1 / 29

CS2013 Mathematics for Computing Science Adam Wyner University of Aberdeen Computing Science

CS2013 Mathematics for Computing Science Adam Wyner University of Aberdeen Computing Science. Slides adapted from Michael P. Frank ' s course based on the text Discrete Mathematics & Its Applications (5 th Edition) by Kenneth H. Rosen. Proof Replacement & Quantifiers. Topics.

pules
Download Presentation

CS2013 Mathematics for Computing Science Adam Wyner University of Aberdeen Computing Science

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. CS2013Mathematics for Computing ScienceAdam WynerUniversity of AberdeenComputing Science Slides adapted from Michael P. Frank's course based on the textDiscrete Mathematics & Its Applications(5th Edition)by Kenneth H. Rosen

  2. ProofReplacement & Quantifiers

  3. Topics • Equivalences that can be used to replace formulae in proofs • Further examples of Propositional Logic proofs. • Proof rules with quantifiers. Frank / van Deemter / Wyner

  4. Equivalences Equivalence expressions can be substitutedsince they do not change truth. Frank / van Deemter / Wyner

  5. Equivalences Frank / van Deemter / Wyner

  6. A Direct Proof 1. ((A ∨ ¬ B) ∨ C)(D  (E F)) 2. (A ∨ ¬ B)((F G)H) 3. A  ((EF)(FG)) 4. A 5. Show: D  H 6. A ∨ ¬ B 7. (A ∨ ¬ B) ∨ C 8. (D  (E F)) 9. (E F) (F G) 10. D (F G) 11. (F G) H 12. DH Frank / van Deemter / Wyner

  7. A Direct Proof 1. ((A ∨ ¬ B) ∨ C)(D  (E F)) 2. (A ∨ ¬ B)((F G)H) 3. A  ((EF)(FG)) 4. A 5. Show: D  H DD 12 6. A ∨ ¬ B DI 4 7. (A ∨ ¬ B) ∨ C DI 6 8. (D  (E F)) IE 1,7 9. (E F) (F G) IE 3,4 10. D (F G) HS 8,9 11. (F G) H IE 2,6 12. DH HS 10,11 Frank / van Deemter / Wyner

  8. A Conditional Proof 1. (A ∨ B)(C ∧ D) 2. (D ∨ E)F 3. Show: A  F 4. A 5. Show: F 6. A ∨ B 7. C ∧ D 8. D 9. (D ∨ E) 10. F Frank / van Deemter / Wyner

  9. A Conditional Proof 1. (A ∨ B)(C ∧ D) 2. (D ∨ E)F 3. Show: A  F CD 4, 5 4. A Assumption 5. Show: F DD 10 6. A ∨ B DI 4 7. C ∧ D IE 1,6 8. D CE 7 9. (D ∨ E) DI 8 10. F IE 2,9 Frank / van Deemter / Wyner

  10. An Indirect Proof 1. A (B ∧ C) 2. (B ∨ D)E 3. (D ∨ A) 4. Show: E ID 13 5. Assumption 6. IE 2,5 7. Second De Morgan 6 8. CE 7 9. DE 4,8 10. IE 1,9 11. CE 10 12. CE 7 13.ContraI 11,12 Frank / van Deemter / Wyner

  11. An Indirect Proof 1. A (B ∧ C) 2. (B ∨ D)E 3. (D ∨ A) 3. Show: E 4. ¬ E 5. ¬ (B ∨ D) 6. ¬ B ∧¬ D 7. ¬ D 8. A 9. B ∧C 10. B 11. ¬ B 12. B ∧¬ B Frank / van Deemter / Wyner

  12. An Indirect Proof 1. A (B ∧ C) 2. (B ∨ D)E 3. (D ∨ A) 4. Show: E ID 13 5. ¬ E Assumption 6. ¬ (B ∨ D) IE 2,5 7. ¬ B ∧¬ D Second De Morgan 6 8. ¬ D CE 7 9. A DE 4,8 10. B ∧C IE 1,9 11. B CE 10 12. ¬ B CE 7 13. B ∧¬ B ContraI 11,12 Frank / van Deemter / Wyner

  13. A Logical Equivalence Prove: ¬ (p ∨ (¬ p ∧ q)) is equivalent to ¬ p ∧¬ q 1. ¬ (p ∨ (¬ p ∧ q))  .... Frank / van Deemter / Wyner

  14. A Logical Equivalence Prove: ¬ (p ∨ (¬ p ∧ q)) is equivalent to ¬ p ∧¬ q 1. ¬ (p ∨ (¬ p ∧ q))  second De Morgan 2.  first De Morgan 3. double negation 4. second distributive 5. negation 6. commutativity 7. identity law for F Frank / van Deemter / Wyner

  15. A Logical Equivalence Prove: ¬ (p ∨ (¬ p ∧ q)) is equivalent to ¬ p ∧¬ q 1. ¬ (p ∨ (¬ p ∧ q))  ¬ p ∧¬ (¬ p ∧ q) 2.  ¬ p ∧(¬ (¬ p) ∨¬ q) 3. ¬ p ∧(p ∨¬ q) 4. (¬ p ∧ p) ∨ ( ¬ p ∧ ¬ q) 5. F ∨ ( ¬ p ∧ ¬ q) 6. ( ¬ p ∧ ¬ q) ∨ F 7. ( ¬ p ∧ ¬ q) Frank / van Deemter / Wyner

  16. A Logical Equivalence Prove: ¬ (p ∨ (¬ p ∧ q)) is equivalent to ¬ p ∧¬ q 1. ¬ (p ∨ (¬ p ∧ q))  ¬ p ∧¬ (¬ p ∧ q) second De Morgan 2.  ¬ p ∧(¬ (¬ p) ∨¬ q) first De Morgan 3. ¬ p ∧(p ∨¬ q) double negation 4. (¬ p ∧ p) ∨ ( ¬ p ∧ ¬ q)second distributive 5. F ∨ ( ¬ p ∧ ¬ q) negation 6. ( ¬ p ∧ ¬ q) ∨ F commutativity 7. ( ¬ p ∧ ¬ q)identity law for F Frank / van Deemter / Wyner

  17. Universal Instantiation • xP(x)P(o) (substitute any constant o) The same for any other variable than x. Frank / van Deemter / Wyner

  18. Existential Generalization • P(o) xP(x) The same for any other variable than x. Frank / van Deemter / Wyner

  19. Universal Generalisation • P(g) xP(x) • This is not a valid inference of course. But suppose you can prove P(g) without using any information about g ... • ... then the inference to xP(x) is valid! • In other words ... Frank / van Deemter / Wyner

  20. Universal Generalisation • P(g) (for g an arbitrary or general constant)xP(x) • Concretely, your strategy should be to choose a new constant g (i.e., that did not occur in your proof so far) and to prove P(g). Frank / van Deemter / Wyner

  21. Existential Instantiation • xP(x)P(c) (substitute a newconstantc) Once again, the inference is not generally valid, but we can regard it as valid if c is a new constant. Frank / van Deemter / Wyner

  22. Simple Formal Proof in Predicate :ogic • Argument: • “All TAs compose quizzes. Ramesh is a TA. Therefore, Ramesh composes quizzes.” • First, separate the premises from conclusions: • Premise #1: All TAs compose quizzes. • Premise #2: Ramesh is a TA. • Conclusion: Ramesh composes quizzes. Frank / van Deemter / Wyner

  23. Rendering in Logic Render the example in logic notation. • Premise #1: All TAs compose easy quizzes. • Let U.D. = all people • Let T(x) :≡ “x is a TA” • Let E(x) :≡ “x composes quizzes” • Then Premise #1 says: x(T(x)→E(x)) Frank / van Deemter / Wyner

  24. Rendering cont… • Premise #2: Ramesh is a TA. • Let r :≡ Ramesh • Then Premise #2 says: T(r) • And the Conclusion says: E(r) • The argument is correct, because it can be reduced to a sequence of applications of valid inference rules, as follows: Frank / van Deemter / Wyner

  25. Formal Proof UsingNatural Deduction StatementHow obtained • x(T(x) → E(x)) (Premise #1) • T(r) → E(r) (Universal instantiation) • T(r) (Premise #2) • E(r) (MP 2, 3) Frank / van Deemter / Wyner

  26. A very similar proof Can you prove: • x(T(x) → E(x)) and E(r) •  T(r). Frank / van Deemter / Wyner

  27.  in Natural Deduction A very simple example: Theorem: From xF(x) it follows that yF(y) • xF(x) (Premiss) • F(a) (Arbitrary a, Exist. Inst.) 3. yF(y) (Exist. Generalisation) Frank / van Deemter / Wyner

  28. Quantifier Rules ß Frank / van Deemter / Wyner

  29. Longer Quantifier Proof Frank / van Deemter / Wyner

More Related