Formal Methods in Computer Science CS1502 Proof by Contradiction PowerPoint PPT Presentation

presentation player overlay
1 / 29
About This Presentation
Transcript and Presenter's Notes

Title: Formal Methods in Computer Science CS1502 Proof by Contradiction


1
Formal Methods in Computer ScienceCS1502Proof
by Contradiction
  • Patchrawat Uthaisombut
  • University of Pittsburgh

2
Goals
  • To understand what a contradiction is.
  • 4 new proof rules
  • __ Intro, __ Elim, Intro, Elim
  • To understand the method of proof by
    contradiction. ( Intro)
  • To gain skills in using
  • proof by contradiction by itself and
  • in combination with proof by cases.
  • To develop intuition when to use proof by cases
    and when to use proof by contradiction.
  • Summary of proof rules page 557 in text

3
Negation Elimination ( Elim)
Double negation
  • 3. A
  • A Elim 3

4
Example
  • Let p be an integer.
  • Prove that if p is even, then p2 is even.
  • Easy
  • If p2 is even, then p is even
  • Harder

5
Even(p2) implies Even(p)
  • We know that p2 is even. This is a given fact.
  • Suppose that p is odd. We will show that this
    leads to a contradiction. (Therefore, the
    opposite must be true)
  • Since p is odd, then p 2 k 1 for some integer
    k.
  • Then p2 (2 k 1)(2 k 1) 4 k2 4 k 1.
  • Thus, p2 is odd.
  • But this contradicts to the fact that p2 is
    even.
  • Our earlier assumption that p is odd must be
    false.
  • Thus, the opposite must be true, i.e. p is even.

6
What is a contradiction?
  • What is a logical truth?
  • Tet(a) \/ Tet(a)
  • a a
  • A contradiction is
  • a sentence that is false in any circumstance
  • A /\ A
  • a ! a
  • FrontOf(a,b) /\ FrontOf(b,a)
  • Tet(a) /\ Cube(a) /\ Dodec(a)
  • Symbol __ reads contradiction
  • But lets call it bottom.

7
Bottom Introduction (__ Intro)
  • A
  • A
  • __ __ Intro 3,7

Now that we have __, why is this useful? Can we
use it somehow?
8
  • Suppose we have __ in our proof.Does anything
    follow from it?

?
9
  • Tet(a)
  • Cube(a)
  • Large(c)
  • Is the argument valid?

10
  • Definition An argument is valid if
  • whenever all the premises are true, the
    conclusion is also true.
  • An argument is not valid if
  • there is at least one circumstance such that all
    the premises are true, but the conclusion is
    false.

11
Validity revisited
  • Recall validity vs soundness of arguments
  • Valid doesnt mean the premises are true.
  • Valid In any circumstance, whenever all the
    premises are true, the conclusion is true.
  • Sound Valid and all premises are true.
  • Consider the followings.
  • There is no circumstance in which the premises
    are all true.
  • There is no circumstance in which the premises
    are all true and the conclusion is false.
  • There is no counterexample.
  • Thus, the argument is valid.
  • This is called Vacuously valid.

Tet(a) Cube(a) Large(c)
12
Also works in the body of proof
  • If the premises are inconsistent, the argument
    is always valid.
  • This also works in the body of a proof.
  • If we have a set of inconsistent sentences in our
    proof, we can assert any sentence P whatsoever.
  • We need a proof rule for this.

13
__ Intro and __ Elim
  • __ Intro __ Elim
  • 3. A 3. __
  • 7. A
  • __ __ Intro 3,7 B __ Elim 3

for any sentence B
14
Example
  • Tet(a) /\ Cube(b)
  • Tet(a)
  • Small(d)
  • Tet(a) \/ Cube(b)
  • Tet(a)
  • Dodec(b)
  • Small(d)

15
Why do we care?
  • So, if the premises are inconsistent, the
    argument is always valid.
  • But the argument is always unsound (There is no
    circumstance in which all premises are true.)
  • There are no real situations where the argument
    is applicable. Why do we care about this?

16
Example
  • Tet(a) \/ Cube(b)
  • Tet(a)
  • Dodec(b)
  • Small(d)
  • from earlier
  • Tet(a) \/ Cube(b)
  • Tet(a)
  • Dodec(b)
  • Cube(b)
  • modified

17
First use of __
  • Use __ in subproofs in proof by cases for cases
    that are impossible to happen.
  • Anywhere else?
  • Yes. __ is used in proof by contradiction.
  • How?

18
  • Suppose we know that
  • A /\ B /\ C is true
  • and
  • A /\ B /\ C /\ D is false
  • What can be said about D?

19
  • We begin with the fact that A /\ B /\ C is true.
  • But when we add an assumption that D is true, the
    whole thing becomes inconsistent.
  • Thus, A /\ B /\ C being true implies that D must
    be false (D must be true)

20
Negation Introduction ( Intro)
Proof by contradiction
  • 5. D
  • 9. __
  • D Intro 5-9

(1) Premises and other sentences derived from the
premises.
(2) Added assumption.
(3) A contradiction is derived from (1) AND (2).
(4) We can conclude the opposite of (2).
21
  • Enough background
  • Lets put it to use!!

22
Even(p2) implies Even(p)
  • We know that p2 is even. This is a given fact.
  • Suppose that p is odd. We will show that this
    leads to a contradiction. (Therefore, the
    opposite must be true)
  • Since p is odd, then p 2 k 1 for some integer
    k.
  • Then p2 (2 k 1)(2 k 1) 4 k2 4 k 1.
  • Thus, p2 is odd.
  • But this contradicts to the fact that p2 is
    even.
  • Our earlier assumption that p is odd must be
    false.
  • Thus, the opposite must be true, i.e. p is even.

23
Even(p2) implies Even(p)
  • 01. Even(p2)
  • 02. ---
  • 03. Even(p)
  • 04. ---
  • 05. p 2k1 for some integer k from 03.
  • 06. p2 (2k1)(2k1) 4k2 4k 1 from
    05.
  • 07. Even(p2) from 06.
  • 08. __ __ Intro 01,07.
  • 09. Even(p) Intro 03-08.

24
Even(p2) implies Even(p)
  • 01. Even(p2)
  • 02. ---
  • 03. p2 2g for some integer g
  • 04. p sqrt(2 g)
  • 05. stuck
  • 06.
  • 07. Even(p)

25
  • In the subproof of a proof by contradiction, we
    get an additional assumption to use. This allows
    us to make progress.
  • The goal of the subproof in proof by
    contradiction is __.

26
Example
  • A \/ B
  • A
  • B
  • (A /\ B)
  • A
  • B

27
Exercise
  • Cube(b) \/ Tet(a)
  • Dodec(a)
  • (Cube(b) /\ Large(d))
  • ???
  • What interesting fact can be concluded?
  • Prove it

28
Exercise
  • (B /\ A) \/ C
  • B
  • ???
  • A
  • What non-trivial premise makes the argument
    valid?
  • Prove it.

29
More proofs
(P /\ P)
P \/ P
P \/ Q (P /\ Q)
(P /\ Q) P \/ Q
Write a Comment
User Comments (0)
About PowerShow.com