General Recursive Function

From BusyBeaverWiki
Revision as of 17:46, 10 April 2026 by Sligocki (talk | contribs) (→Champions: Note some champions in multiple notations to make it clear that they are increasing.)
Jump to navigation Jump to search

General recursive functions (GRFs), also called µ-recursive functions or partial recursive functions, are the collection of partial functions ℕk⇀ℕ that are computable. This definition is equivalent using any Turing complete system of computation. See Wikipedia:general recursive function for background.

Historically it was defined as the smallest class of partial functions ℕk⇀ℕ that is closed under composition, recursion, and minimization, and includes zero, successor, and all projections (see formal definitions below). In the rest of this article, this is the formulation that we focus on exclusively. In this way, it can be considered to be a Turing complete model of computation. In fact, it is one of the oldest Turing complete models, first formalized by Kurt Gödel and Jacques Herbrand in 1933, 3 years before λ-calculus and Turing machines.

BBµ(n) is a Busy Beaver function for GRFs:BBμ(n)=max⁡{f()|f∈GRF0,|f|=n}

where f∈GRFk means that f:ℕk⇀ℕ is a k-ary GRF and |f| is the "structural size" of f (defined below). In other words, it is the largest number computable via a 0-ary function (a constant) with a limited "program" size. It is more akin to the traditional Sigma score for a Turing machine rather than the Step function in the sense that it maximizes over the produced value, not the number of steps needed to reach that value.

Definition

Structure

Define GRFk inductively based on the following construction rules, start with Atoms and combine them using Combinators.

Atoms
  • Zero: ∀k∈ℕ,Zk∈GRFk is the constant 0 function Zk(x1,…,xk)=0
  • Successor: S∈GRF1 is the successor function S(x)=x+1
  • Projection: ∀1≤i≤k∈ℕ,Pik∈GRFk is a projection function Pik(x1,…xk)=xi
Combinators
  • Composition: ∀k,m∈ℕ,∀h∈GRFm,∀g1,…gm∈GRFk,C(h,g1,…gm)∈GRFk is the composition or substitution of the gs into h: C(h,g1,…gm)(x1,…xk)=h(g1(x1,…xk),…gm(x1,…xk))
  • Primitive Recursion: ∀k∈ℕ,∀g∈GRFk,∀h∈GRFk+2,R(g,h)∈GRFk+1 is primitive recursion using g as the base case and h as the inductive step.
  • Minimization / Unlimited Search: ∀k∈ℕ,∀f∈GRFk+1,M(f)∈GRFk is the µ-operator which allows unlimited search.

Primitive Recursion

R models a typical iterative function definition over ℕ.

Base case: Rk(g,h)(0,x2,x3,...,xk)=g(x2,x3,...,xk)

Iterative case (for x1>0): Rk(g,h)(x1,x2,...,xk)=h(x1−1,v,x2,x3,...,xk) where v=R(g,h)(x1−1,x2,x3,...,xk).

R can be recursively evaluated following its definition directly. Or it can be iterated over its first argument, starting with 0 (and thus a call to g), then 1, 2, 3, etc. until x1 is reached, each time calling h with the prior iteration count for its first argument and the result of the prior call for its second.

Minimization

Mk(f)(x1,...,xk)≜min⁡{i∈ℕ:f(i,x1,...,xk)=0}

In computational language, when M(f) is evaluated it can be considered to calculate f(i,x1,...,xk) with i=0, then i=1, then i=2 etc. until one of the calls to f returns 0. It returns the value of i which first gave a result of 0. If no first argument causes f to return 0, M(f) doesn't return. (This is the only way for a GRF to not halt.)

Macros

In order to improve readability we define the following macros. For all f∈GRF1

Macro arity Definition Size Function
Plus constant Plus[n] 1 Plus[1]:=SPlus[n+1]:=C(S,Plus[n]) 2n−1 λx.x+n
Constant Kk[n] k Kk[0]:=ZkKk[n]:=C(Plus[n],Zk) 2n+1 λx1…xk.n
Iteration Rep[f,n] 1 Rep[f,n]:=R(K0[n],C(f,P22)) |f|+2n+4 λx.fx(n)
Iteration of successor RepSucc[f] 2 RepSucc[f]:=R(S,C(f,P23)) |f|+4 λx y.fx(y+1)
Diagonalization RepDiag[f] 1 RepDiag[f]:=C(RepSucc[f],S,S) |f|+7 λx.fx+1(x+2)
Ackermann iteration Ack[n,f] 1 Ack[0,f]:=fAck[n+1,f]:=Rep[Ack[n,f],1] 6n+|f|
Knuth base 2 up-arrows Knuth2[n] 1 Knuth2[0]:=Rep[Plus[2],0]Knuth2[n+1]:=Rep[Knuth2[n],1] 6n+7 λx.2↑nx
Polygonal Poly[n] 1 Poly[n]:=R(Z0,R(S,C(Plus[n],P23))) 2n+5 λx.n2x(x−1)+x
Tri 1 Tri:=Poly[1] 7 λx.x(x+1)2
Square 1 Square:=Poly[2] 9 λx.x2

Champions

n BBµ(n) Champion Champion Found Holdouts Proven
1 = 0 Z0 Shawn Ligocki 8 Dec 2025 By hand
2 = 0 M(Z1),M(P11),C(Z0) Shawn Ligocki 8 Dec 2025 By hand
3 = 1 K0[1] Shawn Ligocki 8 Dec 2025 By hand
4 = 1 C0(K0[1]) Jacob Mandelson 3 Apr 2026
5 = 2 K0[2] Jacob Mandelson 3 Apr 2026
6 = 2 C0(K0[2]) Jacob Mandelson 3 Apr 2026
7 = 3 K0[3] Jacob Mandelson 3 Apr 2026
2k+1 ≥ k K0[k]
15 ≥ 7 K0[7]
17 ≥ 10 C(Tri,K0[4]) Shawn Ligocki 9 Dec 2025
18 ≥ 21 C(RepDiag[Tri],K0[1]) Jacob Mandelson 9 Apr 2026
20 ≥ 1540 C(RepDiag[Tri],K0[2]) Jacob Mandelson 9 Apr 2026
22 ≥ 26'357'430 C(RepDiag[Tri],K0[3]) Jacob Mandelson 9 Apr 2026
24 ≥ 64'449'908'476'890'321 > 1016.8 C(RepDiag[Tri],K0[4]) Jacob Mandelson 9 Apr 2026
25 > 10↑↑3.8388>1010106.8 C(RepDiag[RepDiag[Tri]],K0[1]) Jacob Mandelson 9 Apr 2026
27 > 10↑↑6.0834 C(RepDiag[RepDiag[Tri]],K0[2]) Jacob Mandelson 9 Apr 2026
29 > 10↑↑8.1944 C(RepDiag[RepDiag[Tri]],K0[3]) Jacob Mandelson 9 Apr 2026
31 > 10↑↑10.2800 C(RepDiag[RepDiag[Tri]],K0[4]) Jacob Mandelson 9 Apr 2026
33 > 10↑↑12.3501 C(RepDiag[RepDiag[Tri]],K0[5]) Jacob Mandelson 9 Apr 2026
35 ≥2↑↑↑4>10↑↑65533 C(Knuth2[3],K0[4]) Shawn Ligocki 8 Dec 2025
37 ≥2↑↑↑5 C(Knuth2[3],K0[5]) Shawn Ligocki 8 Dec 2025
39 ≥2↑↑↑6 C(Knuth2[3],K0[6]) Shawn Ligocki 8 Dec 2025
6k+17 ≥2↑k4 C(Knuth2[k],K0[4]) Shawn Ligocki 8 Dec 2025
6k+19 ≥2↑k5 C(Knuth2[k],K0[5]) Shawn Ligocki 8 Dec 2025
6k+21 ≥2↑k6 C(Knuth2[k],K0[6]) Shawn Ligocki 8 Dec 2025