Lecture 1.3: Predicate Logic CS 250, Discrete Structures, Fall 2015 Nitesh Saxena Adopted from previous lectures by Cinda Heeren
Lecture 1.3 - Predicate Logic Course Admin Slides from last lectures all online Both ppt and pdf Any questions? 9/14/2019 Lecture 1.3 - Predicate Logic
Lecture 1.3 - Predicate Logic Outline Predicate Logic (contd.) 9/14/2019 Lecture 1.3 - Predicate Logic
Quantifiers – another way to look at them To simplify, let us say that the universe of discourse is {x1, x2 } x P(x) P(x1) P(x2) x P(x) P(x1) P(x2) This is very useful in proving equivalences involving propositions that use quantifiers Let us see some examples 9/14/2019 Lecture 1.3 - Predicate Logic
Lecture 1.3 - Predicate Logic Laws and Quantifiers Negation or De Morgan’s Law (we saw this last time): x P(x) x P(x) x P(x) x P(x) Distributivity: x (P(x) Q(x)) x P(x) x Q(x) x (P(x) Q(x)) x P(x) x Q(x) Can’t distribute universal quantifier over disjunciton or existential quantifier over conjunction 9/14/2019 Lecture 1.3 - Predicate Logic
Predicates – Free and Bound Variables A variable is bound if it is known or quantified. Otherwise, it is free. Examples: P(x) x is free P(5) x is bound to 5 x P(x) x is bound by quantifier Reminder: in a proposition, all variables must be bound. 9/14/2019 Lecture 1.3 - Predicate Logic
Predicates – Nested Quantifiers To bind many variables, use many quantifiers! Example: P(x,y) = “x > y”; universe of discourse is natural numbers x P(x,y) xy P(x,y) xy P(x,y) x P(x,3) c) True proposition False proposition Not a proposition No clue b) b) b) 9/14/2019 Lecture 1.3 - Predicate Logic
Predicates – Meaning of Nested Quantifiers xy P(x,y) xy P(x,y) xy P(x,y) xy P(x,y) P(x,y) true for all x, y pairs. P(x,y) true for at least one x, y pair. For every value of x we can find a y so that P(x,y) is true. There is at least one x for which P(x,y) is always true. Suppose P(x,y) = “x’s favorite class is y.” 1 and 2 are commutative 3 and 4 are not commutative 9/14/2019 Lecture 1.3 - Predicate Logic
Nested Quantifiers – example N(x,y) = “x is sitting by y” xy N(x,y) xy N(x,y) xy N(x,y) xy N(x,y) False True True False 9/14/2019 Lecture 1.3 - Predicate Logic
Today’s Reading and Next Lecture Rosen 1.5 Again, please start solving the exercises at the end of each chapter section! Please read 1.6 and 1.7 in preparation for the next lecture 9/14/2019 Lecture 1.3 - Predicate Logic