The document provides examples and explanations of propositional logic and predicate logic concepts such as:
- Representing class membership using predicates like MAN(Socrates) rather than propositions.
- Converting statements to clause form by flattening them and separating out quantifiers to allow for resolution.
- The resolution procedure for determining logical consequences by resolving clauses together with substitutions.
- The need to check for variable occurrences to avoid non-terminating substitutions when resolving clauses.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
51 views0 pages
Some Simple Facts in Propositional Logic
The document provides examples and explanations of propositional logic and predicate logic concepts such as:
- Representing class membership using predicates like MAN(Socrates) rather than propositions.
- Converting statements to clause form by flattening them and separating out quantifiers to allow for resolution.
- The resolution procedure for determining logical consequences by resolving clauses together with substitutions.
- The need to check for variable occurrences to avoid non-terminating substitutions when resolving clauses.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 0
100
Some Simple Facts in
Propositional Logic 101 Socrates is a man. SOCRATESMAN Plato is a man. PLATOMAN Better representations : MAN(SOCRATES) MAN(PLATO) All men are mortal. MORTALMAN Better representation : Limitations of Propositional Logic 102 A Predicate Logic Example 1. Marcus was a man. 2. Marcus was a Pompeian. 3. All Pompeian were Romans. 4. Caesar was a ruler. 5. All Romans were either loyal to Caesar or hated him. 6. Everyone is loyal to someone. 7. People only try to assassinate rulers they are not loyal to. 8. Marcus tried to assassinate Caesar. 103 A Predicate Logic Example 104 An Attempt to Prove 105 Three Ways of Representing Class Membership 106 Overriding Defaults Suppose we add: But now we have a problem with 5: So we need to change it to : 107 Another Predicate Logic Example 1. Marcus was a man. 2. Marcus was a Pompeian. 3. Marcus was born in 40 A.D. 4. All men are mortal. 5. All Pompeians died when the volcano erupted in 79 A.D. 6. No mortal lives longer than 150 years. 7. It is now 1991. 8. Alive means not dead. 108 A Set of Facts about Marcus 109 One Way of Proving That Marcus Is Dead 110 Another Way of Proving That Marcus Is Dead 111 Conversion to Clause Form Problem : Solution : Flatten Separate out Quantifiers Conjunctive Normal Form : Clause Form : Conjunctive Normal Form No instances of 112 Algorithm : Convert to Clause Form 113 Examples of Conversion to Clause Form Example : 1 Eliminate 2 Reduce scope of 3 Standardize Variables. 114 Examples of Conversion to Clause Form 4 Move quantifiers. 5 Eliminate existential quantifiers. will be converted to while will be converted to 6 Drop the prefix. 7 Convert to a conjunction of disjuncts. 115 Examples of Conversion to Clause Form The Formula becomes and then becomes 116 The Basis of Resolution Given : becomes 117 Herbrands Theorem Toshowthatasetof clausesSisunsatisfiable, itisnecessarytoconsider onlyinterpretationsoveraparticularset, calledtheHerbranduniverseof S. Aset of clausesSisunsatisfiableif andonlyif afinitesubset of ground instances(inwhichall boundvariableshavehadavaluesubstitutedfor them)ofSisunsatisfiable. 118 Algorithm : Propositional Resolution 1. Convert all thepropositionsof Ftoclauseform. 2. Negate P and convert the result to clause form. Add it to the set of clauses obtainedinstep1. 3. Repeat until either acontradictionisfoundor noprogresscanbemade: (a) Select twoclauses. Call thesetheparent clauses. (b) Resolve them together. The resulting clause, called the resolvent, will be the disjunction of all of the literals of both of the parent clauses with the following exception: If thereareanypairsof literalsLandLsuchthat oneof theparent clauses contains L and the other contains L, then select one such pair and eliminate both L andLfromtheresolvent. (c) If the resolvent is the empty clause, then a contradiction has been found. If it is not, thenaddit totheset of clausesavailabletotheprocedure. 119 A Few Facts in Propositional Logic 120 Resolution in Propositional Logic 121 Unification 122 Finding General Substitutions Given : We could produce : 123 Algorithm : Unify (L1, L2) 1. If L1 or L2 are both variables or constants, then: (a) If L1 and L2 are identical, then return NIL. (b) Else if L1 is a variable, then if L1 occurs in L2 then return {FAIL}, else return (L2/L1). (c) Else if L2 is a variable then if L2 occurs in L1 then return {FAIL}, else return (L1/L2). (d) Else return {FAIL}. 2. If the initial predicate symbols in L1 and L2 are not identical, then return {FAIL). 3. If LI and L2 have a different number of arguments, then return {FAIL}. 4. Set SUBST to NIL. 5. For i 1 to number of arguments in L1: (a) Call Unify with the /th argument of L1 and the ith argument of L2, putting result in S. (b) If S contains FAIL then return {FAIL}. (c) If S is not equal to NIL then: (i) Apply S to the remainder of both L1 and L2. (ii) SUBST : =APPEND(S, SUBST). 6. Return SUBST. 124 Why Do the Occur Check? Example : 125 Resolution in Predicate Logic Example : Yield the substitution : Marcus/x 1 So it does not yield the resolvent : mortal/x 1 It does yield : mortal(Marcus) 126 Algorithm : Resolution 1. Convert all thestatementsof Ftoclauseform. 2. Negate P and convert the result to clause form. Add it to the set of clauses obtained in1. 3. Repeat until either a contradiction is found, no progress can be made, or a predeterminedamount of effort hasbeenexpended. (a) Select twoclauses. Call thesetheparent clauses. (b) Resolvethemtogether. Theresolvent will bethedisjunctionof all theliteralsof 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 T2 and the other contains T1 and if T1 and T2 are unifiable, then neither T1nor T2should appear in the resolvent. If there is more than one pair of complimentaryliterals, onlyonepair sholdbeomittedfromtheresolvent. (c) If theresolvent istheemptyclause, thenacontradictionhasbeenfound. If it isnot, thenaddit totheset of clausesavailabletotheprocedure. 127 A Resolution Proof 128 An Unsuccessful Attempt at Resolution 129 The Need to Standardize Variables 130 Using Resolution with Equality and Reduce 131 Trying Several Substitutions 132 Answers Extraction Using Resolution 133 The Need to Change Representations What happened in 79 A.D.? But we have erupted(volcano, 79) 134 Unification Examples 135 Resolution Example John likes all kind of food. Apples are food. Chicken is food. Anything anyone eats and isnt killed by is food. Bill eats peanuts and is still alive. Sue eats everything Bill eats. 136 Resolution Example The members of the Elm St. Bridge Club are Joe, Sally, Bill and Ellen. Joe is married to Sally. Bill is Ellens brother. The spouse of every married person in the club is also in the club. The last meeting of the club was at Joes house. 137 Resolution Example Steve only likes easy courses. Science courses are hard. All the courses in the basket weaving department are easy. BK301 is a basket weaving course. 138 Order of Substitutions 139 A Problem Given : Prove : Whats wrong with : 140 The Need for the Occur Check Unify: