The set
now has a zero, a successor map and an induction
theorem, and Theorem 1.4.2
shows that together they satisfy Peano’s axioms. It has
no addition yet. In Sets, Relations, and
Cardinality, Chapter 2 the sum of two natural
numbers came for free, from the real numbers; in a natural number
is a set, and nothing we know about sets adds two of
them. This section defines addition and multiplication
by recursion, as school does (“ is one more
than ”), after
first proving, from the axioms, that recursion defines
something. Then it proves the laws of arithmetic one by
one, most of them by an induction.
Recursion
on ω
Sets, Relations, and Cardinality, Section
2.3 proved Sets, Relations, and Cardinality, Theorem 2.3.1:
a starting value and a rule for the next value determine
exactly one function on . That proof ran
inside the familiar real numbers, where is given. Its
ingredients, though, were few: induction, and some facts
about the sets on which the partial solutions live. On
there is a
natural replacement for , namely the set itself. (The next section proves that
is
exactly the set of with ; here we need no order, only as a set.)
So the proof can be repeated on , with one change,
which we point out when we reach it.
A starting value and a rule for the next value
determine exactly one function on .
Theorem
1.5.1 (Recursion Theorem on )
Let be a set,
let , and
let be a function. Then there is
exactly one function
such that
This is the statement of Sets, Relations, and Cardinality, Theorem 2.3.1
word for word, with in place of and in place of
. The set
exists by Proposition 1.2.2.
As before, is the
starting value and turns the stage and the current value
into the next value; the conclusion has an existence
half and a uniqueness half.
Idea. Uniqueness is an induction.
For existence, induction cannot build , so we prove by
induction that the finite pieces of exist and are unique,
and then glue them. The roadmap is that of Sets,
Relations, and Cardinality, Section 2.3:
① Uniqueness, by Theorem 1.3.3.
② Partial solutions. A partial
solution up to is
a function on obeying the
two equations wherever they make sense. A restriction of
a partial solution is again one.
③ Claim: for every there is exactly one
partial solution up to ; the next one adds a
single pair at the new input .
④ Glue: the union of all their
graphs is the graph of .
The glue step of Sets, Relations, and
Cardinality, Section 2.3 compared two indices: if
, the piece
up to lies inside
the piece up to .
We have no order on yet, so at each
point where both
pieces are defined we cut both down to : by ② and
③, each restriction is the unique partial solution up to
.
Before reading on: where is used?
Proof. Step 0 (facts about
).
Let . Each of , is an
element of
by (P2) of Theorem 1.4.2.
We use five facts.
- (i) , by
Lemma 1.4.1
(e), since by (P3) of Theorem 1.4.2.
- (ii) If , then : we
have , and because is a
transitive set (Lemma 1.4.1
(a), Definition 1.4.1).
- (iii) If , then
: because is
transitive, and , so .
- (iv) , by Lemma 1.4.1
(c) applied to .
- (v) The elements of
are the
elements of and itself (Definition 1.3.1).
Every element of lies in
, by Lemma 1.4.1
(b).
Step 1 (uniqueness). Let both satisfy the two equations, and let be “”. holds, since . If
holds, then
so holds.
By Theorem 1.3.3
(b), holds for
every .
The two functions have the same domain and codomain, so
by Sets, Relations, and Cardinality, Proposition 1.4.1.
Step 2 (partial solutions and their
restrictions). For , a
partial solution up to is a function
with and for every with . The equations make sense: by
(i), and for such , also by
(ii).
Claim. If is a partial solution
up to and , then
the restriction is a
partial solution up to .
Proof of Claim. Here by (v), and
by (iii), so the restriction
(Sets, Relations, and Cardinality, Section 1.4)
is a function with the same values as . Its value at is , since by
(i). Let with . Then , because , and by
(ii). So the equation at is one of
the equations of ,
and both of its sides are values at points of :
Step 3.
Claim. For every there is
exactly one partial solution up to .
Proof of Claim. We use Theorem 1.3.3
(b) on .
Base case. . The graph with codomain
is a function on
, since . It is a partial
solution up to :
its value at is
, and the second
condition is vacuous, because
would mean , which (P3) of Theorem 1.4.2
excludes. Any partial solution up to has the value at , so it equals this one
by Sets, Relations, and Cardinality, Proposition 1.4.1.
Inductive step. Let , and suppose
there is exactly one partial solution up to ; call it , with graph . Since , the value is defined. Let
We check Sets, Relations, and Cardinality, Definition 1.4.1
for on
with codomain . By
(v) and because
takes values in ,
every pair of lies in . (Fn1): by (v), an input is an element of
,
which has an output in , or is , which has
the added output. (Fn2): every first coordinate in lies in , while
by (iv). So the added pair is the
only pair of
with first coordinate , and for an
input in all pairs
of lie in
, which
satisfies (Fn2). Hence is a function that agrees with on .
It is a partial solution up to . Its value
at is , since . Let
with
. By (v), there are
two cases.
Case 1: . Then by
(ii), and since
is a partial solution,
Case 2: . Then by (P4) of Theorem 1.4.2,
so the equation at the new input asks for and for
nothing else; and by the choice of the
added pair.
It is the only one. Let be a partial solution
up to . Since
by (v), the claim of
Step 2 (with and ) makes a
partial solution up to , so it is by the induction
hypothesis. Thus for every , and,
by the equation of at , By (v) these are all the inputs, so by Sets, Relations, and Cardinality, Proposition 1.4.1.
This proves the claim.
For each , let be the partial
solution up to ,
and its graph.
One consequence of the two claims is used below. If
, then is a
partial solution up to (Step 2), hence equals
(Step 3), and
since ,
Step 4 (glue). Each is a subset of (by (v)). Let a set by (Z5) and (Z6) of Axiom 1.1.1.
By Step 3, the elements of are exactly the
graphs . Let
, a set by (Z4); a pair lies in if and only if it lies
in some , and
. We check Sets, Relations, and Cardinality, Definition 1.4.1
for .
(Fn1): for , the pair lies in , hence in
.
(Fn2): let and , say and . Then lies in the domains of
both, and , and by , No comparison of with was needed: both pieces
were cut down to , where each
is the unique partial solution up to .
So is a function . If , then
, so . Hence
.
For ,
both and lie in
by (v), and is a
partial solution up to , so This proves existence, and with Step 1, the
theorem.
The proof is that of Sets, Relations, and
Cardinality, Section 2.3 with replaced
by ,
and with one departure, in (Fn2) of Step 4. There,
Sets, Relations, and Cardinality, Section 2.3
used that two indices satisfy or , and that when . On those are facts
about order, which the next section proves. Cutting both
pieces down to avoids the
comparison altogether, so the recursion theorem does not
have to wait for the order. In Step 3, (P4) did a quiet
job: the new input is the
successor of and
of nothing else, so the added pair had to satisfy
exactly one equation.
As in Sets, Relations, and Cardinality,
Section 2.3, no choice is made: each partial solution is
the only one, and is cut out of a power
set by a condition, so no family had to be
formed first. From now on a definition “, ” on is legitimate
whenever
and is a function, and is defined by
recursion.
Warning. The hypothesis that takes its values in
cannot be
dropped. Let , , and for , , so that maps into
but not into
. Any
with the two equations would need , and
since by (P3) of Theorem 1.4.2;
so no such
exists. The proof breaks in Step 3, where the added pair
must lie in .
Addition
and multiplication
With the theorem, addition is the old school
definition made official. To add to , start at and take successor steps: is , and is one
step further than . Multiplication is repeated addition in the
same way.
Adding to
is taking successor steps from
.
Definition
1.5.1 (Addition and Multiplication on )
- (a) For each , let be the function given by Theorem 1.5.1
with ,
and .
The sum of and is .
Thus, for all ,
- (b) For each , let be the function given by Theorem 1.5.1
with ,
and . The
product of and is , also written . Thus, for all ,
- (c) The
numerals are and
, , , and so on, as in Example (The first natural numbers as sets).
For every , ; in particular and for
every .
In words: (a) and (b) are the two clauses we would
write for a school definition, and the theorem
guarantees that they define exactly one function , respectively , for each . Multiplication binds
more tightly than addition, so is .
Well-definedness. Three things need
checking. First, each is a function (the remark above):
for by
(P2) of Theorem 1.4.2,
and because maps into . So (b) uses (a),
and (a) uses nothing but the successor. Second, is a function : its graph is the set of such that for some
function with and for every ; this is a
set by (Z6) of Axiom 1.1.1,
and each
gets exactly one
because exists
and is unique. The same holds for . Third, nothing was
chosen: each
and is the only
function with its property.
The successor is “plus one”. Proof
of the last sentence of (c): for every , by (c) and the two equations of (a). From now
on we write
for
whenever ; the defining equations then read as in
school: Two small computations are used repeatedly
later: , and, for every ,
A non-example by minimal change: keep in (a), but replace
by ,
which ignores the current value. This is still a function
, so Theorem 1.5.1
gives exactly one with and . The first equation still holds for
this “sum”, but the second, , fails: with , , while . So it would give , and it is not
addition.
The defining equations immediately give the two Peano
facts in the “plus one” notation.
Corollary
1.5.2 (Successor Cancellation)
For all : if , then ; and .
Quick check. Compute and from the
defining equations alone.
Solution. By (a) of Definition 1.5.1,
three times, By (b), twice and then at , and . So .
The laws of
arithmetic
Every law of arithmetic that Sets, Relations, and
Cardinality, Chapter 2 took from the real numbers
must now be proved, and the only tools are the four
defining equations and induction. The equations are
lopsided: they say what happens when the
second argument goes up by one, and
nothing about the first. So in every induction below we
fix all variables but one and induct on the variable
that the recursion runs on, the second argument of or .
Theorem
1.5.3 (Laws of Arithmetic on )
For all :
- (a) , and ;
- (b) ;
- (c) ;
- (d) and
;
- (e) , ,
and ;
- (f) ;
- (g) .
Idea. The move is fix the
others, induct on the recursion variable: in
and the recursion
runs on , so we
fix (and ) and induct on . Then the base case is
a defining equation at , and the step can open
or
by
the other defining equation, apply the induction
hypothesis inside, and close up again. The order of the
clauses matters: commutativity (b) needs the two facts
(a) about the first argument, which no
defining equation provides.
Proof. Each clause except the
second half of (d) and the last part of (e), which the
table derives from earlier clauses without induction, is
proved by Theorem 1.3.3
(b), applied to the property of stated in the clause,
with the other variables fixed; for the first half of
(d) the variable is , the recursion variable
of . “Def”
refers to the equations of Definition 1.5.1,
“IH” to the induction hypothesis.
We prove (c), associativity of addition, in full. Fix
,
and let be
“”. Base case: by the first equation
of (a) of Definition 1.5.1,
applied twice, Inductive step: suppose . Then where the first equality is Def with first
argument , the
second is , the
third is Def with first argument and second argument
, and the
fourth is Def with first argument . So holds, and by Theorem 1.3.3
(b), holds for
every .
The other clauses follow the same pattern; the table
gives, for each, the property inducted on, the base
case, the step, and the earlier clauses used. They are
proved in the order of the table, so each row uses only
rows above it.
| (a) ;
on |
(Def) |
|
Def |
| (a) ;
fixed, on |
both sides are (Def) |
|
Def |
| (b) ;
fixed, on |
|
|
Def; (a), both halves |
| (c) |
in full above |
|
Def |
| (d) ;
fixed, on |
|
|
Def; (c) |
| (e) ; on |
(Def) |
|
Def |
| (e) ;
fixed, on |
|
|
Def; (b), (c) |
| (e) , ; no induction |
|
; |
Def; (a); first two parts of (e) |
| (f) ;
fixed, on |
|
|
Def; (e) |
| (d), second half; no induction |
|
|
(d), first half; (f) |
| (g) ; fixed, on |
|
|
Def; (d) |
In the step of (a), second half, the third equality
is (Def), read inside the outer ; in the step of (b),
the last equality is (a), second half, read from right
to left. In the long step of (e), the equalities after
IH use, in order, (c), Def, (b), Def, (c), Def. In the
second half of (e), is the first half of (a), and is the second part of (e) with . In (g), is
the first half of (d). This proves the theorem.
The laws (a)–(g) are the rules of school arithmetic
for and on the natural
numbers, now proved from the seven axioms for sets. The
next section defines the order of and ties it to
them:
exactly when for some .
Warning. Do not assume
.
It is clause (a) of Theorem 1.5.3,
proved by induction; the defining equation is . For the same
reason, inducting on in gets stuck:
the step would need , and the definition says nothing about a
sum whose first argument is a successor
until (a) is proved.
The order of the table is forced by the lopsided
definition. Commutativity, which lets us move a
successor from the second place to the first, comes only
after the two facts in (a) that move it by hand; once it
is available, (e) and (f) follow the same way for
multiplication.
Exercises
A. Check your
understanding
Exercise
(A1)
These questions are about the proof of Theorem 1.5.1.
- (a) Where in the
proof is used, and what would fail
without it?
- (b) Run the
construction for , and : write the graphs of
the partial solutions up to , and .
- (c) Why does the
uniqueness half need only an induction, while existence
needs partial solutions?
- (d) State the idea
of the proof in two sentences.
Solution.
(a) In the
inductive step of Step 3, in checking (Fn2) for the
extended graph . The added pair
has first coordinate , and every
first coordinate in lies in ; because
, the input is new, so
adding the pair cannot give an old input a second
output. If were an
element of , then would already contain
a pair , and would contain both
it and , so might fail to be a
function.
(b) Here adds two steps. The
partial solution up to has graph . The next adds
the pair at with value : the graph
up to is . The
next adds the pair at with value : the graph up to
is . Each graph contains the previous one, as
Step 3 says.
(c) Uniqueness
compares two functions that are given,
value by value, and comparing values at through the values
at is exactly an
induction on .
Existence asks for a function that is not given;
induction proves statements and builds nothing. So the
proof proves by induction a statement (the claim of Step
3) about finite pieces, and builds from them as a union,
using (Z4).
(d) For each
, induction shows
that there is exactly one function on obeying the
equations, and any two of these agree at every point
where both are
defined, because on each
restricts to the unique one up to . Their union is the
required function, and an induction shows there is no
other.
B. Practice
Exercise
(B1: Small products)
Compute and from the defining equations of Definition 1.5.1
alone, without using Theorem 1.5.3.
Here and .
Solution. For , by (b) twice
and then at :
By (a), . Then
So .
For ,
by (b), , and by the Quick check above. Then So , as (f) of Theorem 1.5.3
predicts; but the two computations took different
routes, and neither used a law.
Exercise
(B2: Distributivity, last step blank)
Here is the proof of for all , with
the last step left blank. Name the move, then
complete it.
Fix and induct on . Base case: . Inductive step: suppose . Then
Justify each equality you add.
Solution. The move is fix
the others, induct on the recursion variable:
in the
recursion of runs
on , so and are fixed and the
induction is on .
The completion is where the first equality is associativity, (c)
of Theorem 1.5.3,
and the second is the defining equation of Definition 1.5.1
(b), read from right to left. This is the statement for
, so by Theorem 1.3.3
(b) it holds for every . (This is clause (d) of Theorem 1.5.3,
already proved; the exercise practices the move.)
C. Going deeper
Exercise
(C1: Exit check: addition is commutative)
From the two defining equations of addition, and , and Theorem 1.3.3
alone, prove that for all . Prove every auxiliary fact you
need.
Solution (Hint 1). The definition
says what happens when the second argument is or a successor. To use
it on , you
need to know the same for the first argument: prove two
lemmas first.
Solution (Hint 2). The lemmas are
and , each by induction on .
Solution. All inductions are by Theorem 1.3.3
(b).
Lemma 1: for every . Induct on . Base: , by the first
equation. Step: if , then , by the second equation
and the hypothesis.
Lemma 2: for all . Fix and induct on . Base: , by the first equation twice. Step: if , then by the second equation, the hypothesis, and
the second equation read from right to left inside the
outer .
Main induction. Fix and induct on for “”. Base:
,
by the first equation and Lemma 1. Step: if , then by the second equation, the hypothesis, and
Lemma 2 (with in
the role of and
in the role of
), read from right
to left. Hence for all .
Marking scheme. (10 points) - 2:
proves by
induction on ,
from the first equation (base) and the second (step). -
3: proves, by an induction with the other variable
fixed, a lemma that moves a successor out of the first
argument (the book’s , or together
with associativity of addition), base and step both
justified. - 2: in the main induction, the base case
,
using the first lemma. - 2: in the main induction, the
step, using the second equation, the hypothesis and that
lemma. - 1: names the variable inducted on in each
induction and fixes the other. Fatal errors (0 for the
step): citing commutativity, or any law of Theorem 1.5.3,
without proving it from the two equations; treating
as if it
were a defining equation. A second route inducts on
in the main
induction with
fixed; it needs the same two lemmas, and its base and
step map to the same 2 + 2 points. A third route proves
associativity and (each by induction on , from the equations and
) and then
closes the step as ; those two lemmas together
earn the 3 points.
Exercise
(C2: Associativity of multiplication, last half
blank)
Prove that for all . The first half is given; name
the move, then complete it.
Fix and induct on . Base case: . Inductive step:
You may use (a)–(f) of Theorem 1.5.3.
Solution. The move is fix
the others, induct on the recursion variable:
in and the variable is the second argument
of the outer and the inner product, where the recursion
runs, so and
are fixed.
Inductive step. Suppose . Then where the first equality is the defining
equation of Definition 1.5.1
(b) with first factor , the second is the
induction hypothesis, the third is (d) of Theorem 1.5.3
read from right to left ( with , ), and the fourth is
the defining equation with first factor . By Theorem 1.3.3
(b),
for every , and
were
arbitrary.
The base case used the defining equation three
times, with ,
and . Commutativity (f)
is not needed for this route; a proof that first
rewrites as
would need
it.
Exercise
(C3: Doubling)
Show that there is exactly one function with and for every , and prove
that
for every .
Solution. Existence and
uniqueness. The function , , maps into by (P2) of Theorem 1.4.2
applied twice. By Theorem 1.5.1
with and
, there is
exactly one with and . (Its partial solutions up to are those of Exercise (A1)
(b), so
and .)
The formula. Induct on by Theorem 1.3.3
(b) for “”. Base: , by the defining equation . Step: suppose
. Then
where the first equality is the defining
equation of Definition 1.5.1
(a), the second is (a) of Theorem 1.5.3,
with , the third is the hypothesis, and the last is
the equation of .
Hence
for every .
Alternatively, satisfies the two equations that
define (the
computation above, read without the hypothesis, shows
), so it is by the uniqueness half
of Theorem 1.5.1.
Either way the double is
too: by (f), the defining
equation of ,
and (e) of Theorem 1.5.3.