Exercises
26. Justify the rule of universal transitivity, which states that if ∀x(P(x) → Q(x)) and ∀x(Q(x) → R(x)) are true,
1.7 Introduction to Proofs
1.7.7 Proofs by Contradiction
Becauseq≠0 andu≠0, it follows thatqu≠0. Consequently, we have expressedr+sas the ratio of two integers,v=pu+qtandw=qu, wherew≠0. This means thatr+sis rational.
We have proved that the sum of two rational numbers is rational; our attempt to find a direct
proof succeeded.
◂
EXAMPLE 9 Prove that ifnis an integer andn2is odd, thennis odd.
Solution:We first attempt a direct proof. Suppose thatnis an integer andn2 is odd. From the definition of an odd integer, there exists an integer ksuch that n2 =2k+1. Can we use this information to show thatnis odd? There seems to be no obvious approach to show thatnis odd because solving fornproduces the equationn= ±√
2k+1, which is not terribly useful.
Because this attempt to use a direct proof did not bear fruit, we next attempt a proof by contraposition. We take as our hypothesis the statement thatnis not odd. Because every integer is odd or even, this means thatnis even. This implies that there exists an integerksuch that n=2k. To prove the theorem, we need to show that this hypothesis implies the conclusion thatn2 is not odd, that is, thatn2is even. Can we use the equationn=2kto achieve this? By squaring both sides of this equation, we obtainn2 =4k2 =2(2k2), which implies thatn2is also even becausen2=2t, wheret=2k2. We have proved that ifnis an integer andn2is odd, then nis odd. Our attempt to find a proof by contraposition succeeded.
◂
If√
2 is rational, there exist integersaandbwith√
2=a∕b, whereb≠0 andaandbhave no common factors (so that the fractiona∕bis in lowest terms). (Here, we are using the fact that every rational number can be written in lowest terms.) Because√
2=a∕b, when both sides of this equation are squared, it follows that
2= a2 b2. Hence,
2b2 =a2.
By the definition of an even integer it follows thata2 is even. We next use the fact that ifa2 is even,amust also be even, which follows by Exercise 18. Furthermore, becauseais even, by the definition of an even integer,a=2cfor some integerc. Thus,
2b2 =4c2.
Dividing both sides of this equation by 2 gives b2 =2c2.
By the definition of even, this means thatb2is even. Again using the fact that if the square of an integer is even, then the integer itself must be even, we conclude thatbmust be even as well.
We have now shown that the assumption of¬pleads to the equation √
2=a∕b, where aandbhave no common factors, but both aandbare even, that is, 2 divides bothaandb.
Note that the statement that√
2=a∕b, where a andb have no common factors, means, in particular, that 2 does not divide both a andb. Because our assumption of ¬p leads to the contradiction that 2 divides bothaandband 2 does not divide bothaandb,¬pmust be false.
That is, the statementp, “√
2 is irrational,” is true. We have proved that√
2 is irrational.
◂
Proof by contradiction can be used to prove conditional statements. In such proofs, we first assume the negation of the conclusion. We then use the premises of the theorem and the negation of the conclusion to arrive at a contradiction. (The reason that such proofs are valid rests on the logical equivalence ofp→qand (p∧ ¬q)→F. To see that these statements are equivalent, simply note that each is false in exactly one case, namely, whenpis true andqis false.)
Note that we can rewrite a proof by contraposition of a conditional statement as a proof by contradiction. In a proof ofp→qby contraposition, we assume that¬qis true. We then show that¬pmust also be true. To rewrite a proof by contraposition ofp→qas a proof by contradiction, we suppose that bothpand¬qare true. Then, we use the steps from the proof of
¬q→¬pto show that¬pis true. This leads to the contradictionp∧ ¬p, completing the proof.
Example 11 illustrates how a proof by contraposition of a conditional statement can be rewritten as a proof by contradiction.
EXAMPLE 12 Give a proof by contradiction of the theorem “If 3n+2 is odd, thennis odd.”
Solution:Letpbe “3n+2 is odd” andqbe “nis odd.” To construct a proof by contradiction, assume that bothpand¬qare true. That is, assume that 3n+2 is odd and thatnis not odd.
Becausenis not odd, we know that it is even. Because nis even, there is an integerk such thatn=2k. This implies that 3n+2=3(2k)+2=6k+2=2(3k+1). Because 3n+2 is 2t, wheret=3k+1, 3n+2 is even. Note that the statement “3n+2 is even” is equivalent to the statement¬p, because an integer is even if and only if it is not odd. Because bothpand¬pare
true, we have a contradiction. This completes the proof by contradiction, proving that if 3n+2
is odd, thennis odd.
◂
Note that we can also prove by contradiction thatp→qis true by assuming thatpand¬q are true, and showing thatqmust be also be true. This implies that¬qandqare both true, a contradiction. This observation tells us that we can turn a direct proof into a proof by contra- diction.
PROOFS OF EQUIVALENCE To prove a theorem that is a biconditional statement, that is, a statement of the formp↔q, we show thatp→qandq→pare both true. The validity of this approach is based on the tautology
(p↔q)↔(p→q)∧(q→p).
EXAMPLE 13 Prove the theorem “Ifnis an integer, thennis odd if and only ifn2 is odd.”
Solution:This theorem has the form “pif and only ifq,” where pis “nis odd” andqis “n2 is odd.” (As usual, we do not explicitly deal with the universal quantification.) To prove this theorem, we need to show thatp→qandq→pare true.
We have already shown (in Example 1) thatp→qis true and (in Example 8) thatq→pis Extra
Examples
true.
Because we have shown that bothp→qandq→pare true, we have shown that the theorem
is true.
◂
Sometimes a theorem states that several propositions are equivalent. Such a theorem states that propositionsp1, p2, p3,…, pnare equivalent. This can be written as
p1 ↔p2 ↔⋯↔pn,
which states that allnpropositions have the same truth values, and consequently, that for alli andjwith 1≤i≤nand 1≤j≤n,piandpjare equivalent. One way to prove these are mutually equivalent is to use the tautology
p1 ↔p2 ↔⋯↔pn↔(p1 →p2)∧(p2→p3)∧⋯∧(pn→p1).
This shows that if thenconditional statementsp1 →p2,p2 →p3,…, pn →p1can be shown to be true, then the propositionsp1, p2,…, pnare all equivalent.
This is much more efficient than proving thatpi→pjfor alli≠jwith 1≤i≤nand 1≤ j≤n. (Note that there aren2−nsuch conditional statements.)
When we prove that a group of statements are equivalent, we can establish any chain of conditional statements we choose as long as it is possible to work through the chain to go from any one of these statements to any other statement. For example, we can show thatp1,p2, and p3are equivalent by showing thatp1→p3,p3 →p2, andp2 →p1.
EXAMPLE 14 Show that these statements about the integernare equivalent:
p1: nis even.
p2: n−1 is odd.
p3: n2is even.
Solution:We will show that these three statements are equivalent by showing that the condi- tional statementsp1 →p2,p2→p3, andp3→p1are true.
We use a direct proof to show thatp1→p2. Suppose thatnis even. Thenn=2kfor some integerk. Consequently,n−1=2k−1=2(k−1)+1. This means thatn−1 is odd because it is of the form 2m+1, wheremis the integerk−1.
We also use a direct proof to show that p2 →p3. Now suppose n−1 is odd. Then n−1=2k+1 for some integerk. Hence,n=2k+2 so thatn2 =(2k+2)2 =4k2+8k+4= 2(2k2+4k+2). This means thatn2is twice the integer 2k2+4k+2, and hence is even.
To provep3→p1, we use a proof by contraposition. That is, we prove that ifnis not even, thenn2is not even. This is the same as proving that ifnis odd, thenn2 is odd, which we have
already done in Example 1. This completes the proof.
◂
COUNTEREXAMPLES In Section 1.4 we stated that to show that a statement of the form
∀xP(x) is false, we need only find acounterexample, that is, an examplexfor whichP(x) is false. When presented with a statement of the form∀xP(x), which we believe to be false or which has resisted all proof attempts, we look for a counterexample. We illustrate the use of counterexamples in Example 15.
EXAMPLE 15 Show that the statement “Every positive integer is the sum of the squares of two integers” is false.
Solution:To show that this statement is false, we look for a counterexample, which is a par- ticular integer that is not the sum of the squares of two integers. It does not take long to find Extra
Examples
a counterexample, because 3 cannot be written as the sum of the squares of two integers. To show this is the case, note that the only perfect squares not exceeding 3 are 02=0 and 12 =1.
Furthermore, there is no way to get 3 as the sum of two terms each of which is 0 or 1. Conse- quently, we have shown that “Every positive integer is the sum of the squares of two integers”
is false.