# Goodstein's theorem

(Redirected from Goodstein function)
"Hydra game" redirects here. For the game development kit, see HYDRA Game Development Kit.

In mathematical logic, Goodstein's theorem is a statement about the natural numbers, proved by Reuben Goodstein in 1944, which states that every Goodstein sequence eventually terminates at 0. Kirby and Paris[1] showed that it is unprovable in Peano arithmetic (but it can be proven in stronger systems, such as second-order arithmetic). This was the third example of a true statement that is unprovable in Peano arithmetic, after Gödel's incompleteness theorem and Gerhard Gentzen's 1943 direct proof of the unprovability of ε0-induction in Peano arithmetic. The Paris–Harrington theorem was a later example.

Laurence Kirby and Jeff Paris introduced a graph-theoretic hydra game with behavior similar to that of Goodstein sequences: the "Hydra" is a rooted tree, and a move consists of cutting off one of its "heads" (a branch of the tree), to which the hydra responds by growing a finite number of new heads according to certain rules. Kirby and Paris proved that the Hydra will eventually be killed, regardless of the strategy that Hercules uses to chop off its heads, though this may take a very long time. Just like for Goodstein sequences, Kirby and Paris showed that it cannot be proven in Peano arithmetic alone.[1]

## Hereditary base-n notation

Goodstein sequences are defined in terms of a concept called "hereditary base-n notation". This notation is very similar to usual base-n positional notation, but the usual notation does not suffice for the purposes of Goodstein's theorem.

In ordinary base-n notation, where n is a natural number greater than 1, an arbitrary natural number m is written as a sum of multiples of powers of n:

${\displaystyle m=a_{k}n^{k}+a_{k-1}n^{k-1}+\cdots +a_{0},}$

where each coefficient ai satisfies 0 ≤ ai < n, and ak ≠ 0. For example, in base 2,

${\displaystyle 35=32+2+1=2^{5}+2^{1}+2^{0}.}$

Thus the base-2 representation of 35 is 100011, which means 25 + 2 + 1. Similarly, 100 represented in base 3 is 10201:

${\displaystyle 100=81+18+1=3^{4}+2\cdot 3^{2}+3^{0}.}$

Note that the exponents themselves are not written in base-n notation. For example, the expressions above include 25 and 34.

To convert a base-n representation to hereditary base-n notation, first rewrite all of the exponents in base-n notation. Then rewrite any exponents inside the exponents, and continue in this way until every number appearing in the expression has been converted to base-n notation.

For example, while 35 in ordinary base-2 notation is 25 + 2 + 1, it is written in hereditary base-2 notation as

${\displaystyle 35=2^{2^{2}+1}+2+1,}$

using the fact that 5 = 22 + 1. Similarly, 100 in hereditary base-3 notation is

${\displaystyle 100=3^{3+1}+2\cdot 3^{2}+1.}$

## Goodstein sequences

The Goodstein sequence G(m) of a number m is a sequence of natural numbers. The first element in the sequence G(m) is m itself. To get the second, G(m)(2), write m in hereditary base-2 notation, change all the 2s to 3s, and then subtract 1 from the result. In general, the (n + 1)-st term G(m)(n + 1) of the Goodstein sequence of m is as follows:

• Take the hereditary base-n + 1 representation of G(m)(n).
• Replace each occurrence of the base-n + 1 with n + 2.
• Subtract one. (Note that the next term depends both on the previous term and on the index n.)
• Continue until the result is zero, at which point the sequence terminates.

Early Goodstein sequences terminate quickly. For example, G(3) terminates at the 6th step:

Base Hereditary notation Value Notes
2 ${\displaystyle 2^{1}+1}$ 3 Write 3 in base-2 notation
3 ${\displaystyle 3^{1}+1-1=3^{1}}$ 3 Switch the 2 to a 3, then subtract 1
4 ${\displaystyle 4^{1}-1=3}$ 3 Switch the 3 to a 4, then subtract 1. Now there are no more 4s left
5 ${\displaystyle 3-1=2}$ 2 No 4s left to switch to 5s. Just subtract 1
6 ${\displaystyle 2-1=1}$ 1 No 5s left to switch to 6s. Just subtract 1
7 ${\displaystyle 1-1=0}$ 0 No 6s left to switch to 7s. Just subtract 1

Later Goodstein sequences increase for a very large number of steps. For example, G(4) starts as follows:

Hereditary notation Value
${\displaystyle 2^{2}}$ 4
${\displaystyle 3^{3}-1=2\cdot 3^{2}+2\cdot 3+2}$ 26
${\displaystyle 2\cdot 4^{2}+2\cdot 4+1}$ 41
${\displaystyle 2\cdot 5^{2}+2\cdot 5}$ 60
${\displaystyle 2\cdot 6^{2}+2\cdot 6-1=2\cdot 6^{2}+6+5}$ 83
${\displaystyle 2\cdot 7^{2}+7+4}$ 109
${\displaystyle \vdots }$ ${\displaystyle \vdots }$
${\displaystyle 2\cdot 11^{2}+11}$ 253
${\displaystyle 2\cdot 12^{2}+12-1=2\cdot 12^{2}+11}$ 299
${\displaystyle \vdots }$ ${\displaystyle \vdots }$

Elements of G(4) continue to increase for a while, but at base ${\displaystyle 3\cdot 2^{402\,653\,209}}$, they reach the maximum of ${\displaystyle 3\cdot 2^{402\,653\,210}-1}$, stay there for the next ${\displaystyle 3\cdot 2^{402\,653\,209}}$ steps, and then begin their first and final descent.

The value 0 is reached at base ${\displaystyle 3\cdot 2^{402\,653\,211}-1}$. (Curiously, this is a Woodall number: ${\displaystyle 3\cdot 2^{402\,653\,211}-1=402\,653\,184\cdot 2^{402\,653\,184}-1}$. This is also the case with all other final bases for starting values greater than 4.[citation needed])

However, even G(4) doesn't give a good idea of just how quickly the elements of a Goodstein sequence can increase. G(19) increases much more rapidly and starts as follows:

Hereditary notation Value
${\displaystyle 2^{2^{2}}+2+1}$ 19
${\displaystyle 3^{3^{3}}+3}$ 7625597484990
${\displaystyle 4^{4^{4}}+3}$ ${\displaystyle \approx 1.3\times 10^{154}}$
${\displaystyle 5^{5^{5}}+2}$ ${\displaystyle \approx 1.8\times 10^{2184}}$
${\displaystyle 6^{6^{6}}+1}$ ${\displaystyle \approx 2.6\times 10^{36\,305}}$
${\displaystyle 7^{7^{7}}}$ ${\displaystyle \approx 3.8\times 10^{695\,974}}$

${\displaystyle 8^{8^{8}}-1=7\cdot 8^{(7\cdot 8^{7}+7\cdot 8^{6}+7\cdot 8^{5}+7\cdot 8^{4}+7\cdot 8^{3}+7\cdot 8^{2}+7\cdot 8+7)}}$ ${\displaystyle +7\cdot 8^{(7\cdot 8^{7}+7\cdot 8^{6}+7\cdot 8^{5}+7\cdot 8^{4}+7\cdot 8^{3}+7\cdot 8^{2}+7\cdot 8+6)}+\cdots }$ ${\displaystyle +7\cdot 8^{(8+2)}+7\cdot 8^{(8+1)}+7\cdot 8^{8}}$ ${\displaystyle +7\cdot 8^{7}+7\cdot 8^{6}+7\cdot 8^{5}+7\cdot 8^{4}}$ ${\displaystyle +7\cdot 8^{3}+7\cdot 8^{2}+7\cdot 8+7}$

${\displaystyle \approx 6\times 10^{15\,151\,335}}$

${\displaystyle 7\cdot 9^{(7\cdot 9^{7}+7\cdot 9^{6}+7\cdot 9^{5}+7\cdot 9^{4}+7\cdot 9^{3}+7\cdot 9^{2}+7\cdot 9+7)}}$ ${\displaystyle +7\cdot 9^{(7\cdot 9^{7}+7\cdot 9^{6}+7\cdot 9^{5}+7\cdot 9^{4}+7\cdot 9^{3}+7\cdot 9^{2}+7\cdot 9+6)}+\cdots }$ ${\displaystyle +7\cdot 9^{(9+2)}+7\cdot 9^{(9+1)}+7\cdot 9^{9}}$ ${\displaystyle +7\cdot 9^{7}+7\cdot 9^{6}+7\cdot 9^{5}+7\cdot 9^{4}}$ ${\displaystyle +7\cdot 9^{3}+7\cdot 9^{2}+7\cdot 9+6}$

${\displaystyle \approx 4.3\times 10^{369\,693\,099}}$
${\displaystyle \vdots }$ ${\displaystyle \vdots }$

In spite of this rapid growth, Goodstein's theorem states that every Goodstein sequence eventually terminates at 0, no matter what the starting value is.

## Proof of Goodstein's theorem

Goodstein's theorem can be proved (using techniques outside Peano arithmetic, see below) as follows: Given a Goodstein sequence G(m), we construct a parallel sequence P(m) of ordinal numbers which is strictly decreasing and terminates. Then G(m) must terminate too, and it can terminate only when it goes to 0. A common misunderstanding of this proof is to believe that G(m) goes to 0 because it is dominated by P(m). In fact, the fact that P(m) dominates G(m) plays no role at all. The important point is: G(m)(k) exists if and only if P(m)(k) exists (parallelism). Then if P(m) terminates, so does G(m). And G(m) can terminate only when it comes to 0.

More precisely, each term P(m)(n) of the sequence P(m) is obtained by applying a function f on the term G(m)(n) of the Goodstein sequence of m as follows: take the hereditary base n+1 representation of G(m)(n), and replace each occurrence of the base n+1 with the first infinite ordinal number ω. For example, G(3)(1) = 3 = 21 + 20 and P(3)(1) = f(G(3)(1)) = ω1 + ω0 = ω + 1. Addition, multiplication and exponentiation of ordinal numbers are well defined.

• The base-changing operation of the Goodstein sequence when going from G(m)(n) to G(m)(n+1) does not change the value of f (that's the main point of the construction), thus after the minus 1 operation, P(m)(n+1) will be strictly smaller than P(m)(n). For example, ${\displaystyle f(3\cdot 4^{4^{4}}+4)=3\omega ^{\omega ^{\omega }}+\omega =f(3\cdot 5^{5^{5}}+5)}$, hence ${\displaystyle f(3\cdot 4^{4^{4}}+4)}$ is strictly greater than ${\displaystyle f((3\cdot 5^{5^{5}}+5)-1).}$

If the sequence G(m) did not go to 0, it would not terminate and would be infinite (since G(m)(k+1) would always exist). Consequently, P(m) also would be infinite (since in its turn P(m)(k+1) would always exist too). But P(m) is strictly decreasing and the standard order < on ordinals is well-founded, therefore an infinite strictly decreasing sequence cannot exist, or equivalently, every strictly decreasing sequence of ordinals does terminate (and cannot be infinite). This contradiction shows that G(m) terminates, and since it terminates, goes to 0 (by the way, since there exists a natural number k such that G(m)(k) = 0, by construction of P(m) we have that P(m)(k) = 0).

While this proof of Goodstein's theorem is fairly easy, the Kirby–Paris theorem,[1] which shows that Goodstein's theorem is not a theorem of Peano arithmetic, is technical and considerably more difficult. It makes use of countable nonstandard models of Peano arithmetic.

## Extended Goodstein's theorem

Suppose the definition Goodstein sequence is changed so that instead of replacing each occurrence of the base b with b+1 it was replaces it with b+2. Would the sequence still terminate? More generally, let b1, b2, b3, … be any sequences of integers. Then let the n+1st term G(m)(n+1) of the extended Goodstein sequence of m be as follows: take the hereditary base bn representation of G(m)(n), and replace each occurrence of the base bn with bn+1 and then subtract one. The claim is that this sequence still terminates. The extended proof defines P(m)(n) = f(G(m)(n), n) as follows: take the hereditary base bn representation of G(m)(n), and replace each occurrence of the base bn with the first infinite ordinal number ω. The base-changing operation of the Goodstein sequence when going from G(m)(n) to G(m)(n+1) still does not change the value of f. For example, if bn = 4 and if bn+1 = 9, then ${\displaystyle f(3\cdot 4^{4^{4}}+4,4)=3\omega ^{\omega ^{\omega }}+\omega =f(3\cdot 9^{9^{9}}+9,9)}$, hence the ordinal ${\displaystyle f(3\cdot 4^{4^{4}}+4,4)}$ is strictly greater than the ordinal ${\displaystyle f((3\cdot 9^{9^{9}}+9)-1,9).}$

## Sequence length as a function of the starting value

The Goodstein function, ${\displaystyle {\mathcal {G}}:\mathbb {N} \to \mathbb {N} \,\!}$, is defined such that ${\displaystyle {\mathcal {G}}(n)}$ is the length of the Goodstein sequence that starts with n. (This is a total function since every Goodstein sequence terminates.) The extreme growth-rate of ${\displaystyle {\mathcal {G}}\,\!}$ can be calibrated by relating it to various standard ordinal-indexed hierarchies of functions, such as the functions ${\displaystyle H_{\alpha }\,\!}$ in the Hardy hierarchy, and the functions ${\displaystyle f_{\alpha }\,\!}$ in the fast-growing hierarchy of Löb and Wainer:

• Kirby and Paris (1982) proved that
${\displaystyle {\mathcal {G}}\,\!}$ has approximately the same growth-rate as ${\displaystyle H_{\epsilon _{0}}\,\!}$ (which is the same as that of ${\displaystyle f_{\epsilon _{0}}\,\!}$); more precisely, ${\displaystyle {\mathcal {G}}\,\!}$ dominates ${\displaystyle H_{\alpha }\,\!}$ for every ${\displaystyle \alpha <\epsilon _{0}\,\!}$, and ${\displaystyle H_{\epsilon _{0}}\,\!}$ dominates ${\displaystyle {\mathcal {G}}\,\!.}$
(For any two functions ${\displaystyle f,g:\mathbb {N} \to \mathbb {N} \,\!}$, ${\displaystyle f\,\!}$ is said to dominate ${\displaystyle g\,\!}$ if ${\displaystyle f(n)>g(n)\,\!}$ for all sufficiently large ${\displaystyle n\,\!}$.)
• Cichon (1983) showed that
${\displaystyle {\mathcal {G}}(n)=H_{R_{2}^{\omega }(n+1)}(1)-1,}$
where ${\displaystyle R_{2}^{\omega }(n)}$ is the result of putting n in hereditary base-2 notation and then replacing all 2s with ω (as was done in the proof of Goodstein's theorem).
• Caicedo (2007) showed that if ${\displaystyle n=2^{m_{1}}+2^{m_{2}}+\cdots +2^{m_{k}}}$ with ${\displaystyle m_{1}>m_{2}>\cdots >m_{k},}$ then
${\displaystyle {\mathcal {G}}(n)=f_{R_{2}^{\omega }(m_{1})}(f_{R_{2}^{\omega }(m_{2})}(\cdots (f_{R_{2}^{\omega }(m_{k})}(3))\cdots ))-2}$.

Some examples:

n ${\displaystyle {\mathcal {G}}(n)}$
1 ${\displaystyle 2^{0}}$ ${\displaystyle 2-1}$ ${\displaystyle H_{\omega }(1)-1}$ ${\displaystyle f_{0}(3)-2}$ 2
2 ${\displaystyle 2^{1}}$ ${\displaystyle 2^{1}+1-1}$ ${\displaystyle H_{\omega +1}(1)-1}$ ${\displaystyle f_{1}(3)-2}$ 4
3 ${\displaystyle 2^{1}+2^{0}}$ ${\displaystyle 2^{2}-1}$ ${\displaystyle H_{\omega ^{\omega }}(1)-1}$ ${\displaystyle f_{1}(f_{0}(3))-2}$ 6
4 ${\displaystyle 2^{2}}$ ${\displaystyle 2^{2}+1-1}$ ${\displaystyle H_{\omega ^{\omega }+1}(1)-1}$ ${\displaystyle f_{\omega }(3)-2}$ 3·2402653211 − 2
5 ${\displaystyle 2^{2}+2^{0}}$ ${\displaystyle 2^{2}+2-1}$ ${\displaystyle H_{\omega ^{\omega }+\omega }(1)-1}$ ${\displaystyle f_{\omega }(f_{0}(3))-2}$ > A(4,4)
6 ${\displaystyle 2^{2}+2^{1}}$ ${\displaystyle 2^{2}+2+1-1}$ ${\displaystyle H_{\omega ^{\omega }+\omega +1}(1)-1}$ ${\displaystyle f_{\omega }(f_{1}(3))-2}$ > A(6,6)
7 ${\displaystyle 2^{2}+2^{1}+2^{0}}$ ${\displaystyle 2^{2+1}-1}$ ${\displaystyle H_{\omega ^{\omega +1}}(1)-1}$ ${\displaystyle f_{\omega }(f_{1}(f_{0}(3)))-2}$ > A(8,8)
8 ${\displaystyle 2^{2+1}}$ ${\displaystyle 2^{2+1}+1-1}$ ${\displaystyle H_{\omega ^{\omega +1}+1}(1)-1}$ ${\displaystyle f_{\omega +1}(3)-2}$ > A3(3,3) = A(A(61, 61), A(61, 61))
${\displaystyle \vdots }$
12 ${\displaystyle 2^{2+1}+2^{2}}$ ${\displaystyle 2^{2+1}+2^{2}+1-1}$ ${\displaystyle H_{\omega ^{\omega +1}+\omega ^{\omega }+1}(1)-1}$ ${\displaystyle f_{\omega +1}(f_{\omega }(3))-2}$ > fω+1(64) > Graham's number
${\displaystyle \vdots }$
19 ${\displaystyle 2^{2^{2}}+2^{1}+2^{0}}$ ${\displaystyle 2^{2^{2}}+2^{2}-1}$ ${\displaystyle H_{\omega ^{\omega ^{\omega }}+\omega ^{\omega }}(1)-1}$ ${\displaystyle f_{\omega ^{\omega }}(f_{1}(f_{0}(3)))-2}$

## Application to computable functions

Goodstein's theorem can be used to construct a total computable function that Peano arithmetic cannot prove to be total. The Goodstein sequence of a number can be effectively enumerated by a Turing machine; thus the function which maps n to the number of steps required for the Goodstein sequence of n to terminate is computable by a particular Turing machine. This machine merely enumerates the Goodstein sequence of n and, when the sequence reaches 0, returns the length of the sequence. Because every Goodstein sequence eventually terminates, this function is total. But because Peano arithmetic does not prove that every Goodstein sequence terminates, Peano arithmetic does not prove that this Turing machine computes a total function.