CS 1502 Formal Methods in Computer Science Lecture

  • Slides: 21
Download presentation
CS 1502 Formal Methods in Computer Science Lecture Notes 9 Proofs Involving Conditionals

CS 1502 Formal Methods in Computer Science Lecture Notes 9 Proofs Involving Conditionals

Methods of Proof Want to prove P Q. – Direct Method – assume P

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

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

In Fitch

Informal Indirect Proof Prove Even(n*n) Even(n). Proving the contrapositive is easier: ~Even(n) ~Even(n*n) Assume

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 2 m + 1 for some m. But we see that n*n = 2(2 m*m + 2 m) + 1, showing that n*n is odd. Thus, we have shown ~Even(n) ~Even(n*n)

 Elimination P Q … P … Q Elim

Elimination P Q … P … Q Elim

 Introduction P … Q P Q Intro

Introduction P … Q P Q Intro

Fitch Festival A B (A B) A (A B) C C (A B) B

Fitch Festival A B (A B) A (A B) C C (A B) B C C D A (B A) A B A C A B B D D (C A) (C B) C A B A C A B C

Fitch Festival ~Q ~P P Q ~P v Q P Q

Fitch Festival ~Q ~P P Q ~P v Q P Q

Taut Con: resolution step

Taut Con: resolution step

Full Proof

Full Proof

 Introduction P … Q Q … P P Q Intro

Introduction P … Q Q … P P Q Intro

 Elimination P Q … P … Q Elim

Elimination P Q … P … Q Elim