nature & importance of proofs
DESCRIPTION
Bogazici University Department of Computer Engineering C mpE 220 Discrete Mathematics 02. Basic Proof Methods Haluk Bingöl. Nature & Importance of Proofs. - PowerPoint PPT PresentationTRANSCRIPT
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
1/18
Mod
ule
#2
- P
roofs
Bogazici UniversityBogazici UniversityDepartment of Computer EngineeringDepartment of Computer Engineering
CCmpE 220 mpE 220 Discrete Discrete MathematicsMathematics
02. 02. Basic Proof MethodsBasic Proof Methods
Haluk BingölHaluk Bingöl
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
3/53
Mod
ule
#2
- P
roofs
Nature & Importance of Nature & Importance of ProofsProofsIn mathematics, a In mathematics, a proofproof is is a a
correctcorrect (well-reasoned, logically valid) and (well-reasoned, logically valid) and completecomplete (clear, detailed) argument that (clear, detailed) argument that rigorously & undeniably establishes the truth of a rigorously & undeniably establishes the truth of a mathematical statement.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.
In this course (& throughout mathematics), a In this course (& throughout mathematics), a very very high standardhigh standard for correctness and completeness for correctness and completeness of proofs is demanded!!of proofs is demanded!!
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
4/53
Mod
ule
#2
- P
roofs
Overview of Overview of §§1.51.5
Methods of mathematical argument Methods of mathematical argument ((i.e.i.e., proof methods) can be formalized , proof methods) can be formalized in terms of in terms of rules of logical inferencerules of logical inference..
Mathematical Mathematical proofsproofs can themselves be can themselves be represented formally as discrete represented formally as discrete structures.structures.
We will review both We will review both correctcorrect & & fallaciousfallacious inference rules, & several proof inference rules, & several proof methods.methods.
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
5/53
Mod
ule
#2
- P
roofs
ProofProof
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
6/53
Mod
ule
#2
- P
roofs
Applications of ProofsApplications of Proofs
• An exercise in clear communication of An exercise in clear communication of logical arguments in any area of study.logical arguments in any area of study.
• The fundamental activity of The fundamental activity of mathematics is the discovery and mathematics is the discovery and elucidation, through proofs, of elucidation, through proofs, of interesting new theorems.interesting new theorems.
• Theorem-proving has applications in Theorem-proving has applications in program verification, computer security, program verification, computer security, automated reasoning systems, automated reasoning systems, etc.etc.
• Proving a theorem allows us to rely Proving a theorem allows us to rely upon on its correctness even in the upon on its correctness even in the most critical scenarios.most critical scenarios.
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
7/53
Mod
ule
#2
- P
roofs
Proof TerminologyProof Terminology• TheoremTheorem
A statement that has been proven to be A statement that has been proven to be true.true.
• AxiomsAxioms, , postulatespostulates, , hypotheseshypotheses,, premisespremisesAssumptions (often unproven) defining Assumptions (often unproven) defining the structures about which we are the structures about which we are reasoning.reasoning.
• Rules of inferenceRules of inferencePatterns of logically valid deductions from Patterns of logically valid deductions from hypotheses to conclusions. hypotheses to conclusions.
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
8/53
Mod
ule
#2
- P
roofs
More Proof TerminologyMore Proof Terminology• LemmaLemma
A minor theorem used as a stepping-stone to A minor theorem used as a stepping-stone to proving a major theorem.proving a major theorem.
• CorollaryCorollary A minor theorem proved as an easy consequence A minor theorem proved as an easy consequence of a major theorem.of a major theorem.
• ConjectureConjecture A statement whose truth value has not been A statement whose truth value has not been proven. (A conjecture may be widely believed to proven. (A conjecture may be widely believed to be true, regardless.)be true, regardless.)
• TheoryTheory The set of all theorems that can be proven from a The set of all theorems that can be proven from a given set of axioms.given set of axioms.
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
9/53
Mod
ule
#2
- P
roofs
Graphical VisualizationGraphical Visualization
…
Various TheoremsVarious TheoremsThe AxiomsThe Axiomsof the Theoryof the Theory
A Particular TheoryA Particular Theory
A proofA proof
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
10/53
Mod
ule
#2
- P
roofs
InferenceInference
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
11/53
Mod
ule
#2
- P
roofs
Inference Rules - General Inference Rules - General FormFormDef. Def. An An Inference RuleInference Rule is is aa pattern pattern
establishing that if we know that a set of establishing that if we know that a set of antecedentantecedent statements of certain forms are statements of certain forms are all true, then we can validly deduce that a all true, then we can validly deduce that a certain related certain related consequentconsequent statement is statement is true. true.
antecedent 1antecedent 1antecedent 2 antecedent 2 … … antecedent antecedent nn
consequent consequent ““” means “therefore”” means “therefore”
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
12/53
Mod
ule
#2
- P
roofs
Inference Rules & Inference Rules & ImplicationsImplicationsEach valid logical inference rule corresponds Each valid logical inference rule corresponds
to an implication that is a tautology.to an implication that is a tautology.
pp11 Inference ruleInference rule p p22 ... ... Corresponding tautology: Corresponding tautology: p pnn ((pp11 pp22 … … ppnn) ) qq
Remark. Remark. ppq q ¬¬ppqq
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
13/53
Mod
ule
#2
- P
roofs
Some Inference RulesSome Inference Rules
pp Rule of AdditionRule of Addition pp qq
pp qq Rule of SimplificationRule of Simplification pp
pp Rule of ConjunctionRule of Conjunction qq pp qq
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
14/53
Mod
ule
#2
- P
roofs
Modus Ponens & TollensModus Ponens & Tollens
pp Rule of Rule of modus ponensmodus ponensppqq (a.k.a. (a.k.a. law of law of detachmentdetachment))qq (p (p ( p ( p q)) q)) q q
qqppqq Rule of Rule of modus tollensmodus tollens pp ((qq ( (pp qq)) )) pp
“the mode of affirming”
“the mode of denying”
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
15/53
Mod
ule
#2
- P
roofs
Syllogism Inference RulesSyllogism Inference Rules
ppqq Rule of hypotheticalRule of hypothetical qqrr syllogismsyllogismpprr
p p qq Rule of disjunctiveRule of disjunctive pp syllogismsyllogism qq
Aristotle(ca. 384-322 B.C.)
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
16/53
Mod
ule
#2
- P
roofs
Formal ProofsFormal Proofs
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
17/53
Mod
ule
#2
- P
roofs
Formal ProofsFormal Proofs
• A formal proof of a conclusion A formal proof of a conclusion CC, , – given premises given premises pp11, , pp22,…,…,,ppnn
– consists of a sequence of consists of a sequence of stepssteps, each of , each of which applies some inference rule to which applies some inference rule to premises or previously-proven statements premises or previously-proven statements ((antecedentsantecedents) to yield a new true ) to yield a new true statement (the statement (the consequentconsequent).).
• A proof demonstrates that A proof demonstrates that ifif the the premises are true, premises are true, thenthen the conclusion the conclusion is true.is true.
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
18/53
Mod
ule
#2
- P
roofs
Formal Proof Formal Proof
ExampleExample
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.”“We will swim only if it is sunny.”“We will swim only if it is sunny.”“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 using inference rules.rules.
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
19/53
Mod
ule
#2
- P
roofs
Formal Proof Formal Proof
ExampleExample ... ...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 canoe”“We will 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) swim swim sunnysunny(3) (3) swim swim canoecanoe (4) (4) canoe canoe earlyearly
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
20/53
Mod
ule
#2
- P
roofs
Formal Proof Formal Proof
ExampleExample ... ...
StepStep Proved byProved by1. 1. sunnysunny coldcold Premise #1.Premise #1.2. 2. sunnysunny Simplification of 1.Simplification of 1.3. 3. swimswimsunnysunny Premise #2.Premise #2.4. 4. swimswim Modus tollens on 2,3.Modus tollens on 2,3.5. 5. swimswimcanoecanoe Premise #3.Premise #3.6. 6. canoecanoe Modus ponens on 4,5.Modus ponens on 4,5.7. 7. canoecanoeearlyearly Premise #4.Premise #4.8. 8. earlyearly Modus ponens on 6,7.Modus ponens on 6,7.
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
21/53
Mod
ule
#2
- P
roofs
• xx PP((xx))PP((oo)) (substitute (substitute anyany specific object specific 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))
Inference Rules for Inference Rules for QuantifiersQuantifiers
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
22/53
Mod
ule
#2
- P
roofs
Common FallaciesCommon Fallacies
• A A fallacyfallacy is an inference rule or other is an inference rule or other proof method that is not logically valid.proof method that is not logically valid.– A fallacy may yield a false conclusion!A fallacy may yield a false conclusion!
• Fallacy of Fallacy of affirming the conclusionaffirming the conclusion::– ““ppqq is true, and is true, and qq is true, so is true, so pp must be must be
true.” (No, because true.” (No, because FFTT is true.) is true.)
• Fallacy of Fallacy of denying the hypothesisdenying the hypothesis::““ppqq is true, and is true, and pp is false, so is false, so qq must be must be
false.” (No, again because false.” (No, again because FFTT is true.) is true.)
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
23/53
Mod
ule
#2
- P
roofs
Circular ReasoningCircular ReasoningThe fallacy of (explicitly or implicitly) assuming The fallacy of (explicitly or implicitly) assuming
the very statement you are trying to prove in the very statement you are trying to prove in the course of its proof. the course of its proof.
Ex.Ex. Prove that an integer Prove that an integer nn is even, if is even, if nn22 is even. is even.Attempted proof:Attempted proof: “Assume “Assume nn22 is even. is even. Then Then nn22=2=2kk for some integer for some integer kk. Dividing both . Dividing both sides by sides by nn gives gives n n = (2= (2kk)/)/n n = 2(= 2(kk//nn)). So there . So there is an integer is an integer jj (namely (namely kk//nn) such that ) such that nn=2=2jj. . Therefore Therefore nn is even.” is even.”Circular reasoning is used in this proof. Where?Circular reasoning is used in this proof. Where?
Begs the question: How do you show that j=k/n=n/2 is an integer, without first assuming that n is even?
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
24/53
Mod
ule
#2
- P
roofs
A Correct ProofA Correct ProofEx.Ex. Prove that an integer Prove that an integer nn is even, if is even, if nn22 is is even.even.Proof. Proof. We know that We know that nn must be either odd or must be either odd or even. If even. If nn were odd, then were odd, then nn22 would be odd, would be odd, since an odd number times an odd number since an odd number times an odd number is always an odd number. is always an odd number. Since Since nn22 is even, it is not odd, since no even is even, it is not odd, since no even number is also an odd number. Thus, by number is also an odd number. Thus, by modus tollens, modus tollens, nn is not odd either. Thus, by is not odd either. Thus, by disjunctive syllogism, disjunctive syllogism, nn must be even. must be even. ■■
This proof is correct, but not quite complete,since we used several lemmas without provingthem. Can you identify what they are?
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
25/53
Mod
ule
#2
- P
roofs
A More Verbose VersionA More Verbose VersionEx.Ex. Prove that an integer Prove that an integer nn is even, if is even, if nn22 is even. is even.
Proof. Proof. Suppose Suppose nn22 is even is even,, 2|2|nn22
nn2 2 mod 2 = 0. mod 2 = 0. Of course Of course nn mod 2 is either 0 or 1. mod 2 is either 0 or 1. If it’s 1, then If it’s 1, then nn1 (mod 2), so 1 (mod 2), so nn221 (mod 2), 1 (mod 2), [[ththm.m. IIf f aab b (mod(mod m m) and) and c cd d (mod(mod m m) then) then ac acbd bd (mod m(mod m)])] Now Now nn221 (mod 2) implies that 1 (mod 2) implies that nn22 mod 2 = 1. So mod 2 = 1. So by by the hypothetical syllogism rulethe hypothetical syllogism rule, (, (n n mod 2 = 1) mod 2 = 1) implies (implies (nn22 mod 2 = 1). mod 2 = 1). Since Since nn22 mod 2 = 0 mod 2 = 0 1, 1, by by modus tollensmodus tollens , , thenthen nn mod 2 mod 2 1. 1. So So by disjunctive syllogismby disjunctive syllogism nn mod 2 = 0 mod 2 = 0. . 2|2|n n nn is even. is even.
Use
s so
me n
um
ber
theory
we h
aven
’t d
efin
ed
yet.
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
26/53
Mod
ule
#2
- P
roofs
Proof MethodsProof Methods
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
27/53
Mod
ule
#2
- P
roofs
Proof Methods for Proof Methods for ImplicationsImplicationsFor proving implications For proving implications ppqq, we have:, we have:• DirectDirect proof proof:: Assume Assume pp is true, and is true, and
prove prove qq..• IndirectIndirect proof proof:: Assume Assume qq, and prove , and prove pp..• VacuousVacuous proof proof:: Prove Prove pp by itself. by itself.• TrivialTrivial proof proof:: Prove Prove qq by itself. by itself.• Proof by casesProof by cases::
Show Show pp((aa bb), and (), and (aaqq) and () and (bbqq).).
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
28/53
Mod
ule
#2
- P
roofs
Direct Proof ExampleDirect Proof Example
Def.Def. An integer An integer nn is called is called oddodd iff iff nn=2=2kk+1 for some integer +1 for some integer kk; ; nn is is eveneven iff iff nn=2=2kk for some for some kk..
Thm.Thm. Every integer is either odd or even. Every integer is either odd or even.This can be proven from even simpler axioms.This can be proven from even simpler axioms.
Thm.Thm. (For all numbers (For all numbers nn) If ) If nn is an odd integer, then is an odd integer, then nn22 is an odd integer.is an odd integer.
ProofProof.. If If nn is odd, then is odd, then nn = 2 = 2kk+1 for some integer +1 for some integer kk. . Thus, Thus, nn22 = (2 = (2kk+1)+1)22 = 4 = 4kk22 + 4 + 4kk + 1 = 2(2 + 1 = 2(2kk22 + 2 + 2kk) + 1. ) + 1.
Therefore Therefore nn22 is of the form 2 is of the form 2jj + 1 (with + 1 (with jj the integer the integer 22kk22 + 2 + 2kk), thus ), thus nn22 is odd. is odd. □□
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
29/53
Mod
ule
#2
- P
roofs
Indirect Proof ExampleIndirect Proof Example
Thm.Thm. (For all integers (For all integers nn) ) If 3If 3nn+2 is odd, then +2 is odd, then nn is odd. is odd.
ProofProof.. Suppose that the conclusion is false, Suppose that the conclusion is false, i.e.i.e., , that that nn is even. is even. Then 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). +1). Thus 3Thus 3nn+2 is even, because it equals 2+2 is even, because it equals 2jj for for integer integer jj = 3 = 3kk+1. +1. So 3So 3nn+2 is not odd. +2 is not odd. We have shown that We have shown that ¬(¬(nn is odd)→¬(3 is odd)→¬(3nn+2 is odd), +2 is odd),
thus its contra-positive (3thus its contra-positive (3nn+2 is odd) → (+2 is odd) → (nn is odd) is odd) is also true. □is also true. □
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
30/53
Mod
ule
#2
- P
roofs
Vacuous Proof ExampleVacuous Proof Example
Thm.Thm. (For all (For all nn) If ) If nn is both odd and is both odd and even, then even, then nn22 = = nn + + nn..
ProofProof.. The statement “The statement “nn is both odd is both odd and even” is necessarily false, since and even” is necessarily false, since no number can be both odd and no number can be both odd and even. So, the theorem is vacuously even. So, the theorem is vacuously true. true. □□
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
31/53
Mod
ule
#2
- P
roofs
Trivial Proof ExampleTrivial Proof Example
Thm.Thm. (For integers (For integers nn) If ) If nn is the sum of is the sum of two prime numberstwo prime numbers, then either , then either nn is is odd or odd or nn is even. is even.
ProofProof.. AnyAny integer integer nn is either odd or is either odd or even. So the conclusion of the even. So the conclusion of the implication is true regardless of the implication is true regardless of the truth of the antecedent. Thus the truth of the antecedent. Thus the implication is true trivially. □implication is true trivially. □
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
32/53
Mod
ule
#2
- P
roofs
Proof by ContradictionProof by Contradiction
A method for proving A method for proving pp..
Assume Assume pp, and prove both , and prove both qq and and qq for for some proposition some proposition qq. (Can be anything!). (Can be anything!)
Thus Thus pp ( (qq qq))
((qq qq) is a trivial contradiction, equal to ) is a trivial contradiction, equal to FF
Thus Thus ppFF, which is only true if , which is only true if pp==FF
Thus Thus pp is true. is true.
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
33/53
Mod
ule
#2
- P
roofs
Proof by Contradiction Proof by Contradiction ExampleExampleThm.Thm. is irrational. is irrational.
ProofProof.. Assume 2 Assume 21/21/2 were rational. were rational. This means there are integers This means there are integers ii,,jj with no with no common divisors such that 2common divisors such that 21/21/2 = = ii//jj. . Squaring both sides, 2 = Squaring both sides, 2 = ii22//jj22, so 2, so 2jj22 = = ii22. . So So ii22 is even; thus is even; thus ii is even. is even. Let Let ii=2=2kk. So 2. So 2jj22 = (2 = (2kk))22 = 4 = 4kk22. . Dividing both sides by 2, Dividing both sides by 2, jj22 = 2 = 2kk22. . Thus Thus jj22 is even, so is even, so jj is even. is even. But then But then ii and and jj have a common divisor, have a common divisor, namely 2, namely 2, so we have a contradiction. so we have a contradiction. □□
2
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
34/53
Mod
ule
#2
- P
roofs
Review: Proof Methods So Review: Proof Methods So FarFarDirectDirect, , indirectindirect, , vacuousvacuous, and , and trivialtrivial
proofs of statements of the form proofs of statements of the form ppqq..
Proof by contradictionProof by contradiction of any of any statements.statements.
Next: Next: ConstructiveConstructive and and nonconstructivenonconstructive existence proofsexistence proofs..
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
35/53
Mod
ule
#2
- P
roofs
Proving ExistentialsProving 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 If the proof demonstrates how to actually find or construct a specific actually find or construct a specific element element aa such that such that PP((aa) is true, then ) is true, then it is a it is a constructiveconstructive proof. proof.
• Otherwise, it is Otherwise, it is nonconstructivenonconstructive..
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
36/53
Mod
ule
#2
- P
roofs
Constructive Existence ProofConstructive Existence Proof
Thm.Thm. There exists a positive integer There exists a positive integer nn that is the sum of two perfect cubes that is the sum of two perfect cubes in two different ways:in two different ways:equal to equal to jj33 + + kk33 and and ll33 + + mm33 where where jj, , kk, , ll, , mm
are positive integers, and {are positive integers, and {jj,,kk} } ≠ {≠ {ll,,mm}}
ProofProof.. Consider Consider nn = 1729, = 1729, jj = 9, = 9, kk = = 10, 10, ll = 1, = 1, mm = 12. Now just check that = 12. Now just check that the equalities hold.the equalities hold.
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
37/53
Mod
ule
#2
- P
roofs
Another Constructive Another Constructive Existence ProofExistence Proof
Thm.Thm. For any integer For any integer nn>0, there exists a >0, there exists a sequence of sequence of nn consecutive composite consecutive composite integers.integers.
Same statement in predicate logic:Same statement in predicate logic:
Thm.Thm. nn>0 >0 x x ii (1 (1iinn))((xx++ii is is composite)composite)
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
38/53
Mod
ule
#2
- P
roofs
The proof...The proof...
Thm.Thm. nn>0 >0 x x ii (1 (1iinn))((xx++ii is is composite)composite)
Proof.Proof. Given Given nn>0, let >0, let xx = ( = (nn + 1)! + 1. + 1)! + 1.Let Let 11 ii and 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 11iin n : : xx++ii is composite. Q.E.D. is composite. Q.E.D.
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
39/53
Mod
ule
#2
- P
roofs
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
40/53
Mod
ule
#2
- P
roofs
Nonconstructive Existence Nonconstructive Existence ProofProof
Thm.Thm. There are infinitely many prime numbers.There are infinitely many prime numbers.
Any finite set of numbers must contain a Any finite set of numbers must contain a maximal element, so we can prove the maximal element, so we can prove the theorem if we can just show that there is theorem if we can just show that there is nono largest prime number.largest prime number.
ii.e..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: For More generally: For anyany number, number, a larger a larger prime.prime.
Formally: Show Formally: Show nn p>n p>n : : pp is prime. is prime.
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
41/53
Mod
ule
#2
- P
roofs
The proof, using The proof, using proof by proof by casescases......Thm.Thm. Given Given nn>0, there is a prime >0, there is a prime pp>>nn. .
Proof.Proof. 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. is prime. Obviously 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 ppnn, then , then pp mod mod xx = 1. Contradiction. = 1. Contradiction.So So pp>>nn, and we’re done., and we’re done.
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
42/53
Mod
ule
#2
- P
roofs
The Halting ProblemThe Halting Problem
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
43/53
Mod
ule
#2
- P
roofs
The Halting Problem The Halting Problem (Turing‘36)(Turing‘36)
The The halting problemhalting problem was the first was the first mathematical function proven to mathematical function proven to have have nono algorithm that computes it! algorithm that computes it! We say, it is We say, it is uncomputable.uncomputable.
The desired function is The desired function is HaltsHalts((PP,,II) :) :≡≡ the truth value of this statement: the truth value of this statement: ““Program P, given input I, eventually terminates.”Program P, given input I, eventually terminates.”
Thm.Thm. HaltsHalts is uncomputable! is uncomputable!I.e., There does I.e., There does notnot exist exist anyany algorithm algorithm AA that that
computes computes HaltsHalts correctly for correctly for allall possible inputs. possible inputs.
Its proof is thus a Its proof is thus a nonnon-existence proof.-existence proof.
CorollaryCorollary.. General impossibility of predictive General impossibility of predictive analysis of arbitrary computer programs.analysis of arbitrary computer programs.
Alan Turing1912-1954
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
44/53
Mod
ule
#2
- P
roofs
The ProofThe ProofThm.Thm. HaltsHalts is uncomputable! is uncomputable!
Proof.Proof. Given any Given any arbitrary arbitrary program program HH((P,IP,I),),Consider algorithm Consider algorithm BreakerBreaker, defined as:, defined as:
procedureprocedure BreakerBreaker ((PP: a program): a program)halts halts :=:= HH((PP,,PP))ifif haltshalts then whilethen while T begin endT begin end
Note that Note that BreakerBreaker((BreakerBreaker) halts iff ) halts iff HH((BreakerBreaker,,BreakerBreaker) = ) = FF..
So So HH does does notnot compute the function compute the function HaltsHalts!!
Breaker makes a liar out of H, by
doing the opposite of whatever H
predicts.
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
45/53
Mod
ule
#2
- P
roofs
Limits on ProofsLimits 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!Ex.Ex. Goldbach’s conjecturGoldbach’s conjecture.e. Every integer Every integer nn≥≥2 is 2 is
exactly the average of some two primes.exactly the average of some two primes.Formally, Formally, nn≥≥2 2 primes primes pp,,qq: : nn=(=(pp++qq)/2.)/2.
• There are true statements of number There are true statements of number theory (or any sufficiently powerful theory (or any sufficiently powerful system) that can system) that can nevernever be proved (or be proved (or disproved) (Gödel).disproved) (Gödel).
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
46/53
Mod
ule
#2
- P
roofs
More Proof ExamplesMore Proof Examples
Quiz question 1a: Quiz question 1a: 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 First, separate the premises from conclusions: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.
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
47/53
Mod
ule
#2
- P
roofs
AnswerAnswer
Next, re-render the example in logic Next, re-render the example in logic notation.notation.
Premise #1: All TAs compose easy Premise #1: All TAs compose easy quizzes.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))
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
48/53
Mod
ule
#2
- P
roofs
Answer cont…Answer cont…
Premise #2: Ramesh is a TA.Premise #2: Ramesh is a TA.Let R :Let R :≡ Ramesh≡ Ramesh
Then Premise #2 says: Then Premise #2 says: TT(R)(R)
And the Conclusion says: And the Conclusion says: EE(R)(R)
The argument is correct, because it The argument is correct, because it can be reduced to a sequence of can be reduced to a sequence of applications of valid inference rules, applications of valid inference rules, as follows:as follows:
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
49/53
Mod
ule
#2
- P
roofs
The Proof in Gory DetailThe Proof in Gory Detail
StatementStatement How obtainedHow obtained
xx, , TT((xx) ) → → EE((xx)) (Premise #1)(Premise #1)
TT(Ramesh) → (Ramesh) → EE(Ramesh) (Ramesh) (Universal (Universal
instantiation)instantiation)
TT(Ramesh)(Ramesh) (Premise #2)(Premise #2)
EE(Ramesh)(Ramesh) ((Modus PonensModus Ponens from from statements #2 and statements #2 and
#3)#3)
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
50/53
Mod
ule
#2
- P
roofs
Another exampleAnother example
Quiz question 2b: Correct or incorrect: Quiz question 2b: Correct or incorrect: At least one of the 280 students in the At least one of the 280 students in the class is intelligent. Y is a student of this class is intelligent. Y is a student of this class. Therefore, Y is intelligent.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)
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
51/53
Mod
ule
#2
- P
roofs
AnswerAnswer
No, the argument is invalid; we can disprove No, the argument is invalid; we can disprove it with a counter-example, as follows:it with a counter-example, as follows:
Consider a case where there is only one Consider a case where there is only one intelligent student X in the class, and Xintelligent student X in the class, and X≠Y.≠Y.Then the premise Then the premise xx InClass( InClass(xx) ) Intelligent( Intelligent(xx))
is true, by existential generalization of is true, 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 is false, since X is the only intelligent student in the class, X is the only intelligent student in the class, and Yand Y≠X.≠X.
Therefore, the premises Therefore, the premises do notdo not imply the imply the conclusion.conclusion.
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
52/53
Mod
ule
#2
- P
roofs
Another ExampleAnother Example
Quiz question #2: Quiz question #2: Prove that the sum of a rational number Prove that the sum of a rational number and an irrational number is always and an irrational number is always irrational.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 allFor all real numbers 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))
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
53/53
Mod
ule
#2
- P
roofs
AnswerAnswer
Next, think back to the definitions of the Next, think back to the definitions of the terms used in the statement of the terms used in the statement of the theorem: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 You almost always need the definitions of the terms in order to prove the of the terms in order to prove the theorem!theorem!
Next, let’s go through one valid proof:Next, let’s go through one valid proof:
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
54/53
Mod
ule
#2
- P
roofs
What you might writeWhat you might write
Theorem: Theorem: xx,,yy: Rational(: Rational(xx) ) Irr Irrational(ational(yy) → Irrational() → Irrational(xx++yy))
Proof:Proof: Let Let xx, , yy be any rational and irrational numbers, be any rational and irrational numbers, respectivelyrespectively. … (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 should think back to the definition of rational:You should think back to the definition of rational:
… … Since Since xx is rational, we know (from the very definition is rational, we know (from the very definition of rational) that there must be some integers of rational) that there must be some integers ii and and jj such that such that xx = = ii//jj.. So, let So, let iixx,,jjxx be such integers be such integers ……
We give them unique names so we can refer to them We give them unique names so we can refer to them later.later.
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
55/53
Mod
ule
#2
- P
roofs
What next?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 But, it’s difficult to see how to use a direct proof in this case. We could try indirect proof in this case. We could try indirect proof also, but in this case, it is a little proof also, but in this case, it is a little simpler to just use proof by contradiction simpler to just use proof by contradiction (very similar to indirect).(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 irrational. That is, is irrational. That is, ¬¬ii,,jj: (: (x x + + yy) = ) = ii//jj..
What happens if we hypothesize the What happens if we hypothesize the negation of this statement?negation of this statement?
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
56/53
Mod
ule
#2
- P
roofs
More writing…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 iiss and and jjss be any such be any such integers where integers where xx++yy = = iiss/ / jjss..
Now, with all these things named, we can Now, with all these things named, we can start seeing what happens when we put start seeing what happens when we put them together.them together.
So, we have that (So, we have that (iixx//jjxx) + ) + yy = ( = (iiss//jjss).).Observe! We have enough information now Observe! We have enough information now
that we can conclude something useful that we can conclude something useful about about yy, by solving this equation for it., by solving this equation for it.
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
57/53
Mod
ule
#2
- P
roofs
Finishing the proof.Finishing the proof.
Solving that equation for Solving that equation for yy, we have: , we have: yy = ( = (iiss//jjss) – () – (iixx//jjxx))
= ( = (iissjjxx – – iixxjjss)/()/(jjssjjxx))Now, since the numerator and Now, since the numerator and denominator of this expression are both denominator of this expression are both integers, integers, yy is (by definition) rational. This is (by definition) rational. This contradicts the assumption that contradicts the assumption that yy was was irrational. Therefore, our hypothesis that irrational. Therefore, our hypothesis that xx++yy is rational must be false, and so the is rational must be false, and so the theorem is proved.theorem is proved.
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
58/53
Mod
ule
#2
- P
roofs
Example wrong answerExample wrong answer
1 is rational. √2 is irrational. 1+√2 is 1 is rational. √2 is irrational. 1+√2 is irrational. Therefore, the sum of a rational irrational. Therefore, the sum of a rational number and an irrational number is number and an irrational number is irrational. (Direct proof.)irrational. (Direct proof.)
Why does this answer deserves Why does this answer deserves no creditno credit??The student attempted to use an example to The student attempted to use an example to
prove a universal statement. prove a universal statement. This is This is always always invalidinvalid!!
Even as an example, it’s incomplete, because Even as an example, it’s incomplete, because the student never even proved that 1+the student never even proved that 1+√2 is √2 is irrational!irrational!
Base
d o
n R
ose
n, D
iscr
ete
Math
em
ati
cs &
Its
A
pp
licati
ons,
5e
Pre
pare
d b
y (
c)2
00
1-2
00
4 M
ichael P. Fra
nk
Mod
ified
by (
c) 2
00
4-2
00
5 H
alu
k B
ing
öl
59/53
Mod
ule
#2
- P
roofs
ReferencesReferences
• RosenRosenDiscrete Mathematics and its Discrete Mathematics and its Applications, 5eApplications, 5eMc GrawHill, 2003Mc GrawHill, 2003