56
cs1231 2006/08/30 Chapter 3: Elementary Number Theory and Methods of Proof Sections 3.1 to 3.7 are covered. Section 3.8 is excluded. This chapter is about proof methods and the illustration of these methods in the context of elementary number theory. cs1231y only 1

cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Chapter 3: Elementary Number Theory and

Methods of Proof

• Sections 3.1 to 3.7 are covered.

• Section 3.8 is excluded.

• This chapter is about proof methods and the illustration of these methodsin the context of elementary number theory.

cs1231y only 1

Page 2: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Introduction

• This chapter illustrates proof methods for universal statements, existentialstatements, and universal conditional statements.

• The methods include direct proof, disproof by counterexample, indirectproof by contraposition or contradiction, and proof by cases.

• The statements to be proved are about even and odd numbers, prime andcomposite numbers, rational numbers and irrational numbers, divisibility(between two integers), the quotient-remainder theorem for integers, andthe floor and ceiling of real numbers.

cs1231y only 2

Page 3: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Methods of Proving Universal Statements

The universal statement

∀x ∈ D,P (x) → Q(x)

can be proved by

1. The method of exhaustion

For each x ∈ D, show that P (x) → Q(x).

2. The method of generalizing from the generic particular (Direct Proof)

For an arbitrary x ∈ D, show that P (x) → Q(x).

cs1231y only 3

Page 4: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Generalizing from the Generic Particular

• Recall that

∀x ∈ D,P (x) → Q(x) ≡ ∀x ∈ T (P ), Q(x).

• Observe that the use of common properties of all elements in the domainD in the derivation is as good as exhaustively deriving Q(x) for every xin the truth set of P (x).

cs1231y only 4

Page 5: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

The Method of Direct Proof by Generalizing from the

Generic Particular

The major steps of directly proving a universal statement are

1. Express the statement to be proved in the form

∀x ∈ D, if P (x) then Q(x).

2. Consider an arbitrary element x ∈ D for which the hypothesis P (x) istrue. That is,

x ∈ D and P (x).

3. Show that Q(x) is true by exploiting the following:

cs1231y only 5

Page 6: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

• the common properties of (all) elements of D,• consequences of P (x),• known results,• and rules for logical inference.

cs1231y only 6

Page 7: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Methods of Disproving Universal Statements

The universal statement

∀x ∈ D,P (x) → Q(x)

can be disproved by proving its negation

∃x ∈ D such that P (x)∧ ∼ Q(x)

Such an x is called a counterexample. Methods of finding acounterexample depends very much on the problem itself, but see Methods

of Proving Existential Statements.

cs1231y only 7

Page 8: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Methods of Proving Existential Statements

The existential statement

∃x ∈ D such that P (x)

can be proved constructively by

1. Actually finding a particular x ∈ D such that P (x).

2. Giving a set of directions for finding such an x ∈ D.

Sometimes the existence of such a x ∈ D can be illustrated withoutactually finding one. This is known as nonconstructive proof of existence.

cs1231y only 8

Page 9: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Methods of Disproving Existential Statements

The existential statement

∃x ∈ D such that P (x)

can be disproved by proving its negation

∀x ∈ D,∼ P (x)

See Methods of Proving Universal Statements for the methods.

cs1231y only 9

Page 10: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Some Remarks on Definitions

• New definitions are given in terms of previously given definitions orundefined terms which are supposed to be understood by all.

• Many authors state definitions in the form: “something is this if that”.We are expected to interpret the ”if” as an “if and only if” because whata definition in this form trys to say is “this≡ that”.

• That is, the “if” in a definition is understood to be “if and only if”.

cs1231y only 10

Page 11: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Example: “if” in Definitions

For example, we may define squares in terms of rectangles as

“A rectangle is a square if its four sides are equal in length.”

Strictly speaking, the definition says

a rectangle with four equal sides → square

but does not say

square → a rectangle with four equal sides

cs1231y only 11

Page 12: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

But since this is a definition it is understood that the latter is also true. Inother words, “if” is to be taken to be “if and only if”.

cs1231y only 12

Page 13: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Example: “if” in Theorems, Etc

This is very different from the “if” used in other non-definition situationssuch as theorems, in which “if” should not be confused with “if and onlyif”.

For example, given a number x, it is correct to say

if x = 1 then x2 = 1

But it is incorrect to say

x = 1 if and only if x2 = 1

because it could be x = −1.

cs1231y only 13

Page 14: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Notational Abbreviations

When the common domain D of x in the predicates P (x) and Q(x) areunderstood, we shall write

P (x) ⇔ Q(x)

to mean∀x ∈ D,P (x) ↔ Q(x) (is true)

andP (x) ⇒ Q(x)

to mean∀x ∈ D,P (x) → Q(x) (is true)

cs1231y only 14

Page 15: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Even and Odd Numbers

An integer n is even if, and only if, n is twice some integer. Aninteger n is odd if and only if n is twice some integer plus 1.Symbolically,

∀n ∈ Z, n is even ↔ ∃k ∈ Z such that n = 2k.

∀n ∈ Z, n is odd ↔ ∃k ∈ Z such that n = 2k + 1.

orn is even ⇔ ∃k ∈ Z such that n = 2k.

n is odd ⇔ ∃k ∈ Z such that n = 2k + 1.

cs1231y only 15

Page 16: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Prime and Composite Numbers

An integer n > 1 is prime if and only if for all positive integers r ands, if n = rs, then r = 1 or s = 1. An integer n > 1 is composite ifand only if n = rs for some positive integers r and s with r 6= 1 ands 6= 1.Let D be the set of integers greater than 1 and Z

+ be the set ofpositive integers. Symbolically, we have (∀n ∈ D):

n is prime ⇔ ∀r, s ∈ Z+, n = rs → (r = 1) ∨ (s = 1).

n is composite ⇔ ∃r, s ∈ Z+, such that (n = rs)∧ (r 6= 1)∧ (s 6= 1).

cs1231y only 16

Page 17: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

An Integer is Either Even or Odd but not Both

Proof: By the quotient-remainder theorem, for any integer n,

n = 2q + r

with 0 ≤ r < 2, that is, r = 0 or r = 1. Consequently, an integer is eithereven or odd.

This is an example of the Direct Proof method.

cs1231y only 17

Page 18: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

An Integer > 1 is Either Prime or Compositive

This is because the negation of

∀r, s ∈ Z+, n = rs → (r = 1) ∨ (s = 1).

is∃r, s ∈ Z

+, (n = rs) ∧ (r 6= 1) ∧ (s 6= 1).

cs1231y only 18

Page 19: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

The Numbers 0, 1, 2

The number 0 is even because

0 = 2 × 0.

The number 1 is neither prime nor composite.

The number 2 is the only even prime number.

cs1231y only 19

Page 20: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Example: The Method of Exhaustion

Prove that

∀n ∈ {4, 5, . . . , 30}, n is even → n is the sum of two prime numbers

We check that every even number in the domain satisfies the property:

4 = 2 + 2, 6 = 3 + 3, 8 = 3 + 5, 10 = 3 + 7 = 5 + 5, 12 = 5 + 7,

14 = 3 + 11 = 7 + 7, 16 = 5 + 11, 18 = 7 + 11, 20 = 7 + 13,

22 = 5 + 17, 24 = 5 + 19, 26 = 7 + 19, 28 = 11 + 17, 30 = 11 + 19.

cs1231y only 20

Page 21: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Example: Direct Proof

Prove that the sum of two even numbers is even.

Proof:

Suppose m and n are two even integers. (m and n are two particularbut arbitrarily chosen even integers.) By the definition of evenness, thereare integers r and s such that m = 2r and n = 2s. Then

m + n = 2r + 2s = 2(r + s).

Since r + s is an integer, by the definition of evenness we conclude thatm + n is even.

cs1231y only 21

Page 22: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Example: Proof by a Constructive Example

Prove that there is an even number n such that it can be written as thesum of two primes in two ways.

Proof:

Consider n = 18.18 = 5 + 13 = 7 + 11.

Thus n = 18 is such an even number.

Note that the Goldbach conjecture says that every even integer greaterthan 2 is the sum of two prime numbers. (What is a conjecture?)

If some even integer m can be written as the sum of two primes in morethan two ways, can we use m as an example to prove the above theorem?

cs1231y only 22

Page 23: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Rational Numbers

A real number r is rational if, and only if, it can be expressed as aquotient (or ratio) of two integers with a nonzero denominator. Areal number that is not rational is irrational. That is,

∀r ∈ R, r is rational ↔ ∃m, n ∈ Z such that r =m

nand n 6= 0.

cs1231y only 23

Page 24: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Some Remarks on Rational Numbers

For any integer n, the expression n0

is not a number, let alone a rationalnumber.

Every integer n is a rational number: n = n1.

Zero is a rational number: 0 = 0

1= 0

nfor any nonzero integer n.

See text or prove it yourself that the sum, difference, product, quotient(if the denominator is not zero) of two rational numbers is again a rationalnumber.

In between any two distinct rational numbers r and s there is anotherrational number t. Take t = r+s

2. (In fact, there are infinitely many such

rational numbers.)

cs1231y only 24

Page 25: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Divisibility

If n and d 6= 0 are integers, then d is divides n if and only if n = dkfor some integer k. Alternatively, we say that

n is divisible by d, or n is a multiple of d, or d is a factor ofn, or d is a divisor of n.

The notation d |n is read “d divides n”.Symbolically, with n ∈ Z, d ∈ Z

′ (Z′ is the set of non-zero integers):

d |n ⇔ n

d∈ Z

cs1231y only 25

Page 26: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Some Remarks on Divisibility

1. ∀n ∈ Z, n | 0

Proof: Observe that 0

n= 0 ∈ Z.

2. ∀n ∈ Z,±1 |n

Proof: Observe that n±1

= ±n ∈ Z.

3. ∀n ∈ Z, if n 6= 0 then n|n.

Proof: Observe that nn

= 1 ∈ Z if n 6= 0.

cs1231y only 26

Page 27: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Transitivity of Divisibility

Theorem 3.3.1. If a|b and b|c, then a|c.

Proof: By the definition of divisibility, we have

b

a,c

b∈ Z

By the properties of integers and the arithemtic of rational numbers, wehave

c

a=

b

a× c

b∈ Z

Consequently, again by the definition of divisibility, we conclude

a|c

cs1231y only 27

Page 28: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

A Composite Number Has a Smaller Divisor

Proposition. If n is composite then there is a 1 < d < n such that d|n.

Proof. If n is composite then n > 1 and there are r, s ∈ Z+ such that

n = rs, r 6= 1, s 6= 1. In other words, 1 < r and 1 < s. Thus r|n (why)and r = n

s< n

1= n. The r is the required d in the proposition.

For example, for n = 30, d can be any of 2, 3, 5, 6, 10, 15.

cs1231y only 28

Page 29: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Divisibility by Primes

Theorem 3.3.2. An integer n > 1 is divisible by a prime number.

Proof: If n is prime then it is divisible by the prime number n. Otherwise,by the proposition, n has a divisor d0 with 1 < d0 < n. If d0 is prime we aredone (why?) otherwise d0 has a divisor d1 with 1 < d1 < d0 (why?). Thisprocess of obtaining progressively smaller di must stop because each di > 1and so cannot decrease forever. Thus n is divisible by the prime number dk

for some k by the transitivity of divisibility.

For example, 50|100, 25|50, 5|25. Therefore the prime number 5 divides100.

cs1231y only 29

Page 30: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

The Unique Factorization Theorem

Theorem 3.3.3 Unique Factorization Theorem for the Integers(Fundamental Theorem of Arithmetic)

Given any integer n > 1, there exist a positive integer k, prime numbersp1 < · · · < pk, and positive integers e1, . . ., ek such that

n = pe1

1 . . . pekk .

Proof: We will omit the proof.

For example, 72 = 2332.

cs1231y only 30

Page 31: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

The Standard Factored Form

Given any integer n > 1, the standard factored form of n is anexpression of the form

n = pe1

1 · · · pekk

where k is a positive integer; p1, · · ·, pk are prime numbers; e1, · · ·,ek are positive integers; and p1 < · · · < pk.

cs1231y only 31

Page 32: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Another Way of Expressing the Fundamental Theorem of

Arithmetic (Extra)

Let p1 < p2 < p3 < · · · be the sequence of all prime numbers. That is,p1 = 2, p2 = 3, p3 = 5, etc. Any positive integer n can be written as

n =

∞∏

i=1

peii

where all the ei are zero except a finite number of them that are positiveintegers.

For example,

1 = 20305070 · · · , 72 = 23325070 · · ·

cs1231y only 32

Page 33: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

The Quotient Remainder Theorem

Given any integer n and positive integer d, there exist unique integers qand r such that

n = qd + r and 0 ≤ r < d.

Proof: Consider the real line marked at multiples of d:

y y y y y y−3d −2d −d 0 d 2d

The integers are partitioned into blocks of integers:

kd .. (k + 1)d − 1.

cs1231y only 33

Page 34: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

So there is a q ∈ Z such that

qd ≤ n < (q + 1)d.

Let r = n − qd.

0 = qd − qd ≤ n − qd < (q + 1)d − qd = d

That is,n = qd + r

and0 ≤ r < d.

cs1231y only 34

Page 35: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Example: Direct Proof and Proof by Cases

Prove that given a positive integer d, there is only one way to expressan integer n as n = qd + r, where q, r are integers and 0 ≤ r < d.

Proof: Assume we have

q1d + r1 = q2d + r2.

Without loss of generality we may assume r1 ≤ r2. (Why?) Rewriting, weobtain

r2 − r1 = (q1 − q2)d

and

q1 − q2 =r2 − r1

d.

cs1231y only 35

Page 36: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

That is, r2−r1

dis an integer. But

0 ≤ r2 − r1 < d − r1 ≤ d,

That is,

0 ≤ r2 − r1

d< 1.

To be an integer we haver2 − r1

d= 0.

Thus r1 = r2 and it follows that q1 = q2. (Why?)

This proves the claim.

cs1231y only 36

Page 37: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Example: Direct Proof and Proof by Cases

Prove that the square of any odd integer n has the form 8m + 1 forsome integer m.

Proof: Since n is odd, there is an integer k such that

n = 2k + 1.

Thenn2 = (2k + 1)2 = 4k2 + 4k + 1 = 4k(k + 1) + 1.

There are two cases to consider: k is even or k is odd.

If k is even, there is an integer p such that k = 2p. So

n2 = 4(2p)(k + 1) + 1 = 8p(k + 1) + 1 = 8m + 1

cs1231y only 37

Page 38: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

where m = p(k + 1) is an integer.

If k is odd, there is an integer q such that k = 2q + 1. So

n2 = 4k(2q + 1 + 1) + 1 = 8k(q + 1) + 1 = 8m + 1

where m = k(q + 1) is an integer.

This proves the claim.

cs1231y only 38

Page 39: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

The Floor of a Real Number

Given any real number x, the floor of x, written bxc, is the largestinteger less than or equal to x. Symbolically,

bxc ≤ x < bxc + 1.

For example,

b−3c = −3, b−2.7c = −3, b0c = 0, b4.979c = 4.

Memory aid: Find the integer n such that n ≤ x < n + 1. Thenbxc = n.

cs1231y only 39

Page 40: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

The Ceiling of a Real Number

Given any real number x, the ceiling of x, written dxe, is the smallestinteger greater than or equal to x. Symbolically,

dxe − 1 < x ≤ dxe.

For example,

d−3e = −3, d−2.7e = −2, d0e = 0, d4.979e = 5.

Memory aid: Find the integer n such that n − 1 < x ≤ n. Thendxe = n.

cs1231y only 40

Page 41: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Visualizing Floor and Ceiling of a Real Number

y y y y y ytxbxc dxe

cs1231y only 41

Page 42: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Some Properties of floor and ceiling

Proposition: For any real number x,

bxc ≤ x ≤ dxe.

Equalities holds if and only if x is an integer.

Proof: There are three claims to be proved.

1. ∀x ∈ R, bxc ≤ x ≤ dxe.This follows from the definitions of floor and ceiling.

2. To show the “only if” part is to show

bxc = x = dxe ⇒ x ∈ Z.

cs1231y only 42

Page 43: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

This is obvious because the floor and ceiling of any real number is aninteger.

3. To show the “if” part is to show

x ∈ Z ⇒ bxc = x = dxe.

To show x ∈ Z → bxc = x = dxe, observe that

x ≤ x < x + 1, x − 1 < x ≤ x

Since x is an integer, so are x− 1 and x + 1. By the definition of floor andceiling, we have

bxc = x and dxe = x.

cs1231y only 43

Page 44: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Disproving Floor of Sum is Sum of Floors

Disprove that for all real numbers x and y, bx + yc = bxc + byc.

Proof: All we need to do is to find an x and a y such that bx + yc 6=bxc + byc. How do we go about doing this? We observe that the flooroperation is like a chop operation: the “fractional” part of a real number is“chopped” off. The “fractional” parts of the l.h.s get to be added beforethe chop so something extra may survive unlike the case of the r.h.s.

So we try

1

7+

2

7

=

3

7

= 0 = 0 + 0 =

1

7

+

2

7

cs1231y only 44

Page 45: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

This is no good, so we try bigger fractions:

3

7+

6

7

=

9

7

= 1 6= 0 + 0 =

3

7

+

6

7

So x = 3/7 and y = 6/7 give a counterexample.

cs1231y only 45

Page 46: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Proof by Contradiction

Instead of proving a statement directly, we may assume the negationof a statement is true. We then try to derive a contradiction from thisassumption.

The contradiction is usually of the form

p∧ ∼ p

where p is the assumption or one of the conclusions and ∼ p is anotherconclusion.

When a contradiction is arrived at, it signals that the assumption has tobe false. Since the assumption is the negation of the theorem statement,so the theorem statement must be true.

cs1231y only 46

Page 47: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

The proof is usually organized as:

1. Assume the contrary, that is, · · ·.

2. Some arguments and conclusions.

3. Consequently we have · · ·.

4. This is a contradiction and thus the theorem is proved.

cs1231y only 47

Page 48: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Example: Proof by Contradiction

Theorem 3.6.2: There is no integer that is both even and odd.

Proof. Assume the contrary. That is, there is an integer n that is botheven and odd. By definition there are integers a and b such that

n = 2a (∵ n is even,)

= 2b + 1 (∵ n is odd.)

Consequently,

a − b =1

2Now a − b is an integer since both are but a − b = 1/2 is not an integer.This contradiction shows that the assumption is false and so the Theoremstatement must be true.

cs1231y only 48

Page 49: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Proof by Contraposition

A universal conditional statement can be proved indirectly by proving itscontrapositive directly or otherwise.

cs1231y only 49

Page 50: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Example: Proof by Contraposition

Proposition: For all integers n, if n2 is even then n is even.

Proof. Suppose n is odd. By definition there is an integer k suchthat n = 2k + 1. Consequently n2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1is odd. Since the contrapositive of the proposition statement is true, theproposition statement is also true.

(Proposition is a result that is not as significant as a theorem.)

cs1231y only 50

Page 51: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Relation between Proof by Contradiction and Proof by

Contraposition

We can prove the universal conditional statement

∀x ∈ D,P (x) → Q(x)

by proving its contrapositive

∀x ∈ D,∼ Q(x) →∼ P (x)

because a statement and its contrapositive are logically equivalent.

After proving the contrapositive of an universal statement, the truth ofthe universal statement can also be established by contradiction instead oflogical equivalence as follows.

cs1231y only 51

Page 52: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Suppose∀x ∈ D,P (x) → Q(x)

is false. Then∃x ∈ D,P (x)∧ ∼ Q(x).

But ∼ Q(x) →∼ P (x). So we have P (x)∧ ∼ P (x), which is acontradiction.

cs1231y only 52

Page 53: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30√2 is Irrational

Theorem 3.7.1:√

2 is irrational.

Proof: We prove by contradiction. Assume√

2 is rational. Then thereare integers m and n such that

√2 =

m

n.

We can ensure that m and n have no common factors. This is because ifthere are we can always cancel them. Squaring and rearranging we obtain

2n2 = m2.

cs1231y only 53

Page 54: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Since m2 is even so m is even. (If m is odd then m2 is also odd.) Thusm = 2k for some integer k. So

2n2 = 4k2

and n2 = 2k2. Hence n2 is even and so n is even. Thus m and n have thecommon factor 2. This contradicts that m and n have no common factors.Consequently

√2 cannot be rational.

cs1231y only 54

Page 55: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

There are Infinitely Many Primes

Theorem 3.7.4: There are infinitely many primes.

Proof: Suppose there are only n primes. So we can list all the primes as

p1, p2, · · · , pn.

Consider the integerN = p1p2 · · · pn + 1.

By Theorem 3.3.2, N is divisible by some prime pk. We have

1

pk

=N − p1 · · · pk · · · pn

pk

=N

pk

− p1 · · · pk · · · pn

pk

.

cs1231y only 55

Page 56: cs1231 2006/08/30 Chapter 3: Elementary Number …cs1231y/06-07-1/LN/proofs.pdfof Proving Existential Statements. cs1231y only 7 cs1231 2006/08/30 Methods of Proving Existential Statements

cs1231 2006/08/30

Hence 1

pkis an integer because it is the difference of two integers. But this

is a contradiction because 1 < pk so 1

pkcannot be an integer. Consequently

the assumption is false and the theorem is true.

cs1231y only 56