Talk:Σ∞

From Esolang
Jump to navigation Jump to search

This esolang is absolutely AWESOME!!!!! C++DSUCKER (talk) 09:46, 12 March 2026 (UTC)

Golfing the addition function

While trying to define 2, I realized that there's a convenient way to set up variables containing the values 0, 1, and 2 all at once, by a slight modification of the definition of 1:

0 = Σ[∞≤o<∞]∞
PREAMBLE(X) = Σ[0≤t<∞]Σ[Σ[0≤x<t]x≤o<t]Σ[Σ[∞≤o<∞]∞≤z<o]X   (X is evaluated once, with t=2, o=1, and z=0)

In particular, `PREAMBLE(t)` is a 57 character definition of 2.

Using this preamble, we can fill in more operations along the lines of the existing ones, using the conventional choice that 0 is false and 1 is true:

NOT(X) = IS_ZERO(X) = Σ[X≤a<o]o
AND(X,Y) = MULTIPLY(X,Y) = Σ[0≤a<X]Y
OR(X,Y) = NOT(AND(NOT(X),NOT(Y)))
GTEQ(X,Y) = IS_ZERO(Σ[X≤u<Y]o)
4 = MULTIPLY(t,t)
TWO_MINUS(X) = Σ[X≤a<t]o
ADD(X,Y) = Σ[z≤a<t]Σ[z≤b<∞]GTEQ(MULTIPLY(MULTIPLY(TWO_MINUS(GTEQ(b,X)),TWO_MINUS(GTEQ(b,Y))),TWO_MINUS(a)),4)

(The inner term of the addition function computes the majority function of NOT(a), b < X, and b < Y.)

This addition function is 111 (+56 preamble) characters long, not counting X and Y, compared to 351 using the original definitions.

--Int-e (talk) 22:06, 9 April 2026 (UTC)