4.3 Proof by cases
Depending on the mathematical objects involved in a statement, it may be possible to consider mutually-exclusive cases and prove each case separately.
To illustrate this idea, we revisit the result from Exercise 4.12, where we proved that if is an integer then is even.
Example 4.16.
We shall prove that if is any integer then is even using a proof by cases.
Since is an integer, we know that it must even or odd, but not both. We can consider these two cases separately.
Case 1: Suppose is even, so we know that for some integer . Then and we see that
and so is even (since it is times an integer [why?]).
Case 2: Now suppose is odd, so can write for some integer . (Note that we are reusing since we are done with the previous case.) Then and we see that
Hence is even.
The proof is complete.
When using proof by cases we split a difficult general proof into many sub-proofs. Each sub-proof has an extra specific hypothesis. In the above example that was ‘ is odd’ or ‘ is even’. The extra hypothesis gives more information, and helps make the sub-proof easier.
Mathematicians are sometimes dissatisfied with proofs by cases. While they do establish that a statement is true, they often do not really explain why it is true. Recall from Section 1.4 that mathematicians sometimes prefer proofs which explain over proofs which just establish truth.
4.3.1 Proof by exhaustion
A statement may assert something about a finite number of objects. If so then it may be possible to verify the statement for each object separately.
Example 4.17.
We prove that for , the expression is greater than and less than .
Because this is a statement about a finite number of values, we can check each separately:
-
•
if then ;
-
•
if then ; and
-
•
if then .
Hence is between 0 and 14 for . The proof is complete.
Exercise 4.18.
Prove that there are exactly two prime numbers greater than 20 and less than 30.
-
Solution.
-
–
is not prime.
-
–
is not prime.
-
–
is prime.
-
–
is not prime.
-
–
is not prime.
-
–
is not prime.
-
–
is not prime.
-
–
is not prime.
-
–
is prime.
So there are exactly two prime numbers greater than and less than . The proof is complete.
This is a pretty mindless way of proving this result. You could reduce the number of cases you have to consider by first noting that any even number greater than cannot be prime, and so you only really have to check the odd numbers between and .
-
–
Example 4.19.
The four colour theorem is a famous example of a result involving a proof by exhaustion. In 1976, a computer algorithm was used to check 1834 cases in order to verify the claim of the theorem.