General Recursive Function: Difference between revisions

From BusyBeaverWiki
Jump to navigation Jump to search
Champions: Update back to my old fast-growing hierarchy results from yesterday. Those were actually better than the "Square" ones.
Polygon (talk | contribs)
Added category:functions
 
(7 intermediate revisions by one other user not shown)
Line 8: Line 8:


== Definition ==
== Definition ==
=== Structure ===
Define <math>GRF_k</math> inductively based on the following construction rules, start with Atoms and combine them using Combinators.
====== Atoms ======
* Zero: <math>\forall k \in \N, Z^k \in GRF_k</math> is the constant 0 function <math>Z^k(x_1, \dots, x_k) = 0</math>
* Successor: <math>S \in GRF_1</math> is the successor function <math>S(x) = x+1</math>
* Projection: <math>\forall 1 \le i \le k \in \N, P^k_i \in GRF_k</math> is a projection function <math>P^k_i(x_1, \dots x_k) = x_i</math>
===== Combinators =====
* Composition: <math>\forall k,m \in \N, \forall h \in GRF_m, \forall g_1, \dots g_m \in GRF_k, C(h, g_1, \dots g_m) \in GRF_k</math> is the composition or substitution of the gs into h <math>C(h, g_1, \dots g_m)(x_1, \dots x_k) = h(g_1(x_1, \dots x_k), \dots g_m(x_1, \dots x_k))</math>
* Primitive Recursion: <math>\forall k \in \N, \forall g \in GRF_k, \forall h \in GRF_{k+2}, R(g, h) \in GRF_{k+1}</math> is primitive recursion using g as the base case and h as the inductive step.
* Minimization / Unlimited Search: <math>\forall k \in \N, \forall f \in GRF_{k+1}, M(f) \in GRF_k</math> is the µ-operator which allows unlimited search.
=== Primitive Recursive Functions ===
=== Primitive Recursive Functions ===
TODO
TODO
Line 15: Line 31:


== Macros ==
== Macros ==
In order to improve readability we define the following macros:
In order to improve readability we define the following macros. For all <math>f \in GRF_1</math>
 
{| class="wikitable"
* Plus constant. For any <math>n \in \N^+</math>:<math display="block">\begin{array}{lcl}
|+
  Plus[n]    & \in & GRF_1 \\
!
!Macro
!arity
!Definition
!Size
!Function
|-
|Plus constant
|<math>Plus[n]</math>
|1
|<math>\begin{array}{lcl}
   Plus[1]    & :=  & S \\
   Plus[1]    & :=  & S \\
   Plus[n+1]  & :=  & C(S, Plus[n]) \\
   Plus[n+1]  & :=  & C(S, Plus[n])
  |Plus[n]|  &  =  & 2n-1 \\
  Plus[n](x) &  =  & x + n \\
\end{array}</math>
\end{array}</math>
* Constant. For any <math>n \in \N</math>:<math display="block">\begin{array}{lcl}
|<math>2n-1</math>
  K^k[n]    & \in & GRF_k \\
|<math>\lambda x. x+n</math>
|-
|Constant
|<math>K^k[n]</math>
|k
|<math>\begin{array}{lcl}
   K^k[0]    & :=  & Z^k \\
   K^k[0]    & :=  & Z^k \\
   K^k[n]    & :=  & C(Plus[n], Z^k) \\
   K^k[n]    & :=  & C(Plus[n], Z^k)
  |K^k[n]|  &  =  & 2n+1 \\
  K^k[n](x_1, \dots x_k) &  =  & n \\
\end{array}</math>
\end{array}</math>
* Unary function iteration. For any <math>f \in GRF_1, n \in \N</math>:<math display="block">\begin{array}{lcl}
|<math>2n+1</math>
  Rep[f,n]   & \in & GRF_1 \\
|<math>\lambda x_1 \dots x_k. n</math>
  Rep[f,n]   & := & R(K^0[n], C(f, P^2_2)) \\
|-
  |Rep[f,n]|  &  =  & |f| + 2n + 4 \\
|Iteration
  Rep[f,n](x) &  =  & f^x(n) \\
|<math>Rep[f,n]</math>
\end{array}</math>
|1
* Ackermann growth (Nested unary function iteration). For any <math>f \in GRF_1, n \in \N</math>:<math display="block">\begin{array}{lcl}
|<math>Rep[f,n] := R(K^0[n], C(f, P^2_2))</math>
  Ack[n,f]    & \in & GRF_1 \\
|<math>|f| + 2n + 4</math>
|<math>\lambda x. f^x(n)</math>
|-
|Ackermann iteration
|<math>Ack[n,f]</math>
|1
|<math>\begin{array}{lcl}
   Ack[0,f]    & :=  & f \\
   Ack[0,f]    & :=  & f \\
   Ack[n+1,f]  & :=  & Rep[Ack[n,f],1] \\
   Ack[n+1,f]  & :=  & Rep[Ack[n,f],1]
  |Ack[n,f]|  &  =  & |f| + 6n \\
\end{array}</math>
\end{array}</math>
 
|<math>6n + |f|</math>
* Fast growing hierarchy: Knuth base 2 up-arrows. For any <math>n \in \N</math>:<math display="block">\begin{array}{lcl}
|
  Knuth2[n]    & \in & GRF_1 \\
|-
|Knuth base 2 up-arrows
|<math>Knuth2[n]</math>
|1
|<math>\begin{array}{lcl}
   Knuth2[0]    & :=  & Rep[Plus[2],0] \\
   Knuth2[0]    & :=  & Rep[Plus[2],0] \\
   Knuth2[n+1]  & :=  & Rep[Knuth2[n],1] \\
   Knuth2[n+1]  & :=  & Rep[Knuth2[n],1]
  |Knuth2[n]|  &  =  & 6n+7 \\
  Knuth2[0](x) &  =  & 2x \\
  Knuth2[n](x) &  =  & 2 \uparrow^n x \\
\end{array}</math>
 
* Polygonal numbers. For any <math>n \in \N^+</math>:<math display="block">\begin{array}{lcl}
  Poly[n]    & \in & GRF_1 \\
  Poly[n]    & :=  & R(Z^0, R(S, C(Plus[n], P^3_2))) \\
  |Poly[n]|  &  =  & 2n+5 \\
  Poly[n](x) &  =  & \sum_{y=0}^{x-1}(ny+1) = \frac{n}{2} x(x-1) + x \\
\\
  Tri      & :=  & Poly[1] \\
  |Tri|    &  =  & 7 \\
  Tri(x)    &  =  & \frac{x(x+1)}{2} \\
  Square    & :=  & Poly[2] \\
  |Square|  &  =  & 9 \\
  Square(x) &  =  & x^2 \\
\end{array}</math>
\end{array}</math>
|<math>6n+7</math>
|<math>\lambda x. 2 \uparrow^n x</math>
|-
|Polygonal
|<math>Poly[n]</math>
|1
|<math>Poly[n] := R(Z^0, R(S, C(Plus[n], P^3_2)))</math>
|<math>2n+5</math>
|<math>\lambda x. \frac{n}{2} x(x-1) + x</math>
|-
|
|<math>Tri</math>
|1
|<math>Tri := Poly[1]</math>
|<math>7</math>
|<math>\lambda x. \frac{x(x+1)}{2}</math>
|-
|
|<math>Square</math>
|1
|<math>Square := Poly[2]</math>
|<math>9</math>
|<math>\lambda x. x^2</math>
|}


== Champions ==
== Champions ==
Line 74: Line 117:
!Champion Found
!Champion Found
!Holdouts Proven
!Holdouts Proven
|-
|1
|= 0
|<math>Z^0</math>
|
|Shawn Ligocki [https://discord.com/channels/960643023006490684/1447627603698647303/1447693296322215976 8 Dec 2025] By hand
|-
|2
|= 0
|<math>M(Z^1), M(P^1_1), C(Z^0)</math>
|
|Shawn Ligocki [https://discord.com/channels/960643023006490684/1447627603698647303/1447693296322215976 8 Dec 2025] By hand
|-
|3
|= 1
|<math>K^0[1]</math>
|
|Shawn Ligocki [https://discord.com/channels/960643023006490684/1447627603698647303/1447693296322215976 8 Dec 2025] By hand
|-
|-
|2k+1
|2k+1
|≥ k
|≥ k
|<math>K^0[k]</math>
|<math>K^0[k]</math>
|Trivial
|
|
|
|-
|-
Line 84: Line 145:
|≥ 7
|≥ 7
|<math>K^0[7]</math>
|<math>K^0[7]</math>
|Trivial
|
|
|
|-
|-
Line 118: Line 179:
|-
|-
|27
|27
|<math>\ge 2^{16}</math>
|≥ 359,026,206
|<math>C(Rep[Square,2], K^0[4])</math>
|<math>C(Rep[Rep[Tri,2],0], K^0[3])</math>
|Shawn Ligocki 9 Dec 2025
|Shawn Ligocki 9 Dec 2025
|
|
|-
|-
|29
|29
|<math>\ge 2 \uparrow\uparrow 5</math>
|<math>> 10 \uparrow\uparrow 3.9 </math>
|<math>C(Rep[Rep[Square,2],0], K^0[3])</math>
|<math>C(Rep[Rep[Tri,2],0], K^0[4])</math>
|Shawn Ligocki 9 Dec 2025
|Shawn Ligocki 9 Dec 2025
|
|
|-
|-
|31
|31
|<math>\ge 2 \uparrow\uparrow 7</math>
|<math>> 10 \uparrow\uparrow 5.9 </math>
|<math>C(Rep[Rep[Square,2],0], K^0[4])</math>
|<math>C(Rep[Rep[Tri,2],0], K^0[5])</math>
|Shawn Ligocki 9 Dec 2025
|Shawn Ligocki 9 Dec 2025
|
|
|-
|-
|33
|33
|<math>\ge 2 \uparrow\uparrow 9</math>
|<math>> 10 \uparrow\uparrow 7.9 </math>
|<math>C(Rep[Rep[Square,2],0], K^0[5])</math>
|<math>C(Rep[Rep[Tri,2],0], K^0[6])</math>
|Shawn Ligocki 9 Dec 2025
|Shawn Ligocki 9 Dec 2025
|
|
|-
|-
|35
|35
|<math>> 2 \uparrow\uparrow\uparrow 4</math>
|<math>\ge 2 \uparrow\uparrow\uparrow 4</math>
|<math>C(Knuth2[3], K^0[4])</math>
|<math>C(Knuth2[3], K^0[4])</math>
|Shawn Ligocki 8 Dec 2025
|Shawn Ligocki [https://discord.com/channels/960643023006490684/1447627603698647303/1447633458510692385 8 Dec 2025]
|
|
|-
|-
|37
|37
|<math>> 2 \uparrow\uparrow\uparrow 5</math>
|<math>\ge 2 \uparrow\uparrow\uparrow 5</math>
|<math>C(Knuth2[3], K^0[5])</math>
|<math>C(Knuth2[3], K^0[5])</math>
|Shawn Ligocki 8 Dec 2025
|Shawn Ligocki [https://discord.com/channels/960643023006490684/1447627603698647303/1447633458510692385 8 Dec 2025]
|
|
|-
|-
|39
|39
|<math>> 2 \uparrow\uparrow\uparrow 6</math>
|<math>\ge 2 \uparrow\uparrow\uparrow 6</math>
|<math>C(Knuth2[3], K^0[6])</math>
|<math>C(Knuth2[3], K^0[6])</math>
|Shawn Ligocki 8 Dec 2025
|Shawn Ligocki [https://discord.com/channels/960643023006490684/1447627603698647303/1447633458510692385 8 Dec 2025]
|
|
|-
|-
|6k+17
|6k+17
|<math>> 2 \uparrow^k 4</math>
|<math>\ge 2 \uparrow^k 4</math>
|<math>C(Knuth2[k], K^0[4])</math>
|<math>C(Knuth2[k], K^0[4])</math>
|Shawn Ligocki 8 Dec 2025
|Shawn Ligocki [https://discord.com/channels/960643023006490684/1447627603698647303/1447633458510692385 8 Dec 2025]
|
|
|-
|-
|6k+19
|6k+19
|<math>> 2 \uparrow^k 5</math>
|<math>\ge 2 \uparrow^k 5</math>
|<math>C(Knuth2[k], K^0[5])</math>
|<math>C(Knuth2[k], K^0[5])</math>
|Shawn Ligocki 8 Dec 2025
|Shawn Ligocki [https://discord.com/channels/960643023006490684/1447627603698647303/1447633458510692385 8 Dec 2025]
|
|
|-
|-
|6k+21
|6k+21
|<math>> 2 \uparrow^k 6</math>
|<math>\ge 2 \uparrow^k 6</math>
|<math>C(Knuth2[k], K^0[6])</math>
|<math>C(Knuth2[k], K^0[6])</math>
|Shawn Ligocki 8 Dec 2025
|Shawn Ligocki [https://discord.com/channels/960643023006490684/1447627603698647303/1447633458510692385 8 Dec 2025]
|
|
|}
|}
[[Category:functions]]

Latest revision as of 20:48, 10 December 2025

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 Recursive Functions

TODO

Minimization

TODO

Macros

In order to improve readability we define the following macros. For all fGRF1

Macro arity Definition Size Function
Plus constant Plus[n] 1 Plus[1]:=SPlus[n+1]:=C(S,Plus[n]) 2n1 λx.x+n
Constant Kk[n] k Kk[0]:=ZkKk[n]:=C(Plus[n],Zk) 2n+1 λx1xk.n
Iteration Rep[f,n] 1 Rep[f,n]:=R(K0[n],C(f,P22)) |f|+2n+4 λx.fx(n)
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.2nx
Polygonal Poly[n] 1 Poly[n]:=R(Z0,R(S,C(Plus[n],P23))) 2n+5 λx.n2x(x1)+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
2k+1 ≥ k K0[k]
15 ≥ 7 K0[7]
17 ≥ 10 C(Tri,K0[4]) Shawn Ligocki 9 Dec 2025
19 ≥ 16 C(Square,K0[4]) Shawn Ligocki 9 Dec 2025
21 ≥ 25 C(Square,K0[5]) Shawn Ligocki 9 Dec 2025
23 ≥ 36 C(Square,K0[6]) Shawn Ligocki 9 Dec 2025
25 ≥ 256 C(Rep[Square,2],K0[3]) Shawn Ligocki 9 Dec 2025
27 ≥ 359,026,206 C(Rep[Rep[Tri,2],0],K0[3]) Shawn Ligocki 9 Dec 2025
29 >103.9 C(Rep[Rep[Tri,2],0],K0[4]) Shawn Ligocki 9 Dec 2025
31 >105.9 C(Rep[Rep[Tri,2],0],K0[5]) Shawn Ligocki 9 Dec 2025
33 >107.9 C(Rep[Rep[Tri,2],0],K0[6]) Shawn Ligocki 9 Dec 2025
35 24 C(Knuth2[3],K0[4]) Shawn Ligocki 8 Dec 2025
37 25 C(Knuth2[3],K0[5]) Shawn Ligocki 8 Dec 2025
39 26 C(Knuth2[3],K0[6]) Shawn Ligocki 8 Dec 2025
6k+17 2k4 C(Knuth2[k],K0[4]) Shawn Ligocki 8 Dec 2025
6k+19 2k5 C(Knuth2[k],K0[5]) Shawn Ligocki 8 Dec 2025
6k+21 2k6 C(Knuth2[k],K0[6]) Shawn Ligocki 8 Dec 2025