Presentation is loading. Please wait.

Presentation is loading. Please wait.

Proof by Contradiction

Similar presentations


Presentation on theme: "Proof by Contradiction"— Presentation transcript:

1 Proof by Contradiction
CS 270 Math Foundations of CS Jeremy Johnson

2 Outline An example Negation Rules Indirect Proofs
Rational numbers and repeating decimals Irrationality of 2 Negation Rules Bottom introduction and elimination Negation introduction and double negation Indirect Proofs Double negation Law of excluded middle DeMorgan’s Laws

3 Decimals and Fractions
3/8 = .375 = .375 8 |3.0 2.4 60 56 40

4 Repeating Decimals 9/11 = 0.81818181 … = 0. 81 .81 11 |9.0 88 020 11 9
7/23 = 𝑥= . 81 100𝑥=81. 81 99𝑥= 81 →𝑥=9/11

5 Repeating Decimals Theorem. A number r is rational iff it has a terminating or repeating decimal expansion Proof If r = a/b perform long division to compute the decimal expansion. At each step divide what is left by b, m = qb + r, 0 ≤ r < b. There are b possible remainders. If r = 0 the expansion is terminating. If r has occurred previously the expansion is repeating. After at most b steps one of these must happen.

6 Repeating Decimals Theorem. A number r is rational iff it has a terminating or repeating decimal expansion Proof Without loss of generality, we can assume 0 < r < 1. If r = .a1…an, then r = a1…an/10n. If r = .b1…bk a1…an , then 10kr - b1…bk = a = . a1…an and (10n-1)a = a1…an and hence a is rational and consequently r is also rational.

7 Decimal Expansion of sqrt(2)
2 is the positive solution of 𝑥 2 −2=0. We can approximate the solution of this equation by repeated bisection

8 Decimal Expansion of sqrt(2)
x0 := 1.0; x1 := 2.0; n := 20; for i from 1 to n do x := (x0+x1)/2; if x^2 > 2 then x1 := x; else x0 := x; end if; end do;

9 Decimal Expansion of sqrt(2)
Does the expansion terminate or repeat? Maybe it doesn’t? How long should I look? Maybe it’s not rational?

10 Proof that sqrt(2) is not Rational
Proof by contradiction. Assume 2 = 𝑎 𝑏 with gcd(a,b)=1. Then 2b2= a2. Since an odd number squared is odd, this implies a=2p is even and 2b2= 4p2 and b2= 2p2 and b is also even. Since a and b are both even gcd(a,b)  1 which is a contradiction Thus we conclude that is not rational.

11 Negation Rules Introduce the symbol (⊥ =bottom) to encode a contradiction Bottom elimination ⊥ can prove anything Bottom introduction ⊥ e.   ⊥ i

12 Negation Rules Introduction and elimination rules (proof by contradiction) Double negation  i    e     e

13 Proof by Contradiction
Negation elimination called proof by contradiction Assume  and derive a a contradiction  PBC

14 ex falso quodlibet Bottom (falsum) introduction (derived rule)
From falsehood, anything Principle of explosion 1 P  P premise 2 X Assumption 3 P e1 1 4 P e2 1 5 ⊥i 3,4 6 X ¬e 2-5

15 Exercise Prove that A  A and A  A

16 Exercise Prove that A  A 1 A premise 2 A Assumption 3 ⊥ ⊥i 1,2 4

17 Exercise Prove that A  A 1 A premise 2 A Assumption 3 ⊥ ⊥i 1,2 4

18 Law of the Excluded Middle
𝑝∨¬𝑝 [derived rule LEM] 1  (p  p) assumption 2 𝑝 Assumption 3 (p  p) ∨i1 3,4 4 ⊥i 3,1 5  p ¬i 2-4 6 p  p ∨i2 3,4 7 ⊥i 6,1 8 ¬e 1-7

19 De Morgan’s Law (P  Q)  P  Q 1 (P  Q) premise 2 𝑃 assumption 3
4 ⊥i 1,3 5 P i 2-4 6 Q 7 i2 6 8 ⊥i 1,7 9 Q i 6-8 10 P  Q i 5,9

20 De Morgan’s Law (P  Q)  P  Q 1 P  Q premise 2 P e1 1 3 Q
4 P  Q assumption 5 P 6 e 2,5 7 Q 8 e 3,7 9 e 4,5-6, 7-8 10 (P  Q) i 4-9

21 Exercise Prove (P  Q)  P  Q

22 Exercise Prove P  Q  (P  Q)


Download ppt "Proof by Contradiction"

Similar presentations


Ads by Google