CS 245 W15 Lecture 5 A. Lubiw, U. Waterloo CS 245 W15 Lecture 5 A. Lubiw, U. Waterloo Example: analyzing and simplifying code Recall if (C1 or not C2) then - definition of tautology, equivalence if (not (C2 and C3)) then - logical identities (e.g. De Morgan’s laws, commutativity) P1 - application to circuits else if (C2 and not C3) then P2 else P3 else P4 CS 245 W15 Lecture 5 A. Lubiw, U. Waterloo CS 245 W15 Lecture 5 A. Lubiw, U. Waterloo CS 245 W15 Lecture 5 A. Lubiw, U. Waterloo CS 245 W15 Lecture 5 A. Lubiw, U. Waterloo CS 245 W15 Lecture 5 A. Lubiw, U. Waterloo CS 245 W15 Lecture 5 A. Lubiw, U. Waterloo Proof Methods Theorem. The proof method of applying logical identites is sound and complete. How do we construct valid proofs? A proof should start from agreed truths, continue using agreed methods. axioms sound: If we can use logical identities to prove a formula α then α is a tautology. inference rules Issues: - soundness - completeness complete: If α is a tautology then we can prove it using logical identities. - algorithms - ease of checking - matches human proofs Note that this is a proof about proofs! In what proof system do we do this proof? CS 245 W15 Lecture 5 A. Lubiw, U. Waterloo CS 245 W15 Lecture 5 A. Lubiw, U. Waterloo Proof Methods How do we construct valid proofs? A proof should start from agreed truths, continue using agreed methods. axioms inference rules Proof Methods for propositional logic - apply logical identities (“transformational proofs”) - axiomatic systems - natural deduction - semantic tableaux Dear Reader: Enclosed is a check for ninety-eight cents. Using your work, I have proven that this equals the amount you requested. - resolution refutation - Davis Putnam - DPLL (Davis Putnam Logeman Loveland) CS 245 W15 Lecture 5 A. Lubiw, U. Waterloo Proof Methods — history Gerhard Gentzen (1909 − 1945) - introduced natural deduction - more natural than e.g. Russell and Whitehead, Principia Mathematica, an attempt to do all mathematics from a set of axioms and inference rules. “My starting point was this: The formalization of logical deduction, especially as it has been developed by Frege, Russell, and Hilbert, is rather far removed from the forms of deduction used in practice in mathematical proofs. Considerable formal advantages are achieved in return. In contrast, I intended first to set up a formal system which comes as close as possible to actual reasoning.” CS 245 W15 Lecture 5 Natural Deduction Recall some proof methods from MATH 135 - direct proof - proof by contradiction - case analysis Natural deduction models these. A. Lubiw, U. Waterloo CS 245 W15 Lecture 5 A. Lubiw, U. Waterloo CS 245 W15 Lecture 5 A. Lubiw, U. Waterloo Notation Rules of Natural Deduction α⊢β means there is a proof (using natural deduction) of β from premise α α1, . . . ,αn ⊢ β means there is a proof (using natural deduction) of β from premises α1, . . . ,αn ⊢β means we can prove β without any premises The symbol ⊢ is called the “turnstile” Note the difference between ⊨ and ⊢ soundness: if α ⊢ β then α ⊨ β completeness: if α ⊨ β then α ⊢ β CS 245 W15 Rules of Natural Deduction Lecture 5 A. Lubiw, U. Waterloo CS 245 W15 Rules of Natural Deduction Lecture 5 A. Lubiw, U. Waterloo CS 245 W15 Lecture 5 A. Lubiw, U. Waterloo CS 245 W15 Lecture 5 A. Lubiw, U. Waterloo CS 245 W15 Lecture 5 A. Lubiw, U. Waterloo CS 245 W15 Lecture 5 A. Lubiw, U. Waterloo What I expect you to know/do: - use logical identities - use natural deduction notation α ⊢ β
© Copyright 2024