Mathematics for Computing COMP SCI 1FC3 McMaster University, Winter 2013 Wolfram Kahl kahl@cas.mcmaster.ca 31 January 2013 Preliminary Slides Plan for Today Textbook Chapter 3: Propositional Calculus Disjunction Conjunction Doing proofs
Theorems A theorem is either an axiom or the conclusion of an inference rule where the premises are theorems or a Boolean expression proved (using the inference rules) equal to an axiom or a previously proved theorem . Such proofs will be presented in the calculational style . Note: “ theorem ” is a syntactic concept − → proofs “ validity ” is a semantic concept − → truth tables For the propositional logic E , theoremhood and validity coincide: All theorems in E are valid: E is sound All valid Boolean expressions are theorems in E : E is complete Disjunction Axioms (3.24) Axiom, Symmetry of ∨ : p ∨ q ≡ q ∨ p (3.25) Axiom, Associativity of ∨ : ( p ∨ q ) ∨ r ≡ p ∨ ( q ∨ r ) (3.26) Axiom, Idempotency of ∨ : p ∨ p ≡ p (3.27) Axiom, Distributivity of ∨ over ≡ : p ∨ ( q ≡ r ) ≡ p ∨ q ≡ p ∨ r p ∨ ¬ p (3.28) Axiom, Excluded Middle :
Disjunction Axioms and Theorems (3.24) Axiom, Symmetry of ∨ : p ∨ q ≡ q ∨ p (3.25) Axiom, Associativity of ∨ : ( p ∨ q ) ∨ r ≡ p ∨ ( q ∨ r ) (3.26) Axiom, Idempotency of ∨ : p ∨ p ≡ p (3.27) Axiom, Distr. of ∨ over ≡ : p ∨ ( q ≡ r ) ≡ p ∨ q ≡ p ∨ r p ∨ ¬ p (3.28) Axiom, Excluded Middle : Theorems: (3.29) Zero of ∨ : p ∨ true ≡ true (3.30) Identity of ∨ : p ∨ false ≡ p (3.31) Distrib. of ∨ over ∨ : p ∨ ( q ∨ r ) ≡ ( p ∨ q ) ∨ ( p ∨ r ) p ∨ q ≡ p ∨ ¬ q ≡ p (3.32) (3.32) Heuristics of Directing Calculations (3.33) Heuristic: To prove P ≡ Q , transform the expression with the most structure (either P or Q ) into the other. Proving (3.29) p ∨ true ≡ true : Proving (3.29) p ∨ true ≡ true : p ∨ true true ? = � Identity of ≡ (3.3) � = � Identity of ≡ (3.3) � p ∨ ( q ≡ q ) p ∨ p ≡ p ∨ p = � Distr. of ∨ over ≡ (3.27) � = � Distr. of ∨ over ≡ (3.27) � p ∨ q ≡ p ∨ q p ∨ ( p ≡ p ) = � Identity of ≡ (3.3) � = � Identity of ≡ (3.3) � p ∨ true true (3.34) Principle: Structure proofs to minimize the number of rabbits pulled out of a hat — make each step seem obvi- ous, based on the structure of the expression and the goal of the manipulation.
The Conjunction Axiom: The “Golden Rule” (3.35) Axiom, Golden rule : p ∧ q ≡ p ≡ q ≡ p ∨ q Can be used as: p ∧ q = ( p ≡ q ≡ p ∨ q ) ( p ≡ q ) = ( p ∧ q ≡ p ∨ q ) . . . Theorems: (3.36) Symmetry of ∧ : p ∧ q ≡ q ∧ p (3.37) Associativity of ∧ : ( p ∧ q ) ∧ r ≡ p ∧ ( q ∧ r ) (3.38) Idempotency of ∧ : p ∧ p ≡ p (3.39) Identity of ∧ : p ∧ true ≡ p (3.40) Zero of ∧ : p ∧ false ≡ false (3.41) Distributivity of ∧ over ∧ : p ∧ ( q ∧ r ) ≡ ( p ∧ q ) ∧ ( p ∧ r ) (3.42) Contradiction : p ∧ ¬ p ≡ false Theorems Relating ∧ and ∨ p ∧ ( p ∨ q ) ≡ (3.43) Absorption : p p ∨ ( p ∧ q ) ≡ p p ∧ ( ¬ p ∨ q ) ≡ p ∧ q (3.44) Absorption : p ∨ ( ¬ p ∧ q ) ≡ p ∨ q (3.45) Distributivity of ∨ over ∧ : p ∨ ( q ∧ r ) ≡ ( p ∨ q ) ∧ ( p ∨ r ) (3.46) Distributivity of ∧ over ∨ : p ∧ ( q ∨ r ) ≡ ( p ∧ q ) ∨ ( p ∧ r ) ¬ ( p ∧ q ) ≡ ¬ p ∨ ¬ q (3.47) De Morgan : ¬ ( p ∨ q ) ≡ ¬ p ∧ ¬ q
Raymond Smullyan posed many puzzles about an island that has two kinds of inhabitants: knights , who always tell the truth, and knaves , who always lie. You encounter two people A and B . What are A and B if A says “We are both knaves.”? 1 A says “At least one of us is a knave.”? 2 A says “If I am a knight, then so is B .”? 3 A says “We are of the same type.”? 4 A says “ B is a knight” and 5 B says “The two of us are opposite types.”? A says “We are both knaves.”? 1 ≡ ≡ ¬ X A says X A V A says ( A V ∧ B V )
Theorems Relating ∧ and ≡ p ∧ q ≡ p ∧ ¬ q ≡ ¬ p (3.48) (3.48) p ∧ ( q ≡ r ) ≡ p ∧ q ≡ p ∧ r ≡ (3.49) p p ∧ ( q ≡ p ) ≡ p ∧ q (3.50) ( p ≡ q ) ∧ ( r ≡ p ) ≡ ( p ≡ q ) ∧ ( r ≡ q ) (3.51) Replacement : Alternative Definitions of ≡ and �≡ (3.52) Definition of ≡ : p ≡ q ≡ ( p ∧ q ) ∨ ( ¬ p ∧ ¬ q ) (3.53) Definition of �≡ : p �≡ q ≡ ( ¬ p ∧ q ) ∨ ( p ∧ ¬ q )
Recommend
More recommend