| A(0,n) | = | n+1 | |
| A(m,0) | = | A(m−1, 1) | (m>0) |
| A(m,n) | = | A(m−1, A(m,n−1)) | (m,n>0) |
Here we prove that A(m,n) is well-defined for all pairs of natural numbers (m,n). For notational convenience, we use ↓ as a unary postfix operator denoting "is well-defined". That is, A(m,n)↓ means "A(m,n) is well-defined" or "A is well-defined at (m,n)".
It turns out that to prove this claim it is useful to use mathematical induction on both arguments of the function. Sometimes this is called "double induction". Our claim is
Let P be the body of this universal quantification; that is:
P: (∀n | n≥0 : A(m,n)↓)
Following Gries's instructions, to prove our claim by induction on m we must prove:
Here we go:
Basis step:
P[m := 0] = < defn of P > (∀n | n≥0 : A(m,n)↓)[m:=0] = < textual substitution > (∀n | n≥0 : A(0,n)↓) = < defn of A > (∀n | n≥0 : (n+1)↓) = < obvious > true |
Inductive step: Let m≥0 and assume P as the induction hypothesis (IH). What is to be proved is P[m := m+1]
P[m := m+1] = < defn of P > (∀n | n≥0 : A(m,n)↓)[m:=m+1] = < textual substitution > (∀n | n≥0 : A(m+1,n)↓)At this point, it would seem that a proof by induction (on n) is called for. Letting Q be the body of this quantification (which is itself P[m:=m+1]), what we do is to prove
Induction step (wrt n): The IH (wrt n) is Q: A(m+1,n)↓. To be proved is Q[n:=n+1]. Note that we are still within the scope of the assumption of "outer" IH (wrt m), which is P: (∀n | n≥0 : A(m,n)↓)
|