Basic proofs method Basic proofs methodd

EndraPratama1 30 views 58 slides Sep 03, 2024
Slide 1
Slide 1 of 58
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58

About This Presentation

Basic proofs method Basic proofs methodd


Slide Content

1
Basic Proof Methods
Rosen 6Rosen 6
thth
ed., §1.5-1.7 ed., §1.5-1.7

2
Nature & Importance of Proofs
•In mathematics, a In mathematics, a proofproof is: is:
–A sequence of statements that form an argument.A sequence of statements that form an argument.
–Must be Must be correctcorrect (well-reasoned, logically valid) and (well-reasoned, logically valid) and
completecomplete (clear, detailed) that rigorously & undeniably (clear, detailed) that rigorously & undeniably
establishes the truth of a mathematical statement.establishes the truth of a mathematical statement.
•Why must the argument be correct & complete?Why must the argument be correct & complete?
–CorrectnessCorrectness prevents us from fooling ourselves. prevents us from fooling ourselves.
–CompletenessCompleteness allows anyone to verify the result. allows anyone to verify the result.

3
Rules of Inference
•Rules of inference are patterns of logically Rules of inference are patterns of logically
valid deductions from hypotheses to valid deductions from hypotheses to
conclusions.conclusions.
•We will review “inference rules” (i.e., We will review “inference rules” (i.e.,
correctcorrect & & fallacious)fallacious), and “proof methods”., and “proof methods”.

4

Visualization of Proofs

Various TheoremsVarious Theorems
The AxiomsThe Axioms
of the Theoryof the Theory
A Particular TheoryA Particular Theory
A proofA proof
Rules Rules
Of Of
InferenceInference

5
Inference Rules - General Form
•Inference RuleInference Rule – –
–Pattern establishing that if we know that a set of Pattern establishing that if we know that a set of
hypotheseshypotheses are all true, then a certain related are all true, then a certain related
conclusion conclusion statement is true. statement is true.
Hypothesis 1Hypothesis 1
Hypothesis 2 … Hypothesis 2 …
 conclusion conclusion ““” means “therefore”” means “therefore”

6
Inference Rules & Implications
•Each logical inference rule corresponds to Each logical inference rule corresponds to
an implication that is a tautology.an implication that is a tautology.
• Hypothesis 1 Hypothesis 1 Inference ruleInference rule
Hypothesis 2 … Hypothesis 2 …
 conclusionconclusion
•Corresponding tautology: Corresponding tautology:
((((Hypoth. 1Hypoth. 1) )  ( (Hypoth. 2Hypoth. 2) )  …) …)  conclusionconclusion

7
Some Inference Rules
• pp Rule of AdditionRule of Addition
 ppq q “It is below freezing now. Therefore, it is either “It is below freezing now. Therefore, it is either
below freezing or raining now.”below freezing or raining now.”
• ppqq Rule of SimplificationRule of Simplification
 pp “It is below freezing and raining now. “It is below freezing and raining now.
Therefore, it is below freezing now.Therefore, it is below freezing now.

8
Some Inference Rules
pp
qq
 ppq q Rule of ConjunctionRule of Conjunction
•““It is below freezing.It is below freezing.
•It is raining now. It is raining now.
•Therefore, it is below freezing and it is raining now.Therefore, it is below freezing and it is raining now.

9
Modus Ponens & Tollens
• pp Rule of Rule of modus ponensmodus ponens
ppqq (a.k.a. (a.k.a. law of detachmentlaw of detachment))
qq “If it is snows today, then we will go skiing” “If it is snows today, then we will go skiing” andand
““It is snowing today” It is snowing today” implyimply
“We will go skiing”“We will go skiing”
• qq
ppqq Rule of Rule of modus tollensmodus tollens
pp
“the mode of
affirming”
“the mode of denying”

10
Syllogism Inference Rules
• ppqq Rule of hypotheticalRule of hypothetical
qqrr syllogismsyllogism
pprr
•p p  qq Rule of disjunctiveRule of disjunctive
pp syllogismsyllogism
 qq

11
Formal Proofs
•A formal proof of a conclusion A formal proof of a conclusion CC, given , given
premises premises pp
11, , pp
22,…,…,,pp
nn consists of a consists of a sequence sequence
of of stepssteps, each of which applies some , each of which applies some
inference rule to premises or to previously-inference rule to premises or to previously-
proven statements (as hypotheses) to yield a proven statements (as hypotheses) to yield a
new true statement (the conclusion).new true statement (the conclusion).
•A proof demonstrates that A proof demonstrates that ifif the premises are the premises are
true, true, thenthen the conclusion is true (i.e., the conclusion is true (i.e., valid valid
argumentargument).).

12
Formal Proof - Example
•Suppose we have the following premises:Suppose we have the following premises:
“It is not sunny and it is cold.”“It is not sunny and it is cold.”
“if it is not sunny, we will not swim”“if it is not sunny, we will not swim”
“If we do not swim, then we will canoe.”“If we do not swim, then we will canoe.”
“If we canoe, then we will be home early.”“If we canoe, then we will be home early.”
•Given these premises, prove the theoremGiven these premises, prove the theorem
“We will be home early”“We will be home early” using inference rules. using inference rules.

13
Proof Example cont.
•Let us adopt the following abbreviations:Let us adopt the following abbreviations:
sunny sunny = = “It is sunny”“It is sunny”; ; cold cold = = “It is cold”“It is cold”; ;
swim swim = = “We will swim”“We will swim”; ; canoe canoe = = “We will “We will
canoe”canoe”; ; early early = = “We will be home early”“We will be home early”..
•Then, the premises can be written as:Then, the premises can be written as:
(1) (1) sunnysunny  coldcold (2) (2) sunnysunny  swimswim
(3) (3) swim swim  canoecanoe (4) (4) canoe canoe  earlyearly

14
Proof Example cont.
StepStep Proved byProved by
1. 1. sunnysunny  coldcold Premise #1.Premise #1.
2. 2. sunnysunny Simplification of 1.Simplification of 1.
3. 3. sunnysunny  swimswim Premise #2.Premise #2.
4. 4. swimswim Modus tollens on 2,3.Modus tollens on 2,3.
5. 5. swimswimcanoecanoe Premise #3.Premise #3.
6. 6. canoecanoe Modus ponens on 4,5.Modus ponens on 4,5.
7. 7. canoecanoeearlyearly Premise #4.Premise #4.
8. 8. earlyearly Modus ponens on 6,7.Modus ponens on 6,7.

15
Common Fallacies
•A A fallacyfallacy is an inference rule or other proof is an inference rule or other proof
method that is not logically valid.method that is not logically valid.
–May yield a false conclusion!May yield a false conclusion!
•Fallacy of Fallacy of affirming the conclusionaffirming the conclusion::
–““ppqq is true, and is true, and qq is true, so is true, so pp must be true.” must be true.”
(No, because (No, because FFTT is true.) is true.)
•Fallacy of Fallacy of denying the hypothesisdenying the hypothesis::
–““ppqq is true, and is true, and pp is false, so is false, so qq must be false.” must be false.”
(No, again because (No, again because FFTT is true.) is true.)

16
Common Fallacies - Examples
“ “If you do every problem in this book, then you If you do every problem in this book, then you
will learn discrete mathematics. You learned will learn discrete mathematics. You learned
discrete mathematics.”discrete mathematics.”
p: “You did every problem in this book”p: “You did every problem in this book”
q: “You learned discrete mathematics”q: “You learned discrete mathematics”
•Fallacy of Fallacy of affirming the conclusionaffirming the conclusion::
ppq and q q and q does not imply does not imply pp
•Fallacy of Fallacy of denying the hypothesisdenying the hypothesis::
ppqq and and  p p does not imply does not imply  qq

17
Inference Rules for Quantifiers
xx PP((xx))
PP((oo)) (substitute (substitute anyany object object oo))
•PP((gg)) (for (for gg a a general general element of u.d.)element of u.d.)
xx PP((xx))
xx PP((xx))
PP((cc)) (substitute a (substitute a newnew constantconstant cc))
•PP((oo) ) (substitute any extant object (substitute any extant object oo) )
xx PP((xx))

18
Example
““Everyone in this discrete math class has taken a course in Everyone in this discrete math class has taken a course in
computer sciencecomputer science” ” andand “ “Marla is a student in this classMarla is a student in this class” ”
implyimply “ “Marla has taken a course in computer scienceMarla has taken a course in computer science””

D(x): “D(x): “x is in discrete math classx is in discrete math class””
C(x): “C(x): “x has taken a course in computer sciencex has taken a course in computer science””
xx (D(x) (D(x)  C(x)) C(x))
D(Marla)D(Marla)
 C(Marla)C(Marla)

19
Example – cont.
StepStep Proved byProved by
1. 1. xx (D(x) (D(x)  C(x)) C(x)) Premise #1.Premise #1.
2. D(Marla) 2. D(Marla)  C(Marla) C(Marla)Univ. instantiation.Univ. instantiation.
3. D(Marla)3. D(Marla) Premise #2.Premise #2.
4. C(Marla)4. C(Marla) Modus ponens on 2,3.Modus ponens on 2,3.

20
Another Example
““A student in this class has not read the bookA student in this class has not read the book” ” andand
““Everyone in this class passed the first examEveryone in this class passed the first exam” ” implyimply
““Someone who passed the first exam has not read the bookSomeone who passed the first exam has not read the book””

C(x): “C(x): “x is in this classx is in this class””
B(x): “B(x): “x has read the bookx has read the book””
P(x): “P(x): “x passed the first examx passed the first exam””
xx(C(x)(C(x)  B(x))B(x))
xx (C(x) (C(x)  P(x)) P(x))
 x(x(P(x)P(x)  B(x))B(x))

21
Another Example – cont.
StepStep Proved byProved by
1. 1. xx(C(x)(C(x)  B(x))B(x)) Premise #1.Premise #1.
2. C(a) 2. C(a)  B(a) B(a) Exist. instantiation.Exist. instantiation.
3. C(a)3. C(a) Simplification on 2.Simplification on 2.
4. 4. xx (C(x) (C(x)  P(x)) P(x)) Premise #2.Premise #2.
5. C(a) 5. C(a)  P(a) P(a) Univ. instantiation.Univ. instantiation.
6. P(a)6. P(a) Modus ponens on 3,5Modus ponens on 3,5
7. 7. B(a) B(a) Simplification on 2
8. P(a)  B(a) B(a) Conjunction on 6,7Conjunction on 6,7
9. 9. x(x(P(x)P(x)  B(x))B(x)) Exist. generalizationExist. generalization

22
More Examples...
•Is this argument correct or incorrect?Is this argument correct or incorrect?
–““All TAs compose easy quizzes. Ramesh is a TA. All TAs compose easy quizzes. Ramesh is a TA.
Therefore, Ramesh composes easy quizzes.”Therefore, Ramesh composes easy quizzes.”
•First, separate the premises from conclusions:First, separate the premises from conclusions:
–Premise #1: All TAs compose easy quizzes.Premise #1: All TAs compose easy quizzes.
–Premise #2: Ramesh is a TA.Premise #2: Ramesh is a TA.
–Conclusion: Ramesh composes easy quizzes.Conclusion: Ramesh composes easy quizzes.

23
Answer
Next, re-render the example in logic notation.Next, re-render the example in logic notation.
•Premise #1: All TAs compose easy quizzes.Premise #1: All TAs compose easy quizzes.
–Let U.D. = all peopleLet U.D. = all people
–Let Let TT((xx) :≡ “) :≡ “xx is a TA” is a TA”
–Let Let EE((xx) :≡ “) :≡ “xx composes easy quizzes” composes easy quizzes”
–Then Premise #1 says: Then Premise #1 says: xx, , TT((xx)→)→EE((xx))

24
Answer cont…
•Premise #2: Ramesh is a TA.Premise #2: Ramesh is a TA.
–Let R :≡ RameshLet R :≡ Ramesh
–Then Premise #2 says: Then Premise #2 says: TT(R)(R)
•Conclusion says: Conclusion says: EE(R)(R)
•The argument is correct, because it can be The argument is correct, because it can be
reduced to a sequence of applications of reduced to a sequence of applications of
valid inference rules, as follows:valid inference rules, as follows:

25
The Proof in Detail
•StatementStatement How obtainedHow obtained
1.1.xx, , TT((xx) → ) → EE((xx)) (Premise #1)(Premise #1)
2.2.TT(Ramesh) → (Ramesh) → EE(Ramesh) (Ramesh) (Universal (Universal
instantiation) instantiation)
3.3.TT(Ramesh)(Ramesh) (Premise #2)(Premise #2)
4.4.EE(Ramesh)(Ramesh)((Modus PonensModus Ponens from from
statements #2 and #3)statements #2 and #3)

26
Another example
•Correct or incorrect?Correct or incorrect? At least one of the 280 At least one of the 280
students in the class is intelligent. Y is a student students in the class is intelligent. Y is a student
of this class. Therefore, Y is intelligent.of this class. Therefore, Y is intelligent.
•First: Separate premises/conclusion,First: Separate premises/conclusion,
& translate to logic:& translate to logic:
–Premises: (1) Premises: (1) xx InClass( InClass(xx) )  Intelligent( Intelligent(xx))
(2) InClass(Y) (2) InClass(Y)
–Conclusion: Intelligent(Y)Conclusion: Intelligent(Y)

27
Answer
•No, the argument is invalid; we can disprove it No, the argument is invalid; we can disprove it
with a counter-example, as follows:with a counter-example, as follows:
•Consider a case where there is only one intelligent Consider a case where there is only one intelligent
student X in the class, and X≠Y.student X in the class, and X≠Y.
–Then the premise Then the premise xx InClass( InClass(xx) )  Intelligent( Intelligent(xx)) is true, is true,
by existential generalization of by existential generalization of
InClass(X) InClass(X)  Intelligent(X) Intelligent(X)
–But the conclusion But the conclusion Intelligent(Y)Intelligent(Y) is false, since X is is false, since X is
the only intelligent student in the class, and Y≠X.the only intelligent student in the class, and Y≠X.
•Therefore, the premises Therefore, the premises do notdo not imply the imply the
conclusion.conclusion.

28
Proof Methods
•Proving Proving ppqq
–DirectDirect proof: Assume proof: Assume pp is true, and prove is true, and prove qq..
–IndirectIndirect proof: Assume proof: Assume qq, and prove , and prove pp..
–TrivialTrivial proof: Prove proof: Prove qq true. true.
–VacuousVacuous proof: Prove proof: Prove pp is true. is true.
•Proving Proving pp
–Proof by Proof by contradiction: contradiction: Prove Prove pp (r (r  r)r)
((r r  rr is a contradiction); therefore is a contradiction); therefore p p must be false.must be false.
•Prove (Prove (aa  bb) )  pp
–Proof by cases: prove (Proof by cases: prove (aa pp) and () and (bb pp).).
•More …More …

29
Direct Proof Example
•Definition:Definition: An integer An integer nn is called is called oddodd iff iff nn=2=2kk+1 +1
for some integer for some integer kk; ; nn is is eveneven iff iff nn=2=2kk for some for some kk..
•Axiom:Axiom: Every integer is either odd or even. Every integer is either odd or even.
•Theorem:Theorem: (For all numbers (For all numbers nn) If ) If nn is an odd is an odd
integer, then integer, then nn
22
is an odd integer. is an odd integer.
•Proof:Proof: If If nn is odd, then is odd, then nn = 2 = 2kk+1 for some integer +1 for some integer
kk. Thus, . Thus, nn
22
= (2 = (2kk+1)+1)
22
= 4 = 4kk
22
+ 4 + 4kk + 1 = 2(2 + 1 = 2(2kk
22
+ 2 + 2kk) )
+ 1. Therefore + 1. Therefore nn
22
is of the form 2 is of the form 2jj + 1 (with + 1 (with jj the the
integer 2integer 2kk
22
+ 2 + 2kk), thus ), thus nn
22
is odd. □ is odd. □

30
Another Example
•Definition:Definition: A real number A real number rr is is rational rational if there if there
exist integers exist integers p p and and q q ≠≠ 0, 0, with no common factors with no common factors
other than 1 (i.e., gcd(other than 1 (i.e., gcd(pp,,qq)=1), such that )=1), such that r=p/q.r=p/q. A A
real number that is not rational is called real number that is not rational is called irrational.irrational.
•Theorem:Theorem: Prove that the sum of two rational Prove that the sum of two rational
numbers is rational.numbers is rational.

31
Indirect Proof
•Proving Proving ppqq
–IndirectIndirect proof: Assume proof: Assume qq, and prove , and prove pp..

32
Indirect Proof Example
•Theorem:Theorem: (For all integers (For all integers nn) )
If 3If 3nn+2 is odd, then +2 is odd, then nn is odd. is odd.
•Proof:Proof: Suppose that the conclusion is false, Suppose that the conclusion is false, i.e.i.e., ,
that that nn is even. Then is even. Then nn=2=2kk for some integer for some integer kk. .
Then 3Then 3nn+2 = 3(2+2 = 3(2kk)+2 = 6)+2 = 6kk+2 = 2(3+2 = 2(3kk+1). Thus +1). Thus
33nn+2 is even, because it equals 2+2 is even, because it equals 2jj for integer for integer jj = =
33kk+1. So 3+1. So 3nn+2 is not odd. We have shown that +2 is not odd. We have shown that
¬(¬(nn is odd)→¬(3 is odd)→¬(3nn+2 is odd), thus its contra-+2 is odd), thus its contra-
positive (3positive (3nn+2 is odd) → (+2 is odd) → (nn is odd) is also true. □ is odd) is also true. □

33
Another Example
•Theorem:Theorem: Prove that if Prove that if n n is an integer and is an integer and
nn
2 2
is odd, then is odd, then n n is odd.is odd.

34
Trivial Proof
•Proving Proving ppqq
–TrivialTrivial proof: Prove proof: Prove qq true. true.

35
Trivial Proof Example
•Theorem:Theorem: (For integers (For integers nn) If ) If nn is the sum is the sum
of two prime numbers, then either of two prime numbers, then either nn is odd is odd
or or nn is even. is even.
•Proof:Proof: AnyAny integer integer nn is either odd or even. is either odd or even.
So the conclusion of the implication is true So the conclusion of the implication is true
regardless of the truth of the hypothesis. regardless of the truth of the hypothesis.
Thus the implication is true trivially. □Thus the implication is true trivially. □

36
Vacuous Proof
•Proving Proving ppqq
–VacuousVacuous proof: Prove proof: Prove pp is true. is true.

37
Vacuous Proof Example
•Theorem:Theorem: (For all (For all nn) If ) If nn is both odd and is both odd and
even, then even, then nn
22
= = nn + + nn..
•Proof: Proof: The statement “The statement “nn is both odd and is both odd and
even” is necessarily false, since no number even” is necessarily false, since no number
can be both odd and even. So, the theorem can be both odd and even. So, the theorem
is vacuously true. □is vacuously true. □

38
Proof by Contradiction
•Proving Proving pp
–Assume Assume pp, and prove that , and prove that pp ( (rr  rr))
–((rr  rr) is a trivial contradiction, equal to ) is a trivial contradiction, equal to FF
–Thus Thus ppFF is true only if is true only if pp==FF

39
Contradiction Proof Example
•Theorem:Theorem: Prove that is irrational. Prove that is irrational.2

40
Another Example
•Prove that the sum of a rational number and Prove that the sum of a rational number and
an irrational number is always irrational.an irrational number is always irrational.
•First, you have to understand exactly what First, you have to understand exactly what
the question is asking you to prove:the question is asking you to prove:
–““For all real numbers For all real numbers xx,,y,y, if if xx is rational and is rational and yy is is
irrational, then irrational, then xx++yy is irrational.” is irrational.”
xx,,yy: Rational(: Rational(xx) )  Irrational( Irrational(yy) → ) →
Irrational(Irrational(xx++yy))

41
Answer
•Next, think back to the definitions of the Next, think back to the definitions of the
terms used in the statement of the theorem:terms used in the statement of the theorem:
 reals reals rr: Rational(: Rational(rr) ↔) ↔
 Integer( Integer(ii) )  Integer( Integer(jj): ): rr = = ii//jj..
 reals reals rr: Irrational(: Irrational(rr) ↔ ¬Rational() ↔ ¬Rational(rr))
•You almost always need the definitions of You almost always need the definitions of
the terms in order to prove the theorem!the terms in order to prove the theorem!
•Next, let’s go through one valid proof:Next, let’s go through one valid proof:

42
What you might write
•Theorem: Theorem:
xx,,yy: Rational(: Rational(xx) )  Irrational( Irrational(yy) Irrational(

) Irrational(

xx++yy))
•Proof:Proof: Let Let xx, , yy be any rational and irrational be any rational and irrational
numbers, respectivelynumbers, respectively. … (universal generalization). … (universal generalization)
•Now, just from this, what do we know about Now, just from this, what do we know about xx and and yy? You ? You
should think back to the definition of rational:should think back to the definition of rational:
•… … Since Since xx is rational, we know (from the very is rational, we know (from the very
definition of rational) that there must be some definition of rational) that there must be some
integers integers ii and and jj such that such that xx = = ii//jj.. So, let So, let ii
xx,,jj
xx be be
such integers such integers ……
•We give them unique names so we can refer to them later.We give them unique names so we can refer to them later.

43
What next?
•What do we know about What do we know about yy? Only that ? Only that yy is is
irrational: ¬irrational: ¬ integers integers ii,,jj: : yy = = ii//jj..
•But, it’s difficult to see how to use a direct proof But, it’s difficult to see how to use a direct proof
in this case. We could try indirect proof also, but in this case. We could try indirect proof also, but
in this case, it is a little simpler to just use proof in this case, it is a little simpler to just use proof
by contradiction (very similar to indirect).by contradiction (very similar to indirect).
•So, what are we trying to show? Just that So, what are we trying to show? Just that xx++yy is is
irrational. That is, ¬irrational. That is, ¬ii,,jj: (: (x x + + yy) = ) = ii//jj..
•What happens if we hypothesize the negation of What happens if we hypothesize the negation of
this statement?this statement?

44
More writing…
•Suppose that Suppose that xx++yy were not irrational. Then were not irrational. Then
xx++yy would be rational, so would be rational, so  integers integers ii,,jj: : xx++yy
= = ii//jj. So, let . So, let ii
ss and and jj
ss be any such integers be any such integers
where where xx++yy = = ii
ss/ / jj
ss..
•Now, with all these things named, we can start Now, with all these things named, we can start
seeing what happens when we put them together.seeing what happens when we put them together.
•So, we have that (So, we have that (ii
xx//jj
xx) + ) + yy = ( = (ii
ss//jj
ss).).
•Observe! We have enough information now that Observe! We have enough information now that
we can conclude something useful about we can conclude something useful about yy, by , by
solving this equation for it.solving this equation for it.

45
Finishing the proof.
•Solving that equation for Solving that equation for yy, we have: , we have:
yy = ( = (ii
ss//jj
ss) – () – (ii
xx//jj
xx))
= ( = (ii
ssjj
xx – – ii
xxjj
ss)/()/(jj
ssjj
xx))
Now, since the numerator and denominator Now, since the numerator and denominator
of this expression are both integers, of this expression are both integers, yy is is
(by definition) rational. This contradicts (by definition) rational. This contradicts
the assumption that the assumption that yy was irrational. was irrational.
Therefore, our hypothesis that Therefore, our hypothesis that xx++yy is is
rational must be false, and so the theorem rational must be false, and so the theorem
is proved.is proved.

46
Proof by Cases
To proveTo prove
we need to provewe need to prove
ExampleExample: Show that : Show that |xy|=|x| |y|, |xy|=|x| |y|, where where x,yx,y are real are real
numbers.numbers.
1 2
( ... )
n
p p p q   
1 2
( ) ( ) ... ( )
n
p q p q p q     

47
Proof of Equivalences
( )p q
To proveTo prove
we need to provewe need to prove
ExampleExample: Prove that : Prove that n n is odd iff is odd iff nn
2 2
is odd.is odd.
p q
( ) ( )p q q p  

48
Equivalence of a group of
propositions
To proveTo prove

we need to provewe need to prove
1 2
[ ... ]
n
p p p  
1 2 2 3 1
[( ) ( ) ...( )]
n
p p p p p p    

49
Example
•Show that the statements below are Show that the statements below are
equivalent:equivalent:
pp
11: : n is evenn is even
pp
22: : n-1 is oddn-1 is odd
pp
33: : nn
22
is even is even

50
Counterexamples
•When we are presented with a statement of When we are presented with a statement of
the form the form xP(x)xP(x) and we believe that it is and we believe that it is
false, then we look for a counterexample.false, then we look for a counterexample.
•ExampleExample
–Is it true that “every positive integer is the sum Is it true that “every positive integer is the sum
of the squares of three integers?”of the squares of three integers?”

51
Proving Existentials
•A proof of a statement of the form A proof of a statement of the form xx PP((xx) )
is called an is called an existence proofexistence proof..
•If the proof demonstrates how to actually If the proof demonstrates how to actually
find or construct a specific element find or construct a specific element aa such such
that that PP((aa) is true, then it is called a ) is true, then it is called a
constructiveconstructive proof. proof.
•Otherwise, it is called a Otherwise, it is called a non-constructive non-constructive
proof.proof.

52
Constructive Existence Proof
•Theorem:Theorem: There exists a positive integer There exists a positive integer nn
that is the sum of two perfect cubes in two that is the sum of two perfect cubes in two
different ways:different ways:
–equal to equal to jj
33
+ + kk
33
and and ll
33
+ + mm
33
where where jj, , kk, , ll, , mm are are
positive integers, and {positive integers, and {jj,,kk} ≠ {} ≠ {ll,,mm}}
•Proof:Proof: Consider Consider nn = 1729, = 1729, jj = 9, = 9, kk = 10, = 10,
ll = 1, = 1, mm = 12. Now just check that the = 12. Now just check that the
equalities hold.equalities hold.

53
Another Constructive
Existence Proof
•Definition: Definition: A composite is an integer which A composite is an integer which
is not prime.is not prime.
•Theorem: Theorem: For any integer For any integer nn>0, there exists >0, there exists
a sequence of a sequence of nn consecutive composite consecutive composite
integers.integers.
•Same statement in predicate logic:Same statement in predicate logic:
nn>0 >0 x x ii (1 (1iinn))((xx++ii is composite) is composite)

54
The proof...
•Given Given nn>0, let >0, let xx = ( = (nn + 1)! + 1. + 1)! + 1.
•Let Let i i  1 and 1 and i i  nn, and consider , and consider xx++ii..
•Note Note xx++ii = ( = (nn + 1)! + ( + 1)! + (ii + 1). + 1).
•Note (Note (ii+1)|(+1)|(nn+1)!, since 2 +1)!, since 2  ii+1 +1  nn+1.+1.
•Also (Also (ii+1)|(+1)|(ii+1). So, (+1). So, (ii+1)|(+1)|(x+ix+i). ).
 x+ix+i is composite. is composite.
 nn x x 11iin n : : xx++ii is composite. Q.E.D. is composite. Q.E.D.

55
Non-constructive Existence Proof
•Theorem:Theorem:
“There are infinitely many prime numbers.”“There are infinitely many prime numbers.”
•Any finite set of numbers must contain a maximal Any finite set of numbers must contain a maximal
element, so we can prove the theorem if we can element, so we can prove the theorem if we can
just show that just show that there is there is nono largest prime number largest prime number..
•i.e.i.e., , show that for any prime number, there is a show that for any prime number, there is a
larger number that is larger number that is alsoalso prime. prime.
•More generally:More generally: For For anyany number, number,  a larger prime. a larger prime.
•Formally: Show Formally: Show nn p>n p>n : : pp is prime. is prime.

56
The proof, using proof by cases...
•Given Given nn>0, prove there is a prime >0, prove there is a prime pp>>nn. .
•Consider Consider x x = = nn!+1. Since !+1. Since xx>1, we know >1, we know
((xx is prime) is prime)((x x is composite).is composite).
•Case 1:Case 1: xx is prime. Obviously is prime. Obviously xx>>nn, so let , so let
pp==xx and we’re done. and we’re done.
•Case 2:Case 2: xx has a prime factor has a prime factor pp. But if . But if ppnn, ,
then then pp mod mod xx = 1. So = 1. So pp>>nn, and we’re done., and we’re done.

57
Limits on Proofs
•Some very simple statements of number Some very simple statements of number
theory haven’t been proved or disproved!theory haven’t been proved or disproved!
–E.g. Goldbach’s conjectureE.g. Goldbach’s conjecture: Every integer : Every integer nn≥2 ≥2
is exactly the average of some two primes.is exactly the average of some two primes.
n≥n≥2 2  primes primes pp,,qq: : nn=(=(pp++qq)/2.)/2.
•There are true statements of number theory There are true statements of number theory
(or any sufficiently powerful system) that (or any sufficiently powerful system) that
can can nevernever be proved (or disproved) (Gödel). be proved (or disproved) (Gödel).

58
Circular Reasoning
•The fallacy of (explicitly or implicitly) assuming The fallacy of (explicitly or implicitly) assuming
the very statement you are trying to prove in the the very statement you are trying to prove in the
course of its proof. Example:course of its proof. Example:
•Prove that an integer Prove that an integer nn is even, if is even, if nn
22
is even. is even.
•Attempted proof: “Assume Attempted proof: “Assume nn
22
is even. Then is even. Then
nn
22
=2=2kk for some integer for some integer kk. Dividing both sides by . Dividing both sides by nn
gives gives n n = (2= (2kk)/)/n n = 2(= 2(kk//nn). So there is an integer ). So there is an integer jj
(namely (namely kk//nn) such that ) such that nn=2=2jj. Therefore . Therefore nn is even.” is even.”
Begs the question: How do
you show that j=k/n=n/2 is an integer,
without first assuming n is even?
Tags