Since school we have defined powers by two clauses:
, and . Sums
,
factorials and many sequences are defined the same way:
a starting value, and a rule that produces the next
value from the last. Logic and Proof, Chapter 4
used induction to prove facts about such objects, such
as
in Logic and Proof, Example (An inequality by induction).
But induction proves facts about a function that
already exists, and here the function
is what we want to obtain. This section proves that two
such clauses always define exactly one function on , and then uses the
theorem to define sums, products and powers properly and
to prove their first laws.
Definitions
that define something
Logic and Proof, Chapter 4 met the same
question for formulas. A recursive definition on
formulas gives a value for each atom and a rule for each
way of building a compound formula, and Logic and Proof, Theorem 4.3.4
showed that such clauses define exactly one function,
because unique readability leaves no choice of clause.
On the clauses
are simpler: one starting value at , and one rule for
passing from to
. What we want
to prove is this.
A starting value and a rule for the next value
determine exactly one sequence.
Theorem
2.3.1 (Recursion Theorem)
Let be a set,
let , and
let be a function. Then there is
exactly one function such
that
In words: is
the starting value, and is the rule that turns
the stage and the
current value
into the next value. The rule may look at as well as at : the factorial needs
this, since is at . The hypothesis that maps into is what lets the rule
be applied again at the next stage. The conclusion has
two halves: existence (some obeys the two
equations) and uniqueness (no two
different functions do).
Idea. Uniqueness is an ordinary
induction: two solutions agree at , and if they agree at
, the second
equation makes them agree at . Existence is
harder, because induction cannot produce ; it can only prove
statements. So we prove by induction a statement about
finite pieces of .
The roadmap:
① Uniqueness, by induction on .
② Claim: for every there is
exactly one function on obeying the two equations wherever
they make sense (a partial solution).
Its graph is the graph of the previous one with one pair
added.
③ Glue: collect the graphs of all
partial solutions in one set and take the union.
The partial solutions agree where they overlap, so the
union is the graph of a function on all of , and that function
obeys the equations.
Before reading on: self-explain the Claim’s
inductive step.
Proof. For , the set of Section 2.1 contains , since by Lemma 2.1.1
(a). Call a function a partial
solution up to if and for
every
with .
(For such , both
and lie in , so the
equation makes sense.)
Step 1 (uniqueness). Let both satisfy the two equations, and let be “”. holds, since . If
holds, then
so holds. By Logic and Proof, Axiom 4.2.1,
for every . The two functions have the same domain and
the same codomain, so by Proposition 1.4.1.
Step 2.
Claim. For every there is
exactly one partial solution up to .
Proof of Claim. We use Logic and Proof, Axiom 4.2.1
on .
Base case. By Lemma 2.1.1
(a), every has , so holds only for , and . The graph with codomain
is a function on
, since : the input has the one output
. It is a partial
solution up to :
its value at is
, and the second
condition is vacuous, because for
every .
Any partial solution up to has value at , so it equals this one
by Proposition 1.4.1.
Inductive step. Let , and suppose
there is exactly one partial solution up to ; call it , with graph . Let First, : a
natural number is either or less than , and then , since no natural number lies strictly
between and (Lemma 2.1.1
(e)). Also , since .
We check the clauses of Definition 1.4.1
for on
with codomain .
Every pair of lies in , because takes values in . (Fn1): an input has the output
in , and the input has the output
.
(Fn2): the pairs with first coordinate all lie in , since the added pair
has first coordinate , and satisfies (Fn2); the
only pair with first coordinate is the added one,
since the first coordinates in are at most . So is a function on , and
it agrees with
on .
It is a partial solution up to . Its value at is . Let with , so . If , then by Lemma 2.1.1
(e), and ,
because is a
partial solution. If , then by the
choice of the added pair.
It is the only one. Let be a partial solution
up to . Its
restriction (Section 1.4) is a partial solution up to
, because the
conditions on it are among the conditions on . By the induction
hypothesis it is . So for , and By Proposition 1.4.1,
. This
proves the claim.
For each , let be the partial
solution up to ,
and its graph.
If , then
, and the restriction of to is a
partial solution up to , so by the claim it is
. In terms of
graphs,
Step 3 (existence). Let a set by Definition 1.1.3
and Definition 1.2.2.
By the claim, the elements of are exactly the
graphs . Let
(Definition 1.2.4),
so a pair lies in
if and only if it lies in some ; in particular .
We check the clauses of Definition 1.4.1
for .
(Fn1): for , the pair lies in , hence in .
(Fn2): let and , say and . If , then , so
both pairs lie in , and because satisfies (Fn2). If
, the same
argument with and
exchanged gives
.
So is a function . For , the pair lies in , so . Hence
,
and for every , where the middle equation holds because is a partial
solution. This proves existence, and with Step 1, the
theorem.
The starting value was used in both halves: Step 1
needs as its base case, and Step 2 needs it
to fix the first partial solution. The set is cut out of a power
set by a condition, so no family had to be
formed before the union was taken. No choice is made
anywhere: at every stage the claim leaves exactly one
candidate. From now on, a definition of the form “, ” is legitimate whenever and is a function , and
we say that is
defined by recursion.
Starting
elsewhere, looking two steps back
Two variants come up constantly. Sequences are often
indexed from , as
in Section 1.4, and some recursions use the two previous
values. Both reduce to the theorem.
Corollary
2.3.2 (Recursion from a Base)
Let be an
integer, , a set, , and
a function. Then there is exactly one function with
and
for every .
Idea. Rename the index: turns into and the recursion on
into one on , where Theorem 2.3.1
applies.
Proof. For , the number
is an
integer (Proposition 2.1.2
(a)) and (Lemma 2.1.1
(a)), so it lies in . Conversely, for , is an integer (Proposition 2.1.2
(a)) and , so
by
Proposition 2.1.2
(b). Define by . By Theorem 2.3.1
there is exactly one with and for every .
Existence. Let , ,
and (Definition 1.4.2).
Then , and for , with ,
Uniqueness. If
also satisfies both equations, then satisfies the equations that define , so it is by the uniqueness
in Theorem 2.3.1.
Hence for every , and by Proposition 1.4.1.
The renaming is the move that gave induction from a
base (Theorem 2.2.1).
The corollary covers every sequence given by
a first term and a rule, and Analysis on the Real
Line, Chapter 1’s intervals, which are listed from
.
Corollary
2.3.3 (Two-Step Recursion)
Let be a set,
, and
a function (Definition 1.3.2);
write
for .
Then there is exactly one function with
Idea. A rule that looks two steps
back is a rule that looks one step back at
pairs. Carry the pair along:
the next pair is , and both of its entries are computed
from the current pair.
Proof. Define by . By Theorem 2.3.1
with the set and the starting value , there is exactly
one with and . Write .
The equation gives, by the
characteristic property of pairs (Definition 1.3.1),
Let . Then , , and For uniqueness, let satisfy the three
equations, and let . Then
and so by the uniqueness in Theorem 2.3.1,
and for every . By Proposition 1.4.1,
.
Sums,
products and powers
The symbols
and are
recursive definitions, and so are powers. Writing them
as instances of Theorem 2.3.1
settles what they mean at the edges: the empty sum, the
empty product and .
Definition
2.3.1 (Finite Sums and Products)
Let be a sequence of real numbers. The
sums and
products , for
, are
defined by recursion: The factorial of is . For integers and reals given for every
integer ,
In words: a sum starts at and adds one term at
each stage; a product starts at and multiplies by one
term at each stage. The sum is Theorem 2.3.1
with , and , a
function because is an index of the sequence (Lemma 2.1.1
(a), (S)); the
product is ,
. The letter is a dummy: and
are the same number. In the general form, is an integer
, hence in
(Proposition 2.1.2
(b)), and the terms , for , run through
; when it gives the first form back.
The edge cases are the point of the definition. The
empty sum is and the empty
product is :
and . These
are the only values that make the recursive clause true
at the first stage for every sequence, since should
be and
should be . So
, , , .
Three consequences are used constantly, and each is a
short check from the definition.
- Finite lists.
depends only on . Precisely: if two sequences agree at , their sums
up to agree for
every .
Induct on with
the property “if , the two sums up to are equal”. The base is
. In the step,
gives
, so the
sums up to agree,
and the added terms agree because
.
So a finite list is summed by extending it in any way, say
by
for , and
the result does not depend on the extension. The same
holds for products, and for the general bounds with
.
- Shifting the index. For every
integer , , because both sides
unfold to . Analysis on the Real Line,
Chapter 1’s estimate of uses the shift .
- Splitting off the last term. For
, . Unfold the left
side to and apply the recursive clause; its
last term is .
Definition
2.3.2 (Powers)
Let .
The powers , for , are defined by
recursion:
This is Theorem 2.3.1
with , and . So , and
. The
definition gives , in line with the empty product: ,
since both sides obey the same two clauses and so agree
by the uniqueness in Theorem 2.3.1.
Only exponents in are defined here;
roots come
in Analysis on the Real Line, Chapter 1.
A sequence that approaches . Let
and . Before writing a
recursion, check that maps into : for , is defined and
positive, so , and half of it is positive. By Theorem 2.3.1,
and
define a sequence in . Because the
check was made on , no separate induction
is needed to show before dividing by it. The first values are
and , which exceeds by . That the sequence
converges to is a question for Analysis on the Real
Line, Chapter 2, where recursively defined
sequences become objects of study.
A two-step example. By Corollary 2.3.3,
, and
define a unique sequence of reals (, ),
and its first values are . These are . To prove it,
induct on the pair statement : “ and ”.
is and . If holds, its second
half is the first half of , and where and by Definition 2.3.2
(and commutativity). So Logic and Proof, Axiom 4.2.1
gives for
every , and in
particular . The induction carries a pair because the
recursion does: the proof follows the clauses of the
definition.
Warning. A recursion needs its
starting values, and its rule must stay inside . “”
alone defines nothing: and both obey it, and Corollary 2.3.3
asks for and
. And “, ” is
not a definition by recursion: , and then would be . The rule is
not a function from any set containing into , since would have to contain
its value , where
the rule is undefined.
Quick check. Compute , and say why the answer is so
simple.
Solution. Each factor is , so the product is Each numerator cancels the next denominator:
the product telescopes. In general
, by induction on : the empty product is
, and
.
Recursion,
then induction
A function defined by recursion is studied by
induction, and the induction follows the clauses of the
definition: the base case uses the starting value, the
step uses the rule. The laws of powers are the first
example.
Proposition
2.3.4 (Laws of Powers)
Let
and .
- (a) .
- (b) .
- (c) .
- (d) If , then ; if , then .
- (e) If , then . If and , then .
Idea. Each part is an induction on
from , with fixed. The base case is
in some
form, and the step peels one factor off with and
applies the induction hypothesis to . For the second half
of (e), write with and use (a).
Proof.
(a) Fix and induct on . For : . Suppose . Since
(Lemma 2.1.1
(b)), Definition 2.3.2
applies at ,
and where the third equation is the induction
hypothesis and the last is Definition 2.3.2.
By Logic and Proof, Axiom 4.2.1,
(a) holds for every .
(b) Fix . For : . If , then , using (a) with
the exponents (Lemma 2.1.1
(b)).
(c) . If , then .
(d) lies in
by (( )0) and
(S), and . If
and
, then
by Proposition 2.1.2
(a). For
the same induction works with Lemma 2.1.1
(b) in place of Proposition 2.1.2.
(e) Let . Then , and if
, then
as a product of positive numbers. Now let
. First,
for
every integer (such
lies in by Proposition 2.1.2
(b), so is
defined), by Theorem 2.2.1
with base : , and if
, then
, multiplying by . Let . Then
by Lemma 2.1.1
(d), and ,
so by Lemma 2.1.1
(a). By (a), , multiplying by .
Some instances that earlier chapters used on trust:
is
(b) with ;
is (a); is strictly increasing on by (e); and an
integer power of an integer is an integer by (d). For
: by (b),
, where by the induction ;
and . Every is with and (Theorem 2.2.3
with divisor , and
Proposition 2.1.2
(c) for ),
and : if
, then
(Proposition 2.1.2
(c)), so , contradicting (Lemma 2.1.1
(a)). So
by Proposition 2.1.2
(b), is or , and is for even and for odd .
The next two formulas are proved the same way; each
is a recursion (the sum) followed by an induction whose
step splits off the last term.
Proposition
2.3.5 (Sum of the First Natural Numbers)
For every , .
Proof. For , both sides are
: the left by the
empty sum, the right since . If the formula holds for , then by Definition 2.3.1
which is the formula for . By Logic and Proof, Axiom 4.2.1
it holds for every .
Proposition
2.3.6 (Geometric Sum)
Let
with . For
every ,
Proof. The terms are defined: for
, by Lemma 2.1.1
(c), so is
given by Definition 2.3.2,
and the term added at stage is . The
right side is defined because . For , both sides are
, since . If the formula
holds for , then,
by Definition 2.3.1
and the induction hypothesis, where by Definition 2.3.2.
By Logic and Proof, Axiom 4.2.1
the formula holds for every .
For the
sum is , since
every term is ;
that is the case the hypothesis excludes, where the
right side would divide by .
The next inequality is the most used estimate of a
power in analysis. Its proof shows a hypothesis doing
exactly one job.
Theorem
2.3.7 (Bernoulli’s Inequality)
Let
with . Then
for every .
Idea. Induct on . To pass from to , multiply the
induction hypothesis by ; the product is at least
,
because the extra term is non-negative.
Multiplying an inequality by keeps its direction
only if , and that is what says.
Proof. For : . Suppose . Since , we have , and
multiplying the induction hypothesis by gives where the first equation is Definition 2.3.2
and the last step uses , true because (Lemma 2.1.1
(a)) and .
By Logic and Proof, Axiom 4.2.1
the inequality holds for every .
The hypothesis appears in the proof once, in the sentence
“since , we
have ”,
and it cannot simply be dropped: for and , ,
while ,
and .
Exercise C2 below shows that the statement can survive
at some
even though the proof does not.
The last result of this subsection is not about a
recursive definition, but its induction runs over lists,
and it is the fact Analysis on the Real Line,
Chapter 1 needs about finite sets. A
maximum of a set is an
element
with for
every ; a
minimum is an element with for every . For reals , we write
.
Proposition
2.3.8 (Finite Sets Have a Maximum)
For every integer and all reals , the set
has a maximum and a minimum.
Idea. Add the elements one at a
time. The maximum of the longer list is the old maximum
or the new element, whichever is larger, and comparing
the two is all the step needs.
Proof. Let be “for all reals
,
the set has a maximum”. We prove for every by Theorem 2.2.1
with base .
Base case. has the maximum
.
Inductive step. Let , suppose , and let be
reals. Since (Lemma 2.1.1
(e), as in the proof of Theorem 2.3.1),
the set is , where
. By , applied to the list
,
the set has a
maximum . By
trichotomy, or .
Case 1: . Then , and every element of is an element , with , or is . So is a maximum of .
Case 2: . Then , and every
satisfies
. So is a maximum of
.
In both cases holds. By Theorem 2.2.1,
holds for
every .
For the minimum, apply the result to : if
is a maximum
of , then , that is , for every
, so is a minimum of .
The base is ,
not : for the set is , which has
neither a maximum nor a minimum, since both must be
elements. The proof used only order properties of : any two elements are
comparable (trichotomy), is reflexive and
transitive, and reverses . All of these hold in
any ordered field, so the proof works word for word
there; that is the setting in which Analysis on the
Real Line, Chapter 1 uses it. Passing from a finite
set to a list that
enumerates it is what “finite” will mean in Chapter
3.
When the
claim is too weak to carry its step
Sometimes the statement we want is true, but it
cannot be proved by induction as it stands: its
inductive step does not go through. The cure looks
paradoxical. We prove more.
Example
(Proving more to prove anything)
Prove that for every integer .
Solution. The direct attempt
fails. Let , so by Definition 2.3.1.
The base holds. For the step, all we may assume is
, and
that is too little: it allows , and then . The values of
never come so
close to , but the
induction hypothesis cannot know that.
Prove more. We prove : “” for
every , by
Theorem 2.2.1
with base . It
implies the claim, since .
Base case. .
Inductive step. Let and suppose . Then
It remains to show , that is, . Both
denominators are positive, and
because
and ;
so the inequality holds. Hence , which is .
By Theorem 2.2.1,
for every .
The stronger statement carries its own step because
its hypothesis says how far below the sum is, and that
margin pays for the next term. When a step fails, ask
what the hypothesis would need to say, and prove that
instead. Exercise C3 below uses it twice over, proving
two identities together because neither carries its own
one-step induction.
Exercises
A. Check your
understanding
Exercise
(A1)
These questions are about the proof of Theorem 2.3.1.
- (a) Why does
uniqueness need only an induction, while existence needs
the claim about partial solutions?
- (b) In Step 3, which
property of the graphs makes satisfy
(Fn2), and which part of the proof supplies it?
- (c) Run the
construction for ,
and : write the graphs , , . Which familiar
function is ?
- (d) State the idea
of the proof in two sentences.
- (e) Write and
as instances of
Theorem 2.3.1:
name , and for each.
Solution.
(a) Uniqueness is
a statement about two functions that are
given: it compares their values, and
comparing values at through the values at is an induction.
Existence asks for a function that is not given.
Induction proves statements and does not build objects,
so the proof proves a statement (the claim) whose
content is that the finite pieces exist and are unique,
and then builds
from them as a union.
(b) The graphs
agree where they overlap: for
, more
precisely . This comes from the
uniqueness half of the claim: the
restriction of
to
is a partial solution up to , so it is . With it, two pairs
and
lie in the larger graph, whose (Fn2) gives . So it
verifies (Fn2) of Definition 1.4.1
for .
(c) . Then
, so . Then ,
so . The function is : by Definition 2.3.1,
and , so satisfies both equations, and by the
uniqueness in Theorem 2.3.1
it is .
(d) For each
, induction shows
that there is exactly one function on obeying
the equations, and these pieces extend one another.
Their union is the required function, and an induction
on shows there is
no other.
(e) The sum:
, , .
The factorial: (or ), , , as in
(c).
B. Practice
Exercise
(B1: Sum of cubes)
Prove that for
every .
Solution. For , both sides are
(the empty sum,
and ).
Suppose the formula holds for . By Definition 2.3.1
and the induction hypothesis, which is the formula for . By Logic and Proof, Axiom 4.2.1
the formula holds for every . (Compare Proposition 2.3.5:
the sum of the first cubes is the square of
the sum of the first numbers.)
Solution. Let be “”; we use Theorem 2.2.1
with .
Base case. .
Inductive step. Let and suppose . Then by Definition 2.3.2
and the hypothesis. Moreover ,
because , and
for . Hence
.
By Theorem 2.2.1,
for
every .
The base cannot be , because is false: . The
step is valid from on, since for , but it is
useless at , where
its hypothesis is false. At the step fails
(), which is why the true does not lead to
.
Exercise
(B3: A closed form)
The sequence , is defined by Theorem 2.3.1.
Compute its first five values, guess a formula for , and prove it.
Solution. The values are : one less
than . We prove for every . For : . If , then using (Definition 2.3.2).
By Logic and Proof, Axiom 4.2.1,
for
every .
The induction follows the two clauses of the definition:
the base case is the starting value, the step is the
rule.
C. Going deeper
Exercise
(C1: Powers of two)
Prove that every can be written as with and odd (that is, for an integer
). Below, the
proof is started; the second half is blank. Name the
move, then complete it.
Suppose not. Then the set of that
cannot be written in this form is non-empty, and ; let
be its least
element. Then , and
is not odd, since otherwise would be of the
required form.
Why is the statement made for only?
Solution. The move is the
smallest counterexample of Section 2.2:
suppose the claim fails, take the least failure by
well-ordering (Theorem 2.1.3),
and produce a smaller failure.
Completion. By Theorem 2.2.3
with divisor ,
every integer is even or odd; is not odd, so for an
integer .
Since ,
, so (Proposition 2.1.2
(b)), and . As is the least element of
, , so with and odd. Then by Definition 2.3.2,
and
by (S). So has the required form,
contradicting . Hence , and every is
with odd.
The restriction to is needed: forces , since (Proposition 2.3.4
(e)), and is even, not odd (Theorem 2.2.3:
not both). So is
a genuine counterexample, and in the proof it is
excluded by taking , which is what makes .
Marking scheme. (10 points) - 2:
names the move (smallest counterexample) and says that
the least element
exists by well-ordering (Theorem 2.1.3).
- 2: from “ is not
odd” concludes with , citing even-or-odd. - 3: shows
and ,
so .
- 2: writes with and reaches the contradiction. - 1:
explains why
is excluded. Fatal errors (0 for the step): concluding
(or
applying the induction hypothesis to ) without having
shown both and ; missing either one is fatal. A reader who
restarts by Theorem 2.2.2
with base earns
the points for the other steps (the induction hypothesis
at replaces
“”),
but not the 2 points for naming the move.
Exercise
(C2: Bernoulli beyond its hypothesis)
- (a) Show that
holds for
and every .
- (b) Say which line
of the proof of Theorem 2.3.7
fails at ,
and why the statement survives anyway.
- (c) At , find the first
where the
inequality fails, and the first where the step “” fails.
Solution.
(a) At the claim is . By the
remark after Proposition 2.3.4,
is or . For the claim reads
. For , .
(b) The line
“multiplying the induction hypothesis by ” fails. At the multiplier is
,
and multiplying by a negative number
reverses it: we get , the wrong direction. The rest of the proof
() still
holds. The statement survives because (a) proves it by a
different argument, which uses the special values . A proof
that fails does not make its conclusion false.
(c) At : gives ; gives ; gives ; gives , false. So
the first failure is . The step holds for and (both sides are
true) and fails at , where is true and false.
Exercise
(C3: Two identities at once)
Use Corollary 2.3.3
to define the sequence , , ; name , , and . Then prove, for every
, the
statement :
Check , and numerically
first.
Solution (Hint 1). Neither identity
carries its own one-step inductive step: passing from
to needs , which is the
other identity. Prove both together, and use
to merge terms.
Solution (Hint 2). In the step,
start with and substitute both halves
of .
Solution. The definition.
Corollary 2.3.3
with , , and gives
exactly one sequence with , and .
Its first values are .
Small cases. : and
. :
and . :
and .
Proof. We use Logic and Proof, Axiom 4.2.1.
was checked.
Suppose . Using
the recursion and then both halves of , where the last two lines use
twice. This is the first half of . For the second
half, using the first half of just proved, the
second half of , ,
and finally . So holds, and by Logic and Proof, Axiom 4.2.1
holds for
every .
The second identity is written with rather than in
the form , so that both identities
make sense on all of and no is needed. The two
identities hold together, and together they carry a
one-step induction that neither carries alone: this is
“prove more” (Example (Proving more to prove anything))
in the form of a pair, as in the two-step example after
Definition 2.3.2.
(A two-step induction can prove the first identity
alone; see the marking scheme.)
Marking scheme. (10 points) - 2:
defines the sequence by Corollary 2.3.3,
naming , , and . - 1: checks the base
case , both
halves. - 3: proves the first identity at (or for all ): . - 3: proves the second identity at
(or for all
): . - 1: concludes by induction (one-step
or two-step), with a hypothesis that covers every value
the step uses. Alternative route: 3 for proving alone by a two-step induction (via
for and the matching recursion for , with
both bases
checked), and 3 for deriving the second identity as
. Fatal errors (0 for the step):
inducting on one identity alone while using the other at
unproved; using
the identities at to prove themselves.