General Recursive Function

From BusyBeaverWiki
Revision as of 23:40, 29 April 2026 by Sligocki (talk | contribs) (Champions: New BBµ(14) champ again)
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()|fGRF0,|f|=n}

where fGRFk 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,ZkGRFk is the constant 0 function Zk(x1,,xk)=0
  • Successor: SGRF1 is the successor function S(x)=x+1
  • Projection: 1ik,PikGRFk is a projection function Pik(x1,xk)=xi
Combinators
  • Composition: k,m,hGRFm,g1,gmGRFk,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,gGRFk,hGRFk+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,fGRFk+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(x11,v,x2,x3,...,xk) where v=R(g,h)(x11,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, at which point 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 fGRF1

Macro arity Definition Size Function
Constant Kk[n] k Kk[0]:=ZkKk[n]:=C(Plus[n],Zk) 2n+1 λx1xk.n
Plus constant Plus[n] 1 Plus[1]:=SPlus[n+1]:=C(S,Plus[n]) 2n1 λx.x+n
Triangular numbers Tri 1 Tri:=R(Z0,R(S,C(Plus[2],P23))) 7 λx.x(x+1)2
Iteration RepSucc[f] 2 RepSucc[f]:=R(S,C(f,P23)) |f|+4 λx y.fx(y+1)
Diagonalization & Iteration DiagRep[f] 2 DiagRep[f]:=R(S,C(f,P23,P23)) |f|+5 λx y.(λz.f(z,z))x(y+1)
Diagonalization DiagS[f] 1 DiagS[f]:=C(f,S,S) |f|+3 λx.f(x+1,x+1)
Ackermann iteration AckDiag2[n,f] 2 AckDiag2[0,f]:=RepSucc[f]AckDiag2[n+1,f]:=DiagRep[AckDiag2[n,f]] 5n+4+|f|
AckDiag[n,f] 1 AckDiag[n,f]:=DiagS[AckDiag2[n,f]] 5n+7+|f|

Champions

n BBµ(n) Champion Champion Found Holdouts Proven
1 = 0 Z0 Shawn Ligocki 8 Dec 2025 By hand
2 = 0 M0(Z1),M0(P11),C0(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
8 ≥ 3 C0(K0[3])
9 ≥ 4 K0[4]
10 ≥ 4 C0(K0[4])
11 ≥ 5 K0[5]
12 ≥ 5 C0(K0[5])
13 ≥ 6 K0[6]
14 ≥ 13 M0(C1(R2(P11,R3(P12,C4(R2(S,P13),P24,P44))),P11,S)) Shawn Ligocki 29 Apr 2026
15
16
17 ≥ 15 C(AckDiag[1,S],K0[1]) Shawn Ligocki 12 Apr 2026
18 ≥ 21 C(AckDiag[0,Tri],K0[1]) Jacob Mandelson 9 Apr 2026
19 ≥ 39 C(AckDiag[1,S],K0[2]) Shawn Ligocki 12 Apr 2026
20 ≥ 1540 C(AckDiag[0,Tri],K0[2]) Jacob Mandelson 9 Apr 2026
21
22 >1013.35 C(AckDiag[2,S],K0[1]) Shawn Ligocki 13 Apr 2026
23 >1010463 C(AckDiag[1,Tri],K0[1]) Shawn Ligocki 13 Apr 2026
24
25 >105 C(AckDiag[1,Tri],K0[2]) Shawn Ligocki 13 Apr 2026
26
27 >10103 C(AckDiag[3,S],K0[1]) Shawn Ligocki 13 Apr 2026
28 >10105 C(AckDiag[2,Tri],K0[1]) Shawn Ligocki 13 Apr 2026
29 >1010104 C(AckDiag[3,S],K0[2]) Shawn Ligocki 13 Apr 2026
30 >1010108 C(AckDiag[2,Tri],K0[2]) Shawn Ligocki 13 Apr 2026
31 >101010105 C(AckDiag[3,S],K0[3]) Shawn Ligocki 13 Apr 2026
...
5k+17 > 10k10k3 C(AckDiag[k+1,S],K0[1]) Shawn Ligocki 13 Apr 2026
5k+18 > 10k10k3 C(AckDiag[k,Tri],K0[1]) Shawn Ligocki 13 Apr 2026
5k+19 > 10k10k10k4 C(AckDiag[k+1,S],K0[2]) Shawn Ligocki 13 Apr 2026
5k+20 > 10k10k10k5 C(AckDiag[k,Tri],K0[2]) Shawn Ligocki 13 Apr 2026
5k+21 > 10k10k10k10k5 C(AckDiag[k+1,S],K0[3]) Shawn Ligocki 13 Apr 2026
...
94 > 1015101510154 C(AckDiag[16,S],K0[2]) Shawn Ligocki 13 Apr 2026
95 >fω(1013) Omega() from example_ack.rs Shawn Ligocki 16 Apr 2026
96
97 >fω3(3) Omega3() from example_ack.rs Shawn Ligocki 22 Apr 2026
98
99 >fω4(3) Omega4() from example_ack.rs Shawn Ligocki 22 Apr 2026
100 >fω+1(fω2(1013))Graham's number Graham() from example_ack.rs Shawn Ligocki 16 Apr 2026

Cryptids

Jacob Mandelson constructed a size 141 Cryptid on 8 Apr 2026 [1], shrunk to 139 by 17 Apr 2026.[2]

Macro Bounds

Let C=1log10(2)3.32

AckDiag[k, S]

Let ASk(n):=DiagRepk[RepSucc[S]](n,n)=AckDiag[k,S](n1)

  • AS0(n)=Sn(n+1)=2n+1
  • AS1(n)=AS0n(n+1)=(n+2)2n1
  • AS1(n)>C10n/C (for n2)
  • AS2(n)=AS1n(n+1)>C(10)n(n+1C)>10n[n+1C] (for n2)
  • ASk(n)=ASk1n(n+1)>(10k1)n(n+1) (for k3 and n1)

AckDiag[k, Tri]

Let ATk(n):=DiagRepk[RepSucc[Tri]](n,n)=AckDiag[k,Tri](n1)

  • Tri(n)=n(n+1)2>12n2
  • AT0(n)=Trin(n+1)>2(n+12)2n
  • AT0(2)=21, AT0(3)=1540, AT0(4)>107.42
  • AT0(n)>C1010(n1C)+1 (for n5)
  • AT1(n)=AT0n(n+1)>C(10)2n2(AT0(n+1)C)
  • AT1(2)>1010AT0(3)/C>1010463, AT1(3)>10101010AT0(4)/C>105
  • AT1(n)>102n (for n4)
  • AT2(n)=AT1n(n+1)>(10)n1(AT1(n+1))
  • AT2(2)=AT12(3)>AT1(105)>10105, AT2(3)=AT13(4)>1010108
  • AT2(n)>10(n+1) (for n4)
  • AT3(n)=AT2n(n+1)>(10)n1(AT2(n+1))
  • AT3(2)=AT22(3)>AT2(103)>10103

Utilizing Minimization

All the current champions are primitive recursive functions. In other words none use the minimization combinator M. This fundamentally limits their growth rate. In fact, no primitive recursive function can grow faster than the Ackermann function and we can see that above where the assymtotic growth of the known BBµ bound is Ackermann growth: BBμ(6k+17)2k4.

But, like the traditional BB function, BBµ grows uncomputably fast, so eventually it must surpass primitive recursive functions. In order to do that, it needs to use the M combinator. However, in order to do arbitrary computation, you need a way to store arbitrarily large amounts of data into a single integer and extract it back out. In other words, you need to implement a pairing function. Thus there is value in finding small pairing/unpairing functions. A set of pairing functions is a triple Pair,Left,Right such that for all a,b: Left(Pair(a,b)) = a and Right(Pair(a,b)) = b. When functions consume both the left and right values, common subexpression elimination can be used to reduce the number of operations below that from calling Left and Right individually. The smallest known pairing functions are:

Smallest Pairing Functions
Macro arity Definition Size Function
Pair 2 Pair:=C(AddS,C(Tri,Add),P12) 20 λxy.(x+y)(x+y+1)2+x+1
Left 1 Left:=C(RMonus,C(TriP,InvTriCeil),Pred) 38 Left(Pair(x,y))=x
Right 1 Right:=C(RMonus,P11,C(Tri,InvTriCeil)) 36 Right(Pair(x,y))=y
LRCall[f2] 1 LRCall[f]:=C(LRpart3[f],InvTriCeil,P11) 59+|f| LRCall[f](Pair(x,y))=f(x,y)

Where these are based on the following definitions:

Macros
Macro arity Definition Size Function
Addition Add 2 Add:=R(P11,C(S,P23)) 5 λxy.x+y
AddXA 3 AddXA:=R(P12,C(S,P24)) 5 λxyz.x+y
AddS 2 AddS:=R(S,C(S,P23)) 5 λxy.x+y+1
Predecesor Pred 1 Pred:=R(Z0,P12) 3 λx.x˙1
Monus RMonus 2 RMonus:=R(P11,C(Pred,P23)) 7 λxy.y˙x
Triangular numbers Tri 1 Tri:=R(Z0,AddS) 7 λx.x(x+1)2
TriP 1 TriP:=R(Z0,Add) 7 TriP(x+1)=Tri(x)
TriPXA 2 TriPXA:=R(Z1,AddXA) 7 TriPXA(x,y)=TriP(x)
Inverting Tri RMonusTri 2 RMonusTri:=C(RMonus,C(Tri,P12),P22) 18 λxy.y˙Tri(x)
InvTriCeil 1 InvTriCeil:=M(RMonusTri) 19 λy.min{x|Tri(x)y}
Combined LRCall RightPiece 3 RightPiece:=R(P22,C(Pred,P24)) 7 λxyz.z˙x
LeftPiece 3 LeftPiece:=C(RMonus,C(S,P23),P13) 12 λxyz.x˙(y+1)
LRpart1[f] 3 LRpart1[f]:=C(f,LeftPiece,RightPiece) 20+|f| λxyz.f(x˙(y+1),z˙x)
LRpart2[f] 3 LRpart2[f]:=C(LRpart1[f],P33,P13,AddXA) 28+|f| λxyz.f(z˙(x+1),x+y˙z)
LRpart3[f] 2 LRpart3[f]:=C(LRpart2[f],TriPXA,P12,P22) 38+|f| λxy.f(y˙(TriP(x)+1),TriP(x)+x˙y)