formal proof methodology - university of maryland · direct proofs disproving universal ... formal...
TRANSCRIPT
Formal Proof Methodology
Jason Filippou
CMSC250 @ UMCP
06-09-2016
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 1 / 45
Today’s agenda
We will talk about how to formally prove mathematicalstatements.
Some connection to inference in propositional and predicate logic.
More Number Theory definitions will be given as we string along.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 2 / 45
Outline
1 Categories of statements to prove
2 Proving Existential statements
3 Proving Universal statementsDirect proofsDisproving Universal StatementsIndirect proofs
4 Three famous theorems
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 3 / 45
Categories of statements to prove
Categories of statements to prove
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 4 / 45
Categories of statements to prove
Existential statements
Statements of type:
(9x 2 D)P (x)
are referred to as existential statements.
They require us to prove a property P for some x 2 D.Two ways that we deal with those questions:
Constructively: We “construct” or “show” an element of D forwhich P holds and we’re done (why)?Non-constructively: We neither construct nor show such an element,but we prove that it’s a logical necessity for such an element toexist!
Examples:There exists a least prime number.There exists no greatest prime number.(9 a, b) 2 R�Q : ab 2 Q
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 5 / 45
Categories of statements to prove
Universal statements
Statements of type:
(8x 2 D)P (x)
are referred to as universal statements.
They require of us to prove a property P for every single x 2 D.Most often, D will be Z or N.
We can prove such statements directly or indirectly.
They constitute the majority of statements that we will dealwith.
Examples:(8n 2 Zodd), (9k 2 Z) : n = 8k + 1(8n 2 Z), n
2 2 Zodd ) n 2 Zodd
Every Greek politician is a crook.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 6 / 45
Categories of statements to prove
Proving the a�rmative or the negative
Given a mathematical statement S, S can be either true or false(law of excluded middle).
We will call a proof that S is True a proof of the a�rmative.
We will call a proof that S is False a proof of the negative.
Recall negated quantifier equivalences:
⇠(9x)P (x) ⌘ (8x)⇠P (x)⇠(8x)P (x) ⌘ (9x)⇠P (x)
So, arguing the negative of an existential statement is equivalentto arguing the positive for a universal statement, and vice versa!
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 7 / 45
Proving Existential statements
Proving Existential statements
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 8 / 45
Proving Existential statements
Constructive proofs
Theorem (Least prime number)
There exists a least prime number.
Proof: Existence of a least prime number.
By the definition of primality, an integer n is prime i↵ n � 2 and itsonly factors are 1 and itself. 2 satisfies both requirements and becauseof the definition, no prime p exists such that p < 2. End of proof.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 9 / 45
Proving Existential statements
Constructive proofs
Let’s all prove the a�rmatives of the following statements together:
Theorem
There exists an integer n that can be written in two ways as a sum of
two prime numbers.
Theorem
Suppose r, s 2 Z . Then, 9k 2 Z : 22r + 18s = 2k.
Definition (Perfect squares)
An integer n is called a perfect square i↵ there exists an integer ksuch that n = k
2.
Theorem
There is a perfect square that can be written as a sum of two other
perfect squares.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 10 / 45
Proving Existential statements
Constructive proofs
Let’s all prove the a�rmatives of the following statements together:
Theorem
There exists an integer n that can be written in two ways as a sum of
two prime numbers.
Theorem
Suppose r, s 2 Z . Then, 9k 2 Z : 22r + 18s = 2k.
Definition (Perfect squares)
An integer n is called a perfect square i↵ there exists an integer ksuch that n = k
2.
Theorem
There is a perfect square that can be written as a sum of two other
perfect squares.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 10 / 45
Proving Existential statements
Non-Constructive proofs
Here’s a rather famous example of a non-constructive proof:
Theorem
There exists a pair of irrational numbers a and b such that a
bis a
rational number.
Proof.
Let a = b =p2. We know that
p2 is irrationala, so a and b are both
irrational. Is ab rational? Two cases:
If yes, the statement is proven.
If not, then it is irrational by the definition of real numbers.Examine the number ((
p2)
p2)
p2. This number is rational,
because ((p2)
p2)
p2 = (
p2)2 = 2 = 2
1
. End of proof.
aIn fact, we will prove that formally down the road.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 11 / 45
Proving Existential statements
Non-Constructive proofs
Here’s a rather famous example of a non-constructive proof:
Theorem
There exists a pair of irrational numbers a and b such that a
bis a
rational number.
Proof.
Let a = b =p2. We know that
p2 is irrationala, so a and b are both
irrational. Is ab rational? Two cases:
If yes, the statement is proven.
If not, then it is irrational by the definition of real numbers.Examine the number ((
p2)
p2)
p2. This number is rational,
because ((p2)
p2)
p2 = (
p2)2 = 2 = 2
1
. End of proof.
aIn fact, we will prove that formally down the road.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 11 / 45
Proving Universal statements
Proving Universal statements
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 12 / 45
Proving Universal statements Direct proofs
Direct proofs
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 13 / 45
Proving Universal statements Direct proofs
Proof by exhaustion
When my domain D is su�ciently small to explore by hand, Imight consider a proof by (domain) exhaustion.Example:
Theorem
For every even integer between (and including) 4 and 30, n can be
written as a sum of two primes.
Proof.
4=2+2 6 = 3 + 3 8 = 3 + 5 10 = 5 + 5a
12 = 5 + 7 14 = 7 + 7 16 = 13 + 3b 18 = 7 + 1120 = 7 + 13 22 = 5 + 17 24 = 5 + 19 26 = 7 + 1928 = 11 + 17 30 = 11 + 19
aAlso, 10 = 3 + 7
bAlso, 16 = 11 + 5
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 14 / 45
Proving Universal statements Direct proofs
Universal generalization
Reminder: Rule of universal generalization.
Universal Generalization
P (A) for an arbitrarily chosen A 2 D
) (8x 2 D)P (x)
A: Generic particular (particular element, yet arbitrarily -generically - chosen)
Needs to be explicitly mentioned.
Choice of generic particular often perilous.
Most of our proofs will be of this form.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 15 / 45
Proving Universal statements Direct proofs
Universal generalization
Reminder: Rule of universal generalization.
Universal Generalization
P (A) for an arbitrarily chosen A 2 D
) (8x 2 D)P (x)
A: Generic particular (particular element, yet arbitrarily -generically - chosen)
Needs to be explicitly mentioned.
Choice of generic particular often perilous.
Most of our proofs will be of this form.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 15 / 45
Proving Universal statements Direct proofs
Example
Theorem (Odd square)
The square of an odd integer is also odd.
Symbolic proof.
Let a 2 Z be a generic particular of Z. Then, by the definition of oddintegers, 9k 2 Z : a = 2k + 1. Then,
a
2 = (2k + 1)2 = 4k2 + 4k + 1 = 2 k(2k + 2)| {z }r2Z
+1 = 2r + 1
Question: Is k a generic particular in this proof? What about r?
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 16 / 45
Proving Universal statements Direct proofs
Example
Theorem (Odd square)
The square of an odd integer is also odd.
Symbolic proof.
Let a 2 Z be a generic particular of Z. Then, by the definition of oddintegers, 9k 2 Z : a = 2k + 1. Then,
a
2 = (2k + 1)2 = 4k2 + 4k + 1 = 2 k(2k + 2)| {z }r2Z
+1 = 2r + 1
Question: Is k a generic particular in this proof? What about r?
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 16 / 45
Proving Universal statements Direct proofs
Example
Textual proof.
Let a be a generic particular for the set of integers. Then, by definitionof odd integers, we know that there exists an integer k such thata = 2k + 1. Then,
a
2 = (2k + 1)2 = 4k2 + 4k + 1 = 2k(2k + 2) + 1 (1)
Let r = k(2k + 2) be an integer. Substituting the value of r intoequation 1, we have that a2 = 2r + 1. But this is exactly the definitionof an odd integer, and we conclude that a is odd. End of proof.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 17 / 45
Proving Universal statements Direct proofs
Practice
Let’s prove some universal statements.
Before proving them, make sure you understand what they ask.
Theorem
The sum of any two odd integers is even.
Theorem
(n 2 Zodd) ) (�1)n = �1.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 18 / 45
Proving Universal statements Direct proofs
Practice
Let’s prove some universal statements.
Before proving them, make sure you understand what they ask.
Theorem
The sum of any two odd integers is even.
Theorem
(n 2 Zodd) ) (�1)n = �1.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 18 / 45
Proving Universal statements Direct proofs
Proof by division into cases
Another popular way to prove universal statements is by dividingD into sub-domains and proving the statement for everysub-domain.
Popular divisions: {Zodd
,Zeven}, {R⇤�,R+}, {2,P� {2}}
Example:
Theorem
Any two consecutive integers have opposite parity.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 19 / 45
Proving Universal statements Direct proofs
Proof by division into cases
Proof.
Let a 2 Z be a generic particular. Then, a+1 is its consecutive integer.a will be either odd or even. We distinguish between those two cases:
1 Assume a is odd. Therefore, by the definition of odd numbers,9k 2 Z : a = 2k + 1 ) a+ 1 = (2k + 1) + 1 ) a+ 1 = 2 (k + 2)| {z }
r2Z
)
a+ 1 = 2r. Therefore, a+ 1 is even.
2 Assume a is even. Therefore, by the definition of even numbers,9k 2 Z : a = 2k ) a+ 1 = 2k + 1. Therefore, a+ 1 is odd.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 20 / 45
Proving Universal statements Direct proofs
Generic pitfalls in particular proofs
Critique the following proof segments:
Proof.
Let p, q 2 Q be generic particulars. Let also a, c 2 Z and b, d 2 Z⇤ begeneric particulars such that p = a
b and c = cd . . . .
Proof.
Suppose m,n are generic particulars for the set of odd integers. Then,by definition of odd, m = 2k + 1 and n = 2k + 1 for some integer k.. . .
In the second proof above, which one among m and n is truly ageneric particular?
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 21 / 45
Proving Universal statements Direct proofs
Generic pitfalls in particular proofs
Critique the following proof segments:
Proof.
Let p, q 2 Q be generic particulars. Let also a, c 2 Z and b, d 2 Z⇤ begeneric particulars such that p = a
b and c = cd . . . .
Proof.
Suppose m,n are generic particulars for the set of odd integers. Then,by definition of odd, m = 2k + 1 and n = 2k + 1 for some integer k.. . .
In the second proof above, which one among m and n is truly ageneric particular?
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 21 / 45
Proving Universal statements Disproving Universal Statements
Disproving Universal Statements
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 22 / 45
Proving Universal statements Disproving Universal Statements
The counter-example
Recall: ⇠(8x)P (x) ⌘ (9x)⇠P (x)
So an existential proof of the negative is required.Most often, this will be a constructive proof.
The idea works for all direct proof methodologies we’ve discussed.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 23 / 45
Proving Universal statements Disproving Universal Statements
Examples
Theorem
Every odd number between 3 and 13 inclusive is prime.
Disproof.
9 is an odd number between 3 and 13 for which(9p, q) 2 N� {1, 9} : p · q = 9, since 9 = 3⇥ 3. Therefore, 9 iscomposite and the statement is false.
Theorem
(8n) 2 P ) (�1)n = �1.
Disproof.
2 2 P, but (�1)2 = 1. Therefore, the statement is false.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 24 / 45
Proving Universal statements Disproving Universal Statements
Examples
Theorem
Every odd number between 3 and 13 inclusive is prime.
Disproof.
9 is an odd number between 3 and 13 for which(9p, q) 2 N� {1, 9} : p · q = 9, since 9 = 3⇥ 3. Therefore, 9 iscomposite and the statement is false.
Theorem
(8n) 2 P ) (�1)n = �1.
Disproof.
2 2 P, but (�1)2 = 1. Therefore, the statement is false.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 24 / 45
Proving Universal statements Disproving Universal Statements
Examples
Theorem
Every odd number between 3 and 13 inclusive is prime.
Disproof.
9 is an odd number between 3 and 13 for which(9p, q) 2 N� {1, 9} : p · q = 9, since 9 = 3⇥ 3. Therefore, 9 iscomposite and the statement is false.
Theorem
(8n) 2 P ) (�1)n = �1.
Disproof.
2 2 P, but (�1)2 = 1. Therefore, the statement is false.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 24 / 45
Proving Universal statements Disproving Universal Statements
Examples
Theorem
Every odd number between 3 and 13 inclusive is prime.
Disproof.
9 is an odd number between 3 and 13 for which(9p, q) 2 N� {1, 9} : p · q = 9, since 9 = 3⇥ 3. Therefore, 9 iscomposite and the statement is false.
Theorem
(8n) 2 P ) (�1)n = �1.
Disproof.
2 2 P, but (�1)2 = 1. Therefore, the statement is false.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 24 / 45
Proving Universal statements Indirect proofs
Indirect proofs
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 25 / 45
Proving Universal statements Indirect proofs
Proof by contradiction
Recall the definition of the law of contradiction frompropositional logic:
Law of Contradiction⇠p ) c
) p
Tremendously useful and famous proof mechanism.
Use when a counter-example isn’t obvious and direct proof haslead nowhere.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 26 / 45
Proving Universal statements Indirect proofs
Proof by contradiction
General idea: We want to prove a statement p. If we assume ⇠p
and reach a contradiction, then, by the law of contradiction, wecan infer p.
So, for a universal statement (8x)P (x), we assume(⇠8x)P (x) ⌘ (9x)⇠P (x), and aim towards a contradiction.
Equivalently for an existential statement.
Since, when we reach the contradiction, the only additionalassumption we’ve made is that p is false, p has to be true.
***ALWAYS*** mention the discovery of a contradictionclearly within your proof, e.g:
“Contradiction, because XYZ.”“Since XYZ, we have reached a contradiction.”
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 27 / 45
Proving Universal statements Indirect proofs
Applications
Theorem
There is no greatest integer.
Proof.
Assume not. Then, (9M 2 Z) : (8m 2 Z), M � m. But the realnumber N = M + 1 is also an integer, since it’s a sum of two integers.Since N > M , we have reached a contradiction, and we conclude that agreatest integer cannot possibly exist.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 28 / 45
Proving Universal statements Indirect proofs
Applications
Theorem
There is no greatest integer.
Proof.
Assume not. Then, (9M 2 Z) : (8m 2 Z), M � m. But the realnumber N = M + 1 is also an integer, since it’s a sum of two integers.Since N > M , we have reached a contradiction, and we conclude that agreatest integer cannot possibly exist.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 28 / 45
Proving Universal statements Indirect proofs
Applications
Theorem
Prove that the sum of a rational and irrational number is irrational.
Proof.
Assume not. So, there exists a rational r and an irrational q such that r + q isrational. By the definition of rational numbers, there exist integers a, b, c, d,with b and d non-zero, such that r = a
b and r + q = cd . Solving for q, we
obtain:
r + q =c
d
, a
b
+ q =c
d
, q =a
b
� c
d
, q =ad� bc
bd
Both ad� bc and bd are integers, because they are linear combinationsa ofintegers. Furthermore, bd 6= 0 because both b and d are non-zero. But thismeans that q can be written as a fraction of an integer over a non-zerointeger. This contradicts our assumption that q is irrational, which meansthat the statement is true, and r + q must be irrational.
aSums of products.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 29 / 45
Proving Universal statements Indirect proofs
Applications
Theorem
Prove that the sum of a rational and irrational number is irrational.
Proof.
Assume not. So, there exists a rational r and an irrational q such that r + q isrational. By the definition of rational numbers, there exist integers a, b, c, d,with b and d non-zero, such that r = a
b and r + q = cd . Solving for q, we
obtain:
r + q =c
d
, a
b
+ q =c
d
, q =a
b
� c
d
, q =ad� bc
bd
Both ad� bc and bd are integers, because they are linear combinationsa ofintegers. Furthermore, bd 6= 0 because both b and d are non-zero. But thismeans that q can be written as a fraction of an integer over a non-zerointeger. This contradicts our assumption that q is irrational, which meansthat the statement is true, and r + q must be irrational.
aSums of products.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 29 / 45
Proving Universal statements Indirect proofs
Divisibility
To do some more interesting problems with proof by contradiction,let’s introduce some more Number Theory.
Definition (Divisibility)
Let n 2 Z and d 2 Z⇤. Then, we say or denote one of the following:
d divides n
n is divided by d
d|nd is a divisor (or factor) of n
n is a multiple of d
i↵ 9k 2 Z : n = d · k
Some notation: If a does not divide b, we denote: a 6 | b.Attention: a|b is not the same as a/b!
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 30 / 45
Proving Universal statements Indirect proofs
Divisibility
To do some more interesting problems with proof by contradiction,let’s introduce some more Number Theory.
Definition (Divisibility)
Let n 2 Z and d 2 Z⇤. Then, we say or denote one of the following:
d divides n
n is divided by d
d|nd is a divisor (or factor) of n
n is a multiple of d
i↵ 9k 2 Z : n = d · k
Some notation: If a does not divide b, we denote: a 6 | b.Attention: a|b is not the same as a/b!
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 30 / 45
Proving Universal statements Indirect proofs
Properties of divisibility
All the following can be proven:
Theorem (All non-zero integers divide zero)
8n 2 Z⇤, n|0.
What about 0|n(8n 2 Z)?
Theorem (Transitivity of divisibility)
(8a, b, c 2 Z)a|b ^ b|c ) a|c
Is divisibility commutative?
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 31 / 45
Proving Universal statements Indirect proofs
Properties of divisibility
All the following can be proven:
Theorem (All non-zero integers divide zero)
8n 2 Z⇤, n|0.
What about 0|n(8n 2 Z)?
Theorem (Transitivity of divisibility)
(8a, b, c 2 Z)a|b ^ b|c ) a|c
Is divisibility commutative?
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 31 / 45
Proving Universal statements Indirect proofs
Properties of divisibility
All the following can be proven:
Theorem (All non-zero integers divide zero)
8n 2 Z⇤, n|0.
What about 0|n(8n 2 Z)?
Theorem (Transitivity of divisibility)
(8a, b, c 2 Z)a|b ^ b|c ) a|c
Is divisibility commutative?
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 31 / 45
Proving Universal statements Indirect proofs
Prove these!
Prove the a�rmative for all those theorems.
Theorem
For all integers a, b, c, if a 6 |bc then a 6 |b.
Theorem
(8a, b, c 2 Z)((a|b) ^ (a 6 | c)) ) a 6 |(b+ c)
Once again, note how di↵erent the style of presentation of all ofthose theorems is.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 32 / 45
Proving Universal statements Indirect proofs
Here’s two hard ones!
Theorem
Any integer n > 1 is divisible by a prime number.
Theorem
For any integer a and prime p, p|a ) p 6 | (a+ 1)
Prove these at home!
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 33 / 45
Proving Universal statements Indirect proofs
LOL WUT (pitfalls with contradictions)
Theorem
Every integer is rational.
We’ve already proven this directly.The following is a proof by contradiction of the same fact.
Proof.
Suppose not. Then, every integer is irrational. Since every integer isirrational, so is 0. But we know that we can express 0 as a ratio ofintegers, e.g.a 0 = 0
1
. By the definition of rational numbers, this meansthat 0 2 Q. This contradicts our assumption that every integer isirrational, which means that the statement is true.
aThis means “for example”.
What’s going on here?
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 34 / 45
Proving Universal statements Indirect proofs
Proof by contraposition
A somewhat more rare kind of proof.
Takes advantage of the equivalence a ) b ⌘ ⇠b ) ⇠
a.
Idea: If you’re having trouble directly proving a universal/statement, maybe proving its contrapositive will be easier!
Example:
Theorem
(8n 2 Z), n2 2 Zeven ) n 2 Zeven
.
Proof.
We can equivalently prove that (8n 2 Z), n 2 Zodd ) n
2 2 Zodd. Thiswas the first universal statement we proved on Thursday (see slide 16).Done.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 35 / 45
Proving Universal statements Indirect proofs
Applications
Prove the following through contraposition:
Theorem
Given two positive real numbers, if their product is greater than 100,
then at least one of the numbers is greater than 10.
Theorem
For all integers m and n, if m+ n is even, then either m and n are
both even or m and n are both odd.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 36 / 45
Proving Universal statements Indirect proofs
Floor & Ceiling
Number Theory deals with integers (whole numbers).
Sometimes, however, we have to deal with non-integers (rationals,irrationals).
Two functions from R to Z are floor : b c and ceiling : d e.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 37 / 45
Proving Universal statements Indirect proofs
Floor & Ceiling
Definition (Floor and Ceiling)
Let r be a real number. Then:
The ceiling of r, denoted dre is the smallest integer n such thatn � r.
The floor of r, denoted brc is the largest integer n such that n r.
Corollary 1
8n 2 Z, bnc = dne = n
Corollary 2
8x 2 R, n = dxe , n� 1 < x n and8x 2 R, n = bxc , n x < n+ 1
What’s the value of bn+ 1
/2c?What about bn+ 99
/100c?
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 38 / 45
Proving Universal statements Indirect proofs
Floor & Ceiling
Definition (Floor and Ceiling)
Let r be a real number. Then:
The ceiling of r, denoted dre is the smallest integer n such thatn � r.
The floor of r, denoted brc is the largest integer n such that n r.
Corollary 1
8n 2 Z, bnc = dne = n
Corollary 2
8x 2 R, n = dxe , n� 1 < x n and8x 2 R, n = bxc , n x < n+ 1
What’s the value of bn+ 1
/2c?What about bn+ 99
/100c?
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 38 / 45
Proving Universal statements Indirect proofs
Floor & Ceiling
Definition (Floor and Ceiling)
Let r be a real number. Then:
The ceiling of r, denoted dre is the smallest integer n such thatn � r.
The floor of r, denoted brc is the largest integer n such that n r.
Corollary 1
8n 2 Z, bnc = dne = n
Corollary 2
8x 2 R, n = dxe , n� 1 < x n and8x 2 R, n = bxc , n x < n+ 1
What’s the value of bn+ 1
/2c?What about bn+ 99
/100c?
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 38 / 45
Proving Universal statements Indirect proofs
Floor & Ceiling
Definition (Floor and Ceiling)
Let r be a real number. Then:
The ceiling of r, denoted dre is the smallest integer n such thatn � r.
The floor of r, denoted brc is the largest integer n such that n r.
Corollary 1
8n 2 Z, bnc = dne = n
Corollary 2
8x 2 R, n = dxe , n� 1 < x n and8x 2 R, n = bxc , n x < n+ 1
What’s the value of bn+ 1
/2c?What about bn+ 99
/100c?Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 38 / 45
Proving Universal statements Indirect proofs
Proofs with Floor / Ceiling
Prove the truth or falsehood of these conjectures. Read themcarefully!
Conjecture 1
(8x, y 2 R), bx+ yc = bxc+ byc
Conjecture 2
(8x 2 R, y 2 Z), bx+ yc = bxc+ y
Conjecture 3
For any integer n,
bn2
c =(
n2
if n is evenn�1
2
otherwise
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 39 / 45
Three famous theorems
Three famous theorems
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 40 / 45
Three famous theorems
This section
In this section, we will present three famous theorems:1
Unique factorization theorem.2
p2 is irrational.
3 There are infinitely many primes.
First one due to C.F Gauss, the other ones due to Euclid ofAlexandria.
You need not remember their proofs, but you need remember
what they state!
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 41 / 45
Three famous theorems
Unique Factorization Theorem
Also referred to as the Fundamental Theorem of Arithmetic.
Theorem (Fundamental Theorem of Arithmetic)
For all integers n > 1, there exist:
k 2 N+
p
1
, p
2
, . . . pk 2 P
e
1
, e
2
, . . . ek 2 N+
such that:
n = p
e1
1
· pe22
· · · · · pekk
Additionally, this representation is unique: any other prime
factorization is identical to this one up to re-ordering of the factors!
Examples: 2 = 21, 3 = 31, 4 = 22, 10 = 21 · 51, 20 = 22 · 51, 162 =21 · 33, 999 = 33 · 37, 1000 = 23 · 53, 1001 = 7 · 11 · 13
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 42 / 45
Three famous theorems
Unique Factorization Theorem
Also referred to as the Fundamental Theorem of Arithmetic.
Theorem (Fundamental Theorem of Arithmetic)
For all integers n > 1, there exist:
k 2 N+
p
1
, p
2
, . . . pk 2 P
e
1
, e
2
, . . . ek 2 N+
such that:
n = p
e1
1
· pe22
· · · · · pekk
Additionally, this representation is unique: any other prime
factorization is identical to this one up to re-ordering of the factors!
Examples: 2 = 21, 3 = 31, 4 = 22, 10 = 21 · 51, 20 = 22 · 51, 162 =21 · 33, 999 = 33 · 37, 1000 = 23 · 53, 1001 = 7 · 11 · 13
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 42 / 45
Three famous theorems
Unique Factorization Theorem
Also referred to as the Fundamental Theorem of Arithmetic.
Theorem (Fundamental Theorem of Arithmetic)
For all integers n > 1, there exist:
k 2 N+
p
1
, p
2
, . . . pk 2 P
e
1
, e
2
, . . . ek 2 N+
such that:
n = p
e1
1
· pe22
· · · · · pekk
Additionally, this representation is unique: any other prime
factorization is identical to this one up to re-ordering of the factors!
Examples: 2 = 21, 3 = 31, 4 = 22, 10 = 21 · 51, 20 = 22 · 51, 162 =21 · 33, 999 = 33 · 37, 1000 = 23 · 53, 1001 = 7 · 11 · 13
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 42 / 45
Three famous theorems
Unique Factorization Theorem
Also referred to as the Fundamental Theorem of Arithmetic.
Theorem (Fundamental Theorem of Arithmetic)
For all integers n > 1, there exist:
k 2 N+
p
1
, p
2
, . . . pk 2 P
e
1
, e
2
, . . . ek 2 N+
such that:
n = p
e1
1
· pe22
· · · · · pekk
Additionally, this representation is unique: any other prime
factorization is identical to this one up to re-ordering of the factors!
Examples: 2 = 21, 3 = 31, 4 = 22, 10 = 21 · 51, 20 = 22 · 51, 162 =21 · 33, 999 = 33 · 37, 1000 = 23 · 53, 1001 = 7 · 11 · 13
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 42 / 45
Three famous theorems
Unique Factorization Theorem
Also referred to as the Fundamental Theorem of Arithmetic.
Theorem (Fundamental Theorem of Arithmetic)
For all integers n > 1, there exist:
k 2 N+
p
1
, p
2
, . . . pk 2 P
e
1
, e
2
, . . . ek 2 N+
such that:
n = p
e1
1
· pe22
· · · · · pekk
Additionally, this representation is unique: any other prime
factorization is identical to this one up to re-ordering of the factors!
Examples: 2 = 21, 3 = 31, 4 = 22, 10 = 21 · 51, 20 = 22 · 51, 162 =21 · 33, 999 = 33 · 37, 1000 = 23 · 53, 1001 = 7 · 11 · 13
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 42 / 45
Three famous theorems
Unique Factorization Theorem
Also referred to as the Fundamental Theorem of Arithmetic.
Theorem (Fundamental Theorem of Arithmetic)
For all integers n > 1, there exist:
k 2 N+
p
1
, p
2
, . . . pk 2 P
e
1
, e
2
, . . . ek 2 N+
such that:
n = p
e1
1
· pe22
· · · · · pekk
Additionally, this representation is unique: any other prime
factorization is identical to this one up to re-ordering of the factors!
Examples: 2 = 21, 3 = 31, 4 = 22, 10 = 21 · 51, 20 = 22 · 51, 162 =21 · 33, 999 = 33 · 37, 1000 = 23 · 53, 1001 = 7 · 11 · 13
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 42 / 45
Three famous theorems
Unique Factorization Theorem
Also referred to as the Fundamental Theorem of Arithmetic.
Theorem (Fundamental Theorem of Arithmetic)
For all integers n > 1, there exist:
k 2 N+
p
1
, p
2
, . . . pk 2 P
e
1
, e
2
, . . . ek 2 N+
such that:
n = p
e1
1
· pe22
· · · · · pekk
Additionally, this representation is unique: any other prime
factorization is identical to this one up to re-ordering of the factors!
Examples: 2 = 21, 3 = 31, 4 = 22, 10 = 21 · 51, 20 = 22 · 51, 162 =21 · 33, 999 = 33 · 37, 1000 = 23 · 53, 1001 = 7 · 11 · 13
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 42 / 45
Three famous theorems
p2 is irrational
Theorem (p2 is irrational)
The number
p2 is irrational.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 43 / 45
Three famous theorems
p2 is irrational
Proof (by contradiction).
Suppose not. Therefore,
p2 2 Q ) 9a, b 2 Z, b 6= 0, such that
p2 =
ab
(1)
Without loss of generality, we can assume that a and b have no common factors.
Squaring both sides of (1), we obtain:
a2
= 2b2 (2)
From (2) and the definition of even numbers, we deduce that a2
is even. From a
known theorem, we have that a is also even, therefore, 9m 2 Z :
a = 2m(2)
) 4m2
= 2b2 ) b2 = 2m2
(3)
By (3), we deduce that b2 is also even and, by the same theorem, that b is even. So,
both a and b are even. But this means that they have common factors.
Contradiction. Therefore,
p2 /2 Q.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 44 / 45
Three famous theorems
p2 is irrational
Proof (by contradiction).
Suppose not. Therefore,
p2 2 Q ) 9a, b 2 Z, b 6= 0, such that
p2 =
ab
(1)
Without loss of generality, we can assume that a and b have no common factors.
Squaring both sides of (1), we obtain:
a2
= 2b2 (2)
From (2) and the definition of even numbers, we deduce that a2
is even. From a
known theorem, we have that a is also even, therefore, 9m 2 Z :
a = 2m(2)
) 4m2
= 2b2 ) b2 = 2m2
(3)
By (3), we deduce that b2 is also even and, by the same theorem, that b is even. So,
both a and b are even. But this means that they have common factors.
Contradiction. Therefore,
p2 /2 Q.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 44 / 45
Three famous theorems
p2 is irrational
Proof (by contradiction).
Suppose not. Therefore,
p2 2 Q ) 9a, b 2 Z, b 6= 0, such that
p2 =
ab
(1)
Without loss of generality, we can assume that a and b have no common factors.
Squaring both sides of (1), we obtain:
a2
= 2b2 (2)
From (2) and the definition of even numbers, we deduce that a2
is even. From a
known theorem, we have that a is also even, therefore, 9m 2 Z :
a = 2m(2)
) 4m2
= 2b2 ) b2 = 2m2
(3)
By (3), we deduce that b2 is also even and, by the same theorem, that b is even. So,
both a and b are even. But this means that they have common factors.
Contradiction. Therefore,
p2 /2 Q.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 44 / 45
Three famous theorems
p2 is irrational
Proof (by contradiction).
Suppose not. Therefore,
p2 2 Q ) 9a, b 2 Z, b 6= 0, such that
p2 =
ab
(1)
Without loss of generality, we can assume that a and b have no common factors.
Squaring both sides of (1), we obtain:
a2
= 2b2 (2)
From (2) and the definition of even numbers, we deduce that a2
is even.
From a
known theorem, we have that a is also even, therefore, 9m 2 Z :
a = 2m(2)
) 4m2
= 2b2 ) b2 = 2m2
(3)
By (3), we deduce that b2 is also even and, by the same theorem, that b is even. So,
both a and b are even. But this means that they have common factors.
Contradiction. Therefore,
p2 /2 Q.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 44 / 45
Three famous theorems
p2 is irrational
Proof (by contradiction).
Suppose not. Therefore,
p2 2 Q ) 9a, b 2 Z, b 6= 0, such that
p2 =
ab
(1)
Without loss of generality, we can assume that a and b have no common factors.
Squaring both sides of (1), we obtain:
a2
= 2b2 (2)
From (2) and the definition of even numbers, we deduce that a2
is even. From a
known theorem, we have that a is also even, therefore, 9m 2 Z :
a = 2m(2)
) 4m2
= 2b2 ) b2 = 2m2
(3)
By (3), we deduce that b2 is also even and, by the same theorem, that b is even. So,
both a and b are even. But this means that they have common factors.
Contradiction. Therefore,
p2 /2 Q.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 44 / 45
Three famous theorems
p2 is irrational
Proof (by contradiction).
Suppose not. Therefore,
p2 2 Q ) 9a, b 2 Z, b 6= 0, such that
p2 =
ab
(1)
Without loss of generality, we can assume that a and b have no common factors.
Squaring both sides of (1), we obtain:
a2
= 2b2 (2)
From (2) and the definition of even numbers, we deduce that a2
is even. From a
known theorem, we have that a is also even, therefore, 9m 2 Z :
a = 2m(2)
) 4m2
= 2b2 ) b2 = 2m2
(3)
By (3), we deduce that b2 is also even and, by the same theorem, that b is even.
So,
both a and b are even. But this means that they have common factors.
Contradiction. Therefore,
p2 /2 Q.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 44 / 45
Three famous theorems
p2 is irrational
Proof (by contradiction).
Suppose not. Therefore,
p2 2 Q ) 9a, b 2 Z, b 6= 0, such that
p2 =
ab
(1)
Without loss of generality, we can assume that a and b have no common factors.
Squaring both sides of (1), we obtain:
a2
= 2b2 (2)
From (2) and the definition of even numbers, we deduce that a2
is even. From a
known theorem, we have that a is also even, therefore, 9m 2 Z :
a = 2m(2)
) 4m2
= 2b2 ) b2 = 2m2
(3)
By (3), we deduce that b2 is also even and, by the same theorem, that b is even. So,
both a and b are even.
But this means that they have common factors.
Contradiction. Therefore,
p2 /2 Q.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 44 / 45
Three famous theorems
p2 is irrational
Proof (by contradiction).
Suppose not. Therefore,
p2 2 Q ) 9a, b 2 Z, b 6= 0, such that
p2 =
ab
(1)
Without loss of generality, we can assume that a and b have no common factors.
Squaring both sides of (1), we obtain:
a2
= 2b2 (2)
From (2) and the definition of even numbers, we deduce that a2
is even. From a
known theorem, we have that a is also even, therefore, 9m 2 Z :
a = 2m(2)
) 4m2
= 2b2 ) b2 = 2m2
(3)
By (3), we deduce that b2 is also even and, by the same theorem, that b is even. So,
both a and b are even. But this means that they have common factors.
Contradiction. Therefore,
p2 /2 Q.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 44 / 45
Three famous theorems
Infinitude of primes
Theorem (Infinitude of primes)
There are infinitely many prime numbers.
Proof (by contradiction).
Suppose not. Then, the set of primes is finite, so we can enumeratethem in finite time in ascending order: p
1
, p
2
, . . . , pn
Consider the integer: N = p
1
· p2
· · · · · pn + 1. Clearly, N > 1, since thesmallest prime p
1
= 2. Therefore, by a known theorem, N isdivisible by a prime.Let pi, i 2 {1, 2, . . . , n} be this prime, then pi|N . Clearly,pi|p1 · p2 · · · · · pn, by construction of this product.By a known theorem, pi 6 | (p1 · p2 · · · · · pn + 1) = N . Contradiction.Therefore, the set of primes cannot be finite.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 45 / 45
Three famous theorems
Infinitude of primes
Theorem (Infinitude of primes)
There are infinitely many prime numbers.
Proof (by contradiction).
Suppose not. Then, the set of primes is finite, so we can enumeratethem in finite time in ascending order: p
1
, p
2
, . . . , pn
Consider the integer: N = p
1
· p2
· · · · · pn + 1. Clearly, N > 1, since thesmallest prime p
1
= 2. Therefore, by a known theorem, N isdivisible by a prime.Let pi, i 2 {1, 2, . . . , n} be this prime, then pi|N . Clearly,pi|p1 · p2 · · · · · pn, by construction of this product.By a known theorem, pi 6 | (p1 · p2 · · · · · pn + 1) = N . Contradiction.Therefore, the set of primes cannot be finite.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 45 / 45
Three famous theorems
Infinitude of primes
Theorem (Infinitude of primes)
There are infinitely many prime numbers.
Proof (by contradiction).
Suppose not. Then, the set of primes is finite, so we can enumeratethem in finite time in ascending order: p
1
, p
2
, . . . , pn
Consider the integer: N = p
1
· p2
· · · · · pn + 1.
Clearly, N > 1, since thesmallest prime p
1
= 2. Therefore, by a known theorem, N isdivisible by a prime.Let pi, i 2 {1, 2, . . . , n} be this prime, then pi|N . Clearly,pi|p1 · p2 · · · · · pn, by construction of this product.By a known theorem, pi 6 | (p1 · p2 · · · · · pn + 1) = N . Contradiction.Therefore, the set of primes cannot be finite.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 45 / 45
Three famous theorems
Infinitude of primes
Theorem (Infinitude of primes)
There are infinitely many prime numbers.
Proof (by contradiction).
Suppose not. Then, the set of primes is finite, so we can enumeratethem in finite time in ascending order: p
1
, p
2
, . . . , pn
Consider the integer: N = p
1
· p2
· · · · · pn + 1. Clearly, N > 1, since thesmallest prime p
1
= 2.
Therefore, by a known theorem, N isdivisible by a prime.Let pi, i 2 {1, 2, . . . , n} be this prime, then pi|N . Clearly,pi|p1 · p2 · · · · · pn, by construction of this product.By a known theorem, pi 6 | (p1 · p2 · · · · · pn + 1) = N . Contradiction.Therefore, the set of primes cannot be finite.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 45 / 45
Three famous theorems
Infinitude of primes
Theorem (Infinitude of primes)
There are infinitely many prime numbers.
Proof (by contradiction).
Suppose not. Then, the set of primes is finite, so we can enumeratethem in finite time in ascending order: p
1
, p
2
, . . . , pn
Consider the integer: N = p
1
· p2
· · · · · pn + 1. Clearly, N > 1, since thesmallest prime p
1
= 2. Therefore, by a known theorem, N isdivisible by a prime.
Let pi, i 2 {1, 2, . . . , n} be this prime, then pi|N . Clearly,pi|p1 · p2 · · · · · pn, by construction of this product.By a known theorem, pi 6 | (p1 · p2 · · · · · pn + 1) = N . Contradiction.Therefore, the set of primes cannot be finite.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 45 / 45
Three famous theorems
Infinitude of primes
Theorem (Infinitude of primes)
There are infinitely many prime numbers.
Proof (by contradiction).
Suppose not. Then, the set of primes is finite, so we can enumeratethem in finite time in ascending order: p
1
, p
2
, . . . , pn
Consider the integer: N = p
1
· p2
· · · · · pn + 1. Clearly, N > 1, since thesmallest prime p
1
= 2. Therefore, by a known theorem, N isdivisible by a prime.Let pi, i 2 {1, 2, . . . , n} be this prime, then pi|N . Clearly,pi|p1 · p2 · · · · · pn, by construction of this product.
By a known theorem, pi 6 | (p1 · p2 · · · · · pn + 1) = N . Contradiction.Therefore, the set of primes cannot be finite.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 45 / 45
Three famous theorems
Infinitude of primes
Theorem (Infinitude of primes)
There are infinitely many prime numbers.
Proof (by contradiction).
Suppose not. Then, the set of primes is finite, so we can enumeratethem in finite time in ascending order: p
1
, p
2
, . . . , pn
Consider the integer: N = p
1
· p2
· · · · · pn + 1. Clearly, N > 1, since thesmallest prime p
1
= 2. Therefore, by a known theorem, N isdivisible by a prime.Let pi, i 2 {1, 2, . . . , n} be this prime, then pi|N . Clearly,pi|p1 · p2 · · · · · pn, by construction of this product.By a known theorem, pi 6 | (p1 · p2 · · · · · pn + 1) = N . Contradiction.Therefore, the set of primes cannot be finite.
Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 45 / 45