First we introduce an infinite set of functions, denoted Ei for some natural number i. We define
E 0 {\displaystyle E_{0}} is the addition function, and E 1 {\displaystyle E_{1}} is a unary function which squares its argument and adds two. Then, for each n greater than 1, E n ( x ) = E n − 1 x ( 2 ) {\displaystyle E_{n}(x)=E_{n-1}^{x}(2)} , i.e. the x-th iterate of E n − 1 {\displaystyle E_{n-1}} evaluated at 2.
From these functions we define the Grzegorczyk hierarchy. E n {\displaystyle {\mathcal {E}}^{n}} , the n-th set in the hierarchy, contains the following functions:
In other words, E n {\displaystyle {\mathcal {E}}^{n}} is the closure of set B n = { Z , S , ( p i m ) i ≤ m , E k : k < n } {\displaystyle B_{n}=\{Z,S,(p_{i}^{m})_{i\leq m},E_{k}:k<n\}} with respect to function composition and limited recursion (as defined above).
These sets clearly form the hierarchy
because they are closures over the B n {\displaystyle B_{n}} 's and B 0 ⊆ B 1 ⊆ B 2 ⊆ ⋯ {\displaystyle B_{0}\subseteq B_{1}\subseteq B_{2}\subseteq \cdots } .
They are strict subsets.45 In other words
because the hyperoperation H n {\displaystyle H_{n}} is in E n {\displaystyle {\mathcal {E}}^{n}} but not in E n − 1 {\displaystyle {\mathcal {E}}^{n-1}} .
Notably, both the function U {\displaystyle U} and the characteristic function of the predicate T {\displaystyle T} from the Kleene normal form theorem are definable in a way such that they lie at level E 0 {\displaystyle {\mathcal {E}}^{0}} of the Grzegorczyk hierarchy. This implies in particular that every recursively enumerable set is enumerable by some E 0 {\displaystyle {\mathcal {E}}^{0}} -function.
The definition of E n {\displaystyle {\mathcal {E}}^{n}} is the same as that of the primitive recursive functions, PR, except that recursion is limited ( f ( t , u ¯ ) ≤ j ( t , u ¯ ) {\displaystyle f(t,{\bar {u}})\leq j(t,{\bar {u}})} for some j in E n {\displaystyle {\mathcal {E}}^{n}} ) and the functions ( E k ) k < n {\displaystyle (E_{k})_{k<n}} are explicitly included in E n {\displaystyle {\mathcal {E}}^{n}} . Thus the Grzegorczyk hierarchy can be seen as a way to limit the power of primitive recursion to different levels.
It is clear from this fact that all functions in any level of the Grzegorczyk hierarchy are primitive recursive functions (i.e. E n ⊆ P R {\displaystyle {\mathcal {E}}^{n}\subseteq {\mathsf {PR}}} ) and thus:
It can also be shown that all primitive recursive functions are in some level of the hierarchy,67 thus
and the sets E 0 , E 1 − E 0 , E 2 − E 1 , … , E n − E n − 1 , … {\displaystyle {\mathcal {E}}^{0},{\mathcal {E}}^{1}-{\mathcal {E}}^{0},{\mathcal {E}}^{2}-{\mathcal {E}}^{1},\dots ,{\mathcal {E}}^{n}-{\mathcal {E}}^{n-1},\dots } partition the set of primitive recursive functions, PR.
Meyer and Ritchie introduced another hierarchy subdividing the primitive recursive functions, based on the nesting depth of loops needed to write a LOOP program that computes the function. For a natural number i {\displaystyle i} , let L i {\displaystyle {\mathcal {L}}_{i}} denote the set of functions computable by a LOOP program with LOOP and END commands nested no deeper than i {\displaystyle i} levels.8 Fachini and Maggiolo-Schettini showed that L i {\displaystyle {\mathcal {L}}_{i}} coincides with E i + 1 {\displaystyle {\mathcal {E}}_{i+1}} for all integers i > 1 {\displaystyle i>1} .9p.63
Main article: Fast-growing hierarchy
The Grzegorczyk hierarchy can be extended to transfinite ordinals. Such extensions define a fast-growing hierarchy. To do this, the generating functions E α {\displaystyle E_{\alpha }} must be recursively defined for limit ordinals (note they have already been recursively defined for successor ordinals by the relation E α + 1 ( n ) = E α n ( 2 ) {\displaystyle E_{\alpha +1}(n)=E_{\alpha }^{n}(2)} ). If there is a standard way of defining a fundamental sequence λ m {\displaystyle \lambda _{m}} , whose limit ordinal is λ {\displaystyle \lambda } , then the generating functions can be defined E λ ( n ) = E λ n ( n ) {\displaystyle E_{\lambda }(n)=E_{\lambda _{n}}(n)} . However, this definition depends upon a standard way of defining the fundamental sequence. Rose (1984) suggests a standard way for all ordinals α < ε0.
The original extension was due to Martin Löb and Stan S. Wainer and is sometimes called the Löb–Wainer hierarchy.10
Wagner & Wechsung 1986, p. 43. - Wagner, K.; Wechsung, G. (1986). "Computational Complexity". Mathematics and Its Applications. 21. Springer. ISBN 978-90-277-2146-4. ↩
Here u ¯ {\displaystyle {\bar {u}}} represents a tuple of inputs to f. The notation f ( u ¯ ) {\displaystyle f({\bar {u}})} means that f takes some arbitrary number of arguments and if u ¯ = ( x , y , z ) {\displaystyle {\bar {u}}=(x,y,z)} , then f ( u ¯ ) = f ( x , y , z ) {\displaystyle f({\bar {u}})=f(x,y,z)} . In the notation f ( t , u ¯ ) {\displaystyle f(t,{\bar {u}})} , the first argument, t, is specified explicitly and the rest as the arbitrary tuple u ¯ {\displaystyle {\bar {u}}} . Thus, if u ¯ = ( x , y , z ) {\displaystyle {\bar {u}}=(x,y,z)} , then f ( t , u ¯ ) = f ( t , x , y , z ) {\displaystyle f(t,{\bar {u}})=f(t,x,y,z)} . This notation allows composition and limited recursion to be defined for functions, f, of any number of arguments. /wiki/Tuple ↩
Rose 1984. - Rose, H.E. (1984). Subrecursion: Functions and hierarchies. Oxford University Press. ISBN 0-19-853189-3. ↩
Gakwaya 1997. - Gakwaya, Jean-Sylvestre (1997). "A survey on the Grzegorczyk Hierarchy and its Extension through the BSS Model of Computability". CiteSeerX 10.1.1.69.4621. https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.69.4621 ↩
A. R. Meyer, D. M. Ritchie, "The complexity of loop programs". Proceedings A.C.M. National Meeting, 1967. https://people.csail.mit.edu/meyer/meyer-ritchie.pdf ↩
E. Fachini, A. Maggiolo-Schettini, "[A hierarchy of primitive recursive sequence functions]". From Informatique théorique, book 13, no. 1 (1979), pp.49--67. ↩
Löb & Wainer 1970. - Löb, Martin Hugo; Wainer, Stan S. (1970). "Hierarchies of Number Theoretic Functions I, II: A Correction". Archiv für mathematische Logik und Grundlagenforschung. 14 (3–4): 198–199. doi:10.1007/bf01991855. S2CID 119830535. https://doi.org/10.1007%2Fbf01991855 ↩