1 / 24

Predicate Logic

Predicate Logic. Lecture 7. Limitations of Prepositional Logic. The prepositional calculus has its limitations that you cannot deal properly with general statements of the form “All men are mortal” You can not derive from the conjunction of this and “Socrates is a man” that

ryo
Download Presentation

Predicate 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. Predicate Logic Lecture 7

  2. Limitations of Prepositional Logic • The prepositional calculus has its limitations that you cannot deal properly with general statements of the form • “All men are mortal” • You can not derive from the conjunction of this and “Socrates is a man” that • “Socrates is mortal”

  3. Limitations • If All men are mortal = P • Socrates is a Man = Q • Socrates is mortal = R • Then (P & Q)  R is not valid • To do this, you need to analyze propositions into predicates and arguments, and deal explicitly with quantification

  4. Expressions of the Form • For all x, x has the property F • For some x, x has the property F • And so on • Predicate Logic provides a formalism for performing this analysis of prepositions and additional methods for reasoning with quantified expressions

  5. Predicate Logic • The term predicate logic derives from the fact that we analyze prepositions into predicate-argument compositions • Thus instead of representing the preposition that an object, a has some property, F by the prepositional constant P; we typically represent it by placing the predicate in front of the thing that it is predicated of; Fa

  6. Representation • A similar relationship applies to the expression of a relationship R between n objects R a1,…,an • A predicate is a function that returns either the value true or false for example • Is_a_bird(x) • Is a function of the variable x, which is true if x is a bird or false otherwise

  7. Power of Predicate Logic • Relations can take any number of arguments for example • Lives(Ali, Islamabad) represents Ali lives in Islamabad • The real power of predicate logic becomes apparent when we wish to represent more general statements such as Bashir gave Marium Everything The translation into predicate logic is • (all x (gave Bashir Marium X)) • I.e For any thing, lets call it x, Bashir gave it to Marium

  8. Quantifiers • The variable x is understood to range over some domain of appropriate objects • The fact that it is governed by the operator “all” signifies that it is universally quantified • The embedded expression, gave(Bashir Marium x) is said to be within the scope of the quantifier “all”

  9. Quantifiers • Contrast this with another kind of quantifier as in Bashir gave Marium something • Translation into predicate logic is • (some x(gave Bashir Marium x)) • I.e there is something, let us call it x such that Bashir gave it to Marium • Here, the variable x still ranges over a domain of appropriate objects but the fact that it is governed by the operator “some” signifies that it is “existentially quantified”

  10. Example • Consider the problem of representing the hopefully obvious fact that • Every father is Male • This can be done using prepositional Logic without writing out a preposition for each father asserting maleness • What makes it difficult to convert the content of this sentence into prepositional logic is that it contains the idea that for each person it is possible to decide if they are a father, and therefore that they are male

  11. Example • This idea of a yes/no decision can be captured as a predicate function or simply a predicate • A predicate is a function that returns either the value true or value false e.g • Is_a_Father(x) • Is a function of the variable x, which is true if x is a father and false otherwise • The statement “All fathers are male can now be represented as” • Is_a_father(x) is_a_male(x) • That is “if x is a father then x is male”

  12. Proof using Unification and Resolution • Proof procedure in predicate logic are similar to those used in prepositional logic • One complication is that it might be necessary to give variables particular values to deduce the conclusion

  13. Example 1 Parent_of(x,y)child_of(y,x) If x is parent of y then y is a child of x 2 Child_of(y,x) AND Male(y) son(y,x) If y is a child of x and is male then y is a son of x 3 Child_of(y,x) AND female(y)Daughter(y,x) If y is a child of x and is female then y is a daughter of x 4 parent_of(Ahmad,Hina) Ahmad is Hina’s parent 5 female(Hina) Hina is female

  14. Example • We can deduce daughter(Hina,Ahmad) by way of the following steps • If we substitute Ahmad for x and Hina for y in 1 and then use Modus Ponens with 4 • Child(Hina,Ahmad) AND female(Hina)daughter(Hina, Ahmad)

  15. Using Resolution • Proof in predicate logic is composed of a variety of processes including modus ponens, chain rule, substitution, matching etc • However we have to take variables into account e.g parent_of(Ahmad, Bilal) AND Not Parent_of(Ahmad, Khurram) can not be resolved • In other words the resolution method has to look inside predicates to discover if they can be resolved

  16. Unification • This substitution of variables to make resolution possible is called Unification and proof in predicate logic can be based on this joint method of Unification and resolution • Let us rework the proof of daughter(Hina,Ahmad)

  17. Convert first to Clausal form 1 Not parent_of(x,y) or child_of(y,x) 2 Not child_of(y,x) or not male(y) or son(y,x) 3 Not child_of(y,x) or Not female(y) or daughter(y,x) 4 parent of (Ahmad,Hina) 5 female (Hina)

  18. Example 7 not child(ahmad,hina) or female (hina) By substituting Ahmad for x and Hina for y in 3 and resolving with 6 8 Not Parent(Ahmad,Hina) or Not Female(Hina) by substituting Ahmad for x and Hina for y in 1 and resolving with 7 9 Not Parent(Ahmad,Hina) by resolving 8 with 5 10 null clause by resolving 9 with 4

  19. Writing facts in Predicate Logic • Marcus was a man

  20. Fact 1 • Man(Marcus) • Doesn’t capture past tense • Marcus was a Pompeian

  21. Fact 2 • Pompeian(Marcus) • All Pompeians were Romans • X:Pompeian(x)Roman(x) • All Romans were either loyal to Caesar or hated him

  22. Fact 3 • Inclusive OR X:Roman(x) loyalto(x,Caesar) V hate(x, Caesar) Exclusive OR X:Roman(x)  [(loyalto(x,Caesar) V hate(x,Caesar)) AND ~(loyalto(x,Caesar) AND hate(x,Caesar))] Everyone is loyal to someone

  23. Fact 4 • X: y: loyalto(x,y) Meaning that for each person their exists someone to whom he or she is loyal, possibly a different someone for everyone Y: x: loyalto(x,y) There exists someone to whom everyone is loyal People only try to assassinate rulers they are not loyal to

  24. Fact 5 X: y: person(x) AND ruler(y) AND tryassassinate(x,y) ~loyalto(x,y)

More Related