Proof by Contradiction CS 270 Math Foundations of
Proof by Contradiction CS 270 Math Foundations of CS Jeremy Johnson
Outline
Decimals and Fractions
Repeating Decimals
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
Decimal Expansion of sqrt(2)
Decimal Expansion of sqrt(2) x 0 : = 1. 0; x 1 : = 2. 0; n : = 20; for i from 1 to n do x : = (x 0+x 1)/2; if x^2 > 2 then x 1 : = x; else x 0 : = x; end if; end do; 1. 50000 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) v Does the expansion terminate or repeat? v Maybe it doesn’t? v How long should I look? v Maybe it’s not rational?
Proof that sqrt(2) is not Rational
Negation Rules
Negation Rules • Introduction and elimination rules (proof by contradiction) • Double negation e
Proof by Contradiction • Negation elimination called proof by contradiction Assume and derive a a contradiction
ex falso quodlibet • Bottom (falsum) introduction (derived rule) • From falsehood, anything • Principle of explosion 1 P P 2 premise Assumption 3 P e 1 1 4 P e 2 1 5 6 X
Exercise • Prove that A A and A A
Exercise • Prove that A A 1 A 2 Assumption 3 4 premise A
Exercise • Prove that A A 1 2 3 4 A premise Assumption
Law of the Excluded Middle 1 (p p) 2 3 Assumption (p p) 4 5 p 6 p p 7 8 assumption p p
De Morgan’s Law (P Q) P Q 1 (P Q) 2 3 premise assumption P Q i 1 2 4 5 P 6 Q 7 P Q i 2 6 P Q i 5, 9 8 9 10
De Morgan’s Law (P Q) P Q 1 P Q premise 2 e 1 1 3 e 2 1 4 assumption 5 P e 2, 5 6 7 assumption Q assumption 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)
- Slides: 22