Resolution http://users.encs.concordia.ca/~c474_4/Resolution_in_FOL.ppt http://users.encs.concordia.ca/~c474_4/ResolutionTheoremProving.ppt.

Slides:



Advertisements
Similar presentations
Resolution Proof System for First Order Logic
Advertisements

Inference Rules Universal Instantiation Existential Generalization
1 A formula in predicate logic An atom is a formula. If F is a formula then (~F) is a formula. If F and G are Formulae then (F /\ G), (F \/ G), (F → G),
Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of.
Introduction to Theorem Proving
Standard Logical Equivalences
Resolution.
AR: clausal logic The step to Resolution. A deeper study: Modus ponens Ground Horn Logic Unification Horn Logic Resolution Clausal Logic Clausal Logic.
First Order Logic Resolution
Inference and Reasoning. Basic Idea Given a set of statements, does a new statement logically follow from this. For example If an animal has wings and.
We have seen that we can use Generalized Modus Ponens (GMP) combined with search to see if a fact is entailed from a Knowledge Base. Unfortunately, there.
For Friday No reading Homework: –Chapter 9, exercise 4 (This is VERY short – do it while you’re running your tests) Make sure you keep variables and constants.
Logic Use mathematical deduction to derive new knowledge.
13 Automated Reasoning 13.0 Introduction to Weak Methods in Theorem Proving 13.1 The General Problem Solver and Difference Tables 13.2 Resolution.
Normal Forms and Resolution in FOL
Chapter 6 Logical Reasoning Xiu-jun GONG (Ph. D) School of Computer Science and Technology, Tianjin University
First-Order Logic ECE457 Applied Artificial Intelligence Spring 2007 Lecture #7.
Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus.
Using Predicate Logic Chapter 5.
Predicate Logic Terms represent specific objects in the world and can be constants, variables or functions. Predicate Symbols refer to a particular relation.
Prolog IV Logic, condensed. 2 Propositional logic Propositional logic consists of: The logical values true and false ( T and F ) Propositions: “Sentences,”
1 Applied Computer Science II Resolution in FOL Luc De Raedt.
Formal Logic Proof Methods Direct Proof / Natural Deduction Conditional Proof (Implication Introduction) Reductio ad Absurdum Resolution Refutation.
CSE (c) S. Tanimoto, 2008 Propositional Logic
1 FOL Resolution based Inferencing Resolution based rules studied earlier can lead to inferences, rules such as modus ponen, unit resolution etc… Other.
1 Automated Reasoning Introduction to Weak Methods in Theorem Proving 13.1The General Problem Solver and Difference Tables 13.2Resolution Theorem.
Inference and Resolution for Problem Solving
3 Logic Translate the following four English sentences to first order logic (FOL). [4p] 1. Anyone passing his history exams and winning the lottery is.
Artificial Intelligence
Propositional logic It represents real-world facts as logical propositions in well formed formulas. It presented as an atomic propositions, and complex.
The Semantic Web – WEEK 8: An automatic Proof technique.. The “Layer Cake” Model – [From Rector & Horrocks Semantic Web cuurse] You are here!
Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of.
UBI517 Expert Systems 1 Lecture 2 Knowledge Representation.
Inference in First-Order logic Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
For Wednesday Read chapter 10 Prolog Handout 4. Exam 1 Monday Take home due at the exam.
UNIVERSITI TENAGA NASIONAL 1 CSNB234 ARTIFICIAL INTELLIGENCE Chapter 3 Propositional Logic & Predicate Logic Chapter 3 Propositional Logic & Predicate.
Conjunctive normal form: any formula of the predicate calculus can be transformed into a conjunctive normal form. Def. A formula is said to be in conjunctive.
1 Chapter 8 Inference and Resolution for Problem Solving.
Tasks Task 41 Solve Exercise 12, Chapter 2.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Logical Representations and Resolution. Boolean Logic Conjunctive normal form Resolution.
1CS3754 Class Notes 14B, John Shieh, Figure 2.5: Further steps in the unification of (parents X (father X) (mother bill)) and (parents bill.
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
KU NLP Resolution Theorem Proving Resolution Theorem Proving q Introduction - Resolution Principle q Producing the Clause Form q
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Automated Reasoning Early AI explored how to automate several reasoning tasks – these were solved by what we might call weak problem solving methods as.
603 Database Systems Senior Lecturer: Laurie Webster II, M.S.S.E.,M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 25 A First Course in Database Systems.
Prolog Conversion to clause form Reference: Artificial Intelligence, by Elaine Rich and Kevin Knight.
Reasoning using First-Order Logic
第 1 6 章 谓词演算中的归结. 2 Outline Unification Predicate-Calculus Resolution Completeness and Soundness Converting Arbitrary wffs to Clause Form Using Resolution.
For Wednesday Finish reading chapter 10 – can skip chapter 8 No written homework.
1 Example: The following knowledge is given :The following knowledge is given : 1. Marcus was a man. 2. Marcus was a Pompeian. 3. All Pompeians were Romans.
CIT 856 – Artificial Intelligence
Resolution Theorem Proving in Predicate Calculus Lecture No 10 By Zahid Anwar.
Conversion to Conjunctive Normal Form. Assertion All Romans who know Marcus either hate Caesar or think than anyone who hates anyone is crazy. All Romans.
Lectures 1,2 Introduction to the course Logics. WHO AM I?
Introduction to Logic for Artificial Intelligence Lecture 2
Resolution in the Propositional Calculus
Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of.
Prolog IV Logic, condensed.
Resolution Theorem Proving
Horn Clauses and Unification
Reasoning with the Propositional Calculus
Reasoning with the Propositional Calculus
Horn Clauses and Unification
CSNB234 ARTIFICIAL INTELLIGENCE
Reasoning with the Propositional Calculus
Reasoning with the Propositional Calculus
RESOLUTION.
Resolution Proof System for First Order Logic
Presentation transcript:

Resolution http://users.encs.concordia.ca/~c474_4/Resolution_in_FOL.ppt http://users.encs.concordia.ca/~c474_4/ResolutionTheoremProving.ppt

Resolution Principle Resolution refutation proves a theorem by negating the statement to be proved and adding this negated goal to the set of axioms that are known to be true. Use the resolution rule of inference to show that this leads to a contradiction. Once the theorem prover shows that the negated goal is inconsistent with the given set of axioms, it follows that the original goal must be consistent.

Resolution Principle Prove that “Fido will die.” from the statements “Fido is a dog.”, “All dogs are animals.” and “All animals will die.” Changing premises to predicates dog(fido) "(x) (dog(X) ® animal(X)) "(Y) (animal(Y) ® die(Y)) Modus Ponens and {fido/X} animal(fido) Modus Ponens and {fido/Y} die(fido)

Resolution Principle Equivalent Reasoning by Resolution Convert predicates to clause form Predicate form Clause form 1. dog(fido) dog(fido) 2. "(x) (dog(X) ® animal(X)) Ødog(X) Ú animal(X) 3. "(Y) (animal(Y) ® die(Y)) Øanimal(Y) Ú die(Y) Negate the conclusion 4. Ødie(fido) Ødie(fido)

Converting to Clause Form Eliminate , using: a  b=  a v b. Reduce the scope of each  to a single term, using:  ( p) = p deMorgan's laws: (a  b) =  a V  b (a V b) =  a   b  x P(x) = x  P(x)  x P(x) = x  P(x) Standardize variables. Move all quantifiers to the left of the formula without changing their relative order. Eliminate existential quantifiers by inserting Skolem functions. Drop the prefix. Convert the expression into a conjunction of disjuncts, using associativity and distributivity. Create a separate clause for each conjunct. Standardize apart the variables in the set of clauses generated in step 8, using the fact that: (x: P(x)  Q(x)) = x: P(x)  x: Q(x)

Skolem Functions in FOL Skolem’s Theorem Every existentially quantified variable can be replaced by a unique Skolem function whose arguments are all the universally quantified variables on which the existential depends, without changing FOL. Examples “Everybody likes something” (x)  (y) [Person(x) & Likes(x,y)] (x) [Person(x) & Likes(x, S1(x))] Where S1(x) = “that which x likes” “Every philosopher writes at least one book” (x) (y)[Philosopher(x) & Book(y)) => Write(x,y)] (x)[(Philosopher(x) & Book(S2(x))) => Write(x,S2(x))]

Examples of Conversion to Clause Form x: [Roman(x)  know(x, Marcus)] [hate(x,Caesar) V (y: z: hate(y,z)  thinkcrazy(x,y))] Eliminate  x: [Roman(x)  know(x, Marcus)] V [hate(x,Caesar) V (y: z: hate(y,z) V thinkcrazy(x,y))] Reduce scope of . x: [ Roman(x) V  know(x, Marcus)] V [hate(x,Caesar) V (y: z: hate(y,z) V thinkcrazy(x,y))] “Standardize” variables: x: P(x) V x: Q(x) converts to x: P(x) V y: Q(y) Move quantifiers. x: y: z: [Roman(x) V  know(x, Marcus)] V [hate(x,Caesar) V (hate(y,z) V thinkcrazy(x,y))]

Examples of Conversion to Clause Form Eliminate existential quantifiers. y: President(y) will be converted to President(S1) x: y: father-of(y,x) will be converted to x: father-of(S2(x),x)) Drop the prefix. [ Roman(x) V  know(x,Marcus)] V [hate(x, Caesar) V ( hate(y,z) V thinkcrazy(x,y))] Convert to a conjunction of disjuncts.  Roman(x) V  know(x,Marcus) V hate(x,Caesar) V  hate(y,z) V thinkcrazy(x,y)

Algorithm: Resolution Convert all the propositions of F to clause form. Negate P and convert the result to clause form. Add it to the set of clauses obtained in 1. Repeat until either a contradiction is found, no progress can be made, or a predetermined amount of effort has been expended. a) Select two clauses. Call these the parent clauses. b) Resolve them together. The resolvent will be the disjunction of all the literals of both parent clauses with appropriate substitutions performed and with the following exception: If there is one pair of literals T1 and  T2 such that one of the parent clauses contains T1 and the other contains  T2 and if T1 and T2 are unifiable, then neither T1 nor  T2 should appear in the resolvent. If there is more than one pair of complementary literals, only one pair should be omitted from the resolvent. c) If the resolvent is the empty clause, then a contradiction has been found. If it is not, then add it to the set of clauses available to the procedure.

Resolution in Propositional Logic 1. a ¬ b Ù c a Ú Øb Ú Øc 2. b b 3. c ¬ d Ù e c Ú Ød Ú Øe 4. e Ú f e Ú f 5. d Ù Ø f d Ø f

Resolution in Propositional Logic Øa a Ú Øb Ú Øc Øb Ú Øc b Øc c Ú Ød Ú Øe e Ú f Ød Ú Øe d f Ú Ød f Øf First, the goal to be proved, a , is negated and added to the clause set. The derivation of indicates that the database of clauses is inconsistent.

Resolution on the predicate calculus A literal and its negation in parent clauses produce a resolvent only if they unify under some substitution s. s Is then applied to the resolvent before adding it to the clause set. C1 = Ødog(X) Ú animal(X) C2 = Øanimal(Y) Ú die(Y) Resolvent : Ødog(Y) Ú die(Y) {Y/X}

Resolution Proof Axioms in clause form: 1. man(marcus) 2. pompeian(marcus) 3.  pompeian(X1) v roman(X1) 4. ruler(caesar) 5.  roman(X2) v loyalto(X2, caesar) v hate(X2, caesar) 6. loyalto(X3, f1(X3)) 7.  man(X4) v  ruler(Y1) v  tryassassinate(X4, Y1) v  loyalto (X4, Y1) 8. tryassassinate(marcus, caesar)

Resolution Proof Prove: hate(marcus, caesar) hate(marcus, caesar) 5 marcus/X2 3 roman(marcus) V loyalto(marcus,caesar) marcus/X1 pompeian(marcus) V loyalto(marcus,caesar) 2 7 loyalto(marcus,caesar) marcus/X4, caesar/Y1 1 man(marcus) V  ruler(caesar) V  tryassassinate(marcus, caesar)  ruler(caesar) V  tryassassinate(marcus, caesar) 4  tryassassinate(marcus, caesar) 8

Resolution Proof “Lucky student” 1. Anyone passing his history exams and winning the lottery is happy "X(pass(X,history) Ù win(X,lottery) ® happy(X)) 2. Anyone who studies or is lucky can pass all his exams. "X"Y(study(X) Ú lucky(X) ® pass(X,Y)) 3. John did not study but he is lucky Østudy(john) Ù lucky(john) 4. Anyone who is lucky wins the lottery. "X(lucky(X) ® win(X,lottery))

Resolution Proof Clause forms of “Lucky student” 1. Øpass(X,history) Ú Øwin(X,lottery) Ú happy(X) 2. Østudy(X) Ú pass(Y,Z) Ølucky(W) Ú pass(W,V) 3. Østudy(john) lucky(john) 4. Ølucky(V) Ú win(V,lottery) 5. Negate the conclusion “John is happy” Øhappy(john)

Resolution Proof “Exciting Life” 1. All people who are not poor and are smart are happy. "X(Øpoor(X) Ù smart(X) ® happy(X)) 2. Those people who read are not stupid. "Y(read(Y) ® smart(Y)) {assume "X(smart(X) º Østupid(X))} 3. John can read and is wealthy. read(john) Ù Øpoor(john) {assume "Y(wealthy(Y) º Øpoor(Y))} 4. Happy people have exciting lives. "Z(Happy(Z) ® exciting(Z)) 5. Negate the conclusion. “Can anyone be found with an exciting life?” $X(exciting(W))

Resolution Proof Clause forms of “exciting life” 1. poor(X) Ú Øsmart(X) Ú happy(X) 2. Øread(Y) Ú smart(Y) 3. read(john) Øpoor(john) 4. Øhappy(Z) Ú exciting(Z) 5. Øexciting(W)

Summary of this lecture In this lecture we have Converting Clause Form Resolution Proof