Download presentation
Presentation is loading. Please wait.
Published byCharlotte Chandler Modified over 9 years ago
1
Proof by Contradiction CS 270 Math Foundations of CS Jeremy Johnson
2
Outline
3
Decimals and Fractions
4
Repeating Decimals
5
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
7
Decimal Expansion of sqrt(2)
8
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
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
11
Negation Rules
12
Introduction and elimination rules Double negation e
13
Proof by Contradiction Negation elimination called proof by contradiction Assume and derive a a contradiction
14
Exercise Prove that A A and A A
15
Law of the Excluded Middle 1 (p p) assumption 2Assumption 3 (p p) 4 5 p 6 p p 7 8
16
De Morgan’s Law (P Q) P Q 1 (P Q)(P Q) premise 2assumption 3 P QP Q i1 2 4 5 PP 6Q 7 P QP Q i2 6 8 9 10 P QP Q i 5,9
17
De Morgan’s Law (P Q) P Q 1 P QP Q premise 2 e1 1 3 e2 1 4assumption 5P 6 e 2,5 7Q i2 6 8 e 3,7 9 e 4,5-6, 7-8 10 (P Q)(P Q) i 4-9
18
Exercise Prove (P Q) P Q
19
Exercise Prove P Q (P Q)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.