Proof by Contradiction CS 270 Math Foundations of CS Jeremy Johnson
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
Decimals and Fractions 3/8 = .375 = 375 1000 .375 8 |3.0 2.4 60 56 40
Repeating Decimals 9/11 = 0.81818181 … = 0. 81 .81 11 |9.0 88 020 11 9 7/23 = 0. 3043478260869565217391 𝑥= . 81 100𝑥=81. 81 99𝑥= 81 →𝑥=9/11
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.
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.
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
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; 1.500000000 1.250000000 1.375000000 1.437500000 1.406250000 1.421875000 1.414062500 1.417968750 1.416015625 1.415039062 1.414550781 1.414306640 1.414184570 1.414245605 1.414215088 1.414199829 1.414207458 1.414211273 1.414213180 1.414214134
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?
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 2 is not rational.
Negation Rules Introduce the symbol (⊥ =bottom) to encode a contradiction Bottom elimination ⊥ can prove anything Bottom introduction ⊥ ⊥ e. ⊥ i ⊥
Negation Rules Introduction and elimination rules (proof by contradiction) Double negation … ⊥ i … ⊥ e e
Proof by Contradiction Negation elimination called proof by contradiction Assume and derive a a contradiction … ⊥ PBC
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
Exercise Prove that A A and A A
Exercise Prove that A A 1 A premise 2 A Assumption 3 ⊥ ⊥i 1,2 4
Exercise Prove that A A 1 A premise 2 A Assumption 3 ⊥ ⊥i 1,2 4
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
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
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
Exercise Prove (P Q) P Q
Exercise Prove P Q (P Q)