Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 1
Module #2:
Logic: Basic Proof Methods
Rosen 5
Rosen 5th
th
ed., §1.5
ed., §1.5
48 slides, ~3 lectures
48 slides, ~3 lectures
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 2
Nature & Importance of Proofs
• In mathematics, a
In mathematics, a proof
proof is:
is:
– a
a correct
correct (well-reasoned, logically valid) and
(well-reasoned, logically valid) and complete
complete
(clear, detailed) argument that rigorously & undeniably
(clear, detailed) argument 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?
– Correctness
Correctness prevents us from fooling ourselves.
prevents us from fooling ourselves.
– Completeness
Completeness 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 standard
high standard for correctness and completeness of
for correctness and completeness of
proofs is demanded!!
proofs is demanded!!
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 3
Overview of §1.5
• Methods of mathematical argument (
Methods of mathematical argument (i.e.
i.e.,
,
proof methods) can be formalized in terms
proof methods) can be formalized in terms
of
of rules of logical inference
rules of logical inference.
.
• Mathematical
Mathematical proofs
proofs can themselves be
can themselves be
represented formally as discrete structures.
represented formally as discrete structures.
• We will review both
We will review both correct
correct &
& fallacious
fallacious
inference rules, & several proof methods.
inference rules, & several proof methods.
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 4
Applications of Proofs
• An exercise in clear communication of logical
An exercise in clear communication of logical
arguments in any area of study.
arguments in any area of study.
• The fundamental activity of mathematics is the
The fundamental activity of mathematics is the
discovery and elucidation, through proofs, of
discovery and elucidation, through proofs, of
interesting new theorems.
interesting new theorems.
• Theorem-proving has applications in program
Theorem-proving has applications in program
verification, computer security, automated
verification, computer security, automated
reasoning systems,
reasoning systems, etc.
etc.
• Proving a theorem allows us to rely upon on its
Proving a theorem allows us to rely upon on its
correctness even in the most critical scenarios.
correctness even in the most critical scenarios.
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 5
Proof Terminology
• Theorem
Theorem
– A statement that has been proven to be true.
A statement that has been proven to be true.
• Axioms
Axioms,
, postulates
postulates,
, hypotheses
hypotheses,
, premises
premises
– Assumptions (often unproven) defining the
Assumptions (often unproven) defining the
structures about which we are reasoning.
structures about which we are reasoning.
• Rules of inference
Rules of inference
– Patterns of logically valid deductions from
Patterns of logically valid deductions from
hypotheses to conclusions.
hypotheses to conclusions.
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 6
More Proof Terminology
• Lemma
Lemma -
- A minor theorem used as a stepping-
A minor theorem used as a stepping-
stone to proving a major theorem.
stone to proving a major theorem.
• Corollary
Corollary -
- A minor theorem proved as an easy
A minor theorem proved as an easy
consequence of a major theorem.
consequence of a major theorem.
• Conjecture
Conjecture -
- A statement whose truth value has
A statement whose truth value has
not been proven.
not been proven. (A conjecture may be widely
(A conjecture may be widely
believed to be true, regardless.)
believed to be true, regardless.)
• Theory
Theory –
– The set of all theorems that can be
The set of all theorems that can be
proven from a given set of axioms.
proven from a given set of axioms.
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 7
Graphical Visualization
…
Various Theorems
Various Theorems
The Axioms
The Axioms
of the Theory
of the Theory
A Particular Theory
A Particular Theory
A proof
A proof
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 8
Inference Rules - General Form
• An
An Inference Rule
Inference Rule is
is
– A pattern establishing that if we know that a set
A pattern establishing that if we know that a set
of
of antecedent
antecedent statements of certain forms are all
statements of certain forms are all
true, then we can validly deduce that a certain
true, then we can validly deduce that a certain
related
related consequent
consequent statement is true.
statement is true.
• antecedent 1
antecedent 1
antecedent 2 …
antecedent 2 …

 consequent
consequent “
“
” means “therefore”
” means “therefore”
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 9
Inference Rules & Implications
• Each valid logical inference rule
Each valid logical inference rule
corresponds to an implication that is a
corresponds to an implication that is a
tautology.
tautology.
• antecedent 1
antecedent 1 Inference rule
Inference rule
antecedent 2 …
antecedent 2 …

 consequent
consequent
• Corresponding tautology:
Corresponding tautology:
((
((ante. 1
ante. 1)
) 
 (
(ante. 2
ante. 2)
) 
 …)
…) 
 consequent
consequent
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 10
Some Inference Rules
• p
p Rule of Addition
Rule of Addition

 p
p
q
q
• p
p
q
q Rule of Simplification
Rule of Simplification

 p
p
• p
p Rule of Conjunction
Rule of Conjunction
q
q

 p
p
q
q
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 11
Modus Ponens & Tollens
• p
p Rule of
Rule of modus ponens
modus ponens
p
p
q
q (a.k.a.
(a.k.a. law of detachment
law of detachment)
)

q
q
• 
q
q
p
p
q
q Rule of
Rule of modus tollens
modus tollens

p
p
“the mode of
affirming”
“the mode of denying”
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 12
Syllogism Inference Rules
• p
p
q
q Rule of hypothetical
Rule of hypothetical
q
q
r
r syllogism
syllogism

p
p
r
r
• p
p 
 q
q Rule of disjunctive
Rule of disjunctive

p
p syllogism
syllogism

 q
q
Aristotle
(ca. 384-322 B.C.)
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 13
Formal Proofs
• A formal proof of a conclusion
A formal proof of a conclusion C
C, given
, given
premises
premises p
p1
1,
, p
p2
2,…
,…,
,p
pn
n consists of a sequence
consists of a sequence
of
of steps
steps, each of which applies some
, each of which applies some
inference rule to premises or previously-
inference rule to premises or previously-
proven statements (
proven statements (antecedents
antecedents) to yield a
) to yield a
new true statement (the
new true statement (the consequent
consequent).
).
• A proof demonstrates that
A proof demonstrates that if
if the premises are
the premises are
true,
true, then
then the conclusion is true.
the conclusion is true.
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 14
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.”
“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 theorem
Given these premises, prove the theorem
“We will be home early”
“We will be home early” using inference rules.
using inference rules.
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 15
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) 
sunny
sunny 
 cold
cold (2)
(2) swim
swim 
 sunny
sunny
(3)
(3) 
swim
swim 
 canoe
canoe (4)
(4) canoe
canoe 
 early
early
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 16
Proof Example cont.
Step
Step Proved by
Proved by
1.
1. 
sunny
sunny 
 cold
cold Premise #1.
Premise #1.
2.
2. 
sunny
sunny Simplification of 1.
Simplification of 1.
3.
3. swim
swim
sunny
sunny Premise #2.
Premise #2.
4.
4. 
swim
swim Modus tollens on 2,3.
Modus tollens on 2,3.
5.
5. 
swim
swim
canoe
canoe Premise #3.
Premise #3.
6.
6. canoe
canoe Modus ponens on 4,5.
Modus ponens on 4,5.
7.
7. canoe
canoe
early
early Premise #4.
Premise #4.
8.
8. early
early Modus ponens on 6,7.
Modus ponens on 6,7.
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 17
Inference Rules for Quantifiers
 
x
x P
P(
(x
x)
)

P
P(
(o
o)
) (substitute
(substitute any
any specific object
specific object o
o)
)
• P
P(
(g
g)
) (for
(for g
g a
a general
general element of u.d.)
element of u.d.)

x
x P
P(
(x
x)
)
 
x
x P
P(
(x
x)
)

P
P(
(c
c)
) (substitute a
(substitute a new
new constant
constant c
c)
)
• P
P(
(o
o)
) (substitute any extant object
(substitute any extant object o
o)
)

x
x P
P(
(x
x)
)
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 18
Common Fallacies
• A
A fallacy
fallacy 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.
– A fallacy may yield a false conclusion!
A fallacy may yield a false conclusion!
• Fallacy of
Fallacy of affirming the conclusion
affirming the conclusion:
:
– “
“p
p
q
q is true, and
is true, and q
q is true, so
is true, so p
p must be true.”
must be true.”
(No, because
(No, because F
F
T
T is true.)
is true.)
• Fallacy of
Fallacy of denying the hypothesis
denying the hypothesis:
:
– “
“p
p
q
q is true, and
is true, and p
p is false, so
is false, so q
q must be false.”
must be false.”
(No, again because
(No, again because F
F
T
T is true.)
is true.)
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 19
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 n
n is even, if
is even, if n
n2
2
is even.
is even.
• Attempted proof:
Attempted proof: “Assume
“Assume n
n2
2
is even. Then
is even. Then
n
n2
2
=2
=2k
k for some integer
for some integer k
k. Dividing both sides by
. Dividing both sides by n
n
gives
gives n
n = (2
= (2k
k)/
)/n
n = 2(
= 2(k
k/
/n
n)
). So there is an integer
. So there is an integer j
j
(namely
(namely k
k/
/n
n) such that
) such that n
n=2
=2j
j. Therefore
. Therefore n
n 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?
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 20
A Correct Proof
We know that
We know that n
n must be either odd or even.
must be either odd or even.
If
If n
n were odd, then
were odd, then n
n2
2
would be odd, since an
would be odd, since an
odd number times an odd number is always
odd number times an odd number is always
an odd number. Since
an odd number. Since n
n2
2
is even, it is not odd,
is even, it is not odd,
since no even number is also an odd number.
since no even number is also an odd number.
Thus, by modus tollens,
Thus, by modus tollens, n
n is not odd either.
is not odd either.
Thus, by disjunctive syllogism,
Thus, by disjunctive syllogism, n
n must be
must be
even.
even. ■
■ This proof is correct, but not quite complete,
since we used several lemmas without proving
them. Can you identify what they are?
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 21
A More Verbose Version
Suppose
Suppose n
n2
2
is even
is even 
2|
2|n
n2
2

 n
n2
2
mod 2 = 0. Of course
mod 2 = 0. Of course
n
n mod 2 is either 0 or 1. If it’s 1, then
mod 2 is either 0 or 1. If it’s 1, then n
n
1 (mod 2),
1 (mod 2),
so
so n
n2
2

1 (mod 2),
1 (mod 2), using the theorem that if
using the theorem that if a
a
b
b
(mod
(mod m
m) and
) and c
c
d
d (mod
(mod m
m) then
) then ac
ac
bd
bd (mod m),
(mod m),
with
with a
a=
=c
c=
=n
n and
and b
b=
=d
d=1.
=1. Now
Now n
n2
2

1 (mod 2) implies
1 (mod 2) implies
that
that n
n2
2
mod 2 = 1. So
mod 2 = 1. So by the hypothetical syllogism
by the hypothetical syllogism
rule
rule, (
, (n
n mod 2 = 1) implies (
mod 2 = 1) implies (n
n2
2
mod 2 = 1). Since we
mod 2 = 1). Since we
know
know n
n2
2
mod 2 = 0
mod 2 = 0 
 1,
1, by
by modus tollens
modus tollens we know
we know
that
that n
n mod 2
mod 2 
 1. So
1. So by disjunctive syllogism
by disjunctive syllogism we
we
have that
have that n
n mod 2 = 0
mod 2 = 0 
2|
2|n
n 
 n
n is even.
is even.
Uses some number theory we haven’t defined yet.
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 22
Proof Methods for Implications
For proving implications
For proving implications p
p
q
q, we have:
, we have:
• Direct
Direct proof:
proof: Assume
Assume p
p is true, and prove
is true, and prove q
q.
.
• Indirect
Indirect proof:
proof: Assume
Assume 
q
q, and prove
, and prove 
p
p.
.
• Vacuous
Vacuous proof:
proof: Prove
Prove 
p
p by itself.
by itself.
• Trivial
Trivial proof:
proof: Prove
Prove q
q by itself.
by itself.
• Proof by cases:
Proof by cases:
Show
Show p
p
(
(a
a 
 b
b), and (
), and (a
a
q
q) and (
) and (b
b
q
q).
).
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 23
Direct Proof Example
• Definition:
Definition: An integer
An integer n
n is called
is called odd
odd iff
iff n
n=2
=2k
k+1
+1
for some integer
for some integer k
k;
; n
n is
is even
even iff
iff n
n=2
=2k
k for some
for some k
k.
.
• Theorem:
Theorem: 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.
• Theorem:
Theorem: (For all numbers
(For all numbers n
n) If
) If n
n is an odd
is an odd
integer, then
integer, then n
n2
2
is an odd integer.
is an odd integer.
• Proof:
Proof: If
If n
n is odd, then
is odd, then n
n = 2
= 2k
k+1
+1 for some integer
for some integer
k
k. Thus,
. Thus, n
n2
2
= (2
= (2k
k+1)
+1)2
2
= 4
= 4k
k2
2
+ 4
+ 4k
k + 1 = 2(2
+ 1 = 2(2k
k2
2
+ 2
+ 2k
k)
)
+ 1
+ 1. Therefore
. Therefore n
n2
2
is of the form
is of the form 2
2j
j + 1
+ 1 (with
(with j
j the
the
integer
integer 2
2k
k2
2
+ 2
+ 2k
k), thus
), thus n
n2
2
is odd.
is odd. □
□
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 24
Indirect Proof Example
• Theorem:
Theorem: (For all integers
(For all integers n
n)
)
If
If 3
3n
n+2
+2 is odd, then
is odd, then n
n is odd.
is odd.
• Proof:
Proof: Suppose that the conclusion is false,
Suppose that the conclusion is false, i.e.
i.e.,
,
that
that n
n is even. Then
is even. Then n
n=2
=2k
k for some integer
for some integer k
k.
.
Then
Then 3
3n
n+2 = 3(2
+2 = 3(2k
k)+2 = 6
)+2 = 6k
k+2 = 2(3
+2 = 2(3k
k+1)
+1). Thus
. Thus
3
3n
n+2
+2 is even, because it equals
is even, because it equals 2
2j
j for integer
for integer j
j =
=
3
3k
k+1
+1. So
. So 3
3n
n+2
+2 is not odd. We have shown that
is not odd. We have shown that
¬(
¬(n
n is odd)→¬(3
is odd)→¬(3n
n+2 is odd)
+2 is odd), thus its contra-
, thus its contra-
positive
positive (3
(3n
n+2 is odd) → (
+2 is odd) → (n
n is odd)
is odd) is also true. □
is also true. □
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 25
Vacuous Proof Example
• Theorem:
Theorem: (For all
(For all n
n) If
) If n
n is both odd and
is both odd and
even, then
even, then n
n2
2
=
= n
n +
+ n
n.
.
• Proof:
Proof: The statement “
The statement “n
n 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. □
□
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 26
Trivial Proof Example
• Theorem:
Theorem: (For integers
(For integers n
n) If
) If n
n is the sum
is the sum
of two prime numbers
of two prime numbers, then either
, then either n
n is odd
is odd
or
or n
n is even.
is even.
• Proof:
Proof: Any
Any integer
integer n
n 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 antecedent.
regardless of the truth of the antecedent.
Thus the implication is true trivially. □
Thus the implication is true trivially. □
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 27
Proof by Contradiction
• A method for proving
A method for proving p
p.
.
• Assume
Assume 
p
p, and prove both
, and prove both q
q and
and 
q
q for some
for some
proposition
proposition q
q. (Can be anything!)
. (Can be anything!)
• Thus
Thus 
p
p
 (
(q
q 
 
q
q)
)
• (
(q
q 
 
q
q) is a trivial contradiction, equal to
) is a trivial contradiction, equal to F
F
• Thus
Thus 
p
p
F
F, which is only true if
, which is only true if 
p
p=
=F
F
• Thus
Thus p
p is true.
is true.
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 28
Proof by Contradiction Example
• Theorem:
Theorem: is irrational.
is irrational.
– Proof:
Proof: Assume 2
Assume 21/2
1/2
were rational. This means
were rational. This means
there are integers
there are integers i
i,
,j
j with no common divisors
with no common divisors
such that 2
such that 21/2
1/2
=
= i
i/
/j
j. Squaring both sides, 2 =
. Squaring both sides, 2 =
i
i2
2
/
/j
j2
2
, so 2
, so 2j
j2
2
=
= i
i2
2
. So
. So i
i2
2
is even; thus
is even; thus i
i is even.
is even.
Let
Let i
i=2
=2k
k. So 2
. So 2j
j2
2
= (2
= (2k
k)
)2
2
= 4
= 4k
k2
2
. Dividing both
. Dividing both
sides by 2,
sides by 2, j
j2
2
= 2
= 2k
k2
2
. Thus
. Thus j
j2
2
is even, so
is even, so j
j is even.
is even.
But then
But then i
i and
and j
j have a common divisor,
have a common divisor,
namely 2, so we have a contradiction.
namely 2, so we have a contradiction. □
□
2 2
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 29
Review: Proof Methods So Far
• Direct
Direct,
, indirect
indirect,
, vacuous
vacuous, and
, and trivial
trivial proofs
proofs
of statements of the form
of statements of the form p
p
q
q.
.
• Proof by contradiction
Proof by contradiction of any statements.
of any statements.
• Next:
Next: Constructive
Constructive and
and nonconstructive
nonconstructive
existence proofs
existence proofs.
.
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 30
Proving Existentials
• A proof of a statement of the form
A proof of a statement of the form 
x
x P
P(
(x
x)
)
is called an
is called an existence proof
existence 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 a
a such
such
that
that P
P(
(a
a) is true, then it is a
) is true, then it is a constructive
constructive
proof.
proof.
• Otherwise, it is
Otherwise, it is nonconstructive
nonconstructive.
.
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 31
Constructive Existence Proof
• Theorem:
Theorem: There exists a positive integer
There exists a positive integer n
n
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 j
j3
3
+
+ k
k3
3
and
and l
l3
3
+
+ m
m3
3
where
where j
j,
, k
k,
, l
l,
, m
m are
are
positive integers, and {
positive integers, and {j
j,
,k
k}
} ≠ {
≠ {l
l,
,m
m}
}
• Proof:
Proof: Consider
Consider n
n = 1729,
= 1729, j
j = 9,
= 9, k
k = 10,
= 10,
l
l = 1,
= 1, m
m = 12. Now just check that the
= 12. Now just check that the
equalities hold.
equalities hold.
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 32
Another Constructive
Existence Proof
• Theorem:
Theorem: For any integer
For any integer n
n>0, there exists
>0, there exists
a sequence of
a sequence of n
n consecutive composite
consecutive composite
integers.
integers.
• Same statement in predicate logic:
Same statement in predicate logic:

n
n>0
>0 
x
x 
i
i (1
(1
i
i
n
n)
)
(
(x
x+
+i
i is composite)
is composite)
• Proof follows on next slide…
Proof follows on next slide…
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 33
The proof...
• Given
Given n
n>0, let
>0, let x
x = (
= (n
n + 1)! + 1.
+ 1)! + 1.
• Let
Let i
i 
 1 and
1 and i
i 
 n
n, and consider
, and consider x
x+
+i
i.
.
• Note
Note x
x+
+i
i = (
= (n
n + 1)! + (
+ 1)! + (i
i + 1).
+ 1).
• Note (
Note (i
i+1)|(
+1)|(n
n+1)!, since 2
+1)!, since 2 
 i
i+1
+1 
 n
n+1.
+1.
• Also (
Also (i
i+1)|(
+1)|(i
i+1). So, (
+1). So, (i
i+1)|(
+1)|(x+i
x+i).
).
 
 x+i
x+i is composite.
is composite.
 
 
n
n 
x
x 
1
1
i
i
n
n :
: x
x+
+i
i is composite. Q.E.D.
is composite. Q.E.D.
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 34
Nonconstructive 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 there is
just show that there is no
no 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 also
also prime.
prime.
• More generally: For
More generally: For any
any number,
number, 
 a larger prime.
a larger prime.
• Formally: Show
Formally: Show 
n
n 
p>n
p>n :
: p
p is prime.
is prime.
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 35
The proof, using proof by cases...
• Given
Given n
n>0, prove there is a prime
>0, prove there is a prime p
p>
>n
n.
.
• Consider
Consider x
x =
= n
n!+1. Since
!+1. Since x
x>1, we know
>1, we know
(
(x
x is prime)
is prime)
(
(x
x is composite).
is composite).
• Case 1:
Case 1: x
x is prime. Obviously
is prime. Obviously x
x>
>n
n, so let
, so let
p
p=
=x
x and we’re done.
and we’re done.
• Case 2:
Case 2: x
x has a prime factor
has a prime factor p
p. But if
. But if p
p
n
n,
,
then
then p
p mod
mod x
x = 1. So
= 1. So p
p>
>n
n, and we’re done.
, and we’re done.
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 36
The Halting Problem (Turing‘36)
• The
The halting problem
halting problem was the first
was the first
mathematical function proven to
mathematical function proven to
have
have no
no 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 Halts
Halts(
(P
P,
,I
I) :
) :≡
≡
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.”
• Theorem:
Theorem: Halts
Halts is uncomputable!
is uncomputable!
– I.e., There does
I.e., There does not
not exist
exist any
any algorithm
algorithm A
A that
that
computes
computes Halts
Halts correctly for
correctly for all
all possible inputs.
possible inputs.
• Its proof is thus a
Its proof is thus a non
non-existence proof.
-existence proof.
• Corollary:
Corollary: General impossibility of predictive analysis of
General impossibility of predictive analysis of
arbitrary computer programs.
arbitrary computer programs.
Alan Turing
1912-1954
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 37
The Proof
• Given any
Given any arbitrary
arbitrary program
program H
H(
(P,I
P,I),
),
• Consider algorithm
Consider algorithm Breaker
Breaker, defined as:
, defined as:
procedure
procedure Breaker
Breaker(
(P
P: a program)
: a program)
halts
halts :=
:= H
H(
(P
P,
,P
P)
)
if
if halts
halts then while
then while T begin end
T begin end
• Note that
Note that Breaker
Breaker(
(Breaker
Breaker) halts iff
) halts iff
H
H(
(Breaker
Breaker,
,Breaker
Breaker) =
) = F
F.
.
• So
So H
H does
does not
not compute the function
compute the function Halts
Halts!
!
Breaker makes a
liar out of H, by
doing the opposite
of whatever H
predicts.
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 38
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 conjecture
E.g. Goldbach’s conjecture: Every integer
: Every integer n
n≥
≥2
2
is exactly the average of some two primes.
is exactly the average of some two primes.
 
n
n≥
≥2
2 
 primes
primes p
p,
,q
q:
: n
n=(
=(p
p+
+q
q)/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 never
never be proved (or disproved) (Gödel).
be proved (or disproved) (Gödel).
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 39
More Proof Examples
• Quiz question 1a: Is this argument correct or
Quiz question 1a: Is this argument correct or
incorrect?
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.
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 40
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 people
Let U.D. = all people
– Let
Let T
T(
(x
x) :
) :≡ “
≡ “x
x is a TA”
is a TA”
– Let
Let E
E(
(x
x) :≡ “
) :≡ “x
x composes easy quizzes”
composes easy quizzes”
– Then Premise #1 says:
Then Premise #1 says: 
x
x,
, T
T(
(x
x)→
)→E
E(
(x
x)
)
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 41
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: T
T(R)
(R)
– And the Conclusion says:
And the Conclusion says: E
E(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:
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 42
The Proof in Gory Detail
• Statement
Statement How obtained
How obtained
1.
1. 
x
x,
, T
T(
(x
x)
) →
→ E
E(
(x
x)
) (Premise #1)
(Premise #1)
2.
2. T
T(Ramesh) →
(Ramesh) → E
E(Ramesh)
(Ramesh) (Universal
(Universal
instantiation)
instantiation)
3.
3. T
T(Ramesh)
(Ramesh) (Premise #2)
(Premise #2)
4.
4. E
E(Ramesh)
(Ramesh)(
(Modus Ponens
Modus Ponens from
from
statements #2 and #3)
statements #2 and #3)
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 43
Another example
• Quiz question 2b: Correct or incorrect: At least
Quiz question 2b: Correct or incorrect: At least
one of the 280 students in the class is intelligent.
one of the 280 students in the class is intelligent.
Y is a student of this class. Therefore, Y is
Y is a student of this class. Therefore, Y is
intelligent.
intelligent.
• First: Separate premises/conclusion,
First: Separate premises/conclusion,
& translate to logic:
& translate to logic:
– Premises: (1)
Premises: (1) 
x
x InClass(
InClass(x
x)
) 
 Intelligent(
Intelligent(x
x)
)
(2) InClass(Y)
(2) InClass(Y)
– Conclusion: Intelligent(Y)
Conclusion: Intelligent(Y)
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 44
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
student X in the class, and X≠Y.
≠Y.
– Then the premise
Then the premise 
x
x InClass(
InClass(x
x)
) 
 Intelligent(
Intelligent(x
x)
) 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
the only intelligent student in the class, and Y≠X.
≠X.
• Therefore, the premises
Therefore, the premises do not
do not imply the
imply the
conclusion.
conclusion.
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 45
Another Example
• Quiz question #2: Prove that the sum of a rational
Quiz question #2: Prove that the sum of a rational
number and an irrational number is always
number and an irrational number is always
irrational.
irrational.
• First, you have to understand exactly what the
First, you have to understand exactly what the
question is asking you to prove:
question is asking you to prove:
– “
“For all
For all real numbers
real numbers x
x,
,y,
y, if
if x
x is rational and
is rational and y
y is
is
irrational, then
irrational, then x
x+
+y
y is irrational.”
is irrational.”
 
x
x,
,y
y: Rational(
: Rational(x
x)
) 
 Irrational(
Irrational(y
y) → Irrational(
) → Irrational(x
x+
+y
y)
)
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 46
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 r
r: Rational(
: Rational(r
r)
) ↔
↔

 Integer(
Integer(i
i)
) 
 Integer(
Integer(j
j):
): r
r =
= i
i/
/j
j.
.
 
 reals
reals r
r: Irrational(
: Irrational(r
r)
) ↔ ¬
↔ ¬Rational(
Rational(r
r)
)
• 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:
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 47
What you might write
• Theorem:
Theorem:

x
x,
,y
y: Rational(
: Rational(x
x)
) 
 Irr
Irrational(
ational(y
y) Irrational(
→
) Irrational(
→ x
x+
+y
y)
)
• Proof:
Proof: Let
Let x
x,
, y
y be any rational and irrational
be any rational and irrational
numbers, respectively
numbers, respectively. … (universal generalization)
. … (universal generalization)
• Now, just from this, what do we know about
Now, just from this, what do we know about x
x and
and y
y? You
? You
should think back to the definition of rational:
should think back to the definition of rational:
• …
… Since
Since x
x 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 i
i and
and j
j such that
such that x
x =
= i
i/
/j
j.
. So, let
So, let i
ix
x,
,j
jx
x 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.
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 48
What next?
• What do we know about
What do we know about y
y? Only that
? Only that y
y is
is
irrational:
irrational: ¬
¬
 integers
integers i
i,
,j
j:
: y
y =
= i
i/
/j
j.
.
• 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 x
x+
+y
y is
is
irrational. That is,
irrational. That is, ¬
¬
i
i,
,j
j: (
: (x
x +
+ y
y) =
) = i
i/
/j
j.
.
• What happens if we hypothesize the negation of
What happens if we hypothesize the negation of
this statement?
this statement?
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 49
More writing…
• Suppose that
Suppose that x
x+
+y
y were not irrational. Then
were not irrational. Then
x
x+
+y
y would be rational, so
would be rational, so 
 integers
integers i
i,
,j
j:
: x
x+
+y
y
=
= i
i/
/j
j. So, let
. So, let i
is
s and
and j
js
s be any such integers
be any such integers
where
where x
x+
+y
y =
= i
is
s/
/ j
js
s.
.
• 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 (i
ix
x/
/j
jx
x) +
) + y
y = (
= (i
is
s/
/j
js
s).
).
• 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 y
y, by
, by
solving this equation for it.
solving this equation for it.
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 50
Finishing the proof.
• Solving that equation for
Solving that equation for y
y, we have:
, we have:
y
y = (
= (i
is
s/
/j
js
s) – (
) – (i
ix
x/
/j
jx
x)
)
= (
= (i
is
sj
jx
x –
– i
ix
xj
js
s)/(
)/(j
js
sj
jx
x)
)
Now, since the numerator and denominator
Now, since the numerator and denominator
of this expression are both integers,
of this expression are both integers, y
y is
is
(by definition) rational. This contradicts
(by definition) rational. This contradicts
the assumption that
the assumption that y
y was irrational.
was irrational.
Therefore, our hypothesis that
Therefore, our hypothesis that x
x+
+y
y is
is
rational must be false, and so the theorem
rational must be false, and so the theorem
is proved.
is proved.
Module #2 - Proofs
08/31/24 (c)2001-2003, Michael P. Frank 51
Example 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 desereve
Why does this answer desereve no credit
no credit?
?
– The student attempted to use an example to prove a
The student attempted to use an example to prove a
universal statement.
universal statement. This is
This is always invalid
always invalid!
!
– Even as an example, it’s incomplete, because the
Even as an example, it’s incomplete, because the
student never even proved that 1+
student never even proved that 1+√2 is irrational!
√2 is irrational!

Module 2: Logic - Basic Proof Methods GEC 2

  • 1.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 1 Module #2: Logic: Basic Proof Methods Rosen 5 Rosen 5th th ed., §1.5 ed., §1.5 48 slides, ~3 lectures 48 slides, ~3 lectures
  • 2.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 2 Nature & Importance of Proofs • In mathematics, a In mathematics, a proof proof is: is: – a a correct correct (well-reasoned, logically valid) and (well-reasoned, logically valid) and complete complete (clear, detailed) argument that rigorously & undeniably (clear, detailed) argument 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? – Correctness Correctness prevents us from fooling ourselves. prevents us from fooling ourselves. – Completeness Completeness 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 standard high standard for correctness and completeness of for correctness and completeness of proofs is demanded!! proofs is demanded!!
  • 3.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 3 Overview of §1.5 • Methods of mathematical argument ( Methods of mathematical argument (i.e. i.e., , proof methods) can be formalized in terms proof methods) can be formalized in terms of of rules of logical inference rules of logical inference. . • Mathematical Mathematical proofs proofs can themselves be can themselves be represented formally as discrete structures. represented formally as discrete structures. • We will review both We will review both correct correct & & fallacious fallacious inference rules, & several proof methods. inference rules, & several proof methods.
  • 4.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 4 Applications of Proofs • An exercise in clear communication of logical An exercise in clear communication of logical arguments in any area of study. arguments in any area of study. • The fundamental activity of mathematics is the The fundamental activity of mathematics is the discovery and elucidation, through proofs, of discovery and elucidation, through proofs, of interesting new theorems. interesting new theorems. • Theorem-proving has applications in program Theorem-proving has applications in program verification, computer security, automated verification, computer security, automated reasoning systems, reasoning systems, etc. etc. • Proving a theorem allows us to rely upon on its Proving a theorem allows us to rely upon on its correctness even in the most critical scenarios. correctness even in the most critical scenarios.
  • 5.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 5 Proof Terminology • Theorem Theorem – A statement that has been proven to be true. A statement that has been proven to be true. • Axioms Axioms, , postulates postulates, , hypotheses hypotheses, , premises premises – Assumptions (often unproven) defining the Assumptions (often unproven) defining the structures about which we are reasoning. structures about which we are reasoning. • Rules of inference Rules of inference – Patterns of logically valid deductions from Patterns of logically valid deductions from hypotheses to conclusions. hypotheses to conclusions.
  • 6.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 6 More Proof Terminology • Lemma Lemma - - A minor theorem used as a stepping- A minor theorem used as a stepping- stone to proving a major theorem. stone to proving a major theorem. • Corollary Corollary - - A minor theorem proved as an easy A minor theorem proved as an easy consequence of a major theorem. consequence of a major theorem. • Conjecture Conjecture - - A statement whose truth value has A statement whose truth value has not been proven. not been proven. (A conjecture may be widely (A conjecture may be widely believed to be true, regardless.) believed to be true, regardless.) • Theory Theory – – The set of all theorems that can be The set of all theorems that can be proven from a given set of axioms. proven from a given set of axioms.
  • 7.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 7 Graphical Visualization … Various Theorems Various Theorems The Axioms The Axioms of the Theory of the Theory A Particular Theory A Particular Theory A proof A proof
  • 8.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 8 Inference Rules - General Form • An An Inference Rule Inference Rule is is – A pattern establishing that if we know that a set A pattern establishing that if we know that a set of of antecedent antecedent statements of certain forms are all statements of certain forms are all true, then we can validly deduce that a certain true, then we can validly deduce that a certain related related consequent consequent statement is true. statement is true. • antecedent 1 antecedent 1 antecedent 2 … antecedent 2 …   consequent consequent “ “ ” means “therefore” ” means “therefore”
  • 9.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 9 Inference Rules & Implications • Each valid logical inference rule Each valid logical inference rule corresponds to an implication that is a corresponds to an implication that is a tautology. tautology. • antecedent 1 antecedent 1 Inference rule Inference rule antecedent 2 … antecedent 2 …   consequent consequent • Corresponding tautology: Corresponding tautology: (( ((ante. 1 ante. 1) )   ( (ante. 2 ante. 2) )   …) …)   consequent consequent
  • 10.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 10 Some Inference Rules • p p Rule of Addition Rule of Addition   p p q q • p p q q Rule of Simplification Rule of Simplification   p p • p p Rule of Conjunction Rule of Conjunction q q   p p q q
  • 11.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 11 Modus Ponens & Tollens • p p Rule of Rule of modus ponens modus ponens p p q q (a.k.a. (a.k.a. law of detachment law of detachment) )  q q •  q q p p q q Rule of Rule of modus tollens modus tollens  p p “the mode of affirming” “the mode of denying”
  • 12.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 12 Syllogism Inference Rules • p p q q Rule of hypothetical Rule of hypothetical q q r r syllogism syllogism  p p r r • p p   q q Rule of disjunctive Rule of disjunctive  p p syllogism syllogism   q q Aristotle (ca. 384-322 B.C.)
  • 13.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 13 Formal Proofs • A formal proof of a conclusion A formal proof of a conclusion C C, given , given premises premises p p1 1, , p p2 2,… ,…, ,p pn n consists of a sequence consists of a sequence of of steps steps, each of which applies some , each of which applies some inference rule to premises or previously- inference rule to premises or previously- proven statements ( proven statements (antecedents antecedents) to yield a ) to yield a new true statement (the new true statement (the consequent consequent). ). • A proof demonstrates that A proof demonstrates that if if the premises are the premises are true, true, then then the conclusion is true. the conclusion is true.
  • 14.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 14 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.” “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 theorem Given these premises, prove the theorem “We will be home early” “We will be home early” using inference rules. using inference rules.
  • 15.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 15 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)  sunny sunny   cold cold (2) (2) swim swim   sunny sunny (3) (3)  swim swim   canoe canoe (4) (4) canoe canoe   early early
  • 16.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 16 Proof Example cont. Step Step Proved by Proved by 1. 1.  sunny sunny   cold cold Premise #1. Premise #1. 2. 2.  sunny sunny Simplification of 1. Simplification of 1. 3. 3. swim swim sunny sunny Premise #2. Premise #2. 4. 4.  swim swim Modus tollens on 2,3. Modus tollens on 2,3. 5. 5.  swim swim canoe canoe Premise #3. Premise #3. 6. 6. canoe canoe Modus ponens on 4,5. Modus ponens on 4,5. 7. 7. canoe canoe early early Premise #4. Premise #4. 8. 8. early early Modus ponens on 6,7. Modus ponens on 6,7.
  • 17.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 17 Inference Rules for Quantifiers   x x P P( (x x) )  P P( (o o) ) (substitute (substitute any any specific object specific object o o) ) • P P( (g g) ) (for (for g g a a general general element of u.d.) element of u.d.)  x x P P( (x x) )   x x P P( (x x) )  P P( (c c) ) (substitute a (substitute a new new constant constant c c) ) • P P( (o o) ) (substitute any extant object (substitute any extant object o o) )  x x P P( (x x) )
  • 18.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 18 Common Fallacies • A A fallacy fallacy 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. – A fallacy may yield a false conclusion! A fallacy may yield a false conclusion! • Fallacy of Fallacy of affirming the conclusion affirming the conclusion: : – “ “p p q q is true, and is true, and q q is true, so is true, so p p must be true.” must be true.” (No, because (No, because F F T T is true.) is true.) • Fallacy of Fallacy of denying the hypothesis denying the hypothesis: : – “ “p p q q is true, and is true, and p p is false, so is false, so q q must be false.” must be false.” (No, again because (No, again because F F T T is true.) is true.)
  • 19.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 19 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 n n is even, if is even, if n n2 2 is even. is even. • Attempted proof: Attempted proof: “Assume “Assume n n2 2 is even. Then is even. Then n n2 2 =2 =2k k for some integer for some integer k k. Dividing both sides by . Dividing both sides by n n gives gives n n = (2 = (2k k)/ )/n n = 2( = 2(k k/ /n n) ). So there is an integer . So there is an integer j j (namely (namely k k/ /n n) such that ) such that n n=2 =2j j. Therefore . Therefore n n 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?
  • 20.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 20 A Correct Proof We know that We know that n n must be either odd or even. must be either odd or even. If If n n were odd, then were odd, then n n2 2 would be odd, since an would be odd, since an odd number times an odd number is always odd number times an odd number is always an odd number. Since an odd number. Since n n2 2 is even, it is not odd, is even, it is not odd, since no even number is also an odd number. since no even number is also an odd number. Thus, by modus tollens, Thus, by modus tollens, n n is not odd either. is not odd either. Thus, by disjunctive syllogism, Thus, by disjunctive syllogism, n n must be must be even. even. ■ ■ This proof is correct, but not quite complete, since we used several lemmas without proving them. Can you identify what they are?
  • 21.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 21 A More Verbose Version Suppose Suppose n n2 2 is even is even  2| 2|n n2 2   n n2 2 mod 2 = 0. Of course mod 2 = 0. Of course n n mod 2 is either 0 or 1. If it’s 1, then mod 2 is either 0 or 1. If it’s 1, then n n 1 (mod 2), 1 (mod 2), so so n n2 2  1 (mod 2), 1 (mod 2), using the theorem that if using the theorem that if a a b b (mod (mod m m) and ) and c c d d (mod (mod m m) then ) then ac ac bd bd (mod m), (mod m), with with a a= =c c= =n n and and b b= =d d=1. =1. Now Now n n2 2  1 (mod 2) implies 1 (mod 2) implies that that n n2 2 mod 2 = 1. So mod 2 = 1. So by the hypothetical syllogism by the hypothetical syllogism rule rule, ( , (n n mod 2 = 1) implies ( mod 2 = 1) implies (n n2 2 mod 2 = 1). Since we mod 2 = 1). Since we know know n n2 2 mod 2 = 0 mod 2 = 0   1, 1, by by modus tollens modus tollens we know we know that that n n mod 2 mod 2   1. So 1. So by disjunctive syllogism by disjunctive syllogism we we have that have that n n mod 2 = 0 mod 2 = 0  2| 2|n n   n n is even. is even. Uses some number theory we haven’t defined yet.
  • 22.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 22 Proof Methods for Implications For proving implications For proving implications p p q q, we have: , we have: • Direct Direct proof: proof: Assume Assume p p is true, and prove is true, and prove q q. . • Indirect Indirect proof: proof: Assume Assume  q q, and prove , and prove  p p. . • Vacuous Vacuous proof: proof: Prove Prove  p p by itself. by itself. • Trivial Trivial proof: proof: Prove Prove q q by itself. by itself. • Proof by cases: Proof by cases: Show Show p p ( (a a   b b), and ( ), and (a a q q) and ( ) and (b b q q). ).
  • 23.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 23 Direct Proof Example • Definition: Definition: An integer An integer n n is called is called odd odd iff iff n n=2 =2k k+1 +1 for some integer for some integer k k; ; n n is is even even iff iff n n=2 =2k k for some for some k k. . • Theorem: Theorem: 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. • Theorem: Theorem: (For all numbers (For all numbers n n) If ) If n n is an odd is an odd integer, then integer, then n n2 2 is an odd integer. is an odd integer. • Proof: Proof: If If n n is odd, then is odd, then n n = 2 = 2k k+1 +1 for some integer for some integer k k. Thus, . Thus, n n2 2 = (2 = (2k k+1) +1)2 2 = 4 = 4k k2 2 + 4 + 4k k + 1 = 2(2 + 1 = 2(2k k2 2 + 2 + 2k k) ) + 1 + 1. Therefore . Therefore n n2 2 is of the form is of the form 2 2j j + 1 + 1 (with (with j j the the integer integer 2 2k k2 2 + 2 + 2k k), thus ), thus n n2 2 is odd. is odd. □ □
  • 24.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 24 Indirect Proof Example • Theorem: Theorem: (For all integers (For all integers n n) ) If If 3 3n n+2 +2 is odd, then is odd, then n n is odd. is odd. • Proof: Proof: Suppose that the conclusion is false, Suppose that the conclusion is false, i.e. i.e., , that that n n is even. Then is even. Then n n=2 =2k k for some integer for some integer k k. . Then Then 3 3n n+2 = 3(2 +2 = 3(2k k)+2 = 6 )+2 = 6k k+2 = 2(3 +2 = 2(3k k+1) +1). Thus . Thus 3 3n n+2 +2 is even, because it equals is even, because it equals 2 2j j for integer for integer j j = = 3 3k k+1 +1. So . So 3 3n n+2 +2 is not odd. We have shown that is not odd. We have shown that ¬( ¬(n n is odd)→¬(3 is odd)→¬(3n n+2 is odd) +2 is odd), thus its contra- , thus its contra- positive positive (3 (3n n+2 is odd) → ( +2 is odd) → (n n is odd) is odd) is also true. □ is also true. □
  • 25.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 25 Vacuous Proof Example • Theorem: Theorem: (For all (For all n n) If ) If n n is both odd and is both odd and even, then even, then n n2 2 = = n n + + n n. . • Proof: Proof: The statement “ The statement “n n 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. □ □
  • 26.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 26 Trivial Proof Example • Theorem: Theorem: (For integers (For integers n n) If ) If n n is the sum is the sum of two prime numbers of two prime numbers, then either , then either n n is odd is odd or or n n is even. is even. • Proof: Proof: Any Any integer integer n n 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 antecedent. regardless of the truth of the antecedent. Thus the implication is true trivially. □ Thus the implication is true trivially. □
  • 27.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 27 Proof by Contradiction • A method for proving A method for proving p p. . • Assume Assume  p p, and prove both , and prove both q q and and  q q for some for some proposition proposition q q. (Can be anything!) . (Can be anything!) • Thus Thus  p p  ( (q q    q q) ) • ( (q q    q q) is a trivial contradiction, equal to ) is a trivial contradiction, equal to F F • Thus Thus  p p F F, which is only true if , which is only true if  p p= =F F • Thus Thus p p is true. is true.
  • 28.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 28 Proof by Contradiction Example • Theorem: Theorem: is irrational. is irrational. – Proof: Proof: Assume 2 Assume 21/2 1/2 were rational. This means were rational. This means there are integers there are integers i i, ,j j with no common divisors with no common divisors such that 2 such that 21/2 1/2 = = i i/ /j j. Squaring both sides, 2 = . Squaring both sides, 2 = i i2 2 / /j j2 2 , so 2 , so 2j j2 2 = = i i2 2 . So . So i i2 2 is even; thus is even; thus i i is even. is even. Let Let i i=2 =2k k. So 2 . So 2j j2 2 = (2 = (2k k) )2 2 = 4 = 4k k2 2 . Dividing both . Dividing both sides by 2, sides by 2, j j2 2 = 2 = 2k k2 2 . Thus . Thus j j2 2 is even, so is even, so j j is even. is even. But then But then i i and and j j have a common divisor, have a common divisor, namely 2, so we have a contradiction. namely 2, so we have a contradiction. □ □ 2 2
  • 29.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 29 Review: Proof Methods So Far • Direct Direct, , indirect indirect, , vacuous vacuous, and , and trivial trivial proofs proofs of statements of the form of statements of the form p p q q. . • Proof by contradiction Proof by contradiction of any statements. of any statements. • Next: Next: Constructive Constructive and and nonconstructive nonconstructive existence proofs existence proofs. .
  • 30.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 30 Proving Existentials • A proof of a statement of the form A proof of a statement of the form  x x P P( (x x) ) is called an is called an existence proof existence 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 a a such such that that P P( (a a) is true, then it is a ) is true, then it is a constructive constructive proof. proof. • Otherwise, it is Otherwise, it is nonconstructive nonconstructive. .
  • 31.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 31 Constructive Existence Proof • Theorem: Theorem: There exists a positive integer There exists a positive integer n n 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 j j3 3 + + k k3 3 and and l l3 3 + + m m3 3 where where j j, , k k, , l l, , m m are are positive integers, and { positive integers, and {j j, ,k k} } ≠ { ≠ {l l, ,m m} } • Proof: Proof: Consider Consider n n = 1729, = 1729, j j = 9, = 9, k k = 10, = 10, l l = 1, = 1, m m = 12. Now just check that the = 12. Now just check that the equalities hold. equalities hold.
  • 32.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 32 Another Constructive Existence Proof • Theorem: Theorem: For any integer For any integer n n>0, there exists >0, there exists a sequence of a sequence of n n consecutive composite consecutive composite integers. integers. • Same statement in predicate logic: Same statement in predicate logic:  n n>0 >0  x x  i i (1 (1 i i n n) ) ( (x x+ +i i is composite) is composite) • Proof follows on next slide… Proof follows on next slide…
  • 33.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 33 The proof... • Given Given n n>0, let >0, let x x = ( = (n n + 1)! + 1. + 1)! + 1. • Let Let i i   1 and 1 and i i   n n, and consider , and consider x x+ +i i. . • Note Note x x+ +i i = ( = (n n + 1)! + ( + 1)! + (i i + 1). + 1). • Note ( Note (i i+1)|( +1)|(n n+1)!, since 2 +1)!, since 2   i i+1 +1   n n+1. +1. • Also ( Also (i i+1)|( +1)|(i i+1). So, ( +1). So, (i i+1)|( +1)|(x+i x+i). ).    x+i x+i is composite. is composite.     n n  x x  1 1 i i n n : : x x+ +i i is composite. Q.E.D. is composite. Q.E.D.
  • 34.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 34 Nonconstructive 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 there is just show that there is no no 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 also also prime. prime. • More generally: For More generally: For any any number, number,   a larger prime. a larger prime. • Formally: Show Formally: Show  n n  p>n p>n : : p p is prime. is prime.
  • 35.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 35 The proof, using proof by cases... • Given Given n n>0, prove there is a prime >0, prove there is a prime p p> >n n. . • Consider Consider x x = = n n!+1. Since !+1. Since x x>1, we know >1, we know ( (x x is prime) is prime) ( (x x is composite). is composite). • Case 1: Case 1: x x is prime. Obviously is prime. Obviously x x> >n n, so let , so let p p= =x x and we’re done. and we’re done. • Case 2: Case 2: x x has a prime factor has a prime factor p p. But if . But if p p n n, , then then p p mod mod x x = 1. So = 1. So p p> >n n, and we’re done. , and we’re done.
  • 36.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 36 The Halting Problem (Turing‘36) • The The halting problem halting problem was the first was the first mathematical function proven to mathematical function proven to have have no no 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 Halts Halts( (P P, ,I I) : ) :≡ ≡ 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.” • Theorem: Theorem: Halts Halts is uncomputable! is uncomputable! – I.e., There does I.e., There does not not exist exist any any algorithm algorithm A A that that computes computes Halts Halts correctly for correctly for all all possible inputs. possible inputs. • Its proof is thus a Its proof is thus a non non-existence proof. -existence proof. • Corollary: Corollary: General impossibility of predictive analysis of General impossibility of predictive analysis of arbitrary computer programs. arbitrary computer programs. Alan Turing 1912-1954
  • 37.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 37 The Proof • Given any Given any arbitrary arbitrary program program H H( (P,I P,I), ), • Consider algorithm Consider algorithm Breaker Breaker, defined as: , defined as: procedure procedure Breaker Breaker( (P P: a program) : a program) halts halts := := H H( (P P, ,P P) ) if if halts halts then while then while T begin end T begin end • Note that Note that Breaker Breaker( (Breaker Breaker) halts iff ) halts iff H H( (Breaker Breaker, ,Breaker Breaker) = ) = F F. . • So So H H does does not not compute the function compute the function Halts Halts! ! Breaker makes a liar out of H, by doing the opposite of whatever H predicts.
  • 38.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 38 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 conjecture E.g. Goldbach’s conjecture: Every integer : Every integer n n≥ ≥2 2 is exactly the average of some two primes. is exactly the average of some two primes.   n n≥ ≥2 2   primes primes p p, ,q q: : n n=( =(p p+ +q q)/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 never never be proved (or disproved) (Gödel). be proved (or disproved) (Gödel).
  • 39.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 39 More Proof Examples • Quiz question 1a: Is this argument correct or Quiz question 1a: Is this argument correct or incorrect? 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.
  • 40.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 40 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 people Let U.D. = all people – Let Let T T( (x x) : ) :≡ “ ≡ “x x is a TA” is a TA” – Let Let E E( (x x) :≡ “ ) :≡ “x x composes easy quizzes” composes easy quizzes” – Then Premise #1 says: Then Premise #1 says:  x x, , T T( (x x)→ )→E E( (x x) )
  • 41.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 41 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: T T(R) (R) – And the Conclusion says: And the Conclusion says: E E(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:
  • 42.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 42 The Proof in Gory Detail • Statement Statement How obtained How obtained 1. 1.  x x, , T T( (x x) ) → → E E( (x x) ) (Premise #1) (Premise #1) 2. 2. T T(Ramesh) → (Ramesh) → E E(Ramesh) (Ramesh) (Universal (Universal instantiation) instantiation) 3. 3. T T(Ramesh) (Ramesh) (Premise #2) (Premise #2) 4. 4. E E(Ramesh) (Ramesh)( (Modus Ponens Modus Ponens from from statements #2 and #3) statements #2 and #3)
  • 43.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 43 Another example • Quiz question 2b: Correct or incorrect: At least Quiz question 2b: Correct or incorrect: At least one of the 280 students in the class is intelligent. one of the 280 students in the class is intelligent. Y is a student of this class. Therefore, Y is Y is a student of this class. Therefore, Y is intelligent. intelligent. • First: Separate premises/conclusion, First: Separate premises/conclusion, & translate to logic: & translate to logic: – Premises: (1) Premises: (1)  x x InClass( InClass(x x) )   Intelligent( Intelligent(x x) ) (2) InClass(Y) (2) InClass(Y) – Conclusion: Intelligent(Y) Conclusion: Intelligent(Y)
  • 44.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 44 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 student X in the class, and X≠Y. ≠Y. – Then the premise Then the premise  x x InClass( InClass(x x) )   Intelligent( Intelligent(x x) ) 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 the only intelligent student in the class, and Y≠X. ≠X. • Therefore, the premises Therefore, the premises do not do not imply the imply the conclusion. conclusion.
  • 45.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 45 Another Example • Quiz question #2: Prove that the sum of a rational Quiz question #2: Prove that the sum of a rational number and an irrational number is always number and an irrational number is always irrational. irrational. • First, you have to understand exactly what the First, you have to understand exactly what the question is asking you to prove: question is asking you to prove: – “ “For all For all real numbers real numbers x x, ,y, y, if if x x is rational and is rational and y y is is irrational, then irrational, then x x+ +y y is irrational.” is irrational.”   x x, ,y y: Rational( : Rational(x x) )   Irrational( Irrational(y y) → Irrational( ) → Irrational(x x+ +y y) )
  • 46.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 46 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 r r: Rational( : Rational(r r) ) ↔ ↔   Integer( Integer(i i) )   Integer( Integer(j j): ): r r = = i i/ /j j. .    reals reals r r: Irrational( : Irrational(r r) ) ↔ ¬ ↔ ¬Rational( Rational(r r) ) • 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:
  • 47.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 47 What you might write • Theorem: Theorem:  x x, ,y y: Rational( : Rational(x x) )   Irr Irrational( ational(y y) Irrational( → ) Irrational( → x x+ +y y) ) • Proof: Proof: Let Let x x, , y y be any rational and irrational be any rational and irrational numbers, respectively numbers, respectively. … (universal generalization) . … (universal generalization) • Now, just from this, what do we know about Now, just from this, what do we know about x x and and y y? You ? You should think back to the definition of rational: should think back to the definition of rational: • … … Since Since x x 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 i i and and j j such that such that x x = = i i/ /j j. . So, let So, let i ix x, ,j jx x 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.
  • 48.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 48 What next? • What do we know about What do we know about y y? Only that ? Only that y y is is irrational: irrational: ¬ ¬  integers integers i i, ,j j: : y y = = i i/ /j j. . • 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 x x+ +y y is is irrational. That is, irrational. That is, ¬ ¬ i i, ,j j: ( : (x x + + y y) = ) = i i/ /j j. . • What happens if we hypothesize the negation of What happens if we hypothesize the negation of this statement? this statement?
  • 49.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 49 More writing… • Suppose that Suppose that x x+ +y y were not irrational. Then were not irrational. Then x x+ +y y would be rational, so would be rational, so   integers integers i i, ,j j: : x x+ +y y = = i i/ /j j. So, let . So, let i is s and and j js s be any such integers be any such integers where where x x+ +y y = = i is s/ / j js s. . • 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 (i ix x/ /j jx x) + ) + y y = ( = (i is s/ /j js s). ). • 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 y y, by , by solving this equation for it. solving this equation for it.
  • 50.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 50 Finishing the proof. • Solving that equation for Solving that equation for y y, we have: , we have: y y = ( = (i is s/ /j js s) – ( ) – (i ix x/ /j jx x) ) = ( = (i is sj jx x – – i ix xj js s)/( )/(j js sj jx x) ) Now, since the numerator and denominator Now, since the numerator and denominator of this expression are both integers, of this expression are both integers, y y is is (by definition) rational. This contradicts (by definition) rational. This contradicts the assumption that the assumption that y y was irrational. was irrational. Therefore, our hypothesis that Therefore, our hypothesis that x x+ +y y is is rational must be false, and so the theorem rational must be false, and so the theorem is proved. is proved.
  • 51.
    Module #2 -Proofs 08/31/24 (c)2001-2003, Michael P. Frank 51 Example 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 desereve Why does this answer desereve no credit no credit? ? – The student attempted to use an example to prove a The student attempted to use an example to prove a universal statement. universal statement. This is This is always invalid always invalid! ! – Even as an example, it’s incomplete, because the Even as an example, it’s incomplete, because the student never even proved that 1+ student never even proved that 1+√2 is irrational! √2 is irrational!

Editor's Notes

  • #4 Of course, when one is proving things about a mathematical model of the real world, one must always recognize the risk that the postulates that are supposed to connect the premises of the model with the real world may fail to be true.
  • #5 Axioms are statements that are taken as true that serve to define the very structures we are reasoning about. Postulates are assumptions stating that some characteristic of an applied mathematical model corresponds to some truth about the real world or some situation being modeled. Hypotheses are statements that are temporarily adopted as being true, for purposes of proving the consequences they would have if they were true, leading to possible falsification of the hypothesis if a predicted consequence turns out to be false. Usually a hypothesis is offered as a way of explaining a known consequence. Hypotheses are not necessarily believed or disbelieved except in the context of the scenario being explored. Premises are statements that the reasoner adopts as true so he can see what the consequences would be. Like hypotheses, they may or may not be believed. Conjectures are statements that are proposed to be logical consequences of other statements, and that may be strongly believed to be such, but that have not yet been proven. Lemmas are relatively uninteresting statements that are proved on the way to proving an actual theorem of interest.
  • #12 Many valid inference rules were first described by Aristotle. He called these patterns of argument “syllogisms.”
  • #18 It’s easy for each fallacy to give a counter-example showing why it is not valid.
  • #19 The given statement is implicitly universal: FORALL integers n, n is even if n-squared is even. Note that although the statement we are trying to prove is true, our proof of it is invalid. It does not give a clear, valid path to the conclusion.
  • #21 This is a relatively involved example and it should perhaps be saved until after some easier ones have already been done. We also need number theory first for this example. The vertical bar “|” means “divides (evenly).” mod refers to the remainder of a division. Later in the class we will encounter the theorem mentioned (first red-highlighted statement). The triple horizontal lines mean between two numbers means those numbers are “congruent” under the given modulus, that is, they give the same remainder when divided by the modulus.
  • #23 The statement that every integer is either odd or even can actually be proven from simpler axioms, the Peano axioms of arithmetic. However, for
  • #33 Need number theory for this example. At least, need the definitions of factorial “!”, and divides notation “|”.
  • #37 Need algorithms first for this example.
  • #38 We discussed Goldbach’s conjecture and Goedel’’s theorem earlier in Module 1.