104. Least counterexamples
Proof by induction as described in Chapter 103 is based on a very basic fact about the positive integers that has wider applications. Suppose $P (n)$ is a statement about positive integers, and suppose the statement $(\forall n{:}\mathrm{N}^{+})P(n)$ is false. Then there is a counterexample $m$, a positive integer for which $P (m)$ is false. Among all such counterexamples, there is a smallest one:
104.1 Theorem: The Principle of the Least Counterexample
Every false statement of the form $(\forall n{:}\mathrm{N}^{+})P(n)$ about the positive integers has a smallest counterexample.
104.1.1 Usage This property of the positive integers is often referred to by saying the positive integers are well-ordered.
104.1.2 Remark Of course, one can replace the positive integers by the nonnegative integers, or by the set of all integers greater than a particular one, in the statement of Theorem 104.1.
The existence of least counterexamples is characteristic of such sets; for most other data types, least counterexamples need not exist. For example, the statement, “All integers are even” is a false universally quantified statement about the integers which has many counterexamples, but no smallest one.
104.2 Least counterexample and induction
The principle of mathematical induction, in other words Theorem 103.2, can be proved using the principle of the least counterexample. The proof is by contradiction.
Suppose that the hypotheses of the theorem are true: $P$(1), and
$$(\forall n{:}\mathrm{N}^{+})\Bigl(P(n) \Rightarrow P(n+1)\Bigr)$$
Suppose that $(\forall n{:}\mathrm{N}^{+})P(n)$ is false. Then there is a least counterexample $m$, so $P (k)$ is true if $k < m$ but $P (m)$ is false. Now we have two cases.
(i) $m= 1$. Then $P$(1) is false — but this contradicts one of the hypotheses of the theorem.
(ii) $m >1$. In this case, $P (m)$ is false, since $m$ is a counterexample to the statement $(\forall n{:}\mathrm{N}^{+})P(n)$. Since $m$ is the least counterexample, the statement $P (m-1)$ is true. It follows from the truth table for implication that the statement $P (m- 1)\Rightarrow P (m)$ is false. But that means the hypothesis
$$(\forall n{:}\mathrm{N}^{+})\Bigl(P(n) \Rightarrow P(n+1)\Bigr)$$
is false since $n =m-1$ provides a counterexample.
So in either case, one of the hypotheses of Theorem 103.2 must be false. Therefore there can be no least counterexample, so by Theorem 104.1 there can be no counterexample. Hence $(\forall n{:}\mathrm{N}^{+})P(n)$ is true.
The principle of mathematical induction and the principle of the least counterexample are actually equivalent.
104.2.1 Exercise Use the principle of mathematical induction (Theorem 103.2) to prove Theorem 104.1.
104.3 Strong induction
The principle of the least counterexample is useful in its own right for proving things. For example, it is used in Problems 104.3.3 and 104.4.4 to prove the Fundamental Theorem of Arithmetic.
The principle allows you to assume as a kind of induction hypothesis that $P (k)$ is true for all $k < n$, not just for $n-1$. This is stated formally in Exercise 104.3.1 below. It is handy for proving things about factoring integers, since the prime factorization of an integer $n$ has little to do with the factorization of $n-1$. This more general approach is often called strong induction, and another statement of it is in Problem 104.3.1.
In this book, proofs using this technique are usually presented as direct applications of the least counterexample principle.
104.3.1 Exercise Use the principle of the least counterexample to prove the following rule of inference for positive integers $n$. This rule is called the Principle of Strong Induction.
$$(\forall n{:}\mathrm{N}^{+})\Bigl((\forall m{:}\mathrm{N}^{+})\bigl(m < n \Rightarrow P(m)\bigr) \Rightarrow P(n)\Bigr) \vdash (\forall n{:}\mathrm{N}^{+})P(n)$$
104.3.2 Example: Existence of quotient and remainder We will use the Principle of the Least Counterexample to prove the existence half of Theorem 60.2, page 84. That is, we will prove that for given integers $m$ and $n$ with $n\neq 0$, there are integers $q$ and $r$ satisfying
Q.1 $m =qn +r$, and
Q.2 $0\leq r <|n|$.
That there is only one such pair of integers was proved on page 84.
We will give the proof for $m \geq 0$ and $n >0$ and leave the other cases to you (Exercise 104.3.4). Let $S$ be the set of all nonnegative integers of the form $m-xn$. $S$ is nonempty (any negative $x$ makes $m-xn$ positive, but there may also be positive $x$ that do so). Let $m-qn$ be the smallest element of $S$. Let $r =m-qn$. Then $qn +r =qn +m-qn =m$, so Q.1 is true. Since $m-qn\in$ $\mathrm{N}$ by assumption, we know that $r$, which is $m-qn$, is nonnegative, which is half of Q.2. As for the other half, suppose for the purpose of proof by contradiction that $r \geq n$. Then $m-qn\geq n$, that is, $m \geq n +qn = (q + 1)n$. But then $m- (q + 1)n$ is nonnegative, and it is certainly smaller than $m-qn$, contradicting our choice of $m-qn$ as the least element of $S$.
104.3.3 Exercise (hard) Show that if $m$ is any integer greater than 1, then there is a finite list of primes $p_{1},\ldots ,p_{k}$ and integers $e_{1},\ldots ,e_{k}$ for which $m=\prod_{i=1}^{k}p_{i}^{e_{i}}$. Use the principle of the least counterexample. Do not use the Fundamental Theorem of Arithmetic. Note that if $m$ is prime, then this holds for $k = 1,p_{1} =m$, and $e_{1}= 1$.
104.3.4 Exercise Complete the proof that the quotient (of integers) and remainder exist (see 104.3.2).
104.4 Proof of the Fundamental Theorem of Arithmetic
Exercises 104.4.1 through 104.4.4, together with Exercise 104.3.3, lead up to a proof of the Fundamental Theorem of Arithmetic. Thus the Fundamental Theorem should not be used in the proofs of those problems.
104.4.1 Exercise Show that if $p$ is a prime and $m$ an integer not divisible by $p$, then GCD($p,m) = 1$. (Answer on page 249.)
104.4.2 Exercise Show that if $p$ is a prime and $m$ and $n$ are integers for which $p|mn$ but $p$ does not divide $m$, then $p|n$. (Hint: Use Problem 104.4.1 and Bézout’s Lemma, page 128.) (Answer on page 249.)
Suppose $p$ is prime, $p|mn$, but $p$ does not divide $m$. Then GCD($p,m) = 1$, so there are integers $a$ and $b$ for which $ap +bm= 1$. There is also an integer $k$ for which $mn =pk$. Putting these facts together, $n =anp +bmn =anp +bkp=$ $(an +bk )p$, so $n$ is divisible by $p$.
104.4.3 Exercise Use Problem 104.4.2 to show that if $p$ is a prime and $m_{1},\ldots ,m_{k}$ are positive integers for which $p|\prod_{i=1}^{k}m_{i}$, then for some $i, p|m_{i}$.
104.4.4 Exercise (hard) Show that if $p_{1} < p_{2} < \ldots < p_{k}$ in the prime factorization $m=\prod_{i=1}^{k}p_{i}^{e_{i}}$ in Exercise 104.3.3, then the factorization is unique. (Hint: Assume $m$ is the least positive integer which has two such factorizations and use Problem 104.4.3 to obtain a prime which occurs in both factorizations. Then divide by that prime to obtain a smaller integer with two factorizations.)
Pages 154–157 of the book (PDF).