1.3 Proof by exhaustion — Learn
Prerequisites: divisibility and remainders; prime numbers; factorising small whole numbers; the meaning of "for all" from 1.1.
By the end of this section you can: prove a statement about a finite set by checking every case; decide whether a list of cases is exhaustive; explain why checking finitely many cases cannot prove a claim about every whole number; and use remainders to turn an infinite problem into a finite one.
1. What exhaustion is
Proof by exhaustion splits a statement into cases and checks every one of them. When the list of cases is complete, and every case is correct, the statement is proved. Nothing is left to test.
The two jobs are:
- list the cases so that nothing is missed;
- check each case, usually with arithmetic.
Example 1. Prove that every whole number from to divides .
Write the six multiplications:
Each of , , , , and divides with no remainder. The list covers every whole number from to , so the cases are exhaustive and the statement is proved.
2. A real use: testing for primes
To decide whether a whole number is prime, you only need to test the prime numbers whose squares are at most . Any other factor would pair with a smaller one, so it can give no new information.
Example 2. Prove that is prime.
The primes with are , , and , because and .
None divides , and the four cases cover every possible prime factor, so is prime. The set of cases is finite even though is large: the square root keeps the work small.
3. Turning an infinite problem into a finite one
Every whole number leaves remainder , or on division by . Those three cases cover infinitely many numbers, so checking them once proves the statement for every whole number.
Example 3. Prove that is never a multiple of , for every whole number .
Write by its remainder on division by , and square it.
The remainders on division by are , and . None is , so is never a multiple of . The three cases cover every whole number, so this is a complete proof.
4. Try it: test the claim
Return to Claim B from the chapter problem: for every whole number , the value of is prime.
Predict first. The claim is correct for and . Up to which value of do you expect it to keep working? Write your prediction down before you touch the slider.
Test. Move the slider through the values of . The panel reports the value of and whether it is prime.
Explain. At which value of does the claim first fail? What does that value have to do with ? Write two sentences. The check for is correct, so what exactly is missing from a proof that stops at ?
Watch out. There are two ways an exhaustion proof can go wrong.
A missing case. If the list of cases does not cover the whole domain, the proof has a hole. "Every prime is odd" fails at the one prime that is left out: .
Checking forever. For a claim about every whole number, no finite list of checked values is a proof. The table of values for to is strong evidence, and the first value after the table, , breaks the claim.
Re-check: count the cases in your list, then ask whether any number is left out. If the domain is infinite, a finite list can never be exhaustive.
Progress check
Claim B has now been checked for a long run of values.
- Why is a check of to not a proof of Claim B?
- Example 3 checked only three cases but proved a statement about every whole number. Explain the difference.
- What kind of statement could exhaustion prove in full: "for all whole numbers ", or "for every whole number from to "? Give a reason.
You should now be able to
- prove a statement about a finite set by checking every case;
- test for a prime factor using only primes up to the square root;
- use remainder cases to cover infinitely many numbers with finitely many cases;
- explain why a finite check cannot prove a claim about every whole number.