Exercise statement
This exercise will establish a rigorous version of Proposition 2.1.16. Let be an arbitrary set. Let
be a function, and let
be an element of
. Show that there exists a function
such that
and
for all
,
and furthermore that this function is unique. For an additional challenge, prove this result without using any properties of the natural numbers other than the Peano axioms directly (in particular, without using the ordering of the natural numbers, and without appealing to Proposition 2.1.16).
Hints
- First show inductively, by a modification of the proof of Lemma 3.5.12, that for every natural number
, there exists a unique function
such that
and
for all
such that
.
- For the “additional challenge” part: first show inductively, using only the Peano axioms and basic set theory, that for every natural number
, there exists a unique pair
of subsets of
which obeys the following properties: (a)
, (b)
, (c)
, (d)
, (e) Whenever
, we have
. (f) Whenever
and
, we have
. Once one obtains these sets, use
as a substitute for
in the previous argument.
How to think about the exercise
This exercise takes quite a bit of work, especially if you do both the standard version and the “additional challenge” version. It’s a real struggle because there’s just so much to do in the proof, many separate induction proofs, so many variables to keep track of, etc. In the challenge version, you don’t even get to use the properties of order, so you’re essentially re-proving all those properties using bare set theory.
In my opinion, this exercise doesn’t actually have any “deep” ideas, in the sense that the proof is basically all automatic: you just keep doing the next obvious thing, until you’re (eventually, after a very long time) done with the proof. There are I think three non-automatic parts to the proof: (1) figuring out that instead of defining directly, you should build it up in stages by defining the functions
(this was already done for us in the hint); (2) figuring out that
should be defined as
; and (3) coming up with the properties (a) through (f) (like (1), we didn’t actually have to do this, since the book just gave these to us).
My honest opinion is that it’s fine to skip this exercise unless you’re dying to verify that recursive definitions really do work. If you’re not dying to know, one option would be to skip this exercise for now; then, once you’ve finished the rest of the book, you hopefully have more mathematical chops to push through this exercise without it being utter torture. I’m not sure that working through this exercise gives you a better understanding of recursion.
Some tips for thinking about this proof: in the challenge version, is supposed to contain the numbers at most
, so
is the rigorous way to say
(alternatively we could also say
). Similarly, to say
you can write
(alternatively,
).
You might wonder if there’s some short, elegant way to do this exercise. I don’t think there’s a way to shorten the proof unless you’re willing to skip some parts by saying e.g. “this follows from a routine induction”.
In the challenge version, at one point we define and
. You might be nervous about this, since it looks like we are defining the sets
recursively. But the whole point of the exercise is to show that recursive definitions work! Isn’t this circular? It turns out that this is fine (hopefully, unless I’m horribly mistaken), and here is why. For each
, the sets
are described using properties (a) through (f), which are not recursive. So our property
pertaining to
that we use in the inductive proof can be “there exist sets
with properties (a) through (f)”. Notice the missing subscripts in
; because we did this, in our inductive step, we will define some sets
and
. Again, no subscripts, and this makes a difference. If we tried to do this when defining
, it wouldn’t work because we can’t define
without reference to
. (If you think you can do this, try to write a property
pertaining to
such that proving
for all
would give us the theorem. And of course,
can’t mention
at all.)
There is a paper by Leon Henkin titled “On Mathematical Induction” which proves this same theorem using a very similar method. What Henkin calls “segments” are the sets in the proof below, and what he calls “partial functions” are the functions
. I haven’t read his proof in detail, but the paper seems to be very readable (i.e. if you know enough math to read Analysis I, then you shouldn’t have a problem with Henkin’s proof).
Some things I haven’t yet figured out (and am too tired to):
- Do we actually ever use the uniqueness of
and
in the proof? If so, where? Actually for
we do use uniqueness when we use the fact that
.
Model solution (standard version)
(This version is circular, since even defining the sets requires the notion of order, which was defined using addition, and addition was defined using a recursive definition. Also just as in the proof of Lemma 3.5.12, we make use of the property that if
is a number such that
, then exactly one of
or
is true. This again requires the properties of order.)
Let be the statement “there exists a function
such that
and
for all
”. We shall prove that
is true for all natural numbers
using induction. For the base case we must show
, which states that there is a function
such that
. (The second condition is vacuously true, since there are no natural numbers
such that
.) We can simply define
to complete the base case.
Now suppose inductively that is true, so that there exists a function
such that
and
for all
. We must show that
is true, i.e. there exists a function
such that
and
for all
. We will define
as follows. We define
when
and
when
. We verify that this definition satisfies the required properties. We have
since
(here we used the inductive hypothesis
). Now suppose
. Then
, so either
or
.
- Suppose first that
. By definition of
we have
. Also, since
, we have by the inductive hypothesis that
. Finally because
, we have
by definition of
. Putting these three equalities together, we have
, which is what we wanted to show.
- On the other hand, if
then by definition of
we have
. Since
, by definition of
we have
. Also since
, by Axiom 2.4 we see that
. Putting these equalities together we see that
, which is what we wanted.
In either case, we have shown that the desired function exists, so this closes the induction.
Now we show that for each , the function
is unique. Let
be given, and suppose
is a function such that
and
for all
. We will show using induction on
that
, i.e.
for all
. For the base case, we have
. Now suppose inductively that if
, then
. We must show that if
then
. So suppose
. We have
so
by inductive hypothesis. Thus
. This closes the induction.
Now that we have the functions for each natural number
, we can finally define
. We define
for each natural number
. We verify that
has the desired properties. First, we have
. Now we will use induction. Let
be the statement “
”. We will show that
is true for all
. For the base case, we must show that
. By definition of
, we have
. Now
has the property that
for all
so for
we get
. Thus
, where the last step follows because
.
Now suppose inductively that is true, i.e.
. We must show that
is true, i.e.
. Starting from the left-hand side, by definition of
, we have
. By definition of
, we have
. Now starting from the right-hand side, we have
by definition of
. Thus if we can show that
then we will be done. We invoke the Lemma below with
and
, which closes the induction.
Lemma. Let be natural numbers such that
. Then
for all
.
Proof. We prove this by inducting on . For the base case, we have
. Now suppose inductively that if
then
. We want to show that if
then
. So suppose
. Then we have
so by inductive hypothesis
. Now we have
This closes the induction.
We have shown the existence of . Our final task is to show the uniqueness of
. Let
be a function such that
and
for all
. We want to show that
, i.e.
for all
. We prove this by induction on
. For the base case, we have
. Now suppose inductively that
. We want to show that
. We have
, where the middle equality follows by the inductive hypothesis. This closes the induction.
Model solution (challenge version)
First we show by induction that the sets exist. Let
be the statement “there exists a pair of sets
with the properties (a) through (f), and with the additional property that
”.
For the base case, , we will show that
and
work. (a), (b) We have
and
by definition of set difference. (c) Also,
and (d)
since
. (e) Now suppose
. Then
so
. (f) Now suppose
and
. But
implies
so we have both
and
. Thus vacuously we have
. So now we have shown that
satisfy the properties (a) through (f). The additional property is equivalent to (c) in this case, so we have shown that
is true.
Now suppose inductively that is true. We want to show that there are sets
and
that also have properties (a) through (f), and that
. We define
and
. (a), (b) We have
and
by inductive hypothesis. (c) Also,
so
. (d) Next we have to show
. But
by inductive hypothesis, so by property (e) we have
. Also
, which means that in going from
to
, we couldn’t have removed
. So
. (e) Now suppose
. Then
so
. So if we can show that
, then
so
(because only
was removed in going from
to
). But if
then
, which would mean
, which contradicts the additional property in the inductive hypothesis. So
. (f) Now suppose
and
. We want to show that
. Since
, we have
. Now we have two cases. If
, then by inductive hypothesis we have
. On the other hand if
then
. Finally we show the additional property, that
. By definition
so
. This completes the proof that
is true, which closes the induction.
Now we show that the sets are unique. Fix
, and let
be sets such that properties (a) through (f) hold (with
in place of
and
in place of
). We want to show that
and
. We will show using induction that
iff
. The base case follows from property (c). Now suppose inductively that
iff
. We must show that
iff
. Suppose
. Either
or
. If
, then
so
, which means
, a contradiction. Thus
. Since
, we have
(for if
then we would have
by property (e)). So by inductive hypothesis,
. Since
, by property (f) we thus have
. The converse is proved in exactly the same way (we only used properties (a) through (f) regarding
, rather than their concrete definitions, so we can just relabel the sets in the above proof). This closes the induction. Since
, we can use properties (a) and (b) to see that
.
Now we use the sets to show that the functions
exist. Let
be the statement “there exists a function
such that
and
for all
”. We will show that
is true for all natural numbers
using induction. For the base case,
, we must show that there is a function
such that
and
for all
. We showed above that
so
is empty. We can define
. This defines
for all of
, and the condition that
for all
is vacuously satisfied, since
is empty.
Now suppose inductively that is true, i.e. there is a function
such that
and
for all
. We want to show that
is true, i.e. there is a function
such that
and
for all
.
We define if
and
if
. To show that this is a valid definition, we must show that every number in
is in exactly one of
or
. To show this, it suffices to show that
and
. By definition,
so
. To show that
we can show that
. By property (d),
, so by property (a)
. So the definition of
is valid.
Next we show that has the desired properties. Since
by property (c), we have
by definition of
and inductive hypothesis that
. Now we show that
for all
. So suppose
. We have
so
. We will now show that either
or
. Indeed, if
, then since
we can use property (f) to conclude that
. Thus we have two cases:
- Suppose first that
. By definition of
we have
. By inductive hypothesis,
for all
. If
, then by property (e) we would have
, which contradicts property (a). So
, which means
must be in
by property (b). If
then we would have
, which contradicts property (d). Thus
. So
. This means we can use our inductive hypothesis to conclude that
. Finally, because
, we have
by definition of
. Putting all these equalities together, we have
, which is what we wanted to show.
- Now suppose
. Then
so by definition of
we have
. We have
. (This is yet another induction proof. Actually I don’t think we need to prove this since this is the “additional property” that we already proved above. But I wrote this part before I did the earlier part, so I’ll just leave it in. For the base case,
by property (c). Now suppose inductively that
. We want to show that
. But
, and
by inductive hypothesis, so
. Since
, by property (f) we thus have
.) So by definition of
we have
. Thus
, which is what we wanted.
In either case, we have shown that the desired function exists, so this closes the induction.
Now we want to show that for each , the function
is unique. Fix
, and suppose
is a function such that
and
for all
. We will show using induction on
that
, i.e.
for all
. For the base case,
. Now suppose inductively that if
then
. We must show that if
then
. So suppose
. We have
(for if
then
by property (e), a contradiction). Thus
by inductive hypothesis. Thus
. This closes the induction.
Now that we have the functions for each natural number
, we can finally define
. We define
for each natural number
. We verify that
has the desired properties. First, we have
. Now we will use induction. Let
be the statement “
”. We will show that
is true for all
. For the base case, we must show that
. By definition of
, we have
. Now
has the property that
for all
; since
, we see that
, so for
we get
. Thus
, where the last step follows because
.
Now suppose inductively that is true, i.e.
. We must show that
is true, i.e.
. Starting from the left-hand side, by definition of
, we have
. By definition of
, we have
. Now starting from the right-hand side, we have
by definition of
. Thus if we can show that
then we will be done. We apply Lemma 2 below with
and
. Indeed,
since
. Also,
by the additional property. Thus we can apply Lemma 2, and the induction is closed.
Lemma 1. Let be natural numbers. If
then
.
Proof. We prove this by induction on . For the base case, we must show that if
then
. So suppose
. But
so this means
. So we have
as required.
Now suppose inductively that if then
. We must show that if
then
. So suppose
. Then
so
or
. If
then by induction hypothesis we have
. If
then
. So in either case, we have
. This closes the induction.
Lemma 2. Let be natural numbers such that
. Then
for all
.
Proof. We prove this by inducting on . For the base case, we have
. Now suppose inductively that if
then
. We want to show that if
then
. So suppose
. Then by Lemma 1 we have
. Thus we have
. So
, which means by inductive hypothesis we have
. Now we have
. This closes the induction.
We have shown the existence of . Our final task is to show the uniqueness of
. Let
be a function such that
and
for all
. We want to show that
, i.e.
for all
. We prove this by induction on
. For the base case, we have
. Now suppose inductively that
. We want to show that
. We have
, where the middle equality follows by the inductive hypothesis. This closes the induction.