Logic for Computer Scientists/Induction
From Wikibooks, the open-content textbooks collection
[edit] Induction
Induction plays a crucial role at least in two aspect throughout this book. Firstly, it is one of main proof principles in mathematics and of course in logics. In particular it can be used to investigate properties of infinite sets. Very often it is used as natural induction, namely over the natural numbers. We will introduce it as a more general principle over well founded partial orders, which is called structural induction. The second aspect is, that it can be used as well to define infinite structures, as the set of well formed formulae in a particular logic or the set of binary trees.
We start with a very general structure over arbitrary sets, namely partial orders. A relation R over A is a partial order iff R is reflexive, transitive and anti-symmetric (i.e.
) . Partial ordered sets (p.o. sets) A are usually written as
.
[edit] Definition 1
The necessary structure for our induction principle is a partial order, such that there exist minimal elements. Given a p.o. set
, we define:
- x < y iff
and
.
is called well-founded iff there is no infinite sequence
and
.
is called a chain iff
or 
is a total ordering iff A is a chain.
[edit] Lemma 1
is well-founded, iff every non-empty subset of A has a minimal Element. Proof can be done by contradiction and will be given as an exercise.
We finally have the machinery to introduce the principle of complete induction:
[edit] Definition 2 (Complete (structural) induction)
Given a well-founded p.o. set
and a predicate P, i.e.
. The principle of induction is given by the following (second order) formula

[edit] Lemma 2
The induction principle holds for every well-founded set.
Proof: The proof is given by contradiction: Assume the principle is wrong; i.e. the implication is wrong, which means, that we have to assume the premise as true:

and the conclusion as wrong:

Hence we can assume that the set
is not empty.
Since X is a subset of a well-founded set, it has a minimal element, say b. From assumption (premise) we conclude

Now we can distinguish two cases:
- b is minimal in A: Hence there is no
, such that y < b. Hence the premise
of the implication in (inst) is true, which implies that the conclusion P(b) is true. This is a contradiction to the assumption that
! - b is not minimal in A:
holds and it must be that P(y) is true, because otherwise it would be that
and b not minimal in X. Hence, again the premise
of the implication in (inst) is true, which implies that the conclusion P(b) is true. This is a contradiction to the assumption that
!
[edit] An Example
In this subsection we will carry out a proof with induction in detail. For this we need the extension of p.O. sets:
[edit] Definition 3 (Lexicographic Ordering)
A p.O. set
induces an ordering
over
:
iff
and
or
or
and 
[edit] Lemma 3
If
is a well-founded set, then
is well-founded as well.
[edit] Theorem 1
The Ackermann-function ACK defined by the following recursion is a total function over 
ACK(x,y) =
if x=0 then y+1 else
if y=0 then ACK(x-1,1)
else ACK(x-1,ACK(x, y-1))
Proof: For the induction start we take the minimal element (0,0) of the well-founded set,
, where
is the lexicographic ordering induced by
. Hence, assume x = 0,y = 0. By definition of
ACK, we conclude ACK(0,0) = 1 and hence defined. Assume for an an arbitrary (m,n), that
, if 
We distinguish the following cases:
- m = 0: i.e. ACK(0,n) = n + 1 and hence defined.
and n = 0: We know that
and
. From the induction hypothesis we know that ACK(m − 1,1) is defined, and hence ACK(m,0) = ACK(m − 1,1) as well.
and
: According to the definition of ACK we have two cases to consider:
and
: From the induction hypothesis we conclude immediately that ACK(m,n − 1) is defined.
and
: Independent from the values of x and y. If we assume
y'ACK(m,n − 1) and z = n, we again can conclude from the hypothesis, that ACK(m − 1,ACK(m,n − 1)) is defined and hence ACK(m,n) as well
Altogether we proved, that ACK(x,y) is defined for all
.
[edit] Problems
[edit] Problem 1 (Induction)
Prove the following lemma: If
is well founded also
.
Note: The lexicographical Order
is defined as follows:

[edit] Problem 2 (Induction)
How many points of intersection could n straight lines have at most? Find a recursive and explicit formula and show
[edit] Problem 3 (Induction)
Prove that a number x is even if and only if x2 is even.
[edit] Problem 4 (Induction)
Point by an indirect proof that there is not any greatest prime number!
[edit] Problem 5 (Induction)
Which prerequisite do you need that the following order
is
- partial ordered
- total ordered
- well-founded?
[edit] Problem 6 (Induction)
An example of a well founded set is the power set P(M) over a finite set M which is comparable over the relation of the subset
. If
then is e.g.
but
and
are not comparable. Give a definition of a relation B in this way that
is total ordered and well founded.
[edit] Problem 7 (Induction)
Examine which of the following partial order are total and which are well founded!
with
is the power set for natural numbers.
with | marks the relation "`is factor of"'.
with
iff m < m' or (m = m' and
).
with
is the lexicographical .- for
, i.e. 
[edit] Problem 8 (Induction)
Give for the natural numbers
an order relation, that is
- both well-founded and total,
- total but not well-founded,
- well-founded but not total and
- neither well-founded nor total.
[edit] Problem 9 (Induction)
Prove, that a partial order
is well-founded iff every non-empty partial set of A (at least) contains a minimum element.
[edit] Problem 10 (Induction)
A root tree consists (a) of a single node or (b) of a node - that's the root of the tree - and at least one, but only at most finite many (part)trees, this one is bandaged over an edge with the root. Point formally by means of induction, that in every tree the number of the nodes n around 1 is taller than the number of the edges e, i.e. e = n − 1.
[edit] Problem 11 (Induction)
Prove: If ε is a quality of the natural numbers
and it is valid
- ε(0) and
: [ε(n)
ε(n+1)].
then
: ε(n) is valid.
Note: The proof can be done by the fact that the principle of the complete induction in
(which should be proved) can be reduced to the principle of the transfinite induction for well founded orders.