An introduction to logic and proof techniques [version 26 Jan 2006 ed.]

  • Commentary
  • Downloaded from http://www.maths.unp.ac.za/coursework/math130/Notes/LogicProofNotes.pdf
Citation preview

i

AN INTRODUCTION TO LOGIC and PROOF TECHNIQUES

Michael A. Henning School of Mathematical Sciences University of KwaZulu-Natal

ii

Contents

1 Logic

1

1.1

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1

1.2

Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2

1.3

Negation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3

1.4

Conjunction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4

1.5

Disjunction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6

1.6

The Implication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

1.7

The converse, inverse and contrapositive of an implication . . . . . . . . . .

9

1.8

Compound Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10

1.9

The Biconditional

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

1.10 Tautologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

1.11 Contradictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

1.12 Logical Equivalence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15

1.13 Negation of a Conditional Statement . . . . . . . . . . . . . . . . . . . . . .

20

1.14 The Contrapositive of a Conditional Statement . . . . . . . . . . . . . . . .

20

1.15 Quantified Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

1.16 The Universal Quantifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

22

1.17 The Existential Quantifier . . . . . . . . . . . . . . . . . . . . . . . . . . . .

23

1.18 Negation of Quantified Statements . . . . . . . . . . . . . . . . . . . . . . .

24

1.19 Universal Conditional Statements . . . . . . . . . . . . . . . . . . . . . . . .

26

1.20 Review of Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

28

iii

iv

CONTENTS

2 Proof Techniques

29

2.1

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

29

2.2

Trivial Proofs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

31

2.3

Vacuous Proofs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

32

2.4

Direct Proofs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

33

2.5

Proof by Contrapositive . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

35

2.6

Proof by Cases and the Quotient-Remainder Theorem . . . . . . . . . . . .

37

2.7

Proof by Contradiction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

41

2.8

Existence Proofs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

44

2.9

Disproof by Counterexample

. . . . . . . . . . . . . . . . . . . . . . . . . .

45

2.10 Proof by Mathematical Induction . . . . . . . . . . . . . . . . . . . . . . . .

46

Chapter 1

Logic 1.1

Introduction

In this chapter we introduce the student to the principles of logic that are essential for problem solving in mathematics. The ability to reason using the principles of logic is key to seek the truth which is our goal in mathematics. Before we explore and study logic, let us start by spending some time motivating this topic. Mathematicians reduce problems to the manipulation of symbols using a set of rules. As an illustration, let us consider the following problem: Example 1.1 Joe is 7 years older than Themba. Five years from now Joe will be twice Themba’s age. How old are Joe and Themba? Solution. To answer the above question, we reduce the problem using symbolic formulation. We let Themba’s age be x. Then Joe’s age is x + 7. We are given that five years from now Joe will be twice Themba’s age. In symbols, (x + 7) + 5 = 2(x + 5). Solving for x yields x = 2. Therefore, Themba is 2 years old and Joe is 9. Our objective is to reduce the process of mathematical reasoning, i.e., logic, to the manipulation of symbols using a set of rules. The central concept of deductive logic is the concept of argument form. An argument is a sequence of statements aimed at demonstrating the truth of an assertion (a “claim”). Consider the following two arguments. Argument 1. If x is a real number such that x < −2 or x > 2, then x2 > 4. Therefore, if x2 ≤ 4, then x ≥ −2 and x ≤ 2. Argument 2. If it is raining or I am sick, then I stay at home. Therefore, if I do not stay at home, then it is not raining and I am not sick. Although the content of the above two arguments is very different, their logical form is the same. To illustrate the logical form of these arguments, we use letters of the alphabet (such as p, q and r) to represent the component sentences and the expression “not p” to refer to the sentence “It is not the case that p.” Then the common logical form of both the 1

2

CHAPTER 1. LOGIC

arguments above is as follows: If p or q, then r. Therefore, if not r, then not p and not q. We start by identify and giving names to the building blocks which make up an argument. In Arguments 1 and 2, we identified the building blocks as follows: 2 Argument 1. If x is a real number such that x > 2}, then x > 4}. | {z | {z | 4. 1.5 Let p and q be the statements p : 1 is an odd integer. q : 1 < 2. Write each of the following sentences in terms of p, q and logical connectives, and find the truth values of the given statements. (a) 1 is an odd integer and 1 < 2. (b) 1 is not an odd integer and 1 < 2. (c) 1 is not an odd integer and 1 ≮ 2.

6

CHAPTER 1. LOGIC

1.5

Disjunction Definition. Given two statements p and q, the disjunction of p and q is the statement “p or q” and is denoted by p ∨ q.

The disjunction p ∨ q is true if at least one of p and q is true; otherwise, p ∨ q is false. Therefore, p ∨ q is true if exactly one of p and q is true or if both p and q are true. Thus for the statements p and q described earlier, the disjunction of p and q, namely, p ∨ q : The integer 2 is even or 4 is less than 3. is a true statement since at least one of p and q is true (in this case, p is true). The truth table for the disjunction of two statements is shown in Figure 1.3. p T T F F

q T F T F

p∨q T T T F

Figure 1.4 A truth table for disjunction.

Exercises 1.6 Write each of the following statements in symbolic form and determine their truth value. (a) 1 < 2 or 2/3 is a rational number. (b) 3 is a prime number or 3 > 4. 1.7 Let p and q be the statements p : 1 is an odd integer. q : 1 < 2. Write each of the following sentences in terms of p, q and logical connectives, and find the truth values of the given statements. (a) 1 is an odd integer or 1 < 2. (b) 1 is not an odd integer or 1 < 2. (c) 1 is not an odd integer or 1 ≮ 2.

1.6. THE IMPLICATION

1.6

7

The Implication

Of special importance to us will be a connective called the implication (also called the conditional).

Definition. Given two statements p and q, the implication of p and q is the statement “If p, then q” and is denoted by p → q. We call p the hypothesis of the implication and q the conclusion.

The implication p → q can be expressed in words in several ways in addition to the wording “If p, then q”, namely: If p, then q. p implies q. q if p. p only if q. p is sufficient for q. q is necessary for p. The truth table for the implication p → q is shown in Figure 1.5. p T T F F

q T F T F

p→q T F T T

Figure 1.5 A truth table for implication. Notice that the only situation for which the implication p → q is false is when p is true and q is false. The truth table for p → q is actually a definition, but let us convince ourselves with an example that the truth values in this truth table are indeed justified. Example 1.3 Suppose your boss makes you the following promise: “If you meet the month-end deadline, then you will get a bonus.” Under what circumstances are you justified in saying that your boss spoke falsely? Solution. The answer is: You do meet the month-end deadline and you do not get a bonus. Your boss’s promise only says you will get a bonus if a certain condition (you meet

8

CHAPTER 1. LOGIC

the month-end deadline) is met; it says nothing about what will happen if the condition is not met. So if the condition is not met, your boss did not lie (your boss promised nothing if you did not meet the month-end deadline); so your boss told the truth in this case. Are you convinced? Good! If not, let us then check the truth and falseness of the implication based on the various combinations of the truth values of the statements p : You meet the month-end deadline. q : You get a bonus. The given statement can be written as p → q. Suppose first that p is true and q is true. That is, you meet the month-end deadline and you do get a bonus. Did your boss tell the truth? Yes, indeed. So if p and q are both true, then so too is p → q, which agrees with the first row of the truth table of Figure 1.5. Second, suppose that p is true and q is false. That is, you meet the month-end deadline and you did not get a bonus. Then your boss did not do as he/she promised. What your boss said was false, which agrees with the second row of the truth table of Figure 1.5. Third, suppose that p is false and q is true. That is, you did not meet the month-end deadline and you did get a bonus. Your boss (who was most generous) did not lie (your boss promised nothing if you did not meet the month-end deadline); so he/she told the truth. This agrees with the third row of the truth table of Figure 1.5. Finally, suppose that p and q are both false. That is, you did not meet the month-end deadline and you did not get a bonus. Your boss did not lie here either. Your boss only promised you a bonus if you met the month-end deadline. So your boss told the truth. This agrees with the fourth row of the truth table of Figure 1.5. In summary, the implication p → q is false only when p is true and q is false. A conditional (or implication) statement that is true by virtue of the fact that its hypothesis is false is said to be vacuously true or true by default. Thus the statement: “If you meet the month-end deadline, then you will get a bonus” is vacuously true if you do not meet the month-end deadline!

Exercises 1.8 Write each of the following statements in symbolic form and determine their truth value. (a) If 0 is an odd integer, then South Africa will win the World Cup Soccer in 2010. (b) If Mtunzini is the capital of KwaZulu-Natal, then 2 is an even integer. 1.9 Let p and q be the statements p : 1 is an odd integer. q : 1 < 2.

1.7. THE CONVERSE, INVERSE AND CONTRAPOSITIVE OF AN IMPLICATION 9 Write each of the following sentences in terms of p, q and logical connectives, and find the truth values of the given statements. (a) If 1 is not an odd integer, then 1 ≮ 2. (b) If 1 is an odd integer, then 1 ≮ 2. 1.10 Suppose that p and q are statements so that p → q is false. Find the truth values of each of the following: (a) ∼p → q (b) p ∨ q (c) q → p.

1.7

The converse, inverse and contrapositive of an implication Definition. Let p and q be two statements. The statement q → p is called the converse of the implication p → q. The statement ∼ p →∼ q is called the inverse of the implication p → q. The statement ∼ q →∼ p is called the contrapositive of the implication p → q.

Example 1.4 Write the converse, inverse and contrapositive of the statement in Example 1.3. Solution. Recall that the given statement can be written as p → q where p and q are the statements p : You meet the month-end deadline. q : You get a bonus. The converse of this implication is q → p, which is q → p : If you get a bonus, then you have met the month-end deadline. The inverse of this implication is ∼ p →∼ q, which is ∼ p →∼ q : If you do not meet the month-end deadline, then you will not get a bonus. The contrapositive of this implication is ∼ q →∼ p, which is ∼ q →∼ p : If you do not get a bonus, then you will not have met the month-end deadline. Example 1.5 Write the converse, inverse and contrapositive of the following statements: “If today is Saturday, then I will go for a 10km run.” Solution. Let p and q be the following statements: p : Today is Saturday. q : I will go for a 10km run.

10

CHAPTER 1. LOGIC

Then the given statement can be written as p → q. The converse of this implication is q → p, which is q → p : If I go for a 10km run, then today is Saturday. The inverse of this implication is ∼ p →∼ q, which is ∼ p →∼ q : If today is not Saturday, then I will not go for a 10km run. The contrapositive of this implication is ∼ q →∼ p, which is ∼ q →∼ p : If I do not go for a 10km run, then today is not Saturday.

Exercises 1.11 Write the converse, inverse and contrapositive of each of the following statements. (a) If 0 is an odd integer, then South Africa will win the World Cup Soccer in 2010. (b) If Mtunzini is the capital of KwaZulu-Natal, then 2 is an even integer.

1.8

Compound Statements

The symbols ∼, ∧, ∨ and → are sometimes referred to as logical connectives. From given statements, we can use these logical connectives to form more intricate statements, called compound statements.

Definition. A compound statement (or statement form or formula) is a statement made up of one or more statements with statement variables (such as p, q, and r) and at least one logical connective (such as ∼, ∧, ∨ and →). The truth table for a given statement form displays the truth values that correspond to the different combinations of truth values for the variables.

For example, for given statements p and q, the conjunction p∧q is a compound statement. For a slightly more complex example, consider the compound statement given by ((∼ p)∨ ∼ (q ∧ r)) ∨ (∼ (s ∧ (q ∨ (∼ t)))). In compound statements, we avoid the use of many parentheses when no confusion arises. We often omit the outer pair of parentheses in a compound statement. For example, we write ∼ p rather than (∼ p). In expressions using the logical connectives ∼, ∧, ∨ and →, we adopt the following order of operation:

1.8. COMPOUND STATEMENTS

11

∼ ∧, ∨ →

performed first, performed second, performed third.

For example, ∼ p ∧ q = (∼ p) ∧ q. As in ordinary algebra, however, the order of operation can be overridden by the use of parentheses. Thus, ∼ (p ∨ q) represents the negation of the disjunction of p and q. Notice that the symbols ∧ and ∨ are coequal in order of operation. Therefore an expression such as p ∧ q ∨ r is considered ambiguous. It should be written as either (p ∧ q) ∨ r

or

p ∧ (q ∨ r).

Example 1.6 Write each of the following sentences symbolically, letting p and q be the statements: p : It is hot. q : It is sunny. (a) (b)

It is not hot and it is sunny. It is not hot and it is not sunny.

Solution. (a) (∼ p) ∧ q. (b) (∼ p) ∧ (∼ q). Example 1.6 Construct the truth table for the compound statement (p → q) ∧ (q → p). Solution. Set up columns labelled p, q, p → q, q → p, and (p → q)∧(q → p). Complete the p and q columns with all four possible combinations of truth values for p and q (in the order of TT, TF, FT, FF from top to bottom). Then use the truth tables for → (see Figure 1.5) to fill in the p → q and q → p columns. Finally, using the truth table for ∧ (see Figure 1.3), fill in the (p → q) ∧ (q → p) column. The resulting truth table is given in Figure 1.6. p T T F F

q T F T F

p→q T F T T

q→p T T F T

(p → q) ∧ (q → p) T F F T

Figure 1.6 A truth table for (p → q) ∧ (q → q).

12

CHAPTER 1. LOGIC

Example 1.7 Construct the truth table for the compound statement (∼ (p ∨ q)) → (q ∧ p). Solution. Set up columns labelled p, q, p ∨ q, ∼ (p ∨ q), q ∧ p and (∼ (p ∨ q)) → (q ∧ p). Complete the p and q columns with all four possible combinations of truth values for p and q. Then use the truth tables for ∨ (see Figure 1.4) and ∧ (see Figure 1.3) to write the truth values in the columns of p ∨ q and q ∧ p. Next, using the truth table for ∼ (see Figure 1.2), fill in the column of ∼ (p ∨ q). Finally, using the truth table for → (see Figure 1.5), fill in the column for (∼ (p ∨ q)) → (q ∧ p). The resulting truth table is given in Figure 1.7. p T T F F

q T F T F

p∨q T T T F

∼ (p ∨ q) F F F T

q∧p T F F F

(∼ (p ∨ q)) → (q ∧ p) T T T F

Figure 1.7 A truth table for (∼ (p ∨ q)) → (q ∧ p).

Exercises 1.12 Construct truth tables for the compound statement: (a) p ∧ (q → ∼p). (b) (p ∧ ∼q) → r.

1.9

The Biconditional

For statements p and q, we are often interested in both the implication p → q and its converse q → p.

Definition. Given two statements p and q, the conjunction (p → q) ∧ (q → p) of the implication p → q and its converse q → p is called the biconditional of p and q and is denoted by p ↔ q. The biconditional p ↔ q is often stated as “p if and only if q.” or “p is equivalent to q”.

1.10. TAUTOLOGIES

13

The truth table for the biconditional p ↔ q is shown in Figure 1.8. p T T F F

q T F T F

p↔q T F F T

Figure 1.8 A truth table for a biconditional. Recall that p ↔ q represents the compound statement (p → q) ∧ (q → p) whose truth table we established earlier (see Figure 1.6). As mentioned earlier (in Section 1.6), the implication q → p can be expressed in words as “p is necessary for q”, while p → q can be expressed as “p is sufficient for q”. Therefore, p ↔ q can be expressed in words as p is necessary for q and p is sufficient for q. Another way to say this is p is necessary and sufficient for q. We remark that the phrase “if and only if” occurs often in mathematics. Many mathematicians abbreviate this phrase by writing “iff”. Although “iff” is informal and not a word, its use is common and you should be familiar with it.

1.10

Tautologies Definition. A compound statement S is called a tautology if the truth value of S is true for any assignment of truth values to the statement variables occurring in S.

Example 1.8 Show that the compound statement p ∨ (∼ p) is a tautology. Solution. The truth table (see Figure 1.9) for p ∨ (∼ p) shows that this statement is always true regardless of the truth value of p. Hence, p ∨ (∼ p) is a tautology. p T F

∼p F T

p ∨ (∼ p) T T

Figure 1.9 A truth table for p ∨ (∼ p).

14

CHAPTER 1. LOGIC

Example 1.9 Show that the compound statement (∼ p) ∨ (q → p) is a tautology. Solution. The truth table (see Figure 1.10) for (∼ p) ∨ (q → p) shows that this statement is always true regardless of the truth values of p and q. Hence, this statement is a tautology. p T T F F

q T F T F

∼p F F T T

q→p T T F T

(∼ p) ∨ (q → p) T T T T

Figure 1.10 A truth table for p ∨ (∼ p).

Exercises 1.13 Show using truth tables that the following statements are tautologies: (a) ∼(∼p ∧ q) ∨ q. (b) (∼p ∨ q) ∨ (p ∧ ∼q).

1.11

Contradictions Definition. A compound statement S is called a contradiction if the truth value of S is false for any assignment of truth values to the statement variables occurring in S.

Example 1.10 Show that the compound statement p ∧ (∼ p) is a contradiction. Solution. The truth table (see Figure 1.11) for p ∧ (∼ p) shows that this statement is always false regardless of the truth value of p. Hence, this statement is a contradiction. p T F

∼p F T

p ∧ (∼ p) F F

Figure 1.11 A truth table for p ∧ (∼ p).

1.12. LOGICAL EQUIVALENCE

15

Example 1.11 Show that the compound statement (p ∧ q) ∧ (q → ∼ p) is a contradiction. Solution. The truth table (see Figure 1.12) for (p ∧ q) ∧ (q → ∼ p) shows that this statement is always false regardless of the truth values of p and q. Hence, this statement is a contradiction. p T T F F

q T F T F

p∧q T F F F

∼p F F T T

q →∼ p F T T T

(p ∧ q) ∧ (q → ∼ p) F F F F

Figure 1.12 A truth table for (p ∧ q) ∧ (q → ∼ p).

Exercises 1.14 Show using truth tables that the following statements are contradictions: (a) (∼p ∨ q) ∧ (p ∧ ∼q).

1.12

(b) (p ∧ q) ∧ (p ∧ ∼q).

Logical Equivalence Definition. Two statements R and S are logically equivalent if they have the same truth values for all combinations of truth values of the statement variables occurring in R and S. We denote the logical equivalence of R and S by R ≡ S.

Example 1.12 Show that p ∧ q ≡ q ∧ p . Solution. The logical equivalence of p ∧ q and q ∧ p is verified in the truth table shown in Figure 1.13 since the corresponding columns of these two statements are identical. p T T F F

q T F T F

p∧q T F F F

q∧p T F F F

Figure 1.13 p ∧ q and q ∧ p are logically equivalent.

16

CHAPTER 1. LOGIC

Example 1.13 Show that p → q ≡ (∼ p) ∨ q . Solution. The logical equivalence of p → q and (∼ p) ∨ q is verified in the truth table shown in Figure 1.14 since the corresponding columns of these two statements are identical. p T T F F

q T F T F

∼p F F T T

p→q T F T T

(∼ p) ∨ q T F T T

Figure 1.14 p → q and (∼ p) ∨ q are logically equivalent. Example 1.14 Show that p ↔ q ≡ (∼p ∨ q) ∧ (∼q ∨ p). Solution. The logical equivalence of p ↔ q and (∼p ∨ q) ∧ (∼q ∨ p) follows directly from the definition of a biconditional and from Example 1.13. p ↔ q ≡ (p → q) ∧ (q → p) (by definition of biconditional) ≡ (∼p ∨ q) ∧ (∼q ∨ p) (by Example 1.13). The logical equivalence of p → q and (∼ p) ∨ q, and the logical equivalence of p ↔ q and (∼p ∨ q) ∧ (∼q ∨ p), is especially important. Strictly speaking this means that we can actually dispense with the logical connectives “→” and “↔.”

Remark. Any statement form containing → or ↔ is logically equivalent to one containing only ∼, ∧, and ∨.

Example 1.15 Show that the statements ∼(p ∧ q) and ∼p ∧ ∼q are not logically equivalent. Solution. The statements ∼(p ∧ q) and ∼p ∧ ∼q have different truth values in rows 2 and 3 of in the truth table (shown in Figure 1.15), and are therefore not logically equivalent. p

q

∼p

∼q

p∧q

T T F F

T F T F

F F T T

F T F T

T F F F

∼(p ∧ q) F T T T

∼p ∧ ∼q 6= 6 =

F F F T

Figure 1.15 ∼(p ∧ q) and ∼p ∧ ∼q are not logically equivalent.

1.12. LOGICAL EQUIVALENCE

17

Example 1.16 Show that ∼(p ∨ q) ≡ (∼p) ∧ (∼q) . Solution. The logical equivalence of ∼(p ∨ q) and (∼p) ∧ (∼q) is verified in the truth table shown in Figure 1.16 since the corresponding columns (columns 4 and 7) of these two statements are identical. p T T F F

q T F T F

p∨q T T T F

∼(p ∨ q) F F F T

∼p F F T T

∼q F T F T

(∼p) ∧ (∼q) F F F T

Figure 1.16 ∼(p ∨ q) ≡ (∼p) ∧ (∼q) are logically equivalent. Example 1.17 Show that p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r) . Solution. The logical equivalence of p ∨ (q ∧ r) and (p ∨ q) ∧ (p ∨ r) is verified in the truth table shown in Figure 1.17 since the corresponding columns (columns 5 and 8) of these two statements are identical. p T T T T F F F F

q T T F F T T F F

r T F T F T F T F

q∧r T F F F T F F F

p ∨ (q ∧ r) T T T T T F F F

p∨q T T T T T T F F

p∨r T T T T T F T F

(p ∨ q) ∧ (p ∨ r) T T T T T F F F

Figure 1.17 p → q and (∼ p) ∨ q are logically equivalent. There are many fundamental logical equivalences that we often encounter. We summarize a number of these in Theorem 1 for future reference. Theorem 1 Let p, q and r be statements. Then the following logical equivalences hold. (1) Commutative Laws (i) p ∧ q ≡ q ∧ p (ii) p ∨ q ≡ q ∨ p (2) Associate Laws (i) (p ∧ q) ∧ r ≡ p ∧ (q ∧ r) (ii) (p ∨ q) ∨ r ≡ p ∨ (q ∨ r)

18

CHAPTER 1. LOGIC (3) Distributive Laws (i) p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r) (ii) p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r) (4) De Morgan’s Laws (i) ∼(p ∨ q) ≡ (∼p) ∧ (∼q) (ii) ∼(p ∧ q) ≡ (∼p) ∨ (∼q) (5) Idempotent Laws (i) p ∧ p ≡ p (ii) p ∨ p ≡ p (6) Negation Laws (i) p ∨ (∼p) ≡ T (ii) p ∧ (∼p) ≡ F (7) Universal Bound Laws (i) p ∨ T ≡ T (ii) p ∧ F ≡ F (8) Identity Laws (i) p ∨ F ≡ p (ii) p ∧ T ≡ p (9) Double Negation Law ∼(∼p) ≡ p

Proof. A proof of the Commutative Law 1(i) was given in Example 1.12, while proofs of the Distributive Law 3(i) and De Morgan’s Law 4(i) were given in Examples 1.17 and 1.16, respectively. We leave the proofs of the other Laws as an exercise. 2 We mention that De Morgan’s Laws can be expressed in words as follows:

De Morgan’s Laws. The negation of an and statement is logically equivalent to the or statement in which each component is negated, while the negation of an or statement is logically equivalent to the and statement in which each component is negated.

From Example 1.16 and the Double Negation Law, we have the logical equivalence

Fact 1.1 p ∨ q ≡ ∼(∼p ∧ ∼q).

1.12. LOGICAL EQUIVALENCE

19

Exercises 1.15 Determine which of the pairs of statement forms listed below are logically equivalent. Justify your answers using truth tables. (a) p ∧ (p ∨ q) and p. (b) p ∨ (p ∧ q) and p. (c) (∼p) ∨ (∼q) and ∼(p ∨ q). 1.16 Using Theorem 1, supply reasons for each step in the logical equivalence derived in (i) and (ii) below. (i) (p ∧ ∼q) ∨ (p ∧ q) ≡ ≡ ≡ ≡

(ii) (p ∨ ∼q) ∧ (∼p ∨ ∼q) ≡ ≡ ≡ ≡

p ∧ (∼q ∨ q) p ∧ (q ∨ ∼q) p∧T p

(by (by (by (by

(∼q ∨ p) ∧ (∼q ∨ ∼p) ∼q ∨ (p ∧ ∼p) ∼q ∨ F ∼q

(a) (b) (c) (d)

) ) ) ).

(by (by (by (by

(e) (f) (g) (h)

) ) ) ).

1.17 Without using truth tables, verify the following logical equivalences using Theorem 1. (a) p ∨ (p ∧ q) and p. (b) p ∧ (p ∨ q) and p. (c) ∼(p ∨ ∼q) ∨ (∼p ∧ ∼q) and ∼p. (d) ∼(∼p ∧ ∼q) and p ∨ q. 1.18 Use the logical equivalences given in Example 1.13, Example 1.14, and Fact 1.1, to rewrite the given compound statements using only the connectives ∧ and ∼. (a) (p ∧ ∼q) → r. (b) (∼p ∨ q) → (r ∨ ∼q). (c) (p → r) ↔ (q → r).

20

CHAPTER 1. LOGIC

1.13

Negation of a Conditional Statement

Example 1.18 Show that

∼(p → q) ≡ p ∧ ∼q

Solution. We can prove this using truth tables. However, let us prove this without using truth tables and rather present a proof using the logical equivalences in Theorem 1. We have ∼(p → q) ≡ ∼(∼p ∨ q) (by Example 1.13) ≡ ∼(∼p) ∧ (∼q) (by De Morgan’s Laws) ≡ p ∧ ∼q (by the Double Negation Law). The negation of a conditional statement can be expressed in words as follows:

The negation of “if p then q” is logically equivalent to “p and not q”.

1.14

The Contrapositive of a Conditional Statement

Recall that the contrapositive of a conditional statement p → q is the statement ∼ q →∼ p. In this section, we show that:

A conditional statement is logically equivalent to its contrapositive.

Example 1.19 Show that

p → q ≡ ∼q → ∼p

Solution. We can prove this using truth tables. However, let us prove this without using truth tables and rather present a proof using the logical equivalences in Theorem 1. We have p → q ≡ ∼p ∨ q (by Example 1.13) ≡ q ∨ ∼p (by the Commutative Laws) ≡ ∼(∼q) ∨ ∼p (by the Double Negation Law) ≡ ∼q → ∼p (by Example 1.13).

1.15. QUANTIFIED STATEMENTS

1.15

21

Quantified Statements

In the previous sections, we defined and discussed basic properties of compound statements. We were interested in whether a particular statement was true or false. This logic is called propositional logic or statement logic. However there are many arguments whose validity cannot be verified using propositional logic. Consider, for example, the sentence p : x is an even integer. This sentence is neither true nor false. The truth or falsity depends on the value of the variable x. For some values of x the sentence is true; for others it is false. Thus this sentence is not a statement. However, let us denote this sentence by P (x), i.e., P (x) : x is an even integer. Then, P (4) is true, while P (5) is false. To study the properties of such sentences, we need to extend the framework of propositional logic to what is called first-order logic.

Definition. A predicate or propositional function is a sentence that contains a finite number of variables and becomes a statement when specific values are substituted for the variables. The domain of a predicate variable is the set of all values that may be substituted in place of the variables.

In our earlier example, the sentence “P (x) : x is an even integer” is a predicate (or propositional function) with domain D the set of integers since for each x ∈ D, P (x) is a statement, i.e., for each x ∈ D, P (x) is true or false, but not both. Example 1.20 The following are examples of propositional functions: (a) The sentence “P (x): x+3 is an odd integer” with domain D the set of positive integers. (b) The sentence “P (x): x + 3 is an odd integer” with domain D the set of integers. (c) The sentence “P (x, y, z): x2 + y 2 = z 2 ” with domain D the set of positive integers. Some sets are encountered so often that they are given special names. These are summarized below: symbol N Z Q R

for the set of natural number (positive integers) integers rational numbers real numbers

22

CHAPTER 1. LOGIC Thus, N = {1, 2, 3, . . .}, Z = {. . . , −2, −1, 0, 1, 2, . . .}, and Q = { ab | a, b ∈ Z and b 6= 0}. A real number that is not a rational number is called irrational.

1.16

The Universal Quantifier

Example 1.21 Let P (x) be a predicate with domain D. Then the sentence Q(x) : for all x, P (x) is a statement. To see this, notice that either P (x) is true at each value x ∈ D (the notation x ∈ D indicates that x is in the set D, while x ∈ / D means that x is not in D) or P (x) is false for at least one value x ∈ D. If P (x) is true at each value x ∈ D, then Q(x) is true. However, if P (x) is false for at least one value x ∈ D, then Q(x) is false. Hence, Q(x) is a statement because it is either true or false (but not both).

Definition. Each of the phrases “every”, “for every”, “for each”, and “for all” is referred to as the universal quantifier and is expressed by the symbol ∀. Let P (x) be a predicate with domain D. A universal statement is a statement of the form ∀x ∈ D, P (x). It is false if P (x) is false for at least one x ∈ D; otherwise, it is true.

Example 1.22 Let P (x) be the predicate “P (x) : x2 ≥ x.” Determine whether the following universal statements are true or false. (a) ∀x ∈ R, P (x); (b) ∀x ∈ Z, P (x). Solution. (a) Let x = “∀x ∈ R, P (x)” is false.

1 2

∈ R. Then, ( 12 )2 =

1 4


3 then x2 > 9. (Here P (x) is the statement “x > 3” and Q(x) the statement “x2 > 9”.) 1. The contrapositive is: ∀x ∈ R, if x2 ≯ 9 then x ≯ 3, or, equivalently, ∀x ∈ R, if x2 ≤ 9 then x ≤ 3. 2. The converse is: ∀x ∈ R, if x2 > 9 then x > 3. (Note that the converse is false; take, for example, x = −4. Then, “(−4)2 > 9” is true but “−4 > 3” is false. Hence the statement “ if (−4)2 > 9 then − 4 > 3” is false. Hence the universal statement “∀x ∈ R, if x2 > 9 then x > 3” is false.) 3. The inverse is: ∀x ∈ R, if x ≯ 3 then x2 ≯ 9, or, equivalently, ∀x ∈ R, if x ≤ 3 then x2 ≤ 9.

28

CHAPTER 1. LOGIC

Exercises 1.23 Write the contrapositive, converse, and inverse of the following statements: (a) If the square of an integer is odd, then the integer is odd. (b) If an integer is divisible by 4, then it is even. (c) ∀x ∈ R, if x(x + 1) > 0 then x > 0 or x < −1.

1.20

Review of Symbols

We close this chapter with a review of the symbols that we have introduced. ∼ ∨ ∧ → ↔ ∀ ∃

negation (not) disjunction (or) conjunction (and) implication biconditional universal quantifier (for every) existential quantifier (there exists)

Chapter 2

Proof Techniques 2.1

Introduction

In this chapter, we discuss the topic of mathematical proofs. Our goal is to introduce the student to several important proof techniques for verifying mathematical statements. For a given true mathematical statement, how exactly can we verify that it is true? Finding answers to mathematical questions is all very well, but we must be certain that we are right and we must be able to able to convince others, not just ourselves, of this! A true mathematical statement is called a result. Interesting or significant mathematical results are called theorems (or propositions). For example, the mathematical statement “1+1 = 2” is true, but we would not call this a theorem, but rather a result. A corollary is a mathematical result that can be deduced from or is a consequence of some earlier result. A lemma is a mathematical result that is useful in proving another (more interesting) result. A lemma can be thought of as a “helping result” to prove some other result. Before presenting several proof techniques, we will need some elementary definitions in number theory.

Definition. An integer n is even if and only if n = 2k for some integer k. An integer n is odd if and only if n = 2k + 1 for some integer k.

Example 2.1 (a) The integer 8 is even since 8 = 2 · 4 (i.e., 8 = 2k where k = 4 ∈ Z). (b) The integer −5 is odd since −5 = 2(−3) + 1 (i.e., −5 = 2k + 1 where k = −3 ∈ Z). We shall show in Section 2.6 (using the so-called quotient-remainder theorem) that every integer is either even or odd. 29

30

CHAPTER 2. PROOF TECHNIQUES

Definition. An integer n is prime if and only if n > 1 and for all positive integers r and s, if n = r·s, then r = 1 or s = 1. An integer n is composite if and only if n = r · s for some positive integers r and s with r 6= 1 and s 6= 1.

Example 2.2 (a) The first six prime numbers are 2, 3, 5, 7, 11, 13. (b) The first six composite numbers are 4, 6, 8, 9, 10, 12. (c) Every integer greater than 1 is either prime or composite since the two definitions are negations of each other (see Section 1.18!).

Definition. Two integers m and n are said to be of the same parity if m and n are both even or are both odd, while m and n are said to be of the opposite parity if one of m and n is even and the other is odd. Two integers are consecutive if one is one more than the other. So if one integer is n, the next consecutive integer is n + 1.

Example 2.3 (a) The integers 2 and 18 are of the same parity (since they are both even). (b) The integers 7 and 12 are of the opposite parity (one is even, the other odd).

Definition. Let n and d be integers with d 6= 0. Then n is said to be divisible by d if n = d · k for some integer k. Alternatively, we say that n is a multiple of d, or d is a factor of n, or d is a divisor of n, or d divides n. The notation “d | n” is read “d divides n.”

Example 2.4 (a) Is 16 divisible by 8? (d) Does 5 | 30? Solution (a) Yes: 16 = 8 · 2. (d) Yes: 30 = 5 · 6.

(b) Does 3 divide 21? (e) Is 7 a factor of 42? (b) Yes: 21 = 3 · 7. (e) Yes: 42 = 7 · 6.

(c) Is 21 a multiple of 7? (f) Is 8 a factor of −8?

(c) Yes: 21 = 7 · 3. (f) Yes: −8 = 8 · (−1).

2.2. TRIVIAL PROOFS

31

Exercises 2.1 Let m and n be (fixed) integers. Justify your answers to each of the following questions: (a) Is 4mn + 10n even? (b) Is 8mn + 5 odd? (c) If m and n are positive, is m2 + 2mn + n2 composite? (d) If m ≥ n + 2 ≥ 3, is m2 − n2 composite? 2.2 (a) Is 45 divisible by 9? (b) Is 5k(3k + 6) divisible by 3? (c) Is 24 a multiple of 8? (d) Does 11 | 54? (e) Is −6 a factor of 42? (f) If n = 4k + 3, does 8 divide n2 − 1?

2.2

Trivial Proofs Trivial proof. Let P (x) and Q(x) be statements with domain D. If Q(x) is true for all every x ∈ D, then the universal statement ∀x ∈ D, P (x) → Q(x) is true (regardless of the truth value of P (x)).

Recall from the Truth Table 1.5, that if Q(x) is a true statement, then so too is the implication P (x) → Q(x). Furthermore, the universal statement ∀x ∈ D, P (x) → Q(x) is a true statement provided P (x) → Q(x) is true for every x ∈ D. In particular if Q(x) is true for all every x ∈ D, then immediately we can deduce that the statement ∀x ∈ D, P (x) → Q(x) is true. Such a proof we call a trivial proof. Result 2.1 For x ∈ R, if x > −5, then x2 + 2 > 0. Proof. Consider the statements P (x) : x > −5 and Q(x) : x2 + 2 > 0. Since x2 ≥ 0 for every x ∈ R, it follows that x2 + 2 ≥ 0 + 2 > 0 for every x ∈ R. Hence, Q(x) is true for every x ∈ R. Thus, P (x) → Q(x) is true for every x ∈ R, i.e., for x ∈ R, if x > −5, then x2 + 2 > 0. 2

32

CHAPTER 2. PROOF TECHNIQUES

The symbol 2 that occurs at the end of the proof of Result 2.1 indicates that the proof is complete. Note that the proof of Result 2.1 does not depend on x > −5. We could have, in fact, replaced x > −5 by any hypothesis and the result would still be true. It would have been better to replace the statement of Result 2.1 by “If x ∈ R, then x2 + 2 > 0.” We remark that the proof of Result 2.1 could be simplified if we do not introduce the statements P (x) and Q(x): Proof of Result 2.1. Since x2 ≥ 0 for every x ∈ R, it follows that x2 + 2 ≥ 0 + 2 > 0 for every x ∈ R. Hence, x2 + 2 > 0. 2 Result 2.2 If n is an odd integer, then 6n3 + 4n + 3 is an odd integer. Proof. Since 6n3 + 4n + 3 = 2(3n3 + 2n + 1) + 1 where 3n3 + 2n + 1 ∈ Z (i.e., 6n3 + 4n + 3 = 2k + 1 where k = 3n3 + 2n + 1 ∈ Z), the integer 6n3 + 4n + 3 is odd for every integer n. 2 Note that in Result 2.2 the fact that 6n3 + 4n + 3 is odd does not depend on n being odd. It would have been better to replace the statement of Result 2.2 by If n is an integer, then 6n3 + 4n + 3 is odd.

Exercises 2.3 For x ∈ R, prove that if x < −1, then x2 +

1 4

> 0.

2.4 Prove that if n is an odd integer, then 4n3 + 6n2 + 12 is an even integer.

2.3

Vacuous Proofs Vacuous proof. Let P (x) and Q(x) be statements with domain D. If P (x) is false for all every x ∈ D, then the universal statement ∀x ∈ D, P (x) → Q(x) is true (regardless of the truth value of Q(x)).

Recall from the Truth Table 1.5, that if P (x) is a false statement, then the implication P (x) → Q(x) is true. Hence if P (x) is false for all every x ∈ D, then we can deduce that the statement ∀x ∈ D, P (x) → Q(x) is true. Such a proof we call a vacuous proof.

2.4. DIRECT PROOFS

33

Result 2.3 For x ∈ R, if x2 − 2x + 1 < 0, then x > 4. Proof. Consider the statements P (x) : x2 − 2x + 1 < 0 and Q(x) : x > 4. Since x2 − 2x + 1 = (x − 1)2 ≥ 0 for every x ∈ R, we have that x2 − 2x + 1 < 0 is false for every x ∈ R. Hence, P (x) is false for every x ∈ R. Thus, P (x) → Q(x) is true for every x ∈ R, i.e., for x ∈ R, if x2 − 2x + 1 < 0, then x > 4. 2 Note that in the proof of Result 2.3, the truth value of the statement x > 4 plays no role whatsoever. We could have, in fact, replaced x > 4 by any conclusion and the result would still be true.

Exercises 2.5 Let x ∈ R. Prove that if 2x2 − 4x + 4 < 0, then x5 ≥ 7.

2.4

Direct Proofs

One of the most important proof techniques is the method of direct proof.

Direct proof. Let P (x) and Q(x) be statements with domain D. If P (x) → Q(x) is true for all x ∈ D for which P (x) is true, then the universal statement ∀x ∈ D, P (x) → Q(x) is true. Such a proof we call a direct proof. Thus to give a direct proof of the above universal statement, we • assume P (x) is true for some particular but arbitrary element x ∈ D, and then • show that Q(x) is true for this element x.

Recall that the universal statement ∀x ∈ D, P (x) → Q(x) is true provided P (x) → Q(x) is true for every x ∈ D. If P (x) is a false statement, then the implication P (x) → Q(x) is true. Hence to show that the universal statement ∀x ∈ D, P (x) → Q(x) is true for every x ∈ D, we need only show that P (x) → Q(x) is true for all x ∈ D for which P (x) is true. Such a proof we call a direct proof.

34

CHAPTER 2. PROOF TECHNIQUES

Result 2.4 If n is an even integer, then 3n + 5 is an odd integer. Proof. If we let “P (n): n is even” and “Q(n): 3n + 5 is odd”, then we need to show that the universal statement ∀n ∈ Z, P (n) → Q(n) is true. To do this, we assume P (n) is true for some particular but arbitrary element n ∈ Z and show that Q(n) is true for this element n. Since P (n) is true, n = 2k for some integer k. Hence, 3n + 5 = 3(2k) + 5 = 6k + 5 = 2(3k + 2) + 1 = 2m + 1, where m = 3k + 2. Since k ∈ Z, we must have m ∈ Z (since the product of two integers is an integer, and the sum and difference of two integers is an integer). Hence, 3n + 5 = 2m + 1 for some integer m, whence Q(n) is true. Thus by the method of direct proof, we have proven our desired result. 2 We remark that the proof of Result 2.4 could be simplified if we do not introduce the statements P (x) and Q(x). Proof of Result 2.4. Assume that n is an even integer. Then, n = 2k for some integer k. Hence, 3n + 5 = 3(2k) + 5 = 6k + 5 = 2(3k + 2) + 1 = 2m + 1, where m = 3k + 2. Since k ∈ Z, we must have m ∈ Z. Hence, 3n + 5 = 2m + 1 for some integer m, whence 3n + 5 is an odd integer. 2 Result 2.5 If n is an odd integer, then 5n + 3 is an even integer. Proof. Assume that n is an odd integer. Then, n = 2k + 1 for some integer k. Hence, 5n + 3 = 5(2k + 1) + 3 = 10k + 8 = 2(5k + 4) = 2m, where m = 5k + 4. Since k ∈ Z, we must have m ∈ Z. Hence, 5n + 3 = 2m for some integer m, whence 5n + 3 is an even integer. 2 Result 2.6 If n is an odd integer, then n2 + n is even. Proof. Assume that n is an odd integer. Then, n = 2k + 1 for some integer k. Hence n2 + n = (2k + 1)2 + (2k + 1) = 4k 2 + 6k + 2 = 2m, where m = 2k 2 + 3k + 1. Since k ∈ Z, we must have m ∈ Z. Hence, n2 + n is even. 2 Result 2.7 If the sum of any two integers is even, then so is their difference. Proof. Assume that m and n are (particular but arbitrarily chosen) integers such that m + n is even. (We show that m − n is even.) Then, m + n = 2k for some integer k. Thus, m = 2k − n. Hence, m − n = (2k − n) − n = 2k − 2n = 2(k − n) = 2`,

2.5. PROOF BY CONTRAPOSITIVE

35

where ` = k − n. Since k, n ∈ Z and the difference between two integers is an integer, ` ∈ Z. Hence, m − n = 2` where ` ∈ Z. Thus, m − n is even. 2

Exercises

2.6 Use the method of direct proof to prove that: (a) The product of two odd integers is an odd integer. (b) The sum of two even integers is an even integer. (c) If n is an odd integer, then 5n2 + 11 is an even integer. (d) If n is an even integer, then 3n2 − 4n − 5 is an odd integer. (e) If n is an even integer, then 5n3 is an even integer. (f) If n ∈ Z and 7n − 3 is odd, then n is even. 2.7 Find the mistake in the “proof” of the following result, and provide a correct proof. Result. If m is an even integer and n is an odd integer, then 2m + 3n is an odd integer. Proof. Since m is an even integer and n is an odd integer, m = 2k and n = 2k + 1 for some integer k. Therefore, 2m + 3n = 2(2k) + 3(2k + 1) = 10k + 3 = 2(5k + 1) + 1 = 2` + 1, where ` = 5k + 1. Since k ∈ Z, ` ∈ Z. Hence, 2m + 3n = 2` + 1 for some integer `, whence 2m + 3n is an odd integer. 2 2.8 Find the mistake in the “proof ” of the following result, and provide a correct proof. Result. For all integers n ≥ 1, n2 + 2n + 1 is composite. Proof. Let n = 4. Then, n2 + 2n + 1 = 42 + 2(4) + 1 = 25 and 25 is composite. 2

2.5

Proof by Contrapositive

Recall that the contrapositive of a conditional statement P (x) → Q(x) is the statement ∼Q(x) → ∼P (x). In Section 1.14, we showed that a conditional statement P (x) → Q(x) is logically equivalent to its contrapositive ∼Q(x) → ∼P (x).

36

CHAPTER 2. PROOF TECHNIQUES

Let P (x) and Q(x) be statements with domain D. A proof by contrapositive of the statement ∀x ∈ D, P (x) → Q(x) is a direct proof of its contrapositive ∀x ∈ D, ∼Q(x) → ∼P (x); that is, we assume that ∼Q(x) is true for some particular but arbitrary element x ∈ D, and then show that ∼P (x) is true for this element x.

Result 2.8 Let n ∈ Z. If n2 + 5 is odd, then n is even. Proof. Let P (n) be the statement “n2 + 5 is odd” and let Q(n) be the statement “n is even”. Then we need to show that the universal statement ∀n ∈ Z, P (n) → Q(n) is true. To do this, we use a proof by contrapositive. We give a direct proof to show that ∼Q(n) → ∼P (n). Hence we assume that ∼Q(n) is true for some particular but arbitrary element n ∈ Z and show that ∼P (n) is true for this element n. Since ∼Q(n) is true, n is not even. Thus, n is odd, and so n = 2k + 1 for some integer k. Hence, n2 + 5 = (2k + 1)2 + 5 = 4k 2 + 4k + 6 = 2(k 2 + 2k + 3) = 2m, where m = k 2 + 2k + 3. Since k ∈ Z, we must have m ∈ Z. Hence, n2 + 5 = 2m for some integer m, and so n2 + 5 is even, i.e., n2 + 5 is not an odd integer. Thus, ∼P (n) is true. Therefore by the method of direct proof, we have proven that ∼Q(n) → ∼P (n) is true. Hence, P (n) → Q(n) is true. Therefore, ∀n ∈ Z, P (n) → Q(n). 2 We remark that the proof of Result 2.8 could be simplified if we do not introduce the statements P (x) and Q(x). Proof of Result 2.8. Assume that n is odd. Then, n = 2k + 1 for some integer k. Hence, n2 + 5 = (2k + 1)2 + 5 = 4k 2 + 4k + 6 = 2(k 2 + 2k + 3) = 2m, where m = k 2 + 2k + 3. Since k ∈ Z, we must have m ∈ Z. Hence, n2 + 5 = 2m for some integer m, and so n2 + 5 is an even integer. 2 Result 2.9 Let n ∈ Z. If n2 is even, then n is even. Proof. We use a proof by contrapositive. Assume that n is odd. Then, n = 2k + 1 for some integer k. Hence, n2 = (2k + 1)2 = 4k 2 + 4k + 1 = 2(k 2 + 2k) + 1 = 2m + 1, where m = k 2 + 2k. Since k ∈ Z, we must have m ∈ Z. Hence, n2 = 2m + 1 for some integer m, and so n2 is an odd integer. 2

2.6. PROOF BY CASES AND THE QUOTIENT-REMAINDER THEOREM

37

We remark that the statements of Results 2.8 and 2.9 begin with the sentence “Let n ∈ Z.” We call this the overriding assumption or hypothesis, and so n is assumed to be an integer throughout the proofs of Results 2.8 and 2.9.

Exercises 2.9 Let n ∈ Z. Prove that if 5n + 3 is odd, then n is even. 2.10 Let x ∈ Z. Prove that if 11x − 3 is even, then x is odd. 2.11 Let n ∈ Z. Prove that if 5n + 3 is odd, then 7n + 4 is even. 2.12 Let n ∈ Z. Prove that if 7n + 4 is even, then 3n − 5 is odd.

2.6

Proof by Cases and the Quotient-Remainder Theorem Let P (x) be a statement. If x possesses certain properties, and if we can verify that P (x) is true regardless of which of these properties x has, then P (x) is true. Such a proof is called a proof by cases.

Before we look at examples of a proof by cases, we state 1 the Quotient-Remainder Theorem which says that when any integer n is divided by any positive integer d, the result is a quotient q and a nonnegative remainder r that is smaller than d. Theorem 2.10 (Quotient-Remainder Theorem) For every given integer n and positive integer d, there exist unique integers q and r such that n=d·q+r

and

0 ≤ r < d.

Example 2.5 For each of the following values of n and d, find integers q and r such that n = d · q + r and 0 ≤ r < d. (a) n = 36, d = 7 (b) n = −36, d = 7. (c) n = 36, d = 40. 1

A proof of the existence part of the Quotient-Remainder Theorem follows from the so-called well-ordering principle for the integers, while a proof of the uniqueness part follows using the greatest common divisor of two integers. We omit the proof.

38

CHAPTER 2. PROOF TECHNIQUES

Solution (a) 36 = 7 · 5 + 1 (here q = 5 and r = 1). (b) −36 = 7 · (−6) + 6 (here q = −6 and r = 6). (c) 36 = 40 · 0 + 36 (here q = 0 and r = 36).

Definition. Let n be a nonnegative integer and let d be a positive integer. By the Quotient-Remainder Theorem, there exist unique integers q and r such that n = d · q + r, where 0 ≤ r < d. We define n div d = q (read as ”n divided by q”), and n mod d = r (read as ”n modulo q”). Thus n div d and n mod d are the integer quotient and integer remainder, respectively, obtained when n is divided by d.

Observe that given a nonnegative integer n and a positive integer d, we have that n mod d ∈ {0, . . . , d − 1} (since 0 ≤ r ≤ d − 1) and that n mod d = 0 if and only if n is divisible by d. Example 2.6 Compute 31 div 7 and 31 mod 7. Solution. Since 31 = 7 · 4 + 3, we have that 31 div 7 = 4 and 31 mod 7 = 3. Using the Quotient-Remainder Theorem, we can show that every integer is either even or odd. Result 2.11 Every integer is either even or odd. Proof. By the Quotient-Remainder Theorem with d = 2, there exist unique integers q and r such that n = 2 · q + r and 0 ≤ r < 2. Hence, r = 0 or r = 1. Therefore, n = 2q

or

n = 2q + 1

for some integer q depending on whether r = 0 or r = 1, respectively. In the case that n = 2q, the integer n is even. In the remaining case that n = 2q + 1, the integer n is odd. Hence, n is either even or odd. 2 By Result 2.11, every integer has the property that it is either even or odd. This observation is useful when using a proof by cases as is illustrated by the proofs of the next three results.

2.6. PROOF BY CASES AND THE QUOTIENT-REMAINDER THEOREM

39

Result 2.12 If n ∈ Z, then n2 + 5n + 3 is an odd integer. Proof. We use a proof by cases, depending on whether n is even or odd. Case 1. n is even. Then, n = 2k for some integer k. Thus, n2 +5n+3 = (2k)2 +5(2k)+3 = 4k 2 + 10k + 3 = 2(2k 2 + 5k + 1) + 1 = 2m + 1, where m = 2k 2 + 5k + 1. Since k ∈ Z, we must have m ∈ Z. Hence, n2 + 5n + 3 = 2m + 1 for some integer m, and so the integer n2 + 5n + 3 is odd. Case 2. n is odd. Then, n = 2k + 1 for some integer k. Thus, n2 + 5n + 3 = (2k + 1)2 + 5(2k + 1) + 3 = 4k 2 + 14k + 9 = 2(2k 2 + 7k + 4) + 1 = 2m + 1, where m = 2k 2 + 7k + 4. Since k ∈ Z, we must have m ∈ Z. Hence, n2 + 5n + 3 = 2m + 1 for some integer m, and so the integer n2 + 5n + 3 is odd. 2 Result 2.13 Let m, n ∈ Z. If m and n are of the same parity, then m + n is even. Proof. We use a proof by cases, depending on whether m and n are both even or both odd. Case 1. m and n are both even. Then, m = 2k and n = 2` for some integers k and `. Thus, m + n = 2k + 2` = 2(k + `). Since k + ` ∈ Z, the integer m + n is even. Case 2. m and n are both odd. Then, m = 2k + 1 and n = 2` + 1 for some integers k and `. Thus, m + n = (2k + 1) + (2` + 1) = 2(k + ` + 1). Since k + ` + 1 ∈ Z, the integer m + n is even. 2 Result 2.14 Let n ∈ Z. If n2 is a multiple of 3, then n is a multiple of 3. Proof. We shall combine two proof techniques and use both a proof by contrapositive and a proof by cases. Suppose that n is not a multiple of 3. (We wish to show then that n2 is not a multiple of 3.) By the Quotient-Remainder Theorem with d = 3, there exist unique integers q and r such that n = 3 · q + r and 0 ≤ r < 3. Hence, r ∈ {0, 1, 2}. Therefore, n = 3q

or

n = 3q + 1

or

n = 3q + 2

for some integer q depending on whether r = 0, 1 or 2, respectively. Since n is not a multiple of 3, either n = 3q + 1 or n = 3q + 2 for some integer q. We consider each case in turn. Case 1. n = 3q+1 for some integer q. Then, n2 = (3q+1)2 = 9q 2 +6q+1 = 3(3q 2 +2q)+1, and so n2 is not a multiple of 3. Case 2. n = 3q + 2 for some integer q. Then, n2 = (3q + 2)2 = 9q 2 + 12q + 4 = 3(3q 2 + 4q + 1) + 1, and so n2 is not a multiple of 3. 2

40

CHAPTER 2. PROOF TECHNIQUES

Result 2.15 Let n ∈ Z. If n is an odd integer, then n2 = 8m + 1 for some integer m. Proof. We shall use both a direct proof and a proof by cases. Assume that n is an odd integer. By the Quotient-Remainder Theorem with d = 4, there exist unique integers q and r such that n = 4 · q + r and 0 ≤ r < 4. Hence, r ∈ {0, 1, 2, 3}. Therefore, n = 4q

or

n = 4q + 1

or

n = 4q + 2

or

n = 4q + 3

for some integer q depending on whether r = 0, 1, 2 or 3, respectively. Since n is odd, and since 4q and 4q + 2 are both even, either n = 4q + 1 or n = 4q + 3 for some integer q. We consider each case in turn. Case 1. n = 4q + 1 for some integer q. Then, n2 = (4q + 1)2 = 16q 2 + 8q + 1 = 8(2q 2 + q) + 1 = 8m + 1, where m = 2q 2 + q. Since q ∈ Z, we must have m ∈ Z. Hence, n2 = 8m + 1 for some integer m. Case 2. n = 4q + 3 for some integer q. Then, n2 = (4q + 3)2 = 16q 2 + 24q + 9 = (16q 2 + 24q + 8) + 1 = 8(2q 2 + 3q + 1) + 1 = 8m + 1, where m = 2q 2 + 3q + 1. Since q ∈ Z, we must have m ∈ Z. Hence, n2 = 8m + 1 for some integer m. 2 We remark that Result 2.15 can be restated as follows: For every odd integer n, we have n2 mod 8 = 1.

Exercises 2.13 For each of the following values of n and d, find integers q and r such that n = d · q + r and 0 ≤ r < d. (a) n = 38, d = 9 (b) n = −38, d = 13. (c) n = −45, d = 11. 2.14 Compute 37 div 7 and 37 mod 7. 2.15 Prove that every two consecutive integers have opposite parity. 2.16 Prove that the product of two consecutive integers is an even integer. 2.17 Prove that the square of any integer has the form 3k or 3k + 1 for some integer k. 2.18 Prove that the square of any integer has the form 4k or 4k + 1 for some integer k. 2.19 Prove that every prime number greater than 3 has the form 6k + 1 or 6k + 5 for some integer k.

2.7. PROOF BY CONTRADICTION

2.7

41

Proof by Contradiction

In this section, we discuss another very important proof technique, called proof by contradiction.

Proof by contradiction. Let P be a statement. If we assume that ∼P is a true statement (or, equivalently, that P is false) and, from this assumption, we are able to deduce a contradiction, then we can conclude that the statement P is true.

Let P and C be statements, where C is a statement that is a contradiction (see Section 1.11). Hence, the truth value of C is false for any assignment of truth values to the statement variables occurring in C. We wish to prove that P is a true statement. Suppose we can prove that ∼P → C is true. Then the truth table for implication (see Table 1.5) tells us that ∼P must be false (since C is false). This implies that P is true, as desired. This proof technique is called proof by contradiction. Result 2.16 There is no greatest integer. Proof. Assume, to the contrary, that there is a greatest integer, say N . Then, N ≥ n for every integer n. Let m = N + 1. Now m is an integer since it is the sum of two integers. Also, m > N . Thus, m is an integer that is greater than the greatest integer, which is a contradiction. Hence our assumption that there is a greatest integer is false. Thus there is no greatest integer. 2 We proceed further by recalling the definition of a rational number.

Definition. A real number r is rational number if r = a/b for some integers a and b with b 6= 0. A real number that is not a rational number is called an irrational number.

Result 2.17 There is no smallest positive rational number. Proof. Assume, to the contrary, that there is a least positive rational number x. Then, x ≤ y for every positive rational number y. Consider the number x/2. Since x is a positive rational number, so too is x/2. Multiplying both sides of the inequality 1/2 < 1 by x, which is positive, gives x/2 < x. Hence, x/2 is a positive rational number that is less than x, which is a contradiction. Hence our assumption that there is a least positive rational number is false. Thus there is no least positive rational number. 2

42

CHAPTER 2. PROOF TECHNIQUES

Result 2.18 The sum of a rational number and an irrational number is irrational. Proof. Assume, to the contrary, that there exists a rational number r and an irrational number s whose sum is a rational number. Thus, by definition of rational numbers, r = a/b and r + s = c/d for some integers a, b, c and d with b 6= 0 and d 6= 0. Hence, s=

c c a bc − ad −r = − = . d d b bd

Now, bc − ad ∈ Z and bd ∈ Z since a, b, c, d ∈ Z. Since b 6= 0 and d 6= 0, bd 6= 0. Hence, s ∈ Q, which is a contradiction. Hence our assumption that there exists a rational number and an irrational number whose sum is a rational number is false. Thus, the sum of a rational number and an irrational number is irrational. 2 To prove an implication P → Q is true using a proof by contradiction, we assume that ∼(P → Q) is true and then deduce a contradiction. In Example 1.18, we saw that ∼(P → Q) is logically equivalent to P ∧ ∼Q. Thus to prove that P → Q is true by contradiction, we assume that P is true and Q is false, and then deduce a contradiction.

Proof by contradiction. Let P and Q be statements. If we assume that P is true and Q is false and, from this assumption, we are able to deduce a contradiction, then we can conclude that the statement P → Q is true.

Recall that earlier we proved Result 2.9 using a proof by contrapositive. We could have also used a proof by contradiction. Note that in Result 2.9, we take P to be the statement “n2 is even” and Q to be the statement “n is odd.” Result 2.9 Let n ∈ Z. If n2 is even, then n is even. Alternative proof of Result 2.9. We use a proof by contradiction. Assume that n2 is even and n is odd. Then, n = 2k + 1 for some integer k. Hence, n2 = (2k + 1)2 = 4k 2 + 4k + 1 = 2(k 2 + 2k) + 1 = 2m + 1, where m = k 2 + 2k. Since k ∈ Z, we must have m ∈ Z. Hence, n2 = 2m+1 for some integer m, and so n2 is an odd integer, a contradiction. We deduce, therefore, that if n2 is even, then n is even. 2 We prove next a classical result that Result 2.19 The real number

√ 2 is irrational.

√ 2 is irrational.

Proof. Assume, to the contrary, that

√ 2 is rational. Then, √ m 2= n

2.7. PROOF BY CONTRADICTION

43

where m, n ∈ Z and n 6= 0. By dividing m and n by any common factors, if necessary, we may further assume that m and n have no common factors, i.e., m/n has been expressed in (or reduced to) lowest terms. Then, 2 = m2 /n2 , and so m2 = 2n2 . Thus, m2 is even. Hence by Result 2.9, m is even, and so m = 2k, where k ∈ Z. Substituting this into our earlier equation m2 = 2n2 , we have (2k)2 = 2n2 , and so 4k 2 = 2n2 . Therefore, n2 = 2k 2 . Thus, n2 is even, and so n is even by Result 2.9. Therefore each of m and n has 2 as a factor, which contradicts our assumption that m/n has been reduced to lowest terms and therefore factors. We deduce, therefore, that our assumption √ that m and n have no common √ that 2 is rational is incorrect. Hence, 2 is irrational. 2

Exercises 2.20 Prove that there is no greatest negative real number. √ 2.21 Prove that the real number 3 is irrational. 2.22 Prove that the product of an irrational number and a nonzero rational number is irrational. √ 2.23 Prove that 1 + 5 2 is irrational. √ √ 2.24 Prove that 2 + 3 is irrational. 2.25 The Three Cheating Students Problem: Three students were caught cheating in a first year mathematics quiz and sentenced to a relatively light sentence (given the seriousness of the crime) of 20 years in prison with hard labour. But due to overcrowding, one of these three students must be pardoned. A distinguished Persian professor of mathematics devises a scheme to determine which student is to be pardoned. He tells the three students that he will blindfold them and then paint a red dot or a blue dot on each forehead. After he paints the dots, he will remove the blindfolds, and a student should raise his hand if he sees a red dot on one of the other two students. The first student to identify the colour of the dot on his own forehead will be pardoned and may resume his mathematical studies. An incorrect answer would triple his sentence. The professor blindfolds the students, as promised, and then paints a red dot on the foreheads of all three students. He removes the blindfolds and, since each student sees a red dot (in fact two red dots), each student raises his hand. After a considerable time has passed, one student exclaims, ”I know what colour my dot is! It’s red!” The student is then pardoned and allowed re-entry into first year mathematics. How did this student correctly identify the colour of the dot painted on his forehead?

44

CHAPTER 2. PROOF TECHNIQUES

2.8

Existence Proofs

Recall that (see Section 1.17) an existential statement is a statement of the form ∃x ∈ D such that P (x). It is true if P (x) is true for at least one x ∈ D; otherwise, it is false. Hence to prove this statement, we need only display or find an element x ∈ D that makes P (x) true. Such a proof is called an existence proof. Example 2.7 Prove the following statements. √ √ √ (a) There are distinct positive integers such that a + b = a + b − 2. (b) There exists an even integer that can be written as a sum of two prime numbers. (c) There exist positive integers a, b and c such that a2 = b2 + c2 . Solution √ √ √ √ √ √ (a) Take a = 9 and b = 16. Then, a + b = 25 = 5, while a+ b−2 = 9+ 16−2 = 5. (b) Take n = 4. Then, n = 2 + 2. (c) Take a = 5, b = 3 and c = 4. Then, a2 = 25 = b2 + c2 . Result 2.20 There exist irrational numbers a and b such that ab is rational. √ √2 Proof. Consider the real number 2 . This number is either rational or irrational. We consider each case in turn. √ √2 √ √ Case 1. 2 is rational. Let a = 2 and b = 2. By Result 2.19, a and b are irrational. By assumption, ab is rational. √ √2 √ √2 √ Case 2. 2 is irrational. Let a = 2 and let b = 2. By assumption, a is irrational, while by Result 2.19, b is irrational. Moreover, µ √ ¶√2 √ 2 √ (√2·√2) √ 2 = 2 = 2, ab = 2 = 2 which is rational. In both cases, we proved the existence of irrational numbers a and b such that ab is rational, and so we have the desired result. 2 √ √2 2 is rational. Of course, the proof of√Re√ 2 sult 2.20 presented above is a perfectly valid proof irrespective of the fact that 2 is rational. We remark that it has been proven that

We close this section with perhaps one of the most famous mathematical assertions. In Example 2.7(c), we showed that if n = 2, then there exist positive integers a, b and c such that an = bn + cn . Pierre de Fermat (1601–1665), a famous mathematician, claimed the following assertion: Theorem 2.21 (Fermat’s Last Theorem) For each integer n ≥ 3, there are no positive integers a, b and c such that an = b n + cn .

2.9. DISPROOF BY COUNTEREXAMPLE

45

The above result became known as Fermat’s Last Theorem. Fermat’s assertion was discovered, unproved, in a margin of a book, along with the comment “I have discovered a truly remarkable proof of this theorem which this margin is too small to contain.” It was only some 350 years later (in 1993) that a proof to his assertion was finally found by the British mathematician Andrew Wiles. His proof used very sophisticated mathematical techniques that had eluded the greatest mathematical minds of the last few centuries.

Exercises 2.26 Prove that there exists an integer whose cube equals its square. 2.27 Prove that there exists real numbers x and y such that (x + y)2 = x2 + y 2 . 2.28 Prove that there exists a real number x such that x3 < x < x2 .

2.9

Disproof by Counterexample

Some statements may very well be false. To disprove a statement, we use a disproof by counterexample.

Let P (x) be a statement with domain D. A disproof by counterexample of the statement ∀x ∈ D, P (x) is to find an element x ∈ D such that P (x) is false. Such an element x is called a counterexample of the statement.

If the statement ∀x ∈ D, P (x) is not true, then its negation ∼(∀x ∈ D, P (x)) is true. By Fact 1.2, ∼(∀x ∈ D, P (x)) ≡ ∃x ∈ D such that ∼P (x). Hence we wish to show that ∃x ∈ D such that ∼P (x) is true. That is, we wish to show that ∼P (x) is true for some element x ∈ D. Such a disproof is called a disproof by counterexample. Example 2.8 Find counterexamples to the following statements. (a) The product of any two irrational numbers is irrational. (b) If a and b are rational numbers, then ab is rational. (c) The sum of any two positive irrational numbers is irrational. Solution √ (a) Let a = b = 2. By Result 2.19, a and b are irrational, but ab = 2 which is rational.

46

CHAPTER 2. PROOF TECHNIQUES

√ b 1/2 (b) Let a = √ 2 and b = 1/2. Then, √ a, b ∈ Q, but a = 2 = 2, which is irrational. b are positive (c) Let a = 2 and let b = 2 − 2. Then both a and √ √ and both are irrational (by Result 2.18 and Exercise 2.22). However, a + b = 2 + (2 − 2) = 2, which is rational.

Exercises 2.29 Find a counterexample to the statement that the difference of any two irrational numbers is irrational. 2.30 Find a counterexample to the statement that for every rational number r and every irrational number s, we have that r/s is irrational.

2.10

Proof by Mathematical Induction

In this section we discuss a very powerful proof technique called mathematical induction. Before doing so, we introduce a mathematical structure called a sequence. A sequence is informally a set of elements written in a row. In a sequence am , am+1 , am+2 , . . . , ak , . . . , an , where m and n are integers with m ≤ n, each individual element ak (read “a sub k”) is called a term. The term ak is called the kth term. The k in ak is called a subscript or index. The term am is called the initial term. The notation am , am+1 , am+2 , . . . denotes an infinite sequence. Consider the sequence am , am+1 , am+2 , . . . , ak , . . . , an . It is convenient to write the sum of these terms using so-called summation notation defined by n X ak = am + am+1 + am+2 + · · · + an k=m

(read asPthe “summation from k equals m to n of ak ”). We use the capital Greek letter sigma, , to denote the word sum (or summation). We call k the index of the summation, m the lower limit of the summation, and n the upper limit of the summation. We remark that the index of summation is called a dummy variable of summation since it can be replaced by any other symbol as long as the replacement is made in every location where the symbol occurs. For example, n X k=m

ak =

n X i=m

ai =

n X j=m

aj = am + am+1 + am+2 + · · · + an .

2.10. PROOF BY MATHEMATICAL INDUCTION

47

Example 2.9 If a1 = 3, a2 = −5, a3 = 1 and a4 = 2, then compute the following sums: (a)

4 X

ak ;

k=1

(b)

3 X

ak .

k=2

Solution (a)

4 X

ak = a1 + a2 + a3 + a4 = 3 + (−5) + 1 + 2 = 1;

k=1

(b)

3 X

ak = a2 + a3 = (−5) + 1 = −4.

k=2

We now return to discuss the proof technique called mathematical induction.

Theorem 2.22 (The Principle of Mathematical Induction) Let n0 ∈ Z and let P (n) be a statement that is defined for integers n such that (1) P (n0 ) is true; and (2) if P (k) is true, where k ∈ Z and k ≥ n0 , then P (k + 1) is true. Then the statement P (n) is true for all integers n ≥ n0 .

Thus to show that the statement P (n) is true for every n ≥ n0 , we need not show that each of the statements P (n0 ), P (n0 + 1), P (n0 + 2), . . . is true individually. We need only show that two statements are true, namely (1) P (n0 ) and (2) the implication: If P (k) is true for an arbitrary integer k with k ≥ n0 , then P (k +1) is true. This is a two-step process. To prove that P (n0 ) is true (Step 1) is called the basis step or base case. To prove that the implication “if P (k) is true, then P (k + 1) is true” (Step 2) is called the inductive step. For this purpose, we often use a direct proof and assume that P (k) is true (for an arbitrary integer k with k ≥ n0 ). This assumption is called the inductive hypothesis or the induction hypothesis. To summarize, a proof of a mathematical statement by the principle of mathematical induction involves the following steps.

1. Basis step or Base Case: Prove that P (n0 ) is true. 2. Inductive hypothesis: Let k be an arbitrary (but fixed) integer such that k ≥ n0 , and assume that P (k) is true. 3. Inductive step: Prove that P (k + 1) is true.

48

CHAPTER 2. PROOF TECHNIQUES

In this introductory course on proof technique, we omit the proof of Theorem 2.22 which follows from the so-called Well-Ordering Principle. Rather we will focus our attention on applications of this powerful theorem, called the principle of mathematical induction. To visualize the idea of mathematical induction, imagine a ladder that reaches to the heavens constructed in such a way that if we are sitting at any particular but fixed rung of the ladder, then we can always climb one rung higher. The principle of mathematical induction then tells us that if we can climb onto the ladder, we can climb as high as we like on the ladder! To see the connection between this image and the principle of mathematical induction, let P (n) denote the statement “We can climb to the nth rung of the ladder”. It is given that we can climb onto the ladder, i.e., P (1) is true (here “n0 = 1”). This is the base step. We are also given that for each k ≥ 1, if P (k) is true (i.e., we can climb to the kth rung of the ladder), then P (k + 1) is true (i.e., we can climb to the (k + 1)st rung of the ladder). Thus by the principle of mathematical induction, P (n) (i.e., we can climb to the nth rung of the ladder) is true for every integer n ≥ 1. We now illustrate the principle of mathematical induction with a few examples.

Result 2.23 For every positive integer n, 1 + 2 + ··· + n =

n(n + 1) . 2

Proof. We proceed by mathematical induction. For every integer n ≥ 1, let P (n) be the statement P (n) : 1 + 2 + · · · + n =

n(n + 1) . 2

When n = 1, the statement P (1) : 1 =

1(1 + 1) 2

is certainly true since 1(1 + 1)/2 = 2/2 = 1. This establishes the base case when n = 1 (here “n0 = 1”). For the inductive hypothesis, let k be an arbitrary (but fixed) integer such that k ≥ 1 and assume that P (k) is true; that is, assume that 1 + ··· + k =

k(k + 1) . 2

For the inductive step, we show that P (k + 1) is true. That is, we show that 1 + 2 + · · · + (k + 1) =

(k + 1)(k + 2) . 2

(2.1)

2.10. PROOF BY MATHEMATICAL INDUCTION

49

Evaluating the left-hand side of this equation, we have 1 + 2 + · · · + (k + 1) = (1 + 2 + · · · + k) + (k + 1) =

k(k + 1) + (k + 1) 2

=

k(k + 1) 2(k + 1) + 2 2

=

(k + 1)(k + 2) , 2

(by the inductive hypothesis)

thus verifying Equation (2.1); that is, P (k + 1) is true. Hence, by the principle of mathematical induction, P (n) is true for all integers n ≥ 1; that is, 1 + 2 + ··· + n =

n(n + 1) 2

is true for every positive integer n. 2 We remark that in the inductive hypothesis of our proof of Result 2.23, we assume that P (k) is true for an arbitrary, but fixed, positive integer k. We certainly do not assume that P (k) is true for all positive integers k, for this is precisely what we wish to prove! It is important to understand that our aim is to establish the truth of the implication “If P (k) is true, then P (k + 1) is true.” which together with the truth of the statement P (1) allows us to conclude that an infinite number of statements (namely, P (1), P (2), P (3), . . .) are true. Result 2.24 For every positive integer n, 12 + 22 + · · · + n2 =

n(n + 1)(2n + 1) . 6

Proof. We proceed by mathematical induction. For every integer n ≥ 1, let P (n) be the statement n(n + 1)(2n + 1) . P (n) : 12 + 22 + · · · + n2 = 6 When n = 1, the statement P (1) : 1 =

1(1 + 1)(2 · 1 + 1) 6

is true since 1(1 + 1)(2 · 1 + 1)/6 = (1 · 2 · 3)/6 = 6/6 = 1. This establishes the base case when n = 1. For the inductive hypothesis, let k be an arbitrary (but fixed) integer such that k ≥ 1 and assume that P (k) is true; that is, assume that 12 + 22 + · · · + k 2 =

k(k + 1)(2k + 1) . 6

50

CHAPTER 2. PROOF TECHNIQUES

For the inductive step, we show that P (k + 1) is true. That is, we show that 12 + 22 + · · · + (k + 1)2 =

(k + 1)(k + 2)(2k + 3) . 6

(2.2)

Evaluating the left-hand side of this equation, we have 12 + 22 + · · · + (k + 1)2 = (12 + 22 + · · · + k 2 ) + (k + 1)2 =

k(k + 1)(2k + 1) + (k + 1)2 6

=

k(k + 1)(2k + 1) 6(k + 1)2 + 6 6

=

(k + 1)[k(2k + 1) + 6(k + 1)] 6

=

(k + 1)(2k 2 + 7k + 6) 6

=

(k + 1)(k + 2)(2k + 3) 6

(by the inductive hypothesis)

thus verifying Equation (2.2); that is, P (k + 1) is true. Hence, by the principle of mathematical induction, P (n) is true for all integers n ≥ 1; that is, 12 + 22 + · · · + n2 =

n(n + 1)(2n + 1) 6

is true for every positive integer n. 2 Recall that in a geometric sequence, each term is obtained from the preceding one by multiplying by a constant factor. If the first term is 1 and the constant factor is r, then the sequence is 1, r, r2 , r3 , . . . , rn , . . .. The sum of the first n terms of this sequence is given by a simple formula which we shall verify using mathematical induction. We comment that although in the proof of Results 2.23 and 2.24 we defined statements P (n) so that we could apply Theorem 2.22 it is not actually necessary to do this, even though it is often useful. We illustrate this remark in our next few examples. Theorem 2.25 (Sum of a Geometric Sequence) For all integers n ≥ 0 and all real numbers r with r 6= 1, n X rn+1 − 1 ri = . r−1 i=0

Proof. We proceed by mathematical induction. To show that the formula holds for n = 0, we must show that 0 X r0+1 − 1 . ri = r−1 i=0

2.10. PROOF BY MATHEMATICAL INDUCTION

51

The left-hand side of this equation is 0 X

ri = r0 = 1,

i=0

while the right-hand side is

r0+1 − 1 r−1 = = 1, r−1 r−1 since r 6= 1. Hence the formula holds for n = 0. This establishes the base case when n = 1. For the inductive hypothesis, let k be an arbitrary (but fixed) integer such that k ≥ 0 and assume that k X rk+1 − 1 ri = . r−1 i=0

For the inductive step, we show that k+1 X

ri =

i=0

rk+2 − 1 . r−1

(2.3)

Evaluating the left-hand side of this equation, we have à k ! k+1 X X ri = ri + rk+1 (writing the (k + 1)st term separately) i=0

i=0

=

rk+1 − 1 + rk+1 r−1

=

rk+1 − 1 (r − 1)rk+1 + r−1 r−1

=

rk+1 − 1 + (r − 1)rk+1 r−1

=

rk+2 − 1 , r−1

(by the inductive hypothesis)

thus verifying Equation (2.3). Hence, by the principle of mathematical induction, the formula is true for all integer n ≥ 0. 2 Induction can also be used to solve problems involving divisibility, as the next two examples illustrates.

52

CHAPTER 2. PROOF TECHNIQUES

Result 2.26 For all integers n ≥ 1, 22n − 1 is divisible by 3. Proof. We proceed by mathematical induction. When n = 1, the result is true since in this case 22n − 1 = 22 − 1 = 3 and 3 is divisible by 3. Hence, the base case when n = 1 is true. For the inductive hypothesis, let k be an arbitrary (but fixed) integer such that k ≥ 1 and assume that the property holds for n = k, i.e., suppose that 22k − 1 is divisible by 3. For the inductive step, we must show that the property holds for n = k + 1. That is, we must show that 22(k+1) − 1 is divisible by 3. Since 22k − 1 is divisible by 3, there exists, by definition of divisibility, an integer m such that 22k − 1 = 3m, and so 22k = 3m + 1. Now, 22(k+1) − 1 = 22k 22 − 1 = 4 · 22k − 1 = 4(3m + 1) − 1 = 12m + 3 = 3(4m + 1). Since m ∈ Z, we know that 4m + 1 ∈ Z. Hence, 22(k+1) − 1 is an integer multiple of 3; that is, 22(k+1) − 1 is divisible by 3, as desired. Hence, by the principle of mathematical induction, the property holds for all integers n ≥ 1. 2 Result 2.27 For all integers n ≥ 2, n3 − n is divisible by 6. Proof. We proceed by mathematical induction. When n = 2, the result is true since in this case n3 − n = 23 − 2 = 8 − 2 = 6 and 6 is divisible by 6. Hence, the base case when n = 2 is true. For the inductive hypothesis, let k be an arbitrary (but fixed) integer such that k ≥ 2 and assume that the property holds for n = k, i.e., suppose that k 3 − k is divisible by 6. For the inductive step, we must show that the property holds for n = k + 1. That is, we must show that (k + 1)3 − (k + 1) is divisible by 6. Since k 3 − k is divisible by 6, there exists, by definition of divisibility, an integer r such that k 3 − k = 6r. Now, by the laws of algebra and the inductive hypothesis, it follows that (k + 1)3 − (k + 1) = (k 3 + 3k 2 + 3k + 1) − (k + 1) = (k 3 − k) + 3(k 2 + k) = 6r + 3k(k + 1). Now, k(k + 1) is a product of two consecutive integers, and is therefore even (see Exercise 2.16). Hence, k(k + 1) = 2s for some integer s. Thus, 6r + 3k(k + 1) = 6r + 3(2s) = 6(r + s), and so, by substitution, (k + 1)3 − (k + 1) = 6(r + s),

2.10. PROOF BY MATHEMATICAL INDUCTION

53

which is divisible by 6. Therefore, (k + 1)3 − (k + 1) is divisible by 6, as desired. Hence, by the principle of mathematical induction, the property holds for all integers n ≥ 2. 2 Induction can also be used to verify certain inequalities, as the next two examples illustrates. Result 2.28 For all integers n ≥ 3, 2n > 2n + 1. Proof. We proceed by mathematical induction. When n = 3, the inequality holds since in this case 2n = 23 = 8 and 2n + 1 = 2 · 3 + 1 = 7, and 8 > 7. Hence, the base case when n = 3 is true. For the inductive hypothesis, let k be an arbitrary (but fixed) integer such that k ≥ 3 and assume that the inequality holds for n = k, i.e., suppose that 2k > 2k + 1. For the inductive step, we must show that the inequality holds for n = k + 1. That is, we must show that 2k+1 > 2(k + 1) + 1. Now, 2k+1 = 2 · 2k > 2 · (2k + 1)

(by the inductive hypothesis)

= 2(k + 1) + 2k > 2(k + 1) + 1

(since k ≥ 3),

as desired. Hence, by the principle of mathematical induction, the inequality holds for all integers n ≥ 3. 2 Result 2.29 For all integers n ≥ 2, √ 1 1 1 n < √ + √ + ··· + √ . n 1 2 Proof. We proceed induction. To show the inequality holds√ for n = 2 we √ by 1mathematical 1 √ √ must show that 2 < 1 + 2 . But this inequality is true if and only if 2 < 2 + 1. And √ √ √ this is true if and only if 1 < 2. Since 1 < 2 is true, so too is 2 < √11 + √12 . Hence the inequality holds for n = 2. This establishes the base case. For the inductive hypothesis, let k be an arbitrary (but fixed) integer such that k ≥ 2 and assume that the inequality holds for n = k, i.e., suppose that √ 1 1 1 k < √ + √ + ··· + √ . 1 2 k For the inductive step, we must show that the inequality holds for n = k + 1. That is, we must show that √ 1 1 1 1 k + 1 < √ + √ + ··· + √ + √ . k+1 1 2 k

54 Since k ≥ 2,

CHAPTER 2. PROOF TECHNIQUES √ √ √ k < k + 1, and so (multiplying both sides by k), √ √ k < k k + 1.

Hence (adding 1 to both sides), k+1< and so (dividing both sides by

√ √ k k + 1 + 1,

√ k + 1) we have √ √ 1 k+1< k+ √ . k+1

Hence, by the inductive hypothesis, µ ¶ √ 1 1 1 1 k + 1 < √ + √ + ··· + √ +√ , k+1 1 2 k as desired. Hence, by the principle of mathematical induction, the inequality holds for all integers n ≥ 2. 2

Exercises µ 3

3

3

2.31 Prove that for all integers n ≥ 1, 1 + 2 + · · · + n =

n(n + 1) 2

2.32 Prove that for all integers n ≥ 1, 1 · 2 + 2 · 3 + · · · + n(n + 1) = 2.33 Prove that for all integers n ≥ 1,

¶2 .

n(n + 1)(n + 2) . 3

1 1 n 1 + + ··· + = . 1·2 2·3 n(n + 1) n+1

2.34 Prove that for all integers n ≥ 0, 5n + 3 is divisible by 4. 2.35 Prove that for all integers n ≥ 0, 43n − 1 is divisible by 9. 2.36 Prove that for all integers n ≥ 0, n3 − 7n + 3 is divisible by 3. 2.37 Prove that for all integers n ≥ 5, 2n > n2 . 2.38 Prove that for all integers n ≥ 2, n3 > 2n + 1.

Bibliography [1] Chartrand G., A. D. Polimeni and P. Zang, A Transition to Advanced Mathematics. Addison-Wesley, New York (2002). [2] Epp S. S., Discrete Mathematics with Applications (Third Edition). Thomson Brooks/Cole (2004). [3] Johnsonbaugh R., Discrete Mathematics (Fourth Edition). Prentice Hall, Inc., New Jersey (1997). [4] Malik D. S. and M. K. Sen, Discrete Mathematical Structures: Theory and Applications Thomson Course Technology (2004).

55