Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS1502 Formal Methods in Computer Science

Similar presentations


Presentation on theme: "CS1502 Formal Methods in Computer Science"— Presentation transcript:

1 CS1502 Formal Methods in Computer Science
Lecture Notes 9 Proofs Involving Conditionals

2 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

3 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)

4 In Fitch

5 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)

6  Elimination P  Q … P … Q  Elim

7  Introduction P … Q P  Q  Intro

8 Fitch Festival A B  (AB) (AB)  C C  (AB) BC CD AD A(B A)
AC BD D A  B A A  C BC A  B (CA)  (C B)

9 Fitch Festival ~Q  ~P P  Q ~P v Q P  Q

10

11 Taut Con: resolution step

12 Full Proof

13

14

15

16

17

18

19

20  Introduction P … Q Q … P P  Q  Intro

21  Elimination P  Q … P … Q  Elim


Download ppt "CS1502 Formal Methods in Computer Science"

Similar presentations


Ads by Google