\documentstyle[12pt,twoside,amsfonts,amstex]{article}
\input{macros-course-lectures}

\parskip1.5ex
\parindent0pt

\begin{document}

\lecture{notes3}{Notes 3}{September 12, 1996}

\setcounter{section}{5}

Recall the Peano induction rule: \\

\boxtext{Let $P(n)$ be a predicate, and suppose
\begin{itemize}
\item $P(0)$
\item $(\forall n)\ (P(n) \implies P(n+1))$.
\end{itemize}
Then $P(n)$ is true for all natural numbers $n$.}

Plus simple variation where lower limit isn't $0$, but some other
natural number. \\
\\
Today we describe two more interesting variations on the induction
rule. \\
Also valid for reasoning about natural numbers. \\
\\
{\em Strong induction} and {\em well-ordering}. \\
\\
Strong induction is nice because it allows you to use not just
$P(n-1)$ when trying to conclude the result for $P(n)$, \\
but also $P$ of anything smaller than $n-1$, \\
i.e., $P(0), \ldots, P(n-1)$. \\
\\
Well-ordering is a restatement of induction that says that every
nomempty set of natural numbers has some smallest element. \\
\\
We will also sketch proofs that these three induction rules are
``equivalent''. \\
Thus, they are interchangeable in arguments, though in particular
practical cases, one may work out much nicer than the others. 

\section{Picky Axiomatic Remarks}

When I give the new induction axioms, they will mention an ordering
$<$ on the natural numbers. \\
The astute, picky student will observe that the Peano axioms don't
mention anything about an ordering; \\
they just mention $0$ and successor. \\
And we haven't defined any ordering yet. \\
Only defined operations $+$ and $\times$. \\
\\
If we want to treat these as alternatives to the Peano induction
axiom, we will have to add some new notions to the Peano axioms. \\
This new stuff will include a new symbol $<$, and some new simple
axioms like: 
\begin{itemize}
\item
$<$ is a strict total order. \\
(Formally, irreflexive, $\neg n < n$; \\
antisymmetric, $\neg (m < n \wedge n < m)$; \\
transitive, $m < n$, $n < p$ imply $m < p$; \\
total:  any $m$, $n$ have either $m < n$ or $n < m$.)
\item
Every natural number other than $0$ is a successor of something, \\
i.e., $n \neq 0 \implies \exists m ( m' = n )$. \\
(Call this its {\em predecessor}.  It must be unique.)
\item
$0 < n$ for all other $n$.
\item
$n < n'$.
\item
$m < n$ if and only if $m' < n'$.
\item
$\neg (m < n \wedge n < m+1)$.
\item
Etc.
\end{itemize}

We'll come back to this later in the hour. \\
For now, we'll just continue assuming such basic properties.

\section{Strong Induction}

\subsection{Definition}

A variant of induction.  To prove $(\forall n \in N) P(n)$ 
\begin{itemize}
\item prove $P(0)$
\item prove $((\forall k < n)P(k))$ implies $P(n)$.
\end{itemize}

Actually, don't even need the base case. \\
That's because the second case, when specialized to $n = 0$, says
to prove $((\forall k < 0)P(k))$ implies $P(0)$. \\
But the hypothesis is {\em vacuously true}, since there's nothing $< 0$.  \\
So this means you're really forced just to prove the conclusion,
$P(0)$, on its own. \\
\\
But never mind if this is confusing -- we'll follow the book and check
base cases -- they're generally easy anyway. \\
Another reason for base cases:  \\
Often the first case or first few cases need a different argument for
the inductivve step, show explicitly. \\
\\
Again, can modify this to work from any $k$ instead of $0$. 

\subsection{Fibonacci Examples}

\begin{example}
Recall Fibonacci numbers: 
\begin{itemize}
\item $f_0 = 0$
\item $f_1 = 1$
\item $f_{n+1} = f_{n}+f_{n-1}$
\end{itemize}

\begin{theorem}
$f_n \geq ({3 \over 2})^{n-2}$ for all $n \geq 2$. 
\end{theorem}

\begin{proof}
Define $P(n)$ as predicate above. \\
\\
Suffices to show for all $n \geq 2$: \\
$((\forall k, 2 \leq k < n)P(k))$ implies $P(n)$. \\
(No base case.) \\
\\
But convenient to check $P(2)$ and $P(3)$ explicitly in the inductive
step. \\
Or you can regard them as base cases. \\
At any rate, they use a different argument. \\
\\
For $n \geq 4$: \\
Assume $((\forall k, 2 \leq k < n)P(k))$, show $P(n)$. \\
\\
By definition, $f_n = f_{n-1} + f_{n-2}$. \\
Both of these are $\geq 2$, so we can assume $P(n-1)$ and $P(n-2)$,
by the strong inductive hypothesis. \\
That is,
$f_{n-1} \geq ({3 \over 2})^{n-3}$ and 
$f_{n-2} \geq ({3 \over 2})^{n-4}$. \\
\\
Now, $f_n = f_{n-1} + f_{n-2} \geq ({3 \over 2})^{n-3} +
({3 \over 2})^{n-4}$.
We want to show that this is $\geq ({3 \over 2})^{n-2}$. \\
Dividing all terms by $({3 \over 2})^{n-4}$, we see that we need to show: \\
${3 \over 2} + 1 \geq ({3 \over 2})^2$. \\
This is easily checked. \\
\\
Book does a sharper calculation.
\end{proof}
\end{example}


Note how we used the inductive hypothesis about {\em two} earlier
cases. \\
\\
Another example of a mistake -- forgetting to prove enough base 
cases to make the induction step go through. \\
\\
\begin{theorem}
(False theorem) \\
Every Fibonacci number is even.
\end{theorem}

\begin{proof}
The proof is by strong induction. 
Let $P(n)$ be the proposition that $f_n$ is even.\\
{\em BASE:} Prove explicitly that $P(0)$ is true -- this is because
$f_0 = 0$ is even.\\
{\em INDUCTIVE STEP:} Assume $P(k)$ to be true, for all $k < n$. \\
Consider $f_n = f_{n-1} + f_{n-2}$. \\
Since  $f_{n-1}$ and $f_{n-2}$ are even, by the inductive hypothesis,
it follows that $f_n$ is even too. \\
Hence $P_n$ is true. \\
\\
This completes the inductive step and hence $P(n)$ is true for all
nonnegative integers $n$.
\end{proof}

The above proof is faulty because there were not enough base cases
shown explicitly. \\
The inductive argument doesn't work to show $P(1)$, since $f_{-1}$ is not
defined. \\
Would have to show $P(1)$ explicitly, but of course that doesn't work,
since $f_1$ is odd. 

\subsection{Number Theory}

\begin{defin}
For $a > 0$, we say $a$ {\em divides} $b$ if there exists an integer
$t$ such that $a=bt$.  We write $a \mid b$.
\end{defin}
\begin{itemize}
\item $3 \mid 6$
\item $3\not |~7$
\end{itemize}

\begin{defin}
$n \geq 2$ is {\em prime} if the only natural numbers dividing $n$ are $1$
and $n$.
\end{defin}
\begin{defin}
$n \geq 2$ is {\em composite} if $n=ab$ for natural numbers $a,b \ne 1,n$.
\end{defin}

Every natural number is either prime or composite. (Why?)

\begin{theorem}
Every natural number $\geq 2$ has a prime divisor.
\end{theorem}

\begin{proof}
By strong induction. \\
BASE CASE: The theorem is true for $n=2$.

INDUCTIVE STEP: Assuming the theorem true for all $k$, $2 \le k < n$,
consider the number $n$.  We proceed by cases:
\begin{enumerate}
\item $n$ is prime.  Then $n$ (a prime) divides $n$.
\item $n$ is composite.  Then $n=ab$ where $2 \le a < n$.  It follows
from the inductive hypothesis that $a$ has a prime divisor, ie that
$a=pt$ for a prime $t$.  Then $n=ptb$, meaning $p$ divides $n$.
\end{enumerate}
Since we proved the inductive step for both possible cases, we are
done.
\end{proof}

Note: we use a base case of 2.  

\subsection{Structural Induction on a Recursive Definition}

Induction is often used to prove properties for all elements
of a set defined recursively, like well-formed arithmetic formulas or
binary trees. \\
This is usually formulated so it looks like a different kind of
inductive method: \\
Two steps:
\begin{itemize}
\item Prove for ``base cases'' of definition
\item Prove for the result of any combination rule, assuming it's true
for parts.
\end{itemize}
But this isn't really different.
It's an instance of strong induction on the number of formation steps.
\\
Just say that the base cases correspond to $0$ applications of
combination operations. \\
\\
Give two examples here. 

\begin{theorem}
The number of edges in any binary tree is exactly one fewer than the
number of nodes. 
\end{theorem}

\begin{proof}
The proof is by strong induction on $n$, the number of applications of
the ``combination rules''. \\
Let $P(n)$ be the proposition that a binary tree formed by $n$
applications of the combination rules has $1$ fewer edge than nodes.\\
\\
{\em BASE CASE:} $P(0)$ is true since a binary tree that is a node
with no children has $0$ edges.\\
\\
{\em INDUCTIVE STEP:} Assume $P(k)$ to be true, for all $k < n$.
Consider a binary tree  formed by $n$ applications of the combination
rules. There are three cases.
\begin{enumerate}
\item 
The tree is a node with a left child that is a binary tree. 

Since the left child is a binary tree formed by $n-1$ applications of
the combination rules, by the inductive hypothesis, it has $1$ fewer
edge than nodes. Hence the whole tree has $1$ fewer edge than nodes,
too. \\
(Adding one edge and one node.)
\item 
The tree is a node with a right child that is a binary tree. 

This case is identical to the previous case.
\item 
The tree is a node with left and right binary-tree children. \\

Then each of the two subtrees is formed by fewer than $n$ applications
of the combination rules. 
By inductive hypothesis (using strong induction here, since it needn't
be $n-1$), \\
each subtree has exactly $1$ fewer edge than nodes.
The whole tree adds $1$ node and $2$ edges, so also has exactly $1$
fewer edge than nodes. 
\end{enumerate}

This completes the inductive step and hence $P(n)$ is true for all
nonnegative integers $n$.
This implies the result. 
\end{proof}

\begin{theorem}
Well formed formulas always have the same number of left and right
parentheses. 
\end{theorem}

\begin{proof}
The proof is by strong induction on $n$, the number of applications of
the ``combination rules''. \\
Let $P(n)$ be the proposition that a well formed formula formed by $n$
applications of the combination rules has
the same number of  left and right parentheses.\\

{\em BASE CASE:} $P(0)$: \\
If the formula is just a number then the above proposition 
is obviously true since there are $0$ left and right parentheses.
Hence, $P(0)$ is true.\\

{\em INDUCTIVE STEP:}   
Assume $P(k)$ to be true, for all $k < n$. Consider a well formed
formula  formed by $n$ applications of the combination rules. 
There are four cases.
\begin{enumerate}
\item 
The formula is of the form $(f+g)$, where $f$ and $g$ are well formed.
Since $f$ and $g$ are well-formed and are formed by fewer than $n$
applications of the combination rules, by the strong inductive hypothesis,
they have an equal number of  left and right
parentheses and hence so does  $(f+g)$.
\item The formula is of the form $(f-g)$. This case is similar to the first.
\item The formula is of the form $(f*g)$. This case is similar to the first.
\item The formula is of the form $(f/g)$. This case is similar to the first.
\end{enumerate}
This completes the inductive step and hence $P(n)$ is true for all nonnegative
integers $n$.
\end{proof}

\subsection{Tiling}

Problem:  What 2-dimensional planes can be tiled using only $1 \times
3$ and $2 \times 2$ tiles?  \\
Rotations allowed. \\
\\
Easy case:  What about $1 \times n$ and $n \times 1$? \\
If and only if $n$ is a multiple of $3$.  \\
Easy, LTTR to prove carefully.  \\
\\
Next case: $2 \times n$ (and $n \times 2$) \\
Claim any, if $n \geq 2$. \\
Show by strong induction: \\
\\
BASE: $2 \times 2$, one tile.  \\
BASE: $2 \times 3$, two tiles. \\
\\
INDUCTIVE: $n \geq 4$. \\
If $n$ even, then use one $2 \times 2$, what's left is $2
\times (n-2)$, where $n - 2 \geq 2$.
So by strong inductive hypothesis, can tile the rest. \\
\\
If $n$ odd, then $n \geq 5$.
Then use two $1 \times 3$'s to reduce to $2 \times (n-3)$, where $n -
3 \geq 2$.  Again, strong inductive hypothesis gives the rest. 
\\
Yet another case:  $3 \times n$ (and ...) \\
Then all, obviously. \\
\\
Finally:  What about $m \times n$, $m,n \geq 4$? \\
Claim all. \\
Proof by strong induction on $m$ (where $P(m)$ says ``for all $n \geq
4$, can tile $m \times n$''. \\
\\
Cases: \\
$m$ even, $m \geq 4$: \\
Then first two rows are $2 \times n$, $n \geq 4$, can be tiled by
special case lemma. \\
Remove, get $(m - 2) \times n$. \\
If $m-2 = 2$ then can do rest by special case lemma. \\
Else $m - 2 \geq 4$, can do rest by inductive hypothesis. \\
\\
$m$ odd, $m \geq 4$: \\
So $m \geq 5$. \\
Then first three rows can be done, by special case lemma. \\
Remove, get $(m - 3) \times n$. \\
If $m - 3 = 2$ then can do rest by special case lemma. \\
Else $m - 3 \geq 4$, can do rest by inductive hypothesis.

\subsection{Ordinary vs. Strong Induction}

What is the relationship between the ordinary and strong induction
axioms? \\
It should be clear, intuitively, that the strong induction axiom is at
least as powerful as the ordinary one -- any proof you can do with
weak induction still works based on strong induction. \\
You only need to invoke the inductive hypothesis for $n-1$, whereas
you're allowed to use all cases smaller than $n$. \\
\\
(Remark:  This assumes existence of a predecessor, which follows from
our basic axioms.) \\
\\
Though it's not obvious, the strong induction axiom is really {\em no
stronger\/} than the weak axiom! \\
That is, any proof you can do based on strong induction can be
reformulated so it just works using weak induction. \\
You just have to use weak induction in a tricky way: \\
You must strengthen the predicate you prove using weak induction so
that it includes information about smaller arguments. \\
\\
You should be used to strengthening inductive hypotheses...\\
\\
Suppose P is a predicate such that $(\forall n P(n))$ can be proved using strong induction.

Means: $P(0)$\\
       $(\forall k< n) P(k) \implies P(n)$

Show that we can prove using ordinary induction too.
To do so we need to strengthen P so the ordinary induction works:\\
\\
Define $Q(n) = (\forall k \le n) P(k)$\\
\\
Claim: can prove $ Q$ using ordinary induction\\
\\
Base: $ Q(0)$-- Save as $ P(0)$, already know this\\
Inductive step: 

Show that $Q(n) implies Q(n+1)$\\
Show that $(\forall k \le n) P(k)$ implies $(\forall k \le n+1) P(k)$\\
We know this, since $(\forall k \le n) P(k) \implies P(n+1)$\\

Claim: $Q(N) \implies P(n) for all n$
So, by strengthening to $Q$, we have proved P using ordinary induction.\\

Formally: \\
If you start with a basic set of axioms -- not just Peano, but
including ordering axioms and existence of predecessor as above --
then adding either induction axiom allows you to prove the other. \\
\\
\begin{theorem}
Weak induction axiom implies strong induction axiom.
\end{theorem}

\begin{proof}
Suppose we have the weak induction axiom. \\
This says, for any predicate $P$, that \\
$P(0)$ and $(\forall n) (P(n)\implies P(n+1))$ \\
together imply $(\forall n) P(n)$.  \\
\\
What we want to prove is the strong induction axiom, which says: \\
\\
For any predicate $Q$, \\
$Q(0)$ and $(\forall n)(((\forall k < n) Q(k)) \implies Q(n))$ \\
together imply $(\forall n)Q(n)$. \\
\\
So fix some $Q$ that we'd like to prove using strong induction. \\
And assume \\
*** \\
$Q(0)$ and $(\forall n)(((\forall k < n) Q(k)) \implies Q(n))$. \\
*** \\
\\
We will see how to prove $(\forall n) Q(n)$ using ordinary induction.
\\
\\
The key is to come up with just the right strengthened predicate $P$ \\
to make an ordinary induction go through. \\
Here's the clever trick: \\
\\
Define $P(n)$ as the predicate $(\forall k \le n)Q(k)$. \\
Thus, $P(n)$ asserts not only $Q(n)$ for the same argument $n$, but
also for all smaller arguments $k < n$. \\
Need to strengthen it in this way to make the induction go through
using the weaker principle. \\
\\
Now check that this definition works.  Straightforward, but can be a
little hard to keep straight. \\
\\
In order to apply weak induction, we must show two things: \\
$P(0)$ and \\
$(\forall n) (P(n)\implies P(n+1))$. \\
We'll verify these two, then apply weak induction and see what we get. \\
\\
$P(0)$: \\
This says $(\forall k \le 0)Q(k)$. \\
That's the same as just $Q(0)$. \\
But we've assumed this to be true, *** above. \\
\\
$P(n)\implies P(n+1)$. \\
(Fix $n$.) \\
Assume $P(n)$. \\
That says $(\forall k \le n)Q(k)$. \\
By what we have assumed about $Q$ *** above, we know that \\
$((\forall k < n +1 ) Q(k)) \implies Q(n+1)$. \\
Therefore we know $Q(n+1)$. \\
So, we have $(\forall k \le n+1)Q(k)$. \\
But this is just $P(n+1)$, as needed. \\
\\
Now we can apply ordinary induction to $P$, concluding that $P(n)$ holds for
all $n$. \\
But $P(n) \implies Q(n)$, so also $Q(n)$ holds for all $n$.
\end{proof}

\section{Well Ordering Principle}

\subsection{Definition}

The {\em well ordering principle} says: \\
Every nonempty set of natural numbers contains a least element.
\\
This should be ``obvious'', as a property of natural numbers as
commonly understood. \\
\\
This may not look exactly like an induction principle, but it's
similar. \\
Formally, it's equivalent (in the presence of basic axioms)
to induction (weak or strong). \\
Come back to this later. \\
\\
Well ordering not true for integers, positive reals, positive
rationals. 

\subsection{Number Theory}

We give some number theory examples of the use of well ordering. 

\begin{theorem}
Every natural number $\geq 2$ can be factored as a product of primes.
\end{theorem}

\begin{proof}
By well ordering.  \\
Let $S$ be the set of all natural numbers $\geq 2$ that cannot be
factored as a product of primes. \\
We assume $S \ne \emptyset$ and derive a contradiction. \\
\\
Since $S$ is not empty, well ordering implies that it has a least
element $n$. \\
\\
This element $n$ cannot be a prime, because then it would be a
(trivial) product of primes. \\
So $n$ is composite -- write $n=ab$ where $1 < a,b <n$.  \\
\\
Because $a,b < n$, and $n$ is the smallest element of $S$, it follows
that $a,b \notin S$. \\
This implies that 
$a$ can be written as a product of primes, say $p_1 p_2 \cdots p_k$, \\
and $b$ as a product of primes, say $q_1\cdots q_l$.  \\
\\
Therefore, $n$ can be written as $p_1 \cdots p_k q_1 \cdots q_l$, \\
a product of primes, contradicting the claim that $n \in S$.  \\
\\ 
Our assumption that $S \ne \emptyset$ must therefore be false.
\end{proof}

It is also possible to prove this result using strong induction. \\
The argument is very similar, in fact.  (Check this.) \\
This similarity should give you the idea that the well ordering
principle is very similar to strong induction. \\
In fact, it's equivalent (see later). \\
\\
A fallacious argument: \\
Try to show that every number can be factored {\em uniquely} into primes. \\
\\
Apply the same (well ordering) proof as above, modifying the
definition of $S$: \\
Let $S$ be the set of all natural numbers $\geq 2$ that cannot be
factored {\em in exactly one way\/} as a product of primes.  \\
\\
The fallacy is that even if $n = a b$ and $a$ and $b$ have unique
factorizations, \\
it is still possible that $n = c d$ for different $c$ and $d$, \\
producing a different factorization of $n$. \\
\\
The argument is false, but the claim is true and is known as the
{\em fundamental theorem of arithmetic}. \\
\\
\begin{theorem}
(The division algorithm.)  Let $a,b$ be nonzero naturals.  
Then $\exists! q, 0\le r < b$, such that $a=qb+r$.
\end{theorem}

\begin{proof}
To prove this theorem, we need to prove both that some $r$ exists and
that this $r$ is unique (this is typical of unique-existence proofs). \\
Fix $a$, $b$. 

\begin{description}
\item[Existence:] 

We use well ordering.  \\
Let $S = \{r \in \naturals \mid (\exists q \in \naturals) a = qb+r\}.$  \\
\\
Example:  \\
If $a = 13$ and $b = 3$, then $S = \{ 1, 4, 7, 10, 13  \}$. \\
\\
\\
$S$ is nonempty because $a = 0b + a$ implies $a \in S$.  \\
It follows by well ordering that $S$ contains a least element $r_0$
such that $a = q_0 b + r_0$. \\
We claim that this $(q_0,r_0)$ pair has all the properties we need. \\
\\
\\
The only interesting thing to check is that $r_0 < b$. \\
We argue by contradiction: suppose $r_0 \ge b$.  \\
Then $a = (q_0 + 1) b + (r_0 - b)$ and $r_0 - b \ge 0$, \\
which implies that $r_0 - b \in S$. \\
But this contradicts the assumption that $r_0$ is the least element of $S$. \\
Thus $r_0 < b$. \\
\\
\\
\item[Uniqueness:] 

Suppose $a = q_1 b + r_1 = q_2 b + r_2$. \\
Without loss of generality, suppose $r_1 > r_2$. \\
(What we mean is, if $r_1 < r_2$, then we can swap $(q_1,r_1)$ 
with $(q_2,r_2)$ to make the assumption true.  Of course, we cannot
have $r_1 = r_2$.)  \\
Then subtract: \\
$(q_1 - q_2) b = (r_1 - r_2)$. \\
This means that $b \mid r_1 - r_2$. \\
By assumption, $0 \leq r_1, r_2 < b$. \\
So $0 \leq r_1 - r_2 < b$. \\
Therefore, $r_1 - r_2 = 0$.  \\
So $q_1 - q_2 = 0$.
\end{description}
\end{proof}

\begin{defin}
In the theorem above, $q$ is the {\em quotient} and $r$ is the {\em
remainder}.
\end{defin}

Another example: \\
We left a slight hole in our proof that $\sqrt{2}$ is irrational -- 
we assumed that we could write a fraction in lowest terms, \\
that it, in such a way that the numerator and denominator have no
common divisors. \\
Here is how to actually prove that fact:

\begin{theorem}
Every rational number can be written in lowest terms.
\end{theorem}

\begin{proof}
Fix rational $q$. \\
Let $S = \{b \in \naturals \mid (\exists a) q = a/b \}$.  \\
(The set of possible denominators.) \\
$S$ is nonempty, by the definition of $q$ being rational.  \\
Therefore $S$ has a least element $b$ and a corresponding $a$. \\
Then $a / b$ is the lowest-terms representation of $q$.
\end{proof}

\subsection{Nim}

The game of Nim is defined as follows.  A bunch of sticks are placed
on the ground.  Two players take turns removing one, two, or three
sticks.  The player to remove the last stick loses.

\begin{theorem}
First player loses if the number of sticks $n$ is $4k+1$ for some $k$,
and wins (if he plays optimally) otherwise.
\end{theorem}

\begin{proof}
By well ordering.
Let $S$ be the set of numbers $n$ for which the theorem is violated, \\
that is, either $n = 4k + 1$ and the first player wins, \\
or else $n = 4k, 4k + 2, 4k + 3$ and the first player loses. \\
Assume $S$ is nonempty. \\
Let $n$ be the smallest element of $S$. \\
\\
There are four cases: 
\begin{itemize}
\item 
$n=4k+1$ and the first player wins. 

Can't have $n = 1$, because the first player has no choice but to
remove $1$ stick and lose. \\
So must have $n \geq 5$. \\
\\
Consider what the first player might do to win. \\
Can only choose to remove 1, 2 or 3 sticks. \\
\\
If removes one stick, the remainder is $n-1 = 4k$.  \\
By choice of $n$ as smallest element of $S$, \\
the player who plays at this point should win. \\
It follows that the player who played first will lose, contradiction. \\
\\
Similarly, if the first player removes two sticks, the remainder is \\
$4(k-1)+3$, and he loses by the same reasoning.  \\
Another contradiction. \\
\\
Similarly again for removing $3$ sticks.  \\
\\
So however the first player moves, a contradiction is reached. \\
This means that the smallest violating element $n$ can't be of the
form $4k + 1$.

\item 
$n = 4k$ and the second player wins. 

Then if the first player removes three sticks, \\
the second player sees $4(k-1)+1$ sticks. \\
This means he loses, because $n$ is the smallest element of $S$. \\
Contradiction. 

\item 
$n = 4k+2$ and the second player wins. 

Similar to the previous case. 

\item
$n=4k+3$ and the second player wins. 

Again similar.
\end{itemize}
From the division algorithm, we know these are all the possible cases.
\end{proof}

Again, easy to reformulate using strong induction.

\subsection{Well Ordering vs. Induction}

In the presence of basic axioms about numbers,
well ordering turns out to be {\em equivalent} to induction (weak or
strong, since they are equivalent to each other). 

\begin{theorem}
Induction implies well ordering.
\end{theorem}

\begin{proof}
We must show:  Every nonempty set contains a smallest element. \\
We can assume either kind of induction axiom, since they are
equivalent. \\
So we'll use strong induction, since that gives us more power. \\
\\
Define predicate $P(n)$: \\
Every set containing $n$ contains a smallest element. \\
\\
If we prove that $P(n)$ is true for all $n$, then we have well 
ordering since a nonempty set has to contain {\em some} element $n$. \\
\\
\\
Prove this by strong induction: \\
Basis: $P(0)$: \\
If a set contains $0$, then $0$ is its smallest element. \\
Follows from basic ordering properties. \\
\\
Inductive step: \\
Assume $(\forall k < n)P(k)$, and prove $P(n)$. \\
Consider a set containing $n$.  \\
If it contains no smaller element, then $n$ is the smallest element and
we are done.  \\
On the other hand, if it does contain a smaller element $k < n$, \\
then by the inductive hypothesis, it contains a smallest element and
again we are done. 
\end{proof}

\begin{theorem}
Well ordering implies induction. 
\end{theorem}

\begin{proof}
We will show it implies weak induction. \\
\\
We have to show that for any predicate $P$, \\
$P(0)$ and $(\forall n) (P(n)\implies P(n+1))$ \\
together imply $(\forall n) P(n)$.  \\
\\
So fix $P$ and assume 
$P(0)$ and $(\forall n) (P(n) \implies P(n+1))$ \\
\\
We have well ordering, which says any nonempty $S$ has a smallest
element. \\
We need to define the right $S$ so we can apply well ordering: \\
Define $S = \{n \mid \neg P(n)\}$. \\
The set of elements not satisfying $P$. \\
\\
Suppose that $S \ne \emptyset$ and derive a contradiction. \\
\\
If $S \neq \emptyset$ then, by well ordering, it contains a smallest
element $n$. \\
Clearly $n \ne 0$ since $P(0)$ is true.  \\
Therefore $n-1$ is a natural number (uses basic order axioms) \\
and it is not in $S$ (since $n$ is the smallest element). \\
So $P(n-1)$ is true. \\
It follows from weak induction that $P(n)$ is true. which contradicts
the claim that $n \in S$.  \\
\\
We have derived a contradiction, meaning that our initial assumption, 
that $S$ is nonempty, is false. \\
So $S$ is empty, which implies that $P(n)$ is true for all $n$. \\
As needed. 
\end{proof}

\end{document}

Remark:  If we redo the previous proof using strong induction
instead of weak, then it seems not to use the existence of a
predecessor!  Seems nicer, in fact. 

But this assumption is used elsewhere -- in the ``obvious''
implication that strong induction implies weak induction!
