1 / 23

Prepositional Logic

Prepositional Logic. Lecture 5. Logical Equivalence. A stronger form of implication is expressed by the statement B is TRUE if and only if A is TRUE. This is usually written as A  B and is called logical equivalence The double arrow signifies that A  B is the same as AB AND BA

melba
Télécharger la présentation

Prepositional Logic

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Prepositional Logic Lecture 5

  2. Logical Equivalence • A stronger form of implication is expressed by the statement B is TRUE if and only if A is TRUE. This is usually written as A  B and is called logical equivalence The double arrow signifies that A  B is the same as AB AND BA AB = (NOT A OR B) AND (NOT B OR A)

  3. Proof • The proposition that is to be proved Y, is called the conclusion and the propositions that are taken to be TRUE X1, X2, X3,.,XN are called premises In principle all you have to do to prove Y is to use the two rules of inference modus ponens and the chain rule, to deduce new prepositions from the premises until you produce the conclusion Y (A AND B)  ((C AND D) (E AND F)) (E AND F)  (NOT F OR G) A AND B Prove that (C AND D)  NOT (F AND NOT G)

  4. Proof • Using Modus Ponens with 1 and 3 we can deduce (C AND D) (E AND F) Which is a new true preposition not contained in the premises, and using the chain rule with 2 and 4 we can deduce (C AND D) (NOT F OR G) And finally, using DeMorgan’s Law on (NOT F OR G) gives (C AND D)  NOT(F AND NOT G) which is the desired conclusion

  5. Human or Automated • When a human tries to prove something using prepositional logic a variety of vague hunches and inspirations are used to guide the process of deduction • This is clearly going to be a difficult process to automate unless we find or force some sort of regularity on the way the premises are used to deduce the conclusion

  6. Resolution • The use of two rules of inference, modus ponens and the chain rule, is a complicating factor in the automation of proof using prepositional logic. • It is possible to combine modus ponens and the chain rule into a single inference rule –resolution-that also suggests the use of a standard form for all compound prepositions

  7. Resolution As AB can be written as NOT A OR B And the chain rule From AB and BC deduce AC can be written as From NOT A OR B AND NOT B OR C Deduce NOT A OR C And this can be thought of as cancelling the terms B and NOT B This cancellation of terms like B and NOT B between two compound prepositions to produce a third that does not involve B is called resolution

  8. Conjunctive Normal Form • Resolution is an inference rule that would be easy for a computer to use if all the prepositions that constituted the premises were simple prepositions or their negation Ored together • That is each preposition should be something like (A OR B OR NOT C OR D) This can be achieved by using the Conjunctive Normal Form

  9. CNF • It can be proved, using Boolean Algebra, that any compound preposition can be written as the AND of a number of sub prepositions called clauses each one being the OR of a number of terms for example (A OR B) AND (NOT C OR D) AND (E OR NOT F OR G)

  10. Rules that can be used to convert any preposition to CNF 1. Remove equivalences of the form AB by writing them as A  B AND BA 2. Remove implications of the form A B by writing them as NOT A OR B 3. Move NOTs inside brackets using De. Morgan’s Laws e.g Change NOT(A OR B) into (NOT A AND NOT B) 4. Distribute Ors over ANDs e.g change A OR (B AND C) into (A OR B) AND (A OR C)

  11. Example (-P  Q) (P AND (Q OR R)) (--P OR Q) AND (-Q OR –P) (P AND(Q OR R)) -((--P OR Q) AND (-Q OR –P)) OR (P AND(Q OR R)) -(P OR Q) OR –(-Q OR –P) OR (P AND (Q OR R)) (-P AND -Q) OR (Q AND P) OR(P AND (Q OR R)) (-P AND -Q) OR (Q AND P) OR (P AND Q) OR (P AND R)

  12. Logic Normal Forms • Automatic Theorem proving, logic programming and knowledge representation, are often the aims for maximum uniformity and standardization in the the syntax, avoiding the full syntactic variety of prepositional and predicate calculus • The main reason for this is that the more variety there is in the syntax the more inference rules you need. If one can reduce the complexity of the syntax in terms of the number of connectives, the degree of embedding and the significance of order, then corresponding reductions in the complexity of the inference rules are possible.

  13. Normal Forms • Such reductions can also lead to a reduction in the size of the resultant search space • The three main syntactic schemes employed are conjunctive normal form (CNF), full clausal form and the Horn clause • In the three it is customary to reduce the nesting of parenthesis by making AND and OR of variable arity I.e allowing AND and OR to govern any number of operands e.g • (P OR (Q OR R)) = (P OR Q OR R) • (P AND (Q AND R)) = (P AND Q AND R)

  14. CNF An other Example -(p OR Q) (-P AND –Q) (p(qr)) ((P AND S) R) Clausal Form is very similar to CNF, except that the positive and negative literals in each disjunction are grouped together on different side of an arrow and the negation is dropped. Thus

  15. Clausal Form • (-P OR (P OR Q )) AND (-Q OR (P OR Q)) • (-P, P, Q) , (-Q, P, Q) • Will be • PQP • PQQ Atoms on the left hand side of the arrow are implicitly disjoined while on the right hand side are implicitly conjoined

  16. The Horn Clause Subset • The Horn clause subset is just like the full clausal form, except that only one atom (at most) is allowed on the left hand side. • Thus the Horn Clause equivalent of a rule will have the general form PQ1 . . Qn Where Q are implicitly conjoined Write this as P:- Q1,…,Qn and you have the syntax of the PROLOG Programming language

  17. Proof using resolution • Using conjunctive normal form and resolution we have the beginnings of a proof strategy that can be automated. • All we have to do is to convert all the prepositions in the premises to clause form and then apply resolution until we generate the conclusion • There is still the possibility that it could take a long time to generate the conclusion by wild clause generation but if the conclusion can be deduced from the premises then this method will eventually find it

  18. Reduction and Absurdum • There is one slight improvement that we can make to this proof by resolution procedure and that is to use reduction and absurdum • This involves adding the NOT of the conclusion to the premises; that is denying the conclusion and trying to deduce a contradiction.

  19. Null Clause • If you are trying to prove A then add NOT A to the premises • If A can be deduced from the premises then at some point in the resolution we will obtain the clauses A and NOT A and these can be resolved together to produce a clause with nothing in it– the Null Clause

  20. Advantage of Null Clause • The advantage of this method is that if you add the NOT of the conclusion to the premises then no matter how you arrive at the null clause this can be taken as an indication that one of the premises was in fact FALSE, and as the only premise that is, in any doubt is the NOT of the conclusion you can deduce that that is the one that is FALSE. So the conclusion is indeed TRUE.

  21. Proof By Reduction Example • As an Example of Proof by reduction Consider the following: Given A AND B AC BD as Premises Prove C AND D

  22. Solution • The first job is to convert the premises into C.N.F and then into separate clauses. • A AND B Is already in CNF form and gives us 2 separate clauses A, B • AC = NOT A OR C • BD = NOT B OR D • Which gives

  23. Example 1. A 2. B 3. NOT A OR C 4. NOT B OR D (The Second step is to negate the conclusion, convert it into clause form and add it to the premises) 5. NOT C OR NOT D The final step is to resolve clauses together until the null clause is produced 6. NOT C OR NOT B by resolving 5,4 7. NOT A OR NOT B by resolving 6,3 8. NOT A by resolving 7,2 9. NULL by resolving 8,1

More Related