KU NLP Resolution Theorem Proving1 12.2 Resolution Theorem Proving q 12.2.1 Introduction - Resolution Principle q 12.2.2 Producing the Clause Form q 12.2.3.

Slides:



Advertisements
Similar presentations
Artificial Intelligence 8. The Resolution Method
Advertisements

Resolution Proof System for First Order Logic
Biointelligence Lab School of Computer Sci. & Eng.
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
First-Order Logic (FOL) aka. predicate calculus. First-Order Logic (FOL) Syntax User defines these primitives: – Constant symbols (i.e., the "individuals"
Resolution.
Automated Reasoning Systems For first order Predicate Logic.
1 Logic Logic in general is a subfield of philosophy and its development is credited to ancient Greeks. Symbolic or mathematical logic is used in AI. In.
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.
Resolution
13 Automated Reasoning 13.0 Introduction to Weak Methods in Theorem Proving 13.1 The General Problem Solver and Difference Tables 13.2 Resolution.
Resolution Theorem Proving
Normal Forms and Resolution in FOL
Logic Concepts Lecture Module 11.
F22H1 Logic and Proof Week 7 Clausal Form and Resolution.
Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus.
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.
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9 Spring 2004.
1 Automated Reasoning Introduction to Weak Methods in Theorem Proving 13.1The General Problem Solver and Difference Tables 13.2Resolution Theorem.
Logic in Computer Science Transparency No Chapter 3 Propositional Logic 3.6. Propositional Resolution.
Inference and Resolution for Problem Solving
Knoweldge Representation & Reasoning
Chapter 3 Propositional Logic
Artificial Intelligence
Artificial Intelligence Chapter 14 Resolution in the Propositional Calculus Artificial Intelligence Chapter 14 Resolution in the Propositional Calculus.
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.
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
Proof Systems KB |- Q iff there is a sequence of wffs D1,..., Dn such that Dn is Q and for each Di in the sequence: a) either Di is in KB or b) Di can.
Propositional Resolution Computational LogicLecture 4 Michael Genesereth Spring 2005.
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.
CSE S. Tanimoto Horn Clauses and Unification 1 Horn Clauses and Unification Propositional Logic Clauses Resolution Predicate Logic Horn Clauses.
1CS3754 Class Notes 14B, John Shieh, Figure 2.5: Further steps in the unification of (parents X (father X) (mother bill)) and (parents bill.
Unification Algorithm Input: a finite set Σ of simple expressions Output: a mgu for Σ (if Σ is unifiable) 1. Set k = 0 and  0 = . 2. If Σ  k is a singleton,
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
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.
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.
Knowledge Repn. & Reasoning Lec. #5: First-Order Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2004.
Resolution Theorem Proving in Predicate Calculus Lecture No 10 By Zahid Anwar.
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
Lectures 1,2 Introduction to the course Logics. WHO AM I?
Introduction to Logic for Artificial Intelligence Lecture 2
Resolution in the Propositional Calculus
Propositional Approaches to First-Order Theorem Proving
Logic Use mathematical deduction to derive new knowledge.
Prolog IV Logic, condensed.
Horn Clauses and Unification
Resolution Theorem Proving
Horn Clauses and Unification
Biointelligence Lab School of Computer Sci. & Eng.
Horn Clauses and Unification
RESOLUTION.
Resolution Proof System for First Order Logic
Presentation transcript:

KU NLP Resolution Theorem Proving Resolution Theorem Proving q Introduction - Resolution Principle q Producing the Clause Form q Resolution Proof Procedure q Strategies for Resolution q Answer Extraction

KU NLP Resolution Theorem Proving Resolution Principle(1) q 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. q Use the resolution rule of inference to show that this leads to a contradiction. q 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.

KU NLP Resolution Theorem Proving Resolution Principle(2) q Steps for resolution refutation proofs  Put the premises or axioms into clause form(12.2.2).  Add the negation of what is to be proved, in clause form, to the set of axioms.  Resolve these clauses together, producing new clauses that logically follow from them(12.2.3).  Produce a contradiction by generating the empty clause.  The substitutions used to produce the empty clause are those under which the opposite of the negated goal is true(12.2.5).

KU NLP Resolution Theorem Proving Resolution Principle(3) q 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   (x) (dog(X)  animal(X))  dog(fido)  Modus Ponens and {fido/X}  animal(fido)   (Y) (animal(Y)  die(Y))  Modus Ponens and {fido/Y}  die(fido)

KU NLP Resolution Theorem Proving Resolution Principle(4) q Equivalent Reasoning by Resolution  Convert predicates to clause form Predicate formClause form 1.  (x) (dog(X)  animal(X))  dog(X)  animal(X) 2.  dog(fido)dog(fido) 3.  (Y) (animal(Y)  die(Y))  animal(Y)  die(Y)  Negate the conclusion 4.  die(fido)  die(fido)

KU NLP Resolution Theorem Proving Resolution Principle(4) q Equivalent Reasoning by Resolution(continued) Resolution proof for the “dead dog” problem  dog(X)  animal(X)  animal(Y)  die(Y)  dog(Y)  die(Y) dog(fido) die(fido)  die(fido) {Y/X} {fido/Y}

KU NLP Resolution Theorem Proving Converting to Clause Form(1)  Step 1: Eliminate the logical connectives  and   a  b = (a  b)  (b  a)  a  b =  a  b q Step 2: Reduce the scope of negation   (  a) = a   (a  b) =  a   b   (a  b) =  a   b   (  X) a(X) = (  X)  a(X)   (  X) b(X) = (  X)  b(X)

KU NLP Resolution Theorem Proving Converting to Clause Form(2) q Step 3: Standardize by renaming all variables so that variables bound by different quantifiers have unique names.  (  X) a(X)  (  X) b(X) = (  X) a(X)  (  Y) b(Y) q Step 4: Move all quantifiers to the left to obtain a prenex normal form. q Step 5: Eliminate existential quantifiers by using skolemization.

KU NLP Resolution Theorem Proving Converting to Clause Form(3) q Step 6: Drop all universal quantifiers q Step 7: Convert the expression to the conjunction of disjuncts form  (a  b)  (c  d) = (a  (c  d))  (b  (c  d)) = (a  c)  (a  d)  (b  c)  (b  d) q step 8: Call each conjunct a separate clause q step 9: Standardize the variables apart again. Variables are renamed so that no variable symbol appears in more than one clause. (  X)(a(X)  b(X))=(  X)a(X)  (  Y)b(Y)

KU NLP Resolution Theorem Proving Converting to Clause Form(4) q Skolemization  Skolem constant  (  X)(dog(X)) may be replaced by dog(fido) where the name fido is picked from the domain of definition of X to represent that individual X.  Skolem function  If the predicate has more than one argument and the existentially quantified variable is within the scope of universally quantified variables, the existential variable must be a function of those other variables.  (  X)(  Y)(mother(X,Y))  (  X)mother(X,m(X))  (  X)(  Y)(  Z)(  W)(foo (X,Y,Z,W))  (  X)(  Y)(  W)(foo(X,Y,f(X,Y),w))

KU NLP Resolution Theorem Proving Converting to Clause Form(5) q Example of Converting Clause Form (  X)([a(X)  b(X)]  [c(X,I)  (  Y)((  Z)[C(Y,Z)]  d(X,Y))])  (  X)(e(X))  step 1: (  X)(  [a(X)  b(X)]  [c(X,I)  (  Y)(  (  Z)[c(Y,Z)]  d(X,Y))])  (  x)(e(X))  step 2: (  X)([  a(X)  b(X)]  [c(X,I)  (  Y)((  Z)[  c(Y,Z)]  d(X,Y))])  (  x)(e(X))  step 3: (  X)([  a(X)  b(X)]  [c(X,I)  (  Y)((  Z)[  c(Y,Z)]  d(X,Y))])  (  W)(e(W))  step 4: (  X)(  Y)(  Z)(  W)(  [  a(X)  b(X)]  [c(X,I)  (  c(Y,Z)  d(X,Y))])  (e(W))  step 5: (  X)(  Z)(  W)(  [  a(X)  b(X)]  [c(X,I)  (  c(f(X),Z)  d(X,f(X)))])  (e(W))  step 6: [  a(X)  b(X)]  [c(X,I)  (  c(f(X),Z)  d(X,f(X)))])  e(W)

KU NLP Resolution Theorem Proving Converting to Clause Form(6) q Example of Converting Clause Form(continued)  step 7: [ 가  나 ]  [ 다  ( 라  마 )]  바 = [ 가  나  다  바 ]  [ 가  나  라  마  바 ] [  a(X)  b(X)  c(X,I)  e(W)]  [  a(X)   b(X)  c(f(X),Z)  d(X,f(X))  e(W)]  step 8: (i)  a(X)  b(X)  c(X,I)  e(W) (ii)  a(X)   b(X)  c(f(X),Z)  d(X,f(X))  e(W)  step 9: (i)  a(X)  b(X)  c(X,I)  e(W)  (ii)  a(U)   b(U)  c(f(U),Z)  d(U,f(U))  e(V)

KU NLP Resolution Theorem Proving Binary Resolution Proof Procedure(1) q Binary Resolution Step  For any two clauses C 1 and C 2, if there is a literal L 1 in C 1 that is complementary to a literal L 2 in C 2, then delete L 1 and L 2 from C 1 and C 2 respectively, and construct the disjunction of the remaining clauses. The constructed clause is a resolvent of C 1 and C 2. q Examples of Resolution Step  C 1 =a  b, C 2 =b  c  Complementary literals :  b,b  Resolvent: a  c  C 1 =  a  b  c, C 2 =  b  d  Complementary literals : b,  b  Resolvent :  a  c  d

KU NLP Resolution Theorem Proving Binary Resolution Proof Procedure(2) q Justification of Resolution Step  Theorem  Given two clause C 1 and C 2, a resolvent C of C 1 and C 2 is a logical consequence of C 1 and C 2.  Proof  Let C 1 =L  C 1 ’, C 2 =  L  C 2 ’, and C=C 1 ’  C 2 ’, where C 1 ’ and C 2 ’ are disjunction of literals.  Suppose C 1 and C 2 are true in an interpretation I.  We want to prove that the resolvent C of C 1 and C 2 is also true in I.  Case 1: L is true in I Then since C 2 =  L  C 2 ’ is true in I, C 2 ’ must be true in I, and thus C=C 1 ’  C 2 ’ is true in I.  Case 2: L is false in I Then since C 1 = L  C 1 ’ is true in I, C 1 ’ must be true in I. Thus, C=C 1 ’  C 2 ’ must be true in I.

KU NLP Resolution Theorem Proving Binary Resolution Proof Procedure(3) q Resolution in Propositional Logic 1. a  b  ca  b  c 2. bb 3. c  d  e c   d   e 4. e  f e  f 5. d   fd  f

KU NLP Resolution Theorem Proving Binary Resolution Proof Procedure(4) q Resolution in Propositional Logic (continued)  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.  a a   b  c  b  c b  c c  d  e e  f  d  e d f   d f  f

KU NLP Resolution Theorem Proving Binary Resolution Proof Procedure(5) q Resolution on the predicate calculus  A literal and its negation in parent clauses produce a resolvent only if they unify under some substitution .  Is then applied to the resolvent before adding it to the clause set.  C 1 =  dog(X)  animal(X) C 2 =  animal(Y)  die(Y) Resolvent :  dog(Y)  die(Y) {Y/X}

KU NLP Resolution Theorem Proving Binary Resolution Proof Procedure(6) q “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))

KU NLP Resolution Theorem Proving Binary Resolution Proof Procedure(7) q 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)

KU NLP Resolution Theorem Proving Binary Resolution Proof Procedure(8) q Resolution refutation for the “Lucky Student” problem  pass(X, history)  win(X,lottery)  happy(X) win(U,lottery)  lucky(U) {U/X}  pass(U, history)  happy(U)  lucky(U)  happy(john) {john/U} lucky(john)  pass(john,history)  lucky(join) {}  pass(john,history)  lucky(V)  pass(V,W) {john/V,history/W}  lucky(john) lucky(john) {}

KU NLP Resolution Theorem Proving Binary Resolution Proof Procedure(9) q “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))

KU NLP Resolution Theorem Proving Binary Resolution Proof Procedure(10) q 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)

KU NLP Resolution Theorem Proving Binary Resolution Proof Procedure(11) q Resolution refutation for the “exciting life”  exciting(W)  happy(Z)  exciting(Z) {Z/W}  happy(Z) poor(X)  smart(X)  happy(X) {X/Z} poor(X)  smart(X)  read(Y)  smart(Y) {Y/X}  poor(john) poor(Y)   read(Y) {john/Y}  read(john) read(john) {}

KU NLP Resolution Theorem Proving Binary Resolution Proof Procedure(12) q Another resolution refutation for “exciting life”  happy(Z)  exciting(Z) poor(X)  smart(X)  happy(X) {Z/X}  read(Y)  smart(Y) exciting(Z)  poor(Z)  smart(Z) {Y/Z}  read(Y)  exciting(Y)  poor(Y)  poor(john) {john/Y} read(john)  read(john)  exciting(john) {} exciting(john)  exciting(W) {}

KU NLP Resolution Theorem Proving Strategies for Resolution(1) q Order of clause combination is important  N clauses  N 2 ways of combinations or checking to see whether they can be combined  Search heuristics are very important in resolution proof procedures q Strategies  Breadth-First Strategy  Set of Support Strategy  Unit Preference Strategy  Linear Input Form Strategy

KU NLP Resolution Theorem Proving Strategies for Resolution(2) q Breadth-First Strategy  First round: each clause is compared for resolution with every other clause in the clause space.  Second round: generate the clauses by resolving the clauses produced at the first round with all the original clauses.  Nth round: generate the clauses by resolving all clauses at level n-1 against the elements of the original clause set and all clauses previously produced.  Characteristics  it guarantees finding the shortest solution path because it generates every search state for each level before going any deeper.  It is a complete strategy in that it is guaranteed to find a refutation if one exists.  Figure 12.8 (p. 530)

KU NLP Resolution Theorem Proving Strategies for Resolution(3) q Set of Support Strategy  Specify a subset(T) of a set of input clauses(S) called the set of support such that S-T is satisfiable.  Require that resolvents in each resolution have an ancestor in the set of support(T).  Based on the insight that the negation of what we want to prove true is going to be responsible for causing the clause space to be contradictory.  Forces resolutions between clauses of which at least one is either the negated goal clause or a clause produced by resolutions on the negated goal.  Figure 12.6 (p. 528)

KU NLP Resolution Theorem Proving Strategies for Resolution(4) q Unit Preference Strategy  Try to produce a resultant clause that has fewer literals than the parent clauses.  Resolving with a clause of one literal, called a unit clause, will guarantee that the resolvent is smaller than the largest parent clause.  Figure 12.9 (p. 531)

KU NLP Resolution Theorem Proving Strategies for Resolution(5) q Linear Input Form Strategy  a direct use of the negated goal and the original axioms  Take the negated goal and resolve it with one of the axioms. The result is then resolved with one of the axioms to get another new clause. The new clause is again resolved with one of the axioms.  Try to resolve the most recently obtained clause with the original axioms.

KU NLP Resolution Theorem Proving Answer Extraction from Resolution Refutations(1) q Extract the correct answer by retaining information on the unification substitutions made in the resolution refutation.  Retain the original conclusion that was to be proved.  Introduce each unification made in the resolution process into the conclusion. q Example of answer extraction  Fido goes wherever John goes.  at(john, X)  at(fido, X)  John is at the library.  at(john, library)  Negate the conclusion “Where is Fido?”   at(fido, Z)

KU NLP Resolution Theorem Proving Answer Extraction from Resolution Refutations(2) q Example of answer extraction(continued) at(fido, Z) at(fido, X) at(fido, library)  at(fido, Z)  at(john, X)  at(fido, X)  at(john, X) at(john, library) {X/Z} {library/X}

KU NLP Resolution Theorem Proving Answer Extraction from Resolution Refutations(3) q “Exciting Life” exciting(W) exciting(Z) exciting(X) exciting(Y) exciting(john) {Z/W} {X/Z} {} {john/Y} {Y/X}  exciting(W)  happy(Z)  exciting(Z) {Z/W}  happy(Z) poor(X)  smart(X)  happy(X) {X/Z} poor(X)  smart(X)  read(Y)  smart(Y) {Y/X}  poor(john) poor(Y)   read(Y) {john/Y}  read(john) read(john) {}