Section 1 4 Predicate Logic Inference rules for

  • Slides: 7
Download presentation
Section 1. 4 Predicate Logic Inference rules for predicate logic: 1 -7. All inference

Section 1. 4 Predicate Logic Inference rules for predicate logic: 1 -7. All inference rules in propositional logic 8. ( x)P(x) P(t) where t is a variable or a constant (universal instantiation ui) 9. ( x)P(x) P(t) where t is a variable or a constant not previously used in proof sequence (existential instantiation ei) 10. P(x) ( x)P(x) if (a) P(x) has not been deduced from any hypotheses in which x is a free variable, and (b) P(x) has not been deduced by ei from any wff in which x is a free variable (universal generalization ug) 11. P(x) or P(a) ( x)P(x) CS 130 Young (existential generalization eg) 1

e. g. : Q(x, y): x + y = 0, then ( x)( y)Q(x,

e. g. : Q(x, y): x + y = 0, then ( x)( y)Q(x, y): for every integer x there is a negative integer y s. t. x + y = 0 Note that it is not true that ( x)Q(x, t) where t is a particular element in domain, by adding that same integer t to every x will not always produce 0. In general, ( x)( y)Q(x, y) ( x)Q(x, t) CS 130 Young 2

· e. g. Prove ( x)[P(x) Q(x)] ( x)P(x) ( x)Q(x) 1. ( x)[P(x)

· e. g. Prove ( x)[P(x) Q(x)] ( x)P(x) ( x)Q(x) 1. ( x)[P(x) Q(x)] (hypothesis) 2. P(x) Q(x) (ui) 3. P(x) (2, simplification) 4. Q(x) (2, simplification) 5. ( x) P(x) (3, ug) 6. ( x) Q(x) (4, ug) 7. ( x) P(x) ( x) Q(x) (5, 6, conjunction) CS 130 Young 3

( x)[ P(x) Q(x) ] ( x)P(x) ( x)Q(x) e. g. first change it

( x)[ P(x) Q(x) ] ( x)P(x) ( x)Q(x) e. g. first change it to: ( by rewriting implication. ) ( x)[ P(x) Q(x) ] ( [( x)P(x)] ( x)Q(x) ) 1. ( x)[ P(x) Q(x) ] (hypothesis) 2. [ ( x)P(x) ] (hypothesis) 3. ( x)P (x) (2, negation) 4. P (x) (3, ui) 5. P(x) Q(x) (1, ui) 6. Q(x) (4, 5, disj. Syllo) 7. ( x)Q(x) (6, ug) CS 130 Young 4

( x)P(x) ( x)Q(x) ( x)[ P(x) Q(x) ] a. Find an interpretation to

( x)P(x) ( x)Q(x) ( x)[ P(x) Q(x) ] a. Find an interpretation to prove this wff is not valid. Ans: P(x): x is even, Q(x): x is odd b. What’s wrong in the following proof sequence? 1. ( x)P(x) (hypothesis) 2. P(a) (1, ei) 3. ( x)Q(x) (hypothesis) 4. Q(a) (3, ei) ( ** WRONG!! a is a constant previously used ** ) 5. P(a) Q(a) (2, 4 conjunction) 6. ( x)[ P(x) Q(x) ] (5, eg) CS 130 Young 5

note: ( x) (x) ( x)( (x) ) YES BUT won’t work ( x)

note: ( x) (x) ( x)( (x) ) YES BUT won’t work ( x) (x) ( x)( (x) ) e. g. NO ( x) (x): every ball in the bag is red ( x) (x): every ball in the bag is blue Note that (x) excludes (x) ( x)( (x) ) ( x) (x) which is wrong ! CS 130 Young 6

( x) (x) ( x) ( (x) ) YES BUT won’t work ( x)

( x) (x) ( x) ( (x) ) YES BUT won’t work ( x) (x) ( x) ( (x) ) NO e. g. ( x) (x): some ball in the bag is red ( x) (x): some ball in the bag is blue ( x) (x): a red ball and a blue ball but a ball that is red and blue is not true ( x) (x) ( x) ( (x) ) which is wrong ! CS 130 Young 7