CS1502 Formal Methods in Computer Science Lecture Notes 9 Proofs Involving Conditionals
Methods of Proof Want to prove P Q. Direct Method – assume P deduce Q Indirect Method – assume Q deduce P Proof by contradiction – Assume P and Q deduce a contradiction Proof by Induction – more about this later
Informal Conditional Proof Prove: Tet(a) Tet(c) follows from Tet(a) Tet(b) and Tet(b) Tet(c). Assume Tet(a) is true. Applying modus ponens to the first premise gives us Tet(b). Using modus ponens again, this time with the second premise, gives us Tet(c). So, we have established Tet(c) from our assumption of Tet(a). Thus, Tet(a) Tet(c)
In Fitch
Informal Indirect Proof Prove Even(n*n) Even(n). Proving the contrapositive is easier: ~Even(n) ~Even(n*n) Assume ~Even(n), i.e., Odd(n). Then we can express n as 2m + 1 for some m. But we see that n*n = 2(2m*m + 2m) + 1, showing that n*n is odd. Thus, we have shown ~Even(n) ~Even(n*n)
Elimination P Q … P … Q Elim
Introduction P … Q P Q Intro
Fitch Festival A B (AB) (AB) C C (AB) BC CD AD A(B A) AC BD D A B A A C BC A B (CA) (C B)
Fitch Festival ~Q ~P P Q ~P v Q P Q
Taut Con: resolution step
Full Proof
Introduction P … Q Q … P P Q Intro
Elimination P Q … P … Q Elim