<<

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 mathematical statements. Some connection to in propositional and predicate . More Number 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 statements Direct proofs Disproving Universal Statements Indirect proofs

4 Three famous

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:

( x D)P (x) 9 2 are referred to as existential statements. They require us to prove a property P for some x D. Two ways that we deal with those questions: 2 Constructively:We“construct” or “show” an of D for which 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 to exist! Examples: There exists a least . There exists no greatest prime number. ( a, b) R Q : ab Q 9 2 2 Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 5 / 45 Categories of statements to prove Universal statements

Statements of type:

( x D)P (x) 8 2 are referred to as universal statements. They require of us to prove a property P for every single x D. 2 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 deal with. Examples: ( n Zodd), ( k Z):n =8k +1 8 2 9 2 ( n Z),n2 Zodd n Zodd Every8 2 Greek politician2 ) is a2 crook.

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 6 / 45 Categories of statements to prove Proving the armative or the negative

Given a mathematical S, S can be either true or (). We will call a proof that S is True a proof of the armative. We will call a proof that S is False a proof of the negative. Recall negated quantifier equivalences: ( x)P (x) ( x) P (x) ⇠ 9 ⌘ 8 ⇠ ( x)P (x) ( x) P (x) ⇠ 8 ⌘ 9 ⇠ So, arguing the negative of an existential statement is equivalent to 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 its only factors are 1 and itself. 2 satisfies both requirements and because of 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 Definition (Perfect squares) An integer n is called a perfect square i↵there exists an integer k such that n = k2.

Theorem There is a perfect square that can be written as a sum of two other perfect squares.

Proving Existential statements Constructive proofs

Let’s all prove the armatives 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 Z . Then, k Z : 22r + 18s =2k. 2 9 2

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 10 / 45 Proving Existential statements Constructive proofs

Let’s all prove the armatives 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 Z . Then, k Z : 22r + 18s =2k. 2 9 2 Definition (Perfect squares) An integer n is called a perfect square i↵there exists an integer k such that n = k2.

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 Proof. Let a = b = p2. We know that p2 is irrationala,soa 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, p p2 p2 p 2 2 because (( 2) ) =( 2) =2= 1 . End of proof.

aIn fact, we will prove that formally down the road.

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 ab is a .

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 ab is a rational number.

Proof. Let a = b = p2. We know that p2 is irrationala,soa 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, p p2 p2 p 2 2 because (( 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 suciently small to explore by hand, I might 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 + 11 20 = 7 + 13 22 = 5 + 17 24 = 5 + 19 26 = 7 + 19 28 = 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 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.

Proving Universal statements Direct proofs Universal generalization

Reminder: Rule of universal generalization.

Universal Generalization P (A) for an arbitrarily chosen A D 2 ( x D)P (x) ) 8 2

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 D 2 ( x D)P (x) ) 8 2

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 Question: Is k a generic particular in this proof? What about r?

Proving Universal statements Direct proofs Example

Theorem (Odd square) The square of an odd integer is also odd.

Symbolic proof. Let a Z be a generic particular of Z. Then, by the definition of odd 2 integers, k Z : a =2k +1. Then, 9 2 a2 =(2k + 1)2 =4k2 +4k +1=2k(2k + 2) +1 = 2r +1

r Z 2 | {z }

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 Z be a generic particular of Z. Then, by the definition of odd 2 integers, k Z : a =2k +1. Then, 9 2 a2 =(2k + 1)2 =4k2 +4k +1=2k(2k + 2) +1 = 2r +1

r Z 2 | {z }

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 of integers. Then, by definition of odd integers, we know that there exists an integer k such that a =2k + 1. Then,

a2 =(2k + 1)2 =4k2 +4k +1=2k(2k + 2) + 1 (1)

Let r = k(2k + 2) be an integer. Substituting the value of r into equation 1, we have that a2 =2r + 1. But this is exactly the definition of 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 Theorem The sum of any two odd integers is even.

Theorem (n Zodd) ( 1)n = 1. 2 )

Proving Universal statements Direct proofs Practice

Let’s prove some universal statements. Before proving them, make sure you understand what they ask.

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 Zodd) ( 1)n = 1. 2 )

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 dividing D into sub-domains and proving the statement for every sub-domain. odd even + Popular divisions: Z , Z , 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 Z be a generic particular. Then, a + 1 is its consecutive integer. 2 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, k Z : a =2k +1 a +1=(2k + 1) + 1 a +1=2(k + 2) 9 2 ) ) ) r Z a +1=2r. Therefore, a +1iseven. 2 | {z } 2 Assume a is even. Therefore, by the definition of even numbers, k Z : a =2k a +1=2k + 1. Therefore, a +1isodd. 9 2 )

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 20 / 45 In the second proof above, which one among m and n is truly a generic particular?

Proving Universal statements Direct proofs Generic pitfalls in particular proofs

Critique the following proof segments: Proof. Let p, q Q be generic particulars. Let also a, c Z and b, d Z⇤ be 2 a c 2 2 generic particulars such that p = b and c = d . ...

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. ...

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 Q be generic particulars. Let also a, c Z and b, d Z⇤ be 2 a c 2 2 generic particulars such that p = b and c = d . ...

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 a generic 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: ( x)P (x) ( x) P (x) ⇠ 8 ⌘ 9 ⇠ 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 Disproof. 9 is an odd number between 3 and 13 for which ( p, q) N 1, 9 : p q = 9, since 9 = 3 3. Therefore, 9 is 9 2 { } · ⇥ composite and the statement is false.

Theorem ( n) P ( 1)n = 1. 8 2 ) Disproof. 2 P,but( 1)2 = 1. Therefore, the statement is false. 2

Proving Universal statements Disproving Universal Statements Examples

Theorem Every odd number between 3 and 13 inclusive is prime.

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 24 / 45 Theorem ( n) P ( 1)n = 1. 8 2 ) Disproof. 2 P,but( 1)2 = 1. Therefore, the statement is false. 2

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 ( p, q) N 1, 9 : p q = 9, since 9 = 3 3. Therefore, 9 is 9 2 { } · ⇥ composite and the statement is false.

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 24 / 45 Disproof. 2 P,but( 1)2 = 1. Therefore, the statement is false. 2

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 ( p, q) N 1, 9 : p q = 9, since 9 = 3 3. Therefore, 9 is 9 2 { } · ⇥ composite and the statement is false.

Theorem ( n) P ( 1)n = 1. 8 2 )

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 ( p, q) N 1, 9 : p q = 9, since 9 = 3 3. Therefore, 9 is 9 2 { } · ⇥ composite and the statement is false.

Theorem ( n) P ( 1)n = 1. 8 2 ) Disproof. 2 P,but( 1)2 = 1. Therefore, the statement is false. 2

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

Recall the definition of the law of contradiction from propositional logic:

Law of Contradiction p c ⇠ ) ) p

Tremendously useful and famous proof mechanism. Use when a counter-example isn’t obvious and direct proof has lead nowhere.

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 26 / 45 Proving Universal statements Indirect proofs

General idea: We want to prove a statement p. If we assume p ⇠ and reach a contradiction, then, by the law of contradiction, we can infer p. So, for a universal statement ( x)P (x), we assume 8 ( x)P (x) ( x) P (x), and aim towards a contradiction. ⇠8 ⌘ 9 ⇠ Equivalently for an existential statement. Since, when we reach the contradiction, the only additional assumption we’ve made is that p is false, p has to be true. ***ALWAYS*** mention the discovery of a contradiction clearly 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 Proof. Assume not. Then, ( M Z):( m Z),M m. But the real 9 2 8 2 number 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 a greatest integer cannot possibly exist.

Proving Universal statements Indirect proofs Applications

Theorem There is no greatest integer.

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, ( M Z):( m Z),M m. But the real 9 2 8 2 number 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 a greatest integer cannot possibly exist.

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 28 / 45 Proof. Assume not. So, there exists a rational r and an irrational q such that r + q is rational. By the definition of rational numbers, there exist integers a, b, c, d, a c with b and d non-zero, such that r = b and r + q = d . Solving for q,we obtain: c a c a c ad bc r + q = + q = q = q = d , b d , b d , bd Both ad bc and bd are integers, because they are linear combinationsa of integers. Furthermore, bd = 0 because both b and d are non-zero. But this means that q can be written6 as a fraction of an integer over a non-zero integer. This contradicts our assumption that q is irrational, which means that the statement is true, and r + q must be irrational.

aSums of products.

Proving Universal statements Indirect proofs Applications

Theorem Prove that the sum of a rational and is irrational.

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 is rational. By the definition of rational numbers, there exist integers a, b, c, d, a c with b and d non-zero, such that r = b and r + q = d . Solving for q,we obtain: c a c a c ad bc r + q = + q = q = q = d , b d , b d , bd Both ad bc and bd are integers, because they are linear combinationsa of integers. Furthermore, bd = 0 because both b and d are non-zero. But this means that q can be written6 as a fraction of an integer over a non-zero integer. This contradicts our assumption that q is irrational, which means that 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 Some notation: If a does not divide b, we denote: a b. 6| Attention: a b is not the same as a/b! |

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 Z and d Z⇤. Then, we say or denote one of the following: 2 2 d divides n n is divided by d d n | d is a divisor (or factor) of n n is a multiple of d i↵ k Z : n = d k 9 2 ·

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 Z and d Z⇤. Then, we say or denote one of the following: 2 2 d divides n n is divided by d d n | d is a divisor (or factor) of n n is a multiple of d i↵ k Z : n = d k 9 2 · Some notation: If a does not divide b, we denote: a b. 6| Attention: a b is not the same as a/b! | Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 30 / 45 What about 0 n( n Z)? | 8 2 Theorem (Transitivity of divisibility) ( a, b, c Z)a b b c a c 8 2 | ^ | ) |

Is divisibility commutative?

Proving Universal statements Indirect proofs Properties of divisibility

All the following can be proven:

Theorem (All non-zero integers divide zero)

n Z⇤,n0. 8 2 |

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 31 / 45 Theorem (Transitivity of divisibility) ( a, b, c Z)a b b c a c 8 2 | ^ | ) |

Is divisibility commutative?

Proving Universal statements Indirect proofs Properties of divisibility

All the following can be proven:

Theorem (All non-zero integers divide zero)

n Z⇤,n0. 8 2 |

What about 0 n( n Z)? | 8 2

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)

n Z⇤,n0. 8 2 |

What about 0 n( n Z)? | 8 2 Theorem (Transitivity of divisibility) ( a, b, c Z)a b b c a c 8 2 | ^ | ) |

Is divisibility commutative?

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 31 / 45 Proving Universal statements Indirect proofs Prove these!

Prove the armative for all those theorems.

Theorem For all integers a, b, c,ifa bc then a b. 6| 6| Theorem ( a, b, c Z)((a b) (a c)) a (b + c) 8 2 | ^ 6| ) 6|

Once again, note how di↵erent the style of presentation of all of those 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 (a + 1) | ) 6|

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 )

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 is irrational, so is 0. But we know that we can express 0 as a ratio of a 0 integers, e.g. 0= 1 . By the definition of rational numbers, this means that 0 Q. This contradicts our assumption that every integer is 2 irrational, 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 ( n Z),n2 Zeven n Zeven. 8 2 2 ) 2 Proof. We can equivalently prove that ( n Z),n Zodd n2 Zodd.This 8 2 2 ) 2 was 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,ifm + 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 : and ceiling : . bc de

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 37 / 45 Corollary 1 n Z, n = n = n 8 2 b c d e Corollary 2 x R,n= x n 1

What’s the value of n + 1/2 ? b c What about n + 99/100 ? b c

Proving Universal statements Indirect proofs Floor & Ceiling

Definition (Floor and Ceiling) Let r be a . Then: The ceiling of r, denoted r is the smallest integer n such that d e n r. The floor of r, denoted r is the largest integer n such that n r. b c 

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 38 / 45 Corollary 2 x R,n= x n 1

What’s the value of n + 1/2 ? b c What about n + 99/100 ? b c

Proving Universal statements Indirect proofs Floor & Ceiling

Definition (Floor and Ceiling) Let r be a real number. Then: The ceiling of r, denoted r is the smallest integer n such that d e n r. The floor of r, denoted r is the largest integer n such that n r. b c  Corollary 1 n Z, n = n = n 8 2 b c d e

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 38 / 45 What’s the value of n + 1/2 ? b c What about n + 99/100 ? b c

Proving Universal statements Indirect proofs Floor & Ceiling

Definition (Floor and Ceiling) Let r be a real number. Then: The ceiling of r, denoted r is the smallest integer n such that d e n r. The floor of r, denoted r is the largest integer n such that n r. b c  Corollary 1 n Z, n = n = n 8 2 b c d e Corollary 2 x R,n= x n 1

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 r is the smallest integer n such that d e n r. The floor of r, denoted r is the largest integer n such that n r. b c  Corollary 1 n Z, n = n = n 8 2 b c d e Corollary 2 x R,n= x n 1

What’s the value of n + 1/2 ? b c What about n + 99/100 ? Jason Filippou (CMSC250 @b UMCP) Formalc Proof Methodology 06-09-2016 38 / 45 Proving Universal statements Indirect proofs Proofs with Floor / Ceiling

Prove the or falsehood of these . Read them carefully! 1 ( x, y R), x + y = x + y 8 2 b c b c b c Conjecture 2 ( x R,y Z), x + y = x + y 8 2 2 b c b c Conjecture 3 For any integer n,

n n 2 if n is even 2 = n 1 b c ( 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 p2isirrational. 3 There are infinitely many primes. First one due to C.F Gauss, the other ones due to Euclid of Alexandria. 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 k N+ 2 p ,p ,...p P 1 2 k 2 + e1,e2,...ek N 2 such that: n = pe1 pe2 pek 1 · 2 ····· k

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 · · · · ·

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:

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 42 / 45 p ,p ,...p P 1 2 k 2 + e1,e2,...ek N 2 such that: n = pe1 pe2 pek 1 · 2 ····· k

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 · · · · ·

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 N+ 2

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 42 / 45 + e1,e2,...ek N 2 such that: n = pe1 pe2 pek 1 · 2 ····· k

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 · · · · ·

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 N+ 2 p ,p ,...p P 1 2 k 2

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 42 / 45 such that: n = pe1 pe2 pek 1 · 2 ····· k

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 · · · · ·

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 N+ 2 p ,p ,...p P 1 2 k 2 + e1,e2,...ek N 2

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 42 / 45 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 · · · · ·

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 N+ 2 p ,p ,...p P 1 2 k 2 + e1,e2,...ek N 2 such that: n = pe1 pe2 pek 1 · 2 ····· k

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 42 / 45 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 · · · · ·

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 N+ 2 p ,p ,...p P 1 2 k 2 + e1,e2,...ek N 2 such that: n = pe1 pe2 pek 1 · 2 ····· k

Additionally, this representation is unique: any other prime factorization is identical to this one up to re-ordering of the factors!

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 N+ 2 p ,p ,...p P 1 2 k 2 + e1,e2,...ek N 2 such that: n = pe1 pe2 pek 1 · 2 ····· k

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 p2isirrational

Theorem (p2 is irrational) The number p2 is irrational.

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 43 / 45 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,wehavethata is also even, therefore, m Z : 9 2 (2) a =2m 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 / Q. 2

Three famous theorems p2isirrational

Proof (by contradiction).

Suppose not. Therefore, p2 Q a, b Z, b =0,suchthat 2 )9 2 6 a p2= (1) b

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 44 / 45 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,wehavethata is also even, therefore, m Z : 9 2 (2) a =2m 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 / Q. 2

Three famous theorems p2isirrational

Proof (by contradiction).

Suppose not. Therefore, p2 Q a, b Z, b =0,suchthat 2 )9 2 6 a p2= (1) b Without loss of generality, we can assume that a and b have no common factors.

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 44 / 45 From (2) and the definition of even numbers, we deduce that a2 is even. From a known theorem,wehavethata is also even, therefore, m Z : 9 2 (2) a =2m 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 / Q. 2

Three famous theorems p2isirrational

Proof (by contradiction).

Suppose not. Therefore, p2 Q a, b Z, b =0,suchthat 2 )9 2 6 a p2= (1) b 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)

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 44 / 45 From a known theorem,wehavethata is also even, therefore, m Z : 9 2 (2) a =2m 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 / Q. 2

Three famous theorems p2isirrational

Proof (by contradiction).

Suppose not. Therefore, p2 Q a, b Z, b =0,suchthat 2 )9 2 6 a p2= (1) b 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.

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 44 / 45 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 / Q. 2

Three famous theorems p2isirrational

Proof (by contradiction).

Suppose not. Therefore, p2 Q a, b Z, b =0,suchthat 2 )9 2 6 a p2= (1) b 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,wehavethata is also even, therefore, m Z : 9 2 (2) a =2m 4m2 =2b2 b2 =2m2 (3) ) )

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 44 / 45 So, both a and b are even. But this means that they have common factors. Contradiction. Therefore, p2 / Q. 2

Three famous theorems p2isirrational

Proof (by contradiction).

Suppose not. Therefore, p2 Q a, b Z, b =0,suchthat 2 )9 2 6 a p2= (1) b 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,wehavethata is also even, therefore, m Z : 9 2 (2) a =2m 4m2 =2b2 b2 =2m2 (3) ) ) By (3), we deduce that b2 is also even and, by the same theorem, that b is even.

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 44 / 45 But this means that they have common factors. Contradiction. Therefore, p2 / Q. 2

Three famous theorems p2isirrational

Proof (by contradiction).

Suppose not. Therefore, p2 Q a, b Z, b =0,suchthat 2 )9 2 6 a p2= (1) b 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,wehavethata is also even, therefore, m Z : 9 2 (2) a =2m 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.

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 44 / 45 Three famous theorems p2isirrational

Proof (by contradiction).

Suppose not. Therefore, p2 Q a, b Z, b =0,suchthat 2 )9 2 6 a p2= (1) b 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,wehavethata is also even, therefore, m Z : 9 2 (2) a =2m 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 / Q. 2

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 44 / 45 Proof (by contradiction). Suppose not. Then, the set of primes is finite, so we can enumerate them in finite time in ascending order: p1,p2,...,pn Consider the integer: N = p p p + 1. Clearly, N>1, since the 1 · 2 ····· n smallest prime p1 = 2. Therefore, by a known theorem, N is divisible by a prime. Let p ,i 1, 2,...,n be this prime, then p N. Clearly, i 2{ } i| p p p p , by construction of this product. i| 1 · 2 ····· n By a known theorem, p (p p p + 1) = N. Contradiction. i 6| 1 · 2 ····· n Therefore, the set of primes cannot be finite.

Three famous theorems Infinitude of primes

Theorem (Infinitude of primes) There are infinitely many prime numbers.

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 45 / 45 Consider the integer: N = p p p + 1. Clearly, N>1, since the 1 · 2 ····· n smallest prime p1 = 2. Therefore, by a known theorem, N is divisible by a prime. Let p ,i 1, 2,...,n be this prime, then p N. Clearly, i 2{ } i| p p p p , by construction of this product. i| 1 · 2 ····· n By a known theorem, p (p p p + 1) = N. Contradiction. i 6| 1 · 2 ····· n Therefore, the set of primes cannot be finite.

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 enumerate them in finite time in ascending order: p1,p2,...,pn

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 45 / 45 Clearly, N>1, since the smallest prime p1 = 2. Therefore, by a known theorem, N is divisible by a prime. Let p ,i 1, 2,...,n be this prime, then p N. Clearly, i 2{ } i| p p p p , by construction of this product. i| 1 · 2 ····· n By a known theorem, p (p p p + 1) = N. Contradiction. i 6| 1 · 2 ····· n Therefore, the set of primes cannot be finite.

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 enumerate them in finite time in ascending order: p1,p2,...,pn Consider the integer: N = p p p + 1. 1 · 2 ····· n

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 45 / 45 Therefore, by a known theorem, N is divisible by a prime. Let p ,i 1, 2,...,n be this prime, then p N. Clearly, i 2{ } i| p p p p , by construction of this product. i| 1 · 2 ····· n By a known theorem, p (p p p + 1) = N. Contradiction. i 6| 1 · 2 ····· n Therefore, the set of primes cannot be finite.

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 enumerate them in finite time in ascending order: p1,p2,...,pn Consider the integer: N = p p p + 1. Clearly, N>1, since the 1 · 2 ····· n smallest prime p1 = 2.

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 45 / 45 Let p ,i 1, 2,...,n be this prime, then p N. Clearly, i 2{ } i| p p p p , by construction of this product. i| 1 · 2 ····· n By a known theorem, p (p p p + 1) = N. Contradiction. i 6| 1 · 2 ····· n Therefore, the set of primes cannot be finite.

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 enumerate them in finite time in ascending order: p1,p2,...,pn Consider the integer: N = p p p + 1. Clearly, N>1, since the 1 · 2 ····· n smallest prime p1 = 2. Therefore, by a known theorem, N is divisible by a prime.

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 45 / 45 By a known theorem, p (p p p + 1) = N. Contradiction. i 6| 1 · 2 ····· n Therefore, the set of primes cannot be finite.

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 enumerate them in finite time in ascending order: p1,p2,...,pn Consider the integer: N = p p p + 1. Clearly, N>1, since the 1 · 2 ····· n smallest prime p1 = 2. Therefore, by a known theorem, N is divisible by a prime. Let p ,i 1, 2,...,n be this prime, then p N. Clearly, i 2{ } i| p p p p , by construction of this product. i| 1 · 2 ····· n

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 enumerate them in finite time in ascending order: p1,p2,...,pn Consider the integer: N = p p p + 1. Clearly, N>1, since the 1 · 2 ····· n smallest prime p1 = 2. Therefore, by a known theorem, N is divisible by a prime. Let p ,i 1, 2,...,n be this prime, then p N. Clearly, i 2{ } i| p p p p , by construction of this product. i| 1 · 2 ····· n By a known theorem, p (p p p + 1) = N. Contradiction. i 6| 1 · 2 ····· n Therefore, the set of primes cannot be finite.

Jason Filippou (CMSC250 @ UMCP) Formal Proof Methodology 06-09-2016 45 / 45