Javascript, 111 bytes, ~ \$f_{\psi(\Omega_\omega)}(6)\$
\$f\$ is the Fast-growing Hierarchy. \$ψ\$ is Buchholz's Psi. This entry, despite being 111 bytes, dominates all of the previous entries in both size and the amount of bytes (except for Loader's number).
Here is the code:
s=JSON.stringify;P=([y,z])=>y?JSON.parse((k=s([P(y),z])).replaceAll(s(z),k)):z;for(a=b=0;a=b++<9?[a,0]:P(a););b
Here is the same code expanded out:
function P([y,z]) {
if (y==0) {
return z
} else {
k = JSON.stringify([P(y),z])
return JSON.parse(k.replaceAll(JSON.stringify(z),k))
}
}
for(a=b=0;a=b++<9?[a,0]:P(a););
b;
I'm going to explain both the P
function and the for loop.
The Predecessor Function
The inputs of the predecessor function are binary trees with zeroes as leaf nodes. Here are some examples of binary trees:
0
[0,0]
[[0,[0,0]],[0,0]]
[[[[[0,0],0],[0,0]],[0,0]],[[0,[0,0]],[0,[0,0]]]]
[[[[[[[[[[0,0],0],0],0],0],0],0],0],0],0]
The Predecessor function is defined like this:
P([0,z])=z
P([x,y])=[P(x),y]
but with all instances of y
replaced with [P(x),y]
P(0)
is left undefined
Right away, we can see 0
represents the number \$0\$, and [0,z]
represents the structure \$z+1\$.
Natural numbers can be represented as [0,[0,[0,...[0,0]...]]]
with \$n+1\$ zeroes. For example, \$1 =\$ [0,0]
, \$2 =\$ [0,[0,0]]
, \$3 =\$ [0,[0,[0,0]]]
, and so on.
Now consider the string [1,n]
where \$n>1\$.
P([1,n])=[0,n]
but replace all instances of \$n\$ with [0,n]
\$\to\$ [0,[0,n]]
Therefore, [1,n]
corresponds to \$n+3\$, as P(P(P([1,n]))) = n
By this logic, [2,n]
corresponds to \$n+7\$, [3,n]
corresponds to \$n+15\$, and [n,n]
would approximately correspond to \$2^n\$. Maybe [[0,n],n]
corresponds to \$2^{n+1}\$?
Not so fast!
Consider the string [[0,n],n]
. One would expect this to correspond to \$2^{n+1}\$, but it is much stronger. P([[0,n],n])
\$\to\$ [P([0,n]),n] = [n,n]
, but then the second step would be to replace all instances of n
with the entire tree, or [n,n]
. This makes P([[0,n],n])=[[n,n],[n,n]]
rather than [n,[n,n]]
.
One would ask whether this would cause an infinite loop. Let's try P([[n,n],[n,n]])
. If we let J = P([n,n])
, we will get:
P([[n,n],[n,n]])=[J,[n,n]]
but with all instances of [n,n]
replaced with [J,[n,n]]
However, there are no instances of [n,n]
within J
, because J
is strictly less than [n,n]
. Therefore, P([[n,n],[n,n]])=[J,[J,[n,n]]]
. This works for all J
less than [n,n]
.
So this means [[0,n],n]
corresponds to \$2^{2^n}\$. [[0,[0,n]],n]
corresponds to \$2^{2^{2^{2^n}}}\$. And finally, [[n,n],n]
corresponds to \$n \uparrow\uparrow n\$. Now it is time to bring in the Middle Growing Hierarchy.
Middle Growing Hierarchy
The Middle Growing Hierarchy is defined here: https://googology.wikia.org/wiki/Middle-growing_hierarchy
One can make an approximate distinction with the Middle Growing Hierarchy.
[0,n]
corresponds to \$m(0,n) \sim n+1\$
[1,n]
corresponds to \$m(2,n) \sim n+3\$
[2,n]
corresponds to \$m(3,n) \sim n+7\$
[n,n]
corresponds to \$m(n,n) \sim n+2^n\$ and \$m(ω,n)\$
[n,[n,n]]
corresponds to \$m(n+1,n) \sim 2^{n+1}\$ (not \$m(ω+1,n)\$)
[[0,n],n]
corresponds to \$m(ω+1,n) \sim 2^{2^n}\$
[[0,[0,n]],n]
corresponds to \$m(ω+2,n) \sim 2^{2^{2^{2^n}}}\$
[[1,n],n]
corresponds to \$m(ω+3,n) \sim 2^{2^{2^{2^{2^{2^{2^{2^n}}}}}}}\$
[[n,n],n]
corresponds to \$m(ω2,n) \sim n \uparrow\uparrow n\$
One can see a correspondence with the left-hand side of the binary tree and the inner subscript of the Middle Growing Hierarchy. Let's continue the correspondence. I will omit the right hand side of the binary tree and the base of the Middle Growing Hierarchy.
[n,n]
corresponds to \$ω_2\$
[0,[n,n]]
corresponds to \$ω_2+1\$
[n,[n,n]]
corresponds to \$ω_3\$
[[0,n],[n,n]]
corresponds to \$ω_4\$
[[1,n],[n,n]]
corresponds to \$ω_6\$
[[0,n],n]
corresponds to \$ω^2\$
So it seems like there is a jump from [[n,n],n]
to [[[0,n],n],n]
, similar to the jump from [n,n]
to [[0,n],n]
. But even this doesn't capture the power of this notation.
More Ordinal Comparison
[n,[[0,n],n]]
corresponds to \$ω^2+ω\$
[[n,n],[[0,n],n]]
corresponds to \$2\timesω^2\$
[[n,[n,n]],[[0,n],n]]
corresponds to \$ω^3\$
[[[0,n],[n,n]],[[0,n],n]]
corresponds to \$ω^4\$
[[[0,n],n],[[0,n],n]]
corresponds to \$ω^ω\$
We're not even at [[0,[0,n]],n]
yet, what is going on?
[[[0,n],n],[[[0,n],n],[[0,n],n]]]
corresponds to \$2\timesω^ω\$
[[n,[[0,n],n]],[[[0,n],n],[[0,n],n]]]
corresponds to \$ω^{ω+1}\$
[[[n,n],[[0,n],n]],[[[0,n],n],[[0,n],n]]]
corresponds to \$ω^{ω_2}\$
[[n,[[n,n],[[0,n],n]]],[[[0,n],n],[[0,n],n]]]
corresponds to \$ω^{ω_2+1}\$
[[[0,[n,n]],[[0,n],n]],[[[0,n],n],[[0,n],n]]]
corresponds to \$ω^{ω_3}\$
[[[n,[n,n]],[[0,n],n]],[[[0,n],n],[[0,n],n]]]
corresponds to \$ω^{ω^2}\$
[[[[0,n],[n,n]],[[0,n],n]],[[[0,n],n],[[0,n],n]]]
corresponds to \$ω^{ω^3}\$
[[0,[0,n]],n]
corresponds to \$ω^{ω^ω}\$
Where does the strength comes from? The strength lies in the fact that the binary tree notation corresponds to performing the Middle Growing Hierarchy on ordinals! Here are some examples:
[n,n]
corresponds to \$m(ω,n)=n+2^n\$, so [n,n]
as an ordinal corresponds to \$ω+2^ω=ω_2\$
[[0,n],n]
corresponds to \$m(ω+1,n)=2^{n+2^n}\$, so [[0,n],n]
as an ordinal corresponds to \$2^{ω+2^ω}=2^{ω_2}=ω^2\$
[[[0,n],n],[[0,n],n]]
corresponds to \$m(ω,m(ω+1,n))=2^{2^{n+2^n}}\$, so [[[0,n],n],[[0,n],n]]
as an ordinal corresponds to \$2^{2^{ω+2^ω}}=ω^ω\$
[[0,[0,n]],n]
corresponds to \$m(ω+2,n)=2^{2^{2^{n+2^n}}}\$, so [[0,[0,n]],n]
as an ordinal corresponds to \$2^{2^{2^{ω+2^ω}}}=ω^{ω^ω}\$
As it turns out, this pattern continues. I'm not going to go through the full analysis, but here are some more ordinal values. Remember that these are ordinals, not functions!
[[1,n],n]
corresponds to \$ω^{ω^{ω^{ω^{ω^{ω^ω}}}}}\$
[[n,n],n]
corresponds to \$ε_0\$
[[n,[n,n]],n]
corresponds to \$ζ_0\$
[[[0,n],n],n]
corresponds to \$φ(ω,0)\$
[[[n,n],n],n]
corresponds to the BHO
Speed of Notation
Essentially, if a structure \$K\$ corresponds to \$g_a (n)\$ in the slow-growing hierarchy, then the structure [K,n]
corresponds to \$m_a (n)\$ in the middle-growing hierarchy. This makes the limit [[[...,n],n],n]
, which corresponds to the first SGH-MGH catching point, of \$ψ(Ω_ω)\$. For comparison, \$\text{TREE}(n)\$ only corresponds to the ordinal \$ψ(Ω^{Ω^ω})\$, much much smaller. The premise of this notation is essentially nested Goodstein sequences, except it works!
The Middle Growing Hierarchy corresponds closely to the Fast Growing Hierarchy, this is why I put in \$f_{ψ(Ω_ω)}\$ as it is a catching point.
Actual Value of the program
Now that we have gone through the Predecessor function, and how it corresponds to numbers, functions, and ordinals, it is time to return to the value of this program.
To extract a value from a binary tree, such as [[[0,0],0],0]
, one would have to repeatedly apply the predecessor function until the value crashes down to 0. As we seen before, one would have to apply the predecessor function a massive amount of time, on the order of \$m(ψ(Ω_ω),x)\$
Just to let you know, [[[...,0],0],0]
is not degenerate, unlike stuff like \$2 \uparrow\uparrow...\uparrow\uparrow2 = 4\$ in arrow notation. [[[...,0],0],0]
will produce a massive number.
Here is the code again:
for(a=b=0;a=b++<9?[a,0]:P(a););b;
First, it sets a
and b
equal to 0
. Then, it starts incrementing b
. If b
is less than 9
, then it sets a
to [a,0]
. This means at b=9
, a
would had been already [[[[[[[[[0,0],0],0],0],0],0],0],0],0]
, which corresponds to a massive number. Then, the predecessor function gets repeatedly applied to a
, increasing b
by 1
for each application. Eventually, a
is going to crash down to 0
, but b
will be some value far, far greater than \$\text{TREE}(3)\$, or \$\text{TREE}(\text{TREE}(...\text{TREE}(3)...))\$ with \$\text{TREE}(3)\$ nests. Finally, the program returns b
.
So what?
One of the best thing about this program is how the notation enumerates the catching points between the SGH and the MGH. This program only reaches the very first catching point, but by a few simple extension, this program is able to formalize a meameamealokkapoowa oompa, surpass Strong Array Notation, and beat every single Ordinal Collapsing Function ever devised. \$ψ(Ω_ω)\$ is still a pathetically small value...
TREE(3)+1
there I win \$\endgroup\$