Lambda Calculus: Difference between revisions

From BusyBeaverWiki
Jump to navigation Jump to search
Tromp (talk | contribs)
Tromp (talk | contribs)
 
(60 intermediate revisions by 14 users not shown)
Line 1: Line 1:
'''Busy Beaver for lambda calculus''' ('''BBλ''') is a variation of the [[Busy Beaver]] problem for [https://en.wikipedia.org/wiki/Lambda_calculus lambda calculus] invented by John Tromp. BBλ(n) = the maximum normal form size of any closed lambda term of size n (or 0 if no closed term of size n exists). Like the traditional Busy Beaver functions, it is uncomputable (and in fact grows faster than any computable function). If you are not familiar with lambda calculus and beta-reduction, it is recommended to start with that article.
'''Lambda calculus''' is a model of computation developed by Alonzo Church (of Church-Turing thesis fame) in 1932. If you are not familiar with lambda calculus and beta-reduction, it is recommended to start with [[wikipedia:Lambda_calculus|this article]].


Size is measured in bits using [https://tromp.github.io/cl/Binary_lambda_calculus.html Binary Lambda Calculus] which is a binary prefix-free encoding for all closed lambda calculus terms.
'''BBλ''' is the [[Busy Beaver]] function for lambda calculus, where BBλ(n) is the maximum normal form size of any closed lambda term of size n (or 0 if no closed term of size n exists). Size is measured in bits using [https://tromp.github.io/cl/Binary_lambda_calculus.html Binary Lambda Calculus], a binary prefix-free encoding for all closed lambda calculus terms. Pioneered by John Tromp, BBλ is uncomputable, and therefore grows faster than any computable function.  


== Analogy to Turing machines ==
== Analogy to Turing machines ==
Line 11: Line 11:
* Determining whether a term is reducible to a normal form is an undecidable problem equivalent to the halting problem.
* Determining whether a term is reducible to a normal form is an undecidable problem equivalent to the halting problem.


Note: That unlike for Turing machines, evaluating lambda terms is non-deterministic. Specifically, there may be multiple beta-reductions possible in a given term. However, if a term can be reduced to a normal form, that normal form is unique. It is not possible to reduce the original term to any different normal form. A term is '''strongly normalizing''' if any choice of beta-reductions will lead to this normal form and '''weakly normalizing''' if there exist divergent reduction paths which never reach the normal form.
Note: That unlike for Turing machines, evaluating lambda terms is non-deterministic. Specifically, there may be multiple beta-reductions possible in a given term. However, if a term can be reduced to a normal form, that normal form is unique. It is not possible to reduce the original term to any different normal form. A term is '''strongly normalizing''' if every beta-reduction sequence leads to this normal form and '''weakly normalizing''' if some sequence does (while others may diverge).


== Proof of Uncomputability ==
== Proof of Uncomputability ==
Line 52: Line 52:
== Champions ==
== Champions ==
There are no closed lambda terms of size 0, 1, 2, 3 or 5 and so BBλ(n) = 0 for those values.
There are no closed lambda terms of size 0, 1, 2, 3 or 5 and so BBλ(n) = 0 for those values.
<math>C(n)</math> denotes Church numeral ''n'' = <math>\lambda f\lambda x. f^n(x)</math>.
<math>C(n)</math> denotes Church numeral ''n'' = <math>\lambda f\lambda x. f^n(x)</math>.
In the last column, JT and BF abbreviate John Tromp and Bertram Felgenhauer.
In the last column, JT and BF abbreviate John Tromp and Bertram Felgenhauer.


We use the ordinal collapsing functions defined by Buchholz (1986). It is suspected (though not yet confirmed) that we used the fundamental sequences described by Maksudov (2017), or, in the case of lim(BMS), the sequence lim(BMS)[n] = BMS((0)(1,1,...,1)) w/n 1s.
The [https://discord.com/channels/960643023006490684/1355653587824283678/1493455967868817429 smallest Cryptid known] currently is in 74 bits.
<div class="toccolours mw-collapsible mw-collapsed">'''Small Champions'''<div class="mw-collapsible-content">
{| class="wikitable"
{| class="wikitable"
|+
|+
Line 63: Line 70:
!Discovered By
!Discovered By
|-
|-
|4 || = 4 || <math>\lambda 1</math>
| 4 || = 4 || <math>\lambda 1</math>
||| JT & BF
|
|JT & BF
|-
|-
|6 || = 6 || <math>\lambda\lambda 1</math>
| 6 || = 6 || <math>\lambda\lambda 1</math>
||| JT & BF
|
|JT & BF
|-
|-
|7 || = 7 || <math>\lambda\lambda 2</math>
| 7 || = 7 || <math>\lambda\lambda 2</math>
||| JT & BF
|
|JT & BF
|-
|-
|8 || = 8 || <math>\lambda\lambda\lambda 1</math>
| 8 || = 8 || <math>\lambda\lambda\lambda 1</math>
||| JT & BF
|
|JT & BF
|-
|-
|9 || = 9 || <math>\lambda\lambda\lambda 2</math>
| 9 || = 9 || <math>\lambda\lambda\lambda 2</math>
||| JT & BF
|
|JT & BF
|-
|-
|10 || = 10 || <math>\lambda\lambda\lambda\lambda 1</math>
| 10 || = 10 || <math>\lambda\lambda\lambda\lambda 1</math>
||| JT & BF
|
|JT & BF
|-
|-
|11 || = 11 || <math>\lambda\lambda\lambda\lambda 2</math>
| 11 || = 11 || <math>\lambda\lambda\lambda\lambda 2</math>
||| JT & BF
|
|JT & BF
|-
|-
|12 || = 12 || <math>\lambda\lambda\lambda\lambda\lambda 1</math>
| 12 || = 12 || <math>\lambda\lambda\lambda\lambda\lambda 1</math>
||| JT & BF
|
|JT & BF
|-
|-
|13 || = 13 || <math>\lambda\lambda\lambda\lambda\lambda 2</math>
| 13 || = 13 || <math>\lambda\lambda\lambda\lambda\lambda 2</math>
||| JT & BF
|
|JT & BF
|-
|-
|14 || = 14 || <math>\lambda\lambda\lambda\lambda\lambda\lambda 1</math>
| 14 || = 14 || <math>\lambda\lambda\lambda\lambda\lambda\lambda 1</math>
||| JT & BF
|
|JT & BF
|-
|-
|15 || = 15 || <math>\lambda\lambda\lambda\lambda\lambda\lambda 2</math>
| 15 || = 15 || <math>\lambda\lambda\lambda\lambda\lambda\lambda 2</math>
||| JT & BF
|
|JT & BF
|-
|-
|16 || = 16 || <math>\lambda\lambda\lambda\lambda\lambda\lambda\lambda 1</math>
| 16 || = 16 || <math>\lambda\lambda\lambda\lambda\lambda\lambda\lambda 1</math>
||| JT & BF
|
|JT & BF
|-
|-
|17 || = 17 || <math>\lambda\lambda\lambda\lambda\lambda\lambda\lambda 2</math>
| 17 || = 17 || <math>\lambda\lambda\lambda\lambda\lambda\lambda\lambda 2</math>
||| JT & BF
|
|JT & BF
|-
|-
|18 || = 18 || <math>\lambda\lambda\lambda\lambda\lambda\lambda\lambda\lambda 1</math>
|18
||| JT & BF
|= 18
|<math>\lambda\lambda\lambda\lambda\lambda\lambda\lambda\lambda 1</math>
|
|JT & BF
|-
|-
|19 || = 19 || <math>\lambda\lambda\lambda\lambda\lambda\lambda\lambda\lambda 2</math>
|19
||| JT & BF
|= 19
|<math>\lambda\lambda\lambda\lambda\lambda\lambda\lambda\lambda 2</math>
|
|JT & BF
|-
|-
|20 || = 20 || <math>\lambda\lambda\lambda\lambda\lambda\lambda\lambda\lambda\lambda 1</math>
|20
||| JT & BF
|= 20
|<math>\lambda\lambda\lambda\lambda\lambda\lambda\lambda\lambda\lambda 1</math>
|
|JT & BF
|}
</div></div>
 
{| class="wikitable"
|+
!n
!BBλ(n)
!Champion
!Normal form
!Discovered By
|-
|-
|21 || = 22 || <math>\lambda(\lambda 1 1) (1 (\lambda 2))</math>
|21 || = 22 || <math>\lambda(\lambda 1 1) (1 (\lambda 2))</math>
Line 123: Line 162:
| <math>\lambda(1 (\lambda 1)) (1 (\lambda 1)) (1 (\lambda 1))</math>|| JT & BF
| <math>\lambda(1 (\lambda 1)) (1 (\lambda 1)) (1 (\lambda 1))</math>|| JT & BF
|-
|-
|25 || = 42 || <math>\lambda(\lambda 1 1) (\lambda 1 (2 1))</math>  
|25 || = 42 || <math>\lambda(\lambda 1 1) (\lambda 1 (2 1))</math>
| <math>\lambda 1 (\lambda 1 (2 1)) (1 (1 (\lambda 1 (2 1))))</math> || JT & BF
| <math>\lambda 1 (\lambda 1 (2 1)) (1 (1 (\lambda 1 (2 1))))</math>|| JT & BF
|-
|-
|26 || = 52 || <math>(\lambda 1 1) (\lambda\lambda 2 (1 2))</math>  
|26 || = 52 || <math>(\lambda 1 1) (\lambda\lambda 2 (1 2))</math>
| <math>\lambda\lambda 2 (\lambda\lambda 2 (1 2)) (1 (2 (\lambda\lambda 2 (1 2))))</math> || JT & BF
| <math>\lambda\lambda 2 (\lambda\lambda 2 (1 2)) (1 (2 (\lambda\lambda 2 (1 2))))</math>|| JT & BF
|-
|-
|27 || = 44 || <math>\lambda\lambda(\lambda 1 1) (\lambda 1 (2 1))</math>  
|27 || = 44 || <math>\lambda\lambda(\lambda 1 1) (\lambda 1 (2 1))</math>
| <math>\lambda\lambda 1 (\lambda 1 (2 1)) (1 (1 (\lambda 1 (2 1))))</math> || JT & BF
| <math>\lambda\lambda 1 (\lambda 1 (2 1)) (1 (1 (\lambda 1 (2 1))))</math>|| JT & BF
|-
|-
|28 || = 58 || <math>\lambda(\lambda 1 1) (\lambda 1 (2 (\lambda 2))))</math>  
|28 || = 58 || <math>\lambda(\lambda 1 1) (\lambda 1 (2 (\lambda 2))))</math>
| <math>\lambda 1 (\lambda\lambda 1 (3 (\lambda 2))) (1 (\lambda 2 (\lambda\lambda 1 (4 (\lambda 2)))))</math>|| JT & BF
| <math>\lambda 1 (\lambda\lambda 1 (3 (\lambda 2))) (1 (\lambda 2 (\lambda\lambda 1 (4 (\lambda 2)))))</math>|| JT & BF
|-
|-
Line 153: Line 192:
|= 267
|= 267
|<math>(\lambda 1 1) (\lambda\lambda 2 (2 (1 2)))</math>
|<math>(\lambda 1 1) (\lambda\lambda 2 (2 (1 2)))</math>
|  
|
<math>\lambda\lambda 2 A (2 A (C (2 A))) \text{ where}</math>
<math>\lambda\lambda 2 A (2 A (C (2 A))) \text{ where}</math>
<math>C = (2 A (2 A (1 B (2 A))))</math>,  
<math>C = (2 A (2 A (1 B (2 A))))</math>,  
Line 176: Line 215:
|JT & BF
|JT & BF
|-
|-
|34 || <math>= 327\,686</math>
|34 || = 327686
| <math>(\lambda 1 1 1 1) (\lambda\lambda 2 (2 1))</math>
| <math>(\lambda 1 1 1 1) (\lambda\lambda 2 (2 1))</math>
| <math>C(2^{2^{2^2}})</math>|| JT & BF
| <math>C(2^{2^{2^2}})</math>|| JT & BF
Line 182: Line 221:
|35 || <math>= 5 \cdot 3^{3^3} + 6</math>
|35 || <math>= 5 \cdot 3^{3^3} + 6</math>
<math> > 3.8 \times 10^{13}</math>
<math> > 3.8 \times 10^{13}</math>
| <math>(\lambda 1 1 1) (\lambda\lambda 2 (2 (2 1)))</math>  
| <math>(\lambda 1 1 1) (\lambda\lambda 2 (2 (2 1)))</math>
| <math>C(3^{3^3})</math>|| JT & BF
| <math>C(3^{3^3})</math>|| JT & BF
|-
|-
|36 || <math>= 5 \cdot 2^{2^{2^3}} + 6</math>
|36 || <math>= 5 \cdot 2^{2^{2^3}} + 6 > 5.7 \times 10^{77}</math>
<math> > 5.7 \times 10^{77}</math>
| <math>(\lambda 1 1) (\lambda 1 (1 (\lambda\lambda 2 (2 1))))</math>
| <math>(\lambda 1 1) (\lambda 1 (1 (\lambda\lambda 2 (2 1))))</math>
| <math>C(2^{2^{2^3}})</math>|| JT & BF
| <math>C(2^{2^{2^3}})</math>|| JT & BF
Line 194: Line 232:
| <math>\lambda x. C(3^{3^3})</math>||mxdys & JT & dyuan & sligocki
| <math>\lambda x. C(3^{3^3})</math>||mxdys & JT & dyuan & sligocki
|-
|-
|38 || <math>\ge 10^{10^4}</math>
|38 || <math>= 5\cdot{2^{2^{2^{2^2}}}} + 6 > 10^{19,729}</math>
| <math>(\lambda 1 1 1 1 1) (\lambda\lambda 2 (2 1))</math>
| <math>(\lambda 1 1 1 1 1) (\lambda\lambda 2 (2 1))</math>
| <math>C(2^{2^{2^{2^2}}})</math>|| JT & BF
| <math>C(2^{2^{2^{2^2}}})</math>|| JT & BF & CppDS & mxdys & sligocki & dyuan & charles
|-
|-
|39 || <math>\ge 10^{10^{12}}</math>
|39 || <math>= 5\cdot{3^{3^{3^3}}} + 6 > 10^{10^{12}}</math>
| <math>(\lambda 1 1 1 1) (\lambda\lambda 2 (2 (2 1)))</math>  
| <math>(\lambda 1 1 1 1) (\lambda\lambda 2 (2 (2 1)))</math>
| <math>C(3^{3^{3^3}})</math>|| JT & BF
| <math>C(3^{3^{3^3}})</math>|| JT & BF & CppDS & mxdys & sligocki & dyuan & charles & 2014MELO & mammilaria
|-
|-
|40 || <math> > 10 \uparrow\uparrow\uparrow 16</math>
|40 || <math> \approx 10 \uparrow\uparrow\uparrow 16</math>
| <math>(\lambda 1 1 1) (\lambda 1 (\lambda\lambda 2 (2 1)) 1)</math>
| <math>(\lambda 1 1 1) (\lambda 1 (\lambda\lambda 2 (2 1)) 1)</math>
| <math>\lambda x.T(k)\text{ where}</math>
| <math>\lambda x.T(k)\text{ where}</math>
Line 210: Line 248:
|| mxdys & racheline
|| mxdys & racheline
|-
|-
|41 || <math>\ge 10^{10^{40}}</math>
|41 || <math>= 5 \times 3^{3^{85}} +6 > 10^{1.7 \times 10^{40}} \approx 10^{10^{40}}</math>
|  <math>(\lambda 1 (\lambda 1 1) 1) (\lambda\lambda 2 (2 (2 1)))</math>
|  <math>(\lambda 1 (\lambda 1 1) 1) (\lambda\lambda 2 (2 (2 1)))</math>
| <math>C(3^{3^{85}})</math>||mxdys
| <math>C(3^{3^{85}})</math>||mxdys
Line 227: Line 265:
|-
|-
|44 || <math> > 10 \uparrow\uparrow\uparrow 10 \uparrow\uparrow\uparrow 16</math>
|44 || <math> > 10 \uparrow\uparrow\uparrow 10 \uparrow\uparrow\uparrow 16</math>
| <math>(\lambda 1 1 1 1) (\lambda 1 (\lambda\lambda 2 (2 1)) 1)</math>  
| <math>(\lambda 1 1 1 1) (\lambda 1 (\lambda\lambda 2 (2 1)) 1)</math>
| <math>\lambda x.T(k)\text{ where}</math>
| <math>\lambda x.T(k)\text{ where}</math>
<math>T(0)=x</math>,
<math>T(0)=x</math>,
<math>T(n+1)=T(n)\;C(2)\;T(n)</math>,  
<math>T(n+1)=T(n)\;C(2)\;T(n)</math>,  
<math>k > (2\uparrow\uparrow)^{(2\uparrow\uparrow)^{15} 33 - 1} 33</math>||
<math>k > (2\uparrow\uparrow)^{(2\uparrow\uparrow)^{15} 33 - 1} 33</math>
||
|-
|-
|45 || <math> \ge 2 + BB\lambda(43)</math>
|45 || <math> \ge 2 + BB\lambda(43)</math>
Line 241: Line 280:
| ||
| ||
|-
|-
|47 ||  
|47 || <math>> f_{\omega}\left(f_{5}\left(2\right)\right)</math>
|   
|  <math>(\lambda 1 1 1)(\lambda\lambda 1 (1 2) (\lambda\lambda 2 (2 1)))</math>
| ||
| ||50_ft_lock
|-
|-
|48 || <math> > 10 \uparrow\uparrow\uparrow\uparrow 4</math>
|48 || <math> > 10 \uparrow\uparrow\uparrow\uparrow 4</math>
| <math>(\lambda 1 1 1 1 1) (\lambda 1 (\lambda\lambda 2 (2 1)) 1)</math>  
| <math>(\lambda 1 1 1 1 1) (\lambda 1 (\lambda\lambda 2 (2 1)) 1)</math>
| <math>\lambda x.T(k)</math> where <math>T(0)=x,\;T(n+1)=T(n)\;C(2)\;T(n)</math> and <math>k > (2\uparrow\uparrow)^{(2\uparrow\uparrow)^{(2\uparrow\uparrow)^{15} 33 - 1} 33 - 1} 33</math>||
| <math>\lambda x.T(k)</math> where <math>T(0)=x,\;T(n+1)=T(n)\;C(2)\;T(n)</math> and <math>k > (2\uparrow\uparrow)^{(2\uparrow\uparrow)^{(2\uparrow\uparrow)^{15} 33 - 1} 33 - 1} 33</math>||
|-
|-
Line 274: Line 313:
|-
|-
|86
|86
|<math>> f_{\omega^{\omega^{2}}}\left(2\right)</math>
|<math>> f_{\omega^{\omega65536}}\left(2\right)</math>
|<math>(\lambda 1 (\lambda\lambda\lambda\lambda 1 4 4 4 3 2 1) 1 1 1 1) (\lambda\lambda 2 (2 1))</math>
|<math>(\lambda 1 (\lambda\lambda\lambda\lambda 1 4 4 4 3 2 1) 1 1 1 1) (\lambda\lambda 2 (2 1))</math>
|
|
|Patcail
|[https://docs.google.com/document/d/1xlzaEQGarqnCocf4R2UWfqE3ck8YF_P32CmYxGXLhAI/edit?tab=t.0 Patcail]
|-
|-
|...
|...
Line 289: Line 328:
|<math>(\lambda 1 1 (\lambda\lambda\lambda\lambda 1 4 4 4 3 2 1) 1 1 1 1) (\lambda\lambda 2 (2 1))</math>
|<math>(\lambda 1 1 (\lambda\lambda\lambda\lambda 1 4 4 4 3 2 1) 1 1 1 1) (\lambda\lambda 2 (2 1))</math>
|
|
|Patcail
|[https://docs.google.com/document/d/1xlzaEQGarqnCocf4R2UWfqE3ck8YF_P32CmYxGXLhAI/edit?tab=t.0 Patcail]
|-
|-
|...
|...
Line 301: Line 340:
|<math>(\lambda 1 1 1 (\lambda\lambda\lambda\lambda 1 4 4 4 3 2 1) 1 1 1 1) (\lambda\lambda 2 (2 1))</math>
|<math>(\lambda 1 1 1 (\lambda\lambda\lambda\lambda 1 4 4 4 3 2 1) 1 1 1 1) (\lambda\lambda 2 (2 1))</math>
|
|
|Patcail
|[https://docs.google.com/document/d/1xlzaEQGarqnCocf4R2UWfqE3ck8YF_P32CmYxGXLhAI/edit?tab=t.0 Patcail]
|-
|-
|95
|95
Line 307: Line 346:
|<math>(\lambda 1 1 (\lambda\lambda\lambda\lambda 1 4 4 4 3 2 1) 1 1 1 1) (\lambda\lambda 2 (2 (2 1)))</math>
|<math>(\lambda 1 1 (\lambda\lambda\lambda\lambda 1 4 4 4 3 2 1) 1 1 1 1) (\lambda\lambda 2 (2 (2 1)))</math>
|
|
|Patcail
|[https://docs.google.com/document/d/1xlzaEQGarqnCocf4R2UWfqE3ck8YF_P32CmYxGXLhAI/edit?tab=t.0 Patcail]
|-
|-
|96
|96
Line 313: Line 352:
|<math>(\lambda 1 (\lambda 1 (\lambda\lambda\lambda\lambda 1 4 4 4 3 2 1) 1 1 1 1) 1) (\lambda\lambda 2 (2 1))</math>
|<math>(\lambda 1 (\lambda 1 (\lambda\lambda\lambda\lambda 1 4 4 4 3 2 1) 1 1 1 1) 1) (\lambda\lambda 2 (2 1))</math>
|
|
|Patcail
|[https://docs.google.com/document/d/1xlzaEQGarqnCocf4R2UWfqE3ck8YF_P32CmYxGXLhAI/edit?tab=t.0 Patcail]
|-||||||-
|- ||||||-
|100
|100
|<math>> f_{\psi(\Omega_\omega)+1}\left(4\right)</math>
|<math>> f_{\psi(\Omega_\omega)+1}\left(4\right)</math>
|<math>(\lambda 1 1 (\lambda 1 (\lambda\lambda\lambda\lambda 1 4 4 4 3 2 1) 1 1 1 1) 1) (\lambda\lambda 2 (2 1))</math>
|<math>(\lambda 1 1 (\lambda 1 (\lambda\lambda\lambda\lambda 1 4 4 4 3 2 1) 1 1 1 1) 1) (\lambda\lambda 2 (2 1))</math>
|
|
|Patcail
|[https://docs.google.com/document/d/1xlzaEQGarqnCocf4R2UWfqE3ck8YF_P32CmYxGXLhAI/edit?tab=t.0 Patcail]
|-||||||-
|- ||||||-
|213
|201
| > q(5)
| > q(5)  
|too large to show
|too large to show
|
|q is only proven to exceed all functions provably recursive in PA; the true value is likely much larger based on informal analysis
|[https://github.com/tromp/AIT/blob/master/fast_growing_and_conjectures/laver.lam JT & BF]
|[https://github.com/tromp/AIT/blob/master/fast_growing_and_conjectures/laver.lam JT & BF & 50_ft_lock]
|-||||||-
|- ||||||-
|331
|331
| lim(BMS)
| > f<sup>3</sup><sub>lim(BMS)</sub>(5)
|too large to show
|too large to show
|
|
|[https://github.com/tromp/AIT/blob/master/fast_growing_and_conjectures/bms.lam Patcail & JT & 50_ft_lock]
|[https://github.com/tromp/AIT/blob/master/fast_growing_and_conjectures/bms.lam Patcail & JT & 50_ft_lock]
|-||||||-
|- ||||||-
|1850
|1797
|> Loader's number
|> D⁵(99) = Loader's number
|too large to show
|too large to show
|
|
|[https://codegolf.stackexchange.com/questions/176966/golf-a-number-bigger-than-loaders-number/274634#274634 JT]
|[https://codegolf.stackexchange.com/questions/176966/golf-a-number-bigger-than-loaders-number/274634#274634 JT & BF & DropperAUGL]
|}
|}
== Optimal Busy Beaver ==
A closely related BBλ2 function, defined as OEIS sequence (A361211)[https://oeis.org/A361211], allows the lambda term access to (undelimited) raw binary data, which suffices to make it an optimal busy beaver function amongst all binary self-delimiting ones.


== Oracle Busy Beaver ==
== Oracle Busy Beaver ==
Line 359: Line 402:
|+
|+
!n
!n
!champion
!Champion
!BBλ<sub>1</sub>
!BBλ<sub>1</sub>
|-
|-
Line 395: Line 438:
|-
|-
|9
|9
|<math>\lambda \lambda 2</math>
|λ λ λ 2
|9
|9
|-
|-
Line 420: Line 463:
|15
|15
|<math>1 (1 (\lambda \lambda 2))</math>
|<math>1 (1 (\lambda \lambda 2))</math>
|<math>f^{2}(7) = f(41) \geq 25 \times 3^{3^{85}}+36 > 10^{10^{40}}</math>
|<math>f^{2}(7) = f(41) = 25 \times 3^{3^{85}}+36 > 10^{10^{40}}</math>
|-
|-
|16
|16
Line 448: Line 491:
|22
|22
|<math>1 (1 (\lambda 1)) 1 (\lambda 1)</math>
|<math>1 (1 (\lambda 1)) 1 (\lambda 1)</math>
|<math>f^{52}(4)</math>
|<math>f^{26}(4)</math>
|-
|-
|...
|...
Line 457: Line 500:
|<math>1 (\lambda 1) 1 (\lambda 1) 1 (\lambda 1)</math>
|<math>1 (\lambda 1) 1 (\lambda 1) 1 (\lambda 1)</math>
|<math>\ge f^{BB \lambda(f^3(4))}(4)</math>
|<math>\ge f^{BB \lambda(f^3(4))}(4)</math>
|}
We can generalize BBλ<sub>1</sub> to BBλ<sub>α</sub> for ordinals α by using oracle function BBλ<sub>α-1</sub> for successor ordinal a, and oracle function (\n -> BBλ<sub>α[n]</sub>(n)) for limit ordinal α, assuming well-defined fundamental sequences up to α. Because of limited oracle inputs, all oracle busy beavers have identical values up to n=11.
== De Bruijn ==
We can use De Bruijn index instead of binary to evaluate lambda calculus size. To get the size of an expression, convert it into De Bruijn index then count the number of lambdas / backslashes and numbers. By example, <code>(\1 1) (\\2 (1 2))</code>  is size 8 because it has 3 backslashes and 5 numbers.
For n < 7, BBλ_db(n) = n is trivial and can be achieved via picking any size n term already in normal form, like BBλ(m) for m ≤ 20.
{| class="wikitable"
!BBλ_db(n)
!Value
!Champion
!Discovered By
|-
|7
|≥ 7
|<code>\1 1 1 1 1 1</code>
|
|-
|8
|≥ 16
|<code>(\1 1) (\\2 (1 2))</code>
|[[User:Azerty|Azerty]] & John Tromp &  Bertram Felgenhauer
|-
|9
|≥ 68
|<code>(\1 1) (\\2 (2 (1 2)))</code>
|John Tromp &  Bertram Felgenhauer
|-
|10
|<math>\ge 3 \uparrow\uparrow 3 + 3 > 7.625 \times 10^{12}</math>
|<code>(\1 1 1) (\\2 (2 (2 1)))</code>
|
|-
|11
|<math>\ge 3 \uparrow\uparrow 4 + 3 > 10^{10^{12}}</math>
|<code>(\1 1 1 1) (\\2 (2 (2 1)))</code>
|
|-
|12
|<math>> 10 {\uparrow}^{3} 16</math>
|<code>(\1 1 1) (\1 (\\2 (2 1)) 1)</code>
|mxdys and racheline
|-
|13
|<math>> 10 {\uparrow}^{3} 10 {\uparrow}^{3} 10 {\uparrow}^{2} 6</math>
|<code>(\1 1) (\1 (\1 (\\2 (2 1)) 2))</code>
|mxdys
|-
|14
|<math>> 10 {\uparrow}^{3} 10 {\uparrow}^{3} 10 {\uparrow}^{3} 16</math>
|<code>(\1 1 1 1 1) (\1 (\\2 (2 1)) 1)</code>
|
|-
|-
|15
|29
|<math>> f_{\omega+1}(2 \uparrow\uparrow 6)</math>
|<math>1(\lambda 1)(\lambda 1 2 1)(\lambda 1)</math>
|<code>(\1 1) (\1 (1 (\\1 2 (\\2 (2 1)))))</code>
|<math>\ge f^{BB \lambda(f^{BB \lambda(f^4(4))+4}(4))+BB \lambda(f^4(4))+5}(4)</math>
|[https://github.com/tromp/AIT/blob/master/fast_growing_and_conjectures/melo.lam Gustavo Melo]
|-
|18
|<math>> f_{\omega^\omega}(2 \uparrow\uparrow 18)</math>
|<code>(\1 1 1) (\1 (1 (\\\1 3 2 (\\2 (2 1)))))</code>
|[https://tromp.github.io/blog/2026/01/28/largest-number-revised 50_ft_lock]
|-
|22
|<math>> f_{\omega^{\omega+2}}(2)</math>
|<code>(\1 (\\\\1 4 4 4 3 2 1) 1 1 1 1) (\\2 (2 1))</code>
|Patcail
|-
|23
|<math>> f_{\zeta_0}(15)</math>
|<code>(\1 1 (\\\\1 4 4 4 3 2 1) 1 1 1 1) (\\2 (2 1))</code>
|Patcail
|-
|24
|<math>> f_{\psi(\Omega_\omega)}(12)</math>
|<code>(\1 1 1 (\\\\1 4 4 4 3 2 1) 1 1 1 1) (\\2 (2 1))</code>
|Patcail
|-
|25
|<math>> f_{\psi(\Omega_\omega)}(f_{\omega^{\omega+2}}(2))</math>
|<code>(\1 (\1 (\\\\1 4 4 4 3 2 1) 1 1 1 1) 1) (\\2 (2 1))</code>
|Patcail
|-
|26
|<math>> f_{\psi(\Omega_\omega+1)}(4)</math>
|<code>(\1 1 (\1 (\\\\1 4 4 4 3 2 1) 1 1 1 1) 1) (\\2 (2 1))</code>
|Patcail
|}
|}
We can generalize BBλ<sub>1</sub> to BBλ<sub>α</sub> for ordinals α by using oracle function BBλ<sub>α-1</sub> for successor ordinal α, and oracle function (\n -> BBλ<sub>α[n]</sub>(n)) for limit ordinal α, assuming well-defined fundamental sequences up to α. Because of limited oracle inputs, all oracle busy beavers have identical values up to n=11.


== See Also ==
== See Also ==
 
* [[Busy Beaver for SKI calculus|SKI calculus]]
* [[De Bruijn index]]
* https://oeis.org/A333479
* https://oeis.org/A333479
* [https://tromp.github.io/blog/2026/01/28/largest-number-revised The largest number representable in 64 bits]. 28 Jan 2026. John Tromp.
* [https://www.mdpi.com/1099-4300/28/5/494 The Largest Number Representable in 64 Bits]. 26 Apr 2026. John Tromp.
* [https://gist.github.com/tromp/86b3184f852f65bfb814e3ab0987d861 Binary Lambda Calculus]. John Tromp.
* [https://gist.github.com/tromp/86b3184f852f65bfb814e3ab0987d861 Binary Lambda Calculus]. John Tromp.
* https://github.com/tromp/AIT/tree/master/BB
* https://github.com/tromp/AIT/tree/master/BB
* https://github.com/ccz181078/BLC.git
* https://docs.google.com/spreadsheets/d/1jZ6TK9m3xmXUlC69727T-8WwvhALcsp8FrK6DzgThtw
* Buchholz, W. (1986). A new system of proof-theoretic ordinal functions. ''Annals of Pure and Applied Logic, 32'', 195-207. https://doi.org/10.1016/0168-0072(86)90052-7
* Maksudov, D. (2017, April). ''Travelling To The Infinity - The extended Wilfried Buchholz's functions.'' Travelling To The Infinity. https://sites.google.com/site/travelingtotheinfinity/the-extension-of-buchholz-s-function
[[category:Functions]]
[[category:Functions]]

Latest revision as of 12:50, 25 September 2026

Lambda calculus is a model of computation developed by Alonzo Church (of Church-Turing thesis fame) in 1932. If you are not familiar with lambda calculus and beta-reduction, it is recommended to start with this article.

BBλ is the Busy Beaver function for lambda calculus, where BBλ(n) is the maximum normal form size of any closed lambda term of size n (or 0 if no closed term of size n exists). Size is measured in bits using Binary Lambda Calculus, a binary prefix-free encoding for all closed lambda calculus terms. Pioneered by John Tromp, BBλ is uncomputable, and therefore grows faster than any computable function.

Analogy to Turing machines

We evaluate terms by applying beta-reductions until they reach a normal form. As an analogy to Turing machines:

  • Lambda terms are like TM configurations (tape + state + position).
  • Applying beta-reduction to a term is like taking a TM step.
  • A term is in normal form if no beta-reductions can be applied. This is like saying the term has halted.
  • A term may or may not be reducible to a normal form. If it is, this is like saying the term halts.
  • Determining whether a term is reducible to a normal form is an undecidable problem equivalent to the halting problem.

Note: That unlike for Turing machines, evaluating lambda terms is non-deterministic. Specifically, there may be multiple beta-reductions possible in a given term. However, if a term can be reduced to a normal form, that normal form is unique. It is not possible to reduce the original term to any different normal form. A term is strongly normalizing if every beta-reduction sequence leads to this normal form and weakly normalizing if some sequence does (while others may diverge).

Proof of Uncomputability

The proof that BBλ(n) is uncomputable is very similar to Radó's original proof that Σ(n) is uncomputable. Proof by contradiction:

Assume BBλ is computable and so there exists a term f which computes it on Church numerals. In other words: for all n∈ℕ: (fCn) beta reduces to normal form CBBλ(n) (where Cn denotes the Church numeral n). Denote the binary lambda encoded size of f as k. Consider the term f(C2Cn) which has size 2+k+2+(5×2+6)+(5n+6)=5n+k+26 bits. This term reduces to CBBλ(n2) which has size 5⋅BBλ(n2)+6 bits. But for sufficiently large n, n2>5n+k+26 and so 5⋅BBλ(n2)+6>BBλ(5n+k+26). But this is a contradiction, we've found a 5n+k+26 bit term which reduces to a normal form larger than BBλ(5n+k+26).

Thus BBλ(n) is uncomputable. A variation of this argument shows that BBλ(n) eventually dominates all computable functions.

Binary Lambda Encoding

A lambda term using De Bruijn indexes is defined inductively as:

  • Variables: For any n∈ℤ+, Var(n) is a term. It represents a variable bound by the lambda expression n above this one (the De Bruijn index). It is typically written simply as n.
  • Lambdas: For any term T, Lam(T) is a term. It represents a unary function with function body T. It is typically written λT or \T.
  • Applications: For any terms T, U, App(T, U) is a term. It represents applying function T to argument U. It is typically written (T U).

We can think of this as a tree where each variable is a leaf, a lambda is a node with one child and applications are nodes with 2 children. A term is closed if every variable is bound. In other words, for every Var(n) leaf node, there exists n Lam() nodes above it in the tree of the term.

Encoding (blc()) is defined recursively: blc(Var(n))=1n0blc(Lam(T))=00blc(T)blc(App(T,U))=01blc(T)blc(U)

For example, the Church numeral 2: λfx.(f(fx)) = \\(2 (2 1)) = Lam(Lam(App(Var(2), App(Var(2), Var(1)))) is encoded as 00 00 01 110 01 110 10 or simply 0000011100111010 (spaces are not part of the encoding, only used for demonstration purposes) and thus has size 16 bits.

Text Encoding conventions

For human readability, a text encoding and set of conventions is used in this article. As described earlier we encode a lambda term as:

  • Var(n) -> n
  • Lam(T) -> (\T)
  • App(T, U) -> (T U)

However, parentheses are also dropped in certain cases by convention:

  • The outermost parentheses are dropped: Lam(1) -> \1 and App(1, 2) -> 1 2.
  • Parentheses are dropped immediately inside a Lam: Lam(Lam(1)) -> \\1 and Lam(App(1, 1)) -> \1 1.
  • Parentheses are dropped in nested Apps using left associativity: App(App(1, 2), 3) -> 1 2 3. (Note: parentheses are still required for App(1, App(2, 3)) -> 1 (2 3)).

This is the convention used in John Tromp's code and so is used here for consistency.

Champions

There are no closed lambda terms of size 0, 1, 2, 3 or 5 and so BBλ(n) = 0 for those values.

C(n) denotes Church numeral n = λfλx.fn(x).

In the last column, JT and BF abbreviate John Tromp and Bertram Felgenhauer.

We use the ordinal collapsing functions defined by Buchholz (1986). It is suspected (though not yet confirmed) that we used the fundamental sequences described by Maksudov (2017), or, in the case of lim(BMS), the sequence lim(BMS)[n] = BMS((0)(1,1,...,1)) w/n 1s.

The smallest Cryptid known currently is in 74 bits.

Small Champions
n BBλ(n) Champion Normal form Discovered By
4 = 4 λ1 JT & BF
6 = 6 λλ1 JT & BF
7 = 7 λλ2 JT & BF
8 = 8 λλλ1 JT & BF
9 = 9 λλλ2 JT & BF
10 = 10 λλλλ1 JT & BF
11 = 11 λλλλ2 JT & BF
12 = 12 λλλλλ1 JT & BF
13 = 13 λλλλλ2 JT & BF
14 = 14 λλλλλλ1 JT & BF
15 = 15 λλλλλλ2 JT & BF
16 = 16 λλλλλλλ1 JT & BF
17 = 17 λλλλλλλ2 JT & BF
18 = 18 λλλλλλλλ1 JT & BF
19 = 19 λλλλλλλλ2 JT & BF
20 = 20 λλλλλλλλλ1 JT & BF
n BBλ(n) Champion Normal form Discovered By
21 = 22 λ(λ11)(1(λ2)) λ(1(λ2))(1(λ2)) JT & BF
22 = 24 λ(λ111)(11) λ(11)(11)(11) JT & BF
23 = 26 λ(λ11)(1(λλ2)) λ(1(λλ2))(1(λλ2)) JT & BF
24 = 30 λ(λ111)(1(λ1)) λ(1(λ1))(1(λ1))(1(λ1)) JT & BF
25 = 42 λ(λ11)(λ1(21)) λ1(λ1(21))(1(1(λ1(21)))) JT & BF
26 = 52 (λ11)(λλ2(12)) λλ2(λλ2(12))(1(2(λλ2(12)))) JT & BF
27 = 44 λλ(λ11)(λ1(21)) λλ1(λ1(21))(1(1(λ1(21)))) JT & BF
28 = 58 λ(λ11)(λ1(2(λ2)))) λ1(λλ1(3(λ2)))(1(λ2(λλ1(4(λ2))))) JT & BF
29 = 223 λ(λ11)(λ1(1(21))) λB(B(1B)) where

B=(A(A(1A))), A=(1(λ1(1(21))))

JT & BF
30 = 160 (λ111)(λλ2(12))

λλ2BA(1(2BA)) where B=(λλ2A(1(2A))), A=(λλ2(12))

JT & BF
31 = 267 (λ11)(λλ2(2(12)))

λλ2A(2A(C(2A))) where C=(2A(2A(1B(2A)))), B=(λ3A(3A(1(3A)))), A=(λλ2(2(12)))

JT & BF
32 = 298 λ(λ11)(λ1(1(2(λ2)))) JT & BF
33 = 1812 λ(λ11)(λ1(1(1(21))))

λC(C(C(1C))) where C=(B(B(B(1B))), B=(A(A(A(1A))), A=(1(λ1(1(1(21)))))

JT & BF
34 = 327686 (λ1111)(λλ2(21)) C(2222) JT & BF
35 =5⋅333+6

>3.8×1013

(λ111)(λλ2(2(21))) C(333) JT & BF
36 =5⋅2223+6>5.7×1077 (λ11)(λ1(1(λλ2(21)))) C(2223) JT & BF
37 =2+BBλ(35) λ(λ111)(λλ2(2(21))) λx.C(333) mxdys & JT & dyuan & sligocki
38 =5⋅22222+6>1019,729 (λ11111)(λλ2(21)) C(22222) JT & BF & CppDS & mxdys & sligocki & dyuan & charles
39 =5⋅3333+6>101012 (λ1111)(λλ2(2(21))) C(3333) JT & BF & CppDS & mxdys & sligocki & dyuan & charles & 2014MELO & mammilaria
40 ≈10↑↑↑16 (λ111)(λ1(λλ2(21))1) λx.T(k) where

T(0)=x, T(n+1)=T(n)C(2)T(n), k>(2↑↑)1533

mxdys & racheline
41 =5×3385+6>101.7×1040≈101040 (λ1(λ11)1)(λλ2(2(21))) C(3385) mxdys
42 ≥2+BBλ(40) λ(λ111)(λ1(λλ2(21))1)
43 >2↑↑↑2↑↑↑2↑↑8 (λ11)(λ1(λ1(λλ2(21))2)) λx.T(k) where

T(0)=x, T(n+1)=T(n)(λy.yC(2)T(n)), k>2↑↑↑2↑↑↑2↑↑8

mxdys
44 >10↑↑↑10↑↑↑16 (λ1111)(λ1(λλ2(21))1) λx.T(k) where

T(0)=x, T(n+1)=T(n)C(2)T(n), k>(2↑↑)(2↑↑)1533−133

45 ≥2+BBλ(43) λ(λ11)(λ1(λ1(λλ2(21))2))
46 ≥2+BBλ(44) λ(λ1111)(λ1(λλ2(21))1)
47 >fω(f5(2)) (λ111)(λλ1(12)(λλ2(21))) 50_ft_lock
48 >10↑↑↑↑4 (λ11111)(λ1(λλ2(21))1) λx.T(k) where T(0)=x,T(n+1)=T(n)C(2)T(n) and k>(2↑↑)(2↑↑)(2↑↑)1533−133−133
49 >fω+1(2↑↑62) > Graham's number (λ11)(λ1(1(λλ12(λλ2(21))))) C(fω+1(2↑↑62)) Gustavo Melo
...
61 >fω2↑↑18−1(2) (λ111)(λ1(1(λλλ132(λλ2(21))))) C(fω2↑↑18−1(2)) 50_ft_lock
...
86 >fωω65536(2) (λ1(λλλλ1444321)1111)(λλ2(21)) Patcail
...
90 >fζ0(15) (λ11(λλλλ1444321)1111)(λλ2(21)) Patcail
...
94 >fψ(Ωω)(12) > TREE(G64) (λ111(λλλλ1444321)1111)(λλ2(21)) Patcail
95 >fψ(Ωω)(23) (λ11(λλλλ1444321)1111)(λλ2(2(21))) Patcail
96 >fψ(Ωω)(fωω2(2)) (λ1(λ1(λλλλ1444321)1111)1)(λλ2(21)) Patcail
100 >fψ(Ωω)+1(4) (λ11(λ1(λλλλ1444321)1111)1)(λλ2(21)) Patcail
201 > q(5) too large to show q is only proven to exceed all functions provably recursive in PA; the true value is likely much larger based on informal analysis JT & BF & 50_ft_lock
331 > f3lim(BMS)(5) too large to show Patcail & JT & 50_ft_lock
1797 > D⁵(99) = Loader's number too large to show JT & BF & DropperAUGL

Optimal Busy Beaver

A closely related BBλ2 function, defined as OEIS sequence (A361211)[1], allows the lambda term access to (undelimited) raw binary data, which suffices to make it an optimal busy beaver function amongst all binary self-delimiting ones.

Oracle Busy Beaver

While BBλ grows uncomputably fast, one can define functions that grow much faster.

Let's define a higher order busy beaver function BBλ1 by providing oracle access to BBλ.

This is done by enriching the set of terms and possible reduction steps considered in the BB definition.

A 1-closed term is a term in de Bruijn notation that is closed with 1 additional lambda in front. Any variable bound to that lambda is a free variable f in the term.

An oracle reduction step reduces f t, where t is a closed normal form of size s, to Church numeral BBλ(s).

Note that this is almost identical to the oracle steps in Barendregt and Klop's "Applications of infinitary lambda calculus", except that they require t itself to be a church numeral. Allowing arbitrary closed t makes oracle steps more widely applicable while aligning with BBλ's focus on term sizes.

Now let BBλ1 be the maximum beta/oracle normal form size of any 1-closed lambda term of size n, or 0 if no 1-closed term of size n exists. This appears as sequence A385712 in the OEIS.

The following table shows values of BBλ1 up to 22 plus a lower bound for 28, with larger values expressed in terms of function f(n)=6+5×BBλ(n):

n Champion BBλ1
1 0
2 1 1
3 0
4 λ1 4
5 λ2 5
6 λλ1 6
7 λλ2 7
8 1(λ1) f(4)=26
9 λ λ λ 2 9
10 1(λλ1) f(6)=36
11 1(λλ2) f(7)=41
12 1(1(λ1)) f2(4)=266
13 1(λλ2) f(9)=51
14 1(1(λλ1)) f2(6)=f(36)=25×2223+36>2.85×1078
15 1(1(λλ2)) f2(7)=f(41)=25×3385+36>101040
16 1(1(1(λ1))) f3(4)=f(266)
17 1(1(λλλ2)) f2(9)=f(51)
18 1(λ1)1(λ1) f4(4)
19 1(1(1(λλ2))) f3(7)
20 1(λλ1)1(λ1) f6(4)
21 1(λλ2)1(λ1) f7(4)
22 1(1(λ1))1(λ1) f26(4)
...
28 1(λ1)1(λ1)1(λ1) ≥fBBλ(f3(4))(4)
29 1(λ1)(λ121)(λ1) ≥fBBλ(fBBλ(f4(4))+4(4))+BBλ(f4(4))+5(4)

We can generalize BBλ1 to BBλα for ordinals α by using oracle function BBλα-1 for successor ordinal α, and oracle function (\n -> BBλα[n](n)) for limit ordinal α, assuming well-defined fundamental sequences up to α. Because of limited oracle inputs, all oracle busy beavers have identical values up to n=11.

See Also