Download
lecture 1 3 predicate logic and rules of inference n.
Skip this Video
Loading SlideShow in 5 Seconds..
Lecture 1.3: Predicate Logic, and Rules of Inference* PowerPoint Presentation
Download Presentation
Lecture 1.3: Predicate Logic, and Rules of Inference*

Lecture 1.3: Predicate Logic, and Rules of Inference*

276 Vues Download Presentation
Télécharger la présentation

Lecture 1.3: Predicate Logic, and Rules of Inference*

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Lecture 1.3: Predicate Logic, and Rules of Inference* CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Cinda Heeren

  2. Course Admin • Slides from last lecture were posted • Both ppt and pdf • Expect HW1 to be coming in a week from now • Competency exam/quiz today (last 15 minutes) • A 15 minute exam testing for some basic math questions • A must take for every student Lecture 1.3 - Predicate Logic, and Rules of Inference

  3. Outline • Predicate Logic (contd.) • Rules of Inference for mathematical proofs Lecture 1.3 - Predicate Logic, and Rules of Inference

  4. 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, and Rules of Inference

  5. 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, and Rules of Inference

  6. 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, and Rules of Inference

  7. 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) • xy P(x,y) • xy P(x,y) • x P(x,3) Lecture 1.3 - Predicate Logic, and Rules of Inference

  8. 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 • xy P(x,y) • xy P(x,y) • xy P(x,y) • xy P(x,y) Lecture 1.3 - Predicate Logic, and Rules of Inference

  9. False True True False Nested Quantifiers – example N(x,y) = “x is sitting by y” • xy N(x,y) • xy N(x,y) • xy N(x,y) • xy N(x,y) Lecture 1.3 - Predicate Logic, and Rules of Inference

  10. How do we know it? Proofs – How do we know? The following statements are true: If I am Mila, then I am a great swimmer. I am Mila. What do we know to be true? I am a great swimmer! Lecture 1.3 - Predicate Logic, and Rules of Inference

  11. Axiom, postulates, hypotheses and previously proven theorems. Rules of inference Proof Proofs – How do we know? A theorem is a statement that can be shown to be true. A proof is the means of doing so. Lecture 1.3 - Predicate Logic, and Rules of Inference

  12. What rule of inference can we use to justify it? Proofs – How do we know? The following statements are true: If I have taken MA 106, then I am allowed to take CS 250 I have taken MA 106 What do we know to be true? I am allowed to take CS 250 Lecture 1.3 - Predicate Logic, and Rules of Inference

  13. p p  q Tautology: (p  (p  q))  q  q Rules of Inference – Modus Ponens I have taken MA 106. If I have taken MA 106, then I am allowed to take CS 250.  I am allowed to take CS 250. Inference Rule: Modus Ponens Lecture 1.3 - Predicate Logic, and Rules of Inference

  14. q p  q Tautology: (q  (p  q))  p  p Rules of Inference – Modus Tollens I am not allowed to take CS 250. If I have taken MA 106 , then I am allowed to take CS 250.  I have not taken MA 106. Inference Rule: Modus Tollens Lecture 1.3 - Predicate Logic, and Rules of Inference

  15. p Tautology: p  (p  q)  p  q Rules of Inference – Addition I am not a great skater.  I am not a great skater or I am tall. Inference Rule: Addition Lecture 1.3 - Predicate Logic, and Rules of Inference

  16. p  q Tautology: (p  q) p  p Rules of Inference – Simplification I am not a great skater and you are sleepy.  you are sleepy. Inference Rule: Simplification Lecture 1.3 - Predicate Logic, and Rules of Inference

  17. p  q q Tautology: ((p  q)  q)  p  p Rules of Inference – Disjunctive Syllogism I am a great eater or I am a great skater. I am not a great skater.  I am a great eater! Inference Rule: Disjunctive Syllogism Lecture 1.3 - Predicate Logic, and Rules of Inference

  18. p  q q  r Tautology: ((p  q)  (q  r))  (p  r)  p  r Rules of Inference – Hypothetical Syllogism If you are an athlete, you are always hungry. If you are always hungry, you have a snickers in your backpack.  If you are an athlete, you have a snickers in your backpack. Inference Rule: Hypothetical Syllogism Lecture 1.3 - Predicate Logic, and Rules of Inference

  19. Addition Modus Tollens Examples Amy is a computer science major.  Amy is a math major or a computer science major. If Ernie is a math major then Ernie is geeky. Ernie is not geeky!  Ernie is not a math major. Lecture 1.3 - Predicate Logic, and Rules of Inference

  20. Today’s Reading and Next Lecture • Rosen 1.5 and 1.6 • 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, and Rules of Inference