In this section, we discuss several more methods of proof: proof by contradiction, proof by contrapositive, proof by cases, proofs of equivalence, and existence proofs. We will find these proof techniques of use throughout this book.
Proof by Contradiction
A proof by contradiction establishes p→ q by assuming that the hypothesis p is true and that the conclusion q is false and then, using p and¬q as well as other axioms, definitions, previously derived theorems, and rules of inference, derives a contradiction.
A contradiction is a proposition of the form r∧ ¬r (r may be any proposition whatever).
A proof by contradiction is sometimes called an indirect proof since to establish p→ q using proof by contradiction, we follow an indirect route: We derive r∧ ¬r and then conclude that q is true.
The only difference between the assumptions in a direct proof and a proof by contradiction is the negated conclusion. In a direct proof the negated conclusion is not assumed, whereas in a proof by contradiction the negated conclusion is assumed.
Proof by contradiction may be justified by noting that the propositions p→ q and ( p∧ ¬q) → (r ∧ ¬r)
are equivalent. The equivalence is immediate from a truth table:
2.2 ◆ More Methods of Proof
77
p q r p→ q p∧ ¬q r∧ ¬r ( p∧ ¬q) → (r ∧ ¬r)
T T T T F F T
T T F T F F T
T F T F T F F
T F F F T F F
F T T T F F T
F T F T F F T
F F T T F F T
F F F T F F T
Example 2.2.1 We will give a proof by contradiction of the following statement:
For every n∈ Z, if n2is even, then n is even.
Discussion First, let us consider giving a direct proof of this statement. We would assume the hypothesis, that is, that n2is even. Then there exists an integer k1such that n2= 2k1. To prove that n is even, we must find an integer k2such that n= 2k2. It is not clear how to get from n2 = 2k1 to n= 2k2. (Taking the square root certainly does not work!) When a proof technique seems unpromising, try a different one.
In a proof by contradiction, we assume the hypothesis (n2is even) and the negation of the conclusion (n is not even, i.e., n is odd). Since n is odd, there exists an integer k such that n= 2k + 1. If we square both sides of this last equation, we obtain
n2= (2k + 1)2= 4k2+ 4k + 1 = 2(2k2+ 2k) + 1.
But this last equation tells us that n2 is odd. We have our contradiction: n2 is even (hypothesis) and n2is odd. Formally, if r is the statement “n2is even,” we have deduced r∧ ¬r.
Proof We give a proof by contradiction. Thus we assume the hypothesis n2is even
and that the conclusion is false
n is odd.
Since n is odd, there exists an integer k such that n= 2k + 1. Now n2= (2k + 1)2= 4k2+ 4k + 1 = 2(2k2+ 2k) + 1.
Thus n2is odd, which contradicts the hypothesis n2is even. The proof by contradiction is complete. We have proved that for every n∈ Z, if n2is even, then n is even.
Example 2.2.2 We will give a proof by contradiction of the following statement:
For all real numbers x and y, if x+ y ≥ 2, then either x ≥ 1 or y ≥ 1.
Discussion As in the previous example, a direct proof seems unpromising—assuming only that x + y ≥ 2 appears to be too little to get us started. We turn to a proof by contradiction.
Proof We begin by letting x and y be arbitrary real numbers. We then suppose that the conclusion is false, that is, that¬(x ≥ 1 ∨ y ≥ 1) is true. By De Morgan’s laws of logic
(see Example 1.3.11),
¬(x ≥ 1 ∨ y ≥ 1) ≡ ¬(x ≥ 1) ∧ ¬(y ≥ 1) ≡ (x < 1) ∧ (y < 1).
In words, we are assuming that x < 1 and y < 1. Using a previous theorem, we may add these inequalities to obtain
x+ y < 1 + 1 = 2.
At this point, we have derived a contradiction: x + y ≥ 2 and x + y < 2. Thus we conclude that for all real numbers x and y, if x+ y ≥ 2, then either x ≥ 1 or y ≥ 1.
Example 2.2.3 We will prove that√
2 is irrational using proof by contradiction.
Discussion Here a direct proof seems particularly bleak. It seems we have a blank slate with which to begin. However, if we use proof by contradiction, we may assume that√
2 is rational. In this case, we know that there exist integers p and q such that√
2= p/q.
Now we have an entry on our slate. We can manipulate this equation and hope to obtain a contradiction.
Proof We use proof by contradiction and assume that√
2 is rational. Then there exist integers p and q such that√
2 = p/q. We assume that the fraction p/q is in lowest terms so that p and q are not both even. Squaring√
2 = p/q gives 2 = p2/q2, and multiplying by q2gives 2q2= p2. It follows that p2is even. Example 2.2.1 tells us that p is even. Therefore, there exists an integer k such that p= 2k. Substituting p = 2k into 2q2= p2gives 2q2 = (2k)2= 4k2. Canceling 2 gives q2= 2k2. Therefore q2is even, and Example 2.2.1 tells us the q is even. Thus p and q are both even, which contradicts our assumption that p and q are not both even. Therefore,√
2 is irrational.
Proof by Contrapositive
Suppose that we give a proof by contradiction of p→ q in which, as in Examples 2.2.1 and 2.2.2, we deduce¬p. In effect, we have proved
¬q → ¬p.
[Recall (see Theorem 1.3.18) that p→ q and ¬q → ¬p are equivalent.] This special case of proof by contradiction is called proof by contrapositive.
Example 2.2.4 Use proof by contrapositive to show that
for all x ∈ R, if x2is irrational, then x is irrational.
Discussion For much the same reasons that a direct proof seemed unpromising in Examples 2.2.1 and 2.2.2, a direct proof in which we assume only that x2 is irrational seems to be too little to get us started. A proof by contradiction can be devised (see Exercise 1), but here a proof by contrapositive is requested.
Proof We begin by letting x be an arbitrary real number. We prove the contrapositive of the given statement, which is
if x is not irrational, then x2is not irrational
2.2 ◆ More Methods of Proof
79
or, equivalently,
if x is rational, then x2is rational.
So suppose that x is rational. Then x= p/q for some integers p and q. Now x2= p2/q2. Since x2is the quotient of integers, x2is rational. The proof is complete.
Proof by Cases
Proof by cases is used when the original hypothesis naturally divides itself into various cases. For example, the hypothesis “x is a real number” can be divided into cases: (a) x is a nonnegative real number and (b) x is a negative real number. Suppose that the task is to prove p→ q and that p is equivalent to p1∨ p2∨ · · · ∨ pn ( p1,. . . , pn are the cases). Instead of proving
( p1∨ p2∨ · · · ∨ pn)→ q, (2.2.1) we prove
( p1→ q) ∧ ( p2→ q) ∧ · · · ∧ ( pn→ q). (2.2.2) As we will show, proof by cases is justified because the two statements are equivalent.
First suppose that some pi is true. Specifically, we assume that pj is true. Then p1∨ p2∨ · · · ∨ pn
is true. If q is true, then (2.2.1) is true. Now pi → q is true for every i; so (2.2.2) is also true. If q is false, then (2.2.1) is false. Since pj → q is false, (2.2.2) is also false.
Now suppose that no piis true; that is, all piare false. Then both (2.2.1) and (2.2.2) are true. Therefore, (2.2.1) and (2.2.2) are equivalent.
Sometimes the number of cases to prove is finite and not too large so we can check them all one by one. We call this type of proof exhaustive proof.
Example 2.2.5 Prove that
2m2+ 3n2= 40
has no solution in positive integers, that is, that 2m2+ 3n2= 40 is false for all positive integers m and n.
Discussion We certainly cannot check 2m2+ 3n2for all positive integers m and n, but we can rule out most positive integers because, if 2m2+ 3n2 = 40, the sizes of m and n are restricted. In particular, we must have 2m2≤ 40 and 3n2 ≤ 40. (If, for example, 2m2> 40, when we add 3n2to 2m2, the sum 2m2+ 3n2will exceed 40.) If 2m2≤ 40, then m2≤ 20 and m can be at most 4. Similarly, if 3n2≤ 40, then n2≤ 40/3 and n can be at most 3. Thus it suffices to check the cases m= 1, 2, 3, 4 and n = 1, 2, 3.
Proof If 2m2 + 3n2 = 40, we must have 2m2 ≤ 40. Thus m2 ≤ 20 and m ≤ 4.
Similarly, we must have 3n2≤ 40. Thus n2≤ 40/3 and n ≤ 3. Therefore it suffices to check the cases m= 1, 2, 3, 4 and n = 1, 2, 3.
The entries in the table give the value of 2m2+ 3n2for the indicated values of m and n.
m
1 2 3 4
1 5 11 21 35
n 2 14 20 30 44
3 29 35 45 59
Since 2m2+ 3n2 = 40 for m = 1, 2, 3, 4 and n = 1, 2, 3, and 2m2+ 3n2 > 40 for m> 4 or n > 3, we conclude that 2m2+ 3n2= 40 has no solution in positive integers.
Example 2.2.6 We prove that for every real number x, x≤ |x|.
Discussion Notice that “x is a real number” is equivalent to (x≥ 0) ∨ (x < 0). An or statement often lends itself to a proof by cases. Case 1 is x≥ 0 and case 2 is x < 0. We divide the proof into cases because the definition of absolute value is itself divided into cases x ≥ 0 and x < 0 (see Example 2.1.2).
Proof If x≥ 0, by definition |x| = x. Thus |x| ≥ x. If x < 0, by definition |x| = −x.
Since|x| = −x > 0 and 0 > x, |x| ≥ x. In either case, |x| ≥ x; so the proof is complete.
Proofs of Equivalence Some theorems are of the form
p if and only if q.
Such theorems are proved by using the equivalence (see Example 1.3.15) p↔ q ≡ ( p → q) ∧ (q → p);
that is, to prove “ p if and only if q,” prove “if p then q” and “if q then p.”
Example 2.2.7 Prove that for every integer n, n is odd if and only if n− 1 is even.
Discussion We let n be an arbitrary integer. We must prove that if n is odd then n− 1 is even and
if n− 1 is even then n is odd.
Proof We first prove that
if n is odd then n− 1 is even.
If n is odd, then n= 2k + 1 for some integer k. Now n− 1 = (2k + 1) − 1 = 2k.
Therefore, n− 1 is even.
Next we prove that
if n− 1 is even then n is odd.
2.2 ◆ More Methods of Proof
81
If n− 1 is even, then n − 1 = 2k for some integer k. Now n = 2k + 1.
Therefore, n is odd. The proof is complete.
Some proofs of p↔ q combine the proofs of p → q and q → p. For example, the proof in Example 2.2.7 could be written as follows:
n is odd if and only if n= 2k + 1 for some integer k if and only if n − 1 = 2k for some integer k if and only if n− 1 is even.
For such a proof to be correct, it must be the case that each if-and-only-if statement is true. If such a proof of p↔ q is read in one direction, we obtain the proof of p → q and, if it is read in the other direction, we obtain a proof of q → p. Reading the preceding proof in the if-then direction,
if n is odd, then n= 2k + 1 for some integer k; if n = 2k + 1 for some integer k, then n− 1 = 2k for some integer k; if n − 1 = 2k for some integer k, then n − 1 is even,
proves that if n is odd, then n− 1 is even. Reversing the order,
if n− 1 is even, then n − 1 = 2k for some integer k; if n − 1 = 2k for some integer k, then n= 2k + 1 for some integer k; if n = 2k + 1 for some integer k, then n is odd,
proves that if n− 1 is even, then n is odd.
Example 2.2.8 Prove that for all real numbers x and all positive real numbers d,
|x| < d if and only if −d < x < d.
Discussion We let x be an arbitrary real number and d be an arbitrary positive real number. We must show
if|x| < d then −d < x < d and
if−d < x < d then |x| < d.
Since|x| is defined by cases, we expect to use proof by cases.
Proof To show
if|x| < d then −d < x < d, we use proof by cases. We assume that|x| < d. If x ≥ 0, then
−d < 0 ≤ x = |x| < d.
If x< 0, then
−d < 0 < −x = |x| < d;
that is,
−d < −x < d.
Multiplying by−1, we obtain
d > x > −d.
In either case, we have proved that
−d < x < d.
To show
if−d < x < d then |x| < d,
we also use proof by cases. We assume that−d < x < d. If x ≥ 0, then
|x| = x < d.
If x < 0, then |x| = −x. Since −d < x, we may multiply by −1 to obtain d > −x.
Combining|x| = −x and d > −x gives
|x| = −x < d.
In either case, we have proved that
|x| < d.
The proof is complete.
In proving p↔ q, we are proving that p and q are logically equivalent, that is, p and q are either both true or both false. Some theorems state that three or more statements are logically equivalent and, thus, have the form
The following are equivalent:
(a) — (b) — (c) — ...
Such a theorem asserts that (a), (b), (c) and so on are either all true or all false.
To prove that p1, p2,. . . , pnare equivalent, the usual method is to prove
( p1→ p2)∧ ( p2→ p3)∧ · · · ∧ ( pn−1 → pn)∧ ( pn → p1). (2.2.3) We show that proving (2.2.3) shows that p1, p2,. . . , pnare equivalent.
Suppose that we prove (2.2.3). We consider two cases: p1is true, p1is false. First, suppose that p1is true. Because p1 and p1 → p2 are true, p2 is true; because p2and p2→ p3are true, p3is true; and so on. In this case, p1, p2,. . . , pnhave the same truth value: each is true.
Now suppose that p1 is false. Because p1 is false and pn → p1 is true, pn is false; because pnis false and pn−1 → pn is true, pn−1is false; and so on. In this case, p1, p2,. . . , pnhave the same truth value; each is false. Therefore, proving (2.2.3) shows that p1, p2,. . . , pnare equivalent.
2.2 ◆ More Methods of Proof
83
Example 2.2.9 Let A, B, and C be sets. Prove that the following are equivalent:
(a) A⊆ B (b) A∩ B = A (c) A∪ B = B.
Discussion According to the discussion preceding this example, we must prove [(a)→ (b)] ∧ [(b) → (c)] ∧ [(c) → (a)].
Proof We prove (a)→ (b), (b) → (c), and (c) → (a).
[(a)→ (b).] We assume that A ⊆ B, and prove that A ∩ B = A. Suppose that x ∈ A ∩ B. We must show that x ∈ A. But if x ∈ A ∩ B, x ∈ A by the definition of intersection.
Now suppose that x ∈ A. We must show that x ∈ A ∩ B. Since A ⊆ B, x ∈ B.
Therefore x∈ A ∩ B. We have proved that A ∩ B = A.
[(b)→ (c).] We assume that A ∩ B = A, and prove that A ∪ B = B. Suppose that x∈ A ∪ B. We must show that x ∈ B. By assumption, either x ∈ A or x ∈ B. If x ∈ B, we have the desired conclusion. If x ∈ A, since A ∩ B = A, again x ∈ B.
Now suppose that x∈ B. We must show that x ∈ A ∪ B. But if x ∈ B, x ∈ A ∪ B by the definition of union. We have proved that A∪ B = B.
[(c)→ (a).] We assume that A ∪ B = B, and prove that A ⊆ B. Suppose that x ∈ A. We must show that x ∈ B. Since x ∈ A, x ∈ A ∪ B by the definition of union.
Since A∪ B = B, x ∈ B. We have proved that A ⊆ B. The proof is complete.
Existence Proofs A proof of
∃x P(x) (2.2.4)
is called an existence proof. In Section 1.5, we showed that one way to prove (2.2.4) is to exhibit one member a in the domain of discourse that makes P(a) true.
Example 2.2.10 Let a and b be real numbers with a< b. Prove that there exists a real number x satisfying a< x < b.
Discussion We will prove the statement by exhibiting a real number x between a and b. The point midway between a and b suffices.
Proof It suffices to find one real number x satisfying a< x < b. The real number x=a+ b
2 , halfway between a and b, surely satisfies a< x < b.
Example 2.2.11 Prove that there exists a prime p such that 2p− 1 is composite (i.e., not prime).
Discussion By trial and error, we find that 2p− 1 is prime for p = 2, 3, 5, 7 but not p= 11 since
211− 1 = 2048 − 1 = 2047 = 23 · 89.
Thus p= 11 makes the given statement true.
Proof For the prime p= 11, 2p− 1 is composite:
211− 1 = 2048 − 1 = 2047 = 23 · 89.
A prime number of the form 2p− 1, where p is prime, is called a Mersenne prime [named for Marin Mersenne (1588–1648)]. The largest primes known are Mersenne primes. In late 2006, the 44th known Mersenne prime was found, 232,582,657− 1, a number having 9,808,358 decimal digits. This number was found by the Great Internet Mersenne Prime Search (GIMPS). GIMPS is a computer program distributed over many personal computers maintained by volunteers. You can participate. Just check the web link. You may find the next Mersenne prime!
An existence proof of (2.2.4) that exhibits an element a of the domain of discourse that makes P(a) true is called a constructive proof. The proofs in Examples 2.2.10 and 2.2.11 are constructive proofs. A proof of (2.2.4) that does not exhibit an element a of the domain of discourse that makes P(a) true, but rather proves (2.2.4) some other way (e.g., using proof by contradiction), is called a nonconstructive proof.
Example 2.2.12 Let
A=s1+ s2+ · · · + sn
n
be the average of the real numbers s1,. . . , sn. Prove that there exists i such that si ≥ A.
Discussion It seems hopeless to choose an i and prove that si ≥ A; instead, we use proof by contradiction.
Proof We use proof by contradiction and assume the negation of the conclusion
¬∃i(si ≥ A).
By the generalized De Morgan’s laws for logic (Theorem 1.5.14), this latter statement is equivalent to
∀i¬(si ≥ A) or
∀i(si < A).
Thus we assume
s1< A s2< A
...
sn < A.
Adding these inequalities yields
s1+ s2+ · · · + sn< n A.
Dividing by n gives
s1+ s2+ · · · + sn
n < A,
which contradicts the hypothesis
A=s1+ s2+ · · · + sn
n .
Therefore, there exists i such that si≥ A.
2.2 ◆ More Methods of Proof
85
The proof in Example 2.2.12 is nonconstructive; it does not exhibit an i for which si ≥ A. It does however prove indirectly using proof by contradiction that there is such an i . We could find such an i : We could check whether s1 ≥ A and if true, stop.
Otherwise, we could check whether s2 ≥ A and if true, stop. We could continue in this manner until we find an i for which si ≥ A. Example 2.2.12 guarantees that there is such an i .
Problem-Solving Tips
It is worth reviewing the Problem-Solving Tips of Section 2.1. Tips specific to the present section follow.
If you are trying to construct a direct proof of a statement of the form p→ q and you seem to be getting stuck, try a proof by contradiction. You then have more to work with: Besides assuming p, you get to assume¬q.
When writing up a proof by contradiction, alert the reader by stating, “We give a proof by contradiction, thus we assume· · ·,” where · · · is the negation of the conclusion.
Another common introduction is: Assume by way of contradiction that· · ·.
Proof by cases is useful if the hypotheses naturally break down into parts. For example, if the statement to prove involves the absolute value of x, you may want to consider the cases x ≥ 0 and x < 0 because |x| is itself defined by the cases x ≥ 0 and x < 0. If the number of cases to prove is finite and not too large, the cases can be directly checked one by one.
In writing up a proof by cases, it is sometimes helpful to the reader to indicate the cases, for example,
[Case I: x≥ 0.] Proof of this case goes here.
[Case II: x< 0.] Proof of this case goes here.
To prove p if and only if q, you must prove two statements: (1) if p then q and (2) if q then p. It helps the reader if you state clearly what you are proving. You can write up the proof of (1) by beginning a new paragraph with a sentence that indicates that you are about to prove “if p then q.” You would then follow with a proof of (2) by beginning a new paragraph with a sentence that indicates that you are about to prove “if q then p.”
Another common technique is to write [ p→ q.] Proof of p → q goes here.
[q→ p.] Proof of q → p goes here.
To prove that several statements, say p1,. . . , pn, are equivalent, prove p1→ p2, p2→ p3,. . . , pn−1 → pn, pn → p1. The statements can be ordered in any way and the proofs may be easier to construct for one ordering than another. For example, you could swap p2and p3and prove p1 → p3, p3→ p2, p2→ p4, p4 → p5,. . . , pn−1→ pn, pn → p1. You should indicate clearly what you are about to prove. One common form is
[ p1→ p2.] Proof of p1→ p2goes here.
[ p2→ p3.] Proof of p2→ p3goes here.
And so forth.
If the statement is existentially quantified (i.e., there exists x. . .), the proof, called an existence proof, consists of showing that there exists at least one x in the domain of discourse that makes the statement true. One type of existence proof exhibits a value of x that makes the statement true (and proves that the statement is indeed true for the specific x). Another type of existence proof indirectly proves (e.g., using proof by contradiction) that a value of x exists that makes the statement true without specifying any particular value of x for which the statement is true.
Section Review Exercises
1. What is proof by contradiction?
2. Give an example of a proof by contradiction.
3. What is an indirect proof?
4. What is proof by contrapositive?
5. Give an example of a proof by contrapositive.
6. What is proof by cases?
7. Give an example of a proof by cases.
8. What is a proof of equivalence?
9. Give an example of a proof of equivalence.
10. How can we show that three statements, say (a), (b), and (c), are equivalent?
11. What is an existence proof?
12. What is a constructive existence proof?
13. Give an example of a constructive existence proof.
14. What is a nonconstructive existence proof?
15. Give an example of a nonconstructive existence proof.
Exercises
1. Use proof by contradiction to prove that for all x∈ R, if x2is irrational, then x is irrational.
2. Is the converse of Exercise 1 true or false? Prove your answer.
3. Prove that for all x∈ R, if x3is irrational, then x is irrational.
4. Prove that for every n∈ Z, if n2is odd, then n is odd. then x+ y is irrational.
9. Prove or disprove: For all x, y ∈ R, if x is rational and y is irrational, then x y is irrational.
10. Prove that if a and b are real numbers with a< b, there exists a rational number x satisfying a< x < b.
11. Prove that if a and b are real numbers with a< b, there exists an irrational number x satisfying a< x < b.
12. Fill in the details of the following proof that there exist irra-tional numbers a and b such that abis rational.
Proof Let x = y = √
2. If xy is rational, the proof is complete. (Explain.) Otherwise, suppose that xy is irrational.
(Why?) Let a= xyand b=√
2. Consider ab. (How does this complete the proof?)
Is this proof constructive or nonconstructive?
13. Prove or disprove: There exist rational numbers a and b such
13. Prove or disprove: There exist rational numbers a and b such