100 likes | 113 Views
This lecture covers Predicate Logic Laws, Quantifiers, Bound and Free variables, Nested Quantifiers, and Proposition truths. Useful for proving equivalences and understanding quantifiers. Please read Rosen 1.5 for next lecture preparation.
E N D
Lecture 1.3: Predicate Logic CS 250, Discrete Structures, Fall 2015 Nitesh Saxena Adopted from previous lectures by Cinda Heeren
Course Admin • Slides from last lectures all online • Both ppt and pdf • Any questions? Lecture 1.3 - Predicate Logic
Outline • Predicate Logic (contd.) 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 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 Lecture 1.3 - Predicate Logic
Reminder: in a proposition, all variables must be bound. 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 Lecture 1.3 - Predicate Logic
True proposition • False proposition • Not a proposition • No clue c) b) b) b) 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) Lecture 1.3 - Predicate Logic
P(x,y) true for all x, y pairs. For every value of x we can find a y so that P(x,y) is true. P(x,y) true for at least one x, y pair. There is at least one x for which P(x,y) is always true. 1 and 2 are commutative 3 and 4 are not commutative Suppose P(x,y) = “x’s favorite class is y.” Predicates – Meaning of Nested Quantifiers • xy P(x,y) • xy P(x,y) • xy P(x,y) • xy P(x,y) Lecture 1.3 - Predicate Logic
False True True False 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) 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 Lecture 1.3 - Predicate Logic