Draft:Dimethylmercury

From Esolanging
Jump to navigationJump to search

Dimethylmercury is an esoteric programming language by User:AnalysisOfVariance in 2026. It is a series of experiments to try out weird bases in combinatory logic.

The way the experiments work is that they start out with massive bases and try to express combinators in the base in terms of other combinators in the base to make the base simpler. In short, these experiments "work backwards" from a plentiful base to a smaller base.

Syntax

Combinatory Calculus (CC)

This is plain Lazy K syntax.

For example, the K' combinator expression in Candidate 1 would look like K(CKK).

Unlambda

This syntax uses prefix notation from Unlambda. For example, the K' combinator expression in Candidate 2 would look like `k`m2k.

brainfuck mimic

This only applies to Candidate 3.

brainfuck character Description
+ H
- K
, L
. M
< U
> W
[ Start grouping
] End grouping

I/O model

The I/O model for all Dimethylmercury candidates (except for Candidate 1, it can't do anything useful) is pretty much a carbon copy of that of Lazy K. The program is applied to the input, which is a list of Church numerals corresponding to the bytes of input terminated by infinite Church numerals for 256, and the result of the application is treated as a list of Church numerals of the bytes to output terminated by 256. Because of this, the empty program is a cat program.

Candidates

These are all of the candidates for Dimethylmercury.

Candidate 1

CDFKQT basis. This basis is affine, as in duplicative combinators do not exist.

Cxyz = xzy
Dxyzw = xy(zw)
Fxyz = zyx
Kxy = x
Qxyz = y(xz)
Txy = yx

Other combinators in terms of this strange basis.

Combinator Bird name Formula Dimethylmercury C1 expression (CC) Dimethylmercury C1 expression (Unlambda) Proof
I Identity bird Ix = x CKK ``ckk
CKKx = x
-> KxK = x
-> x = x
Q.E.D.
K' Kite K'xy = y K(CKK) `k``ckk
K(CKK)xy = y
-> CKKy = y
-> KyK = y
-> y = y
Q.E.D.
S Starling Sxyz = xz(yz) Impossible S is a duplicative combinator and CDFKQT is an affine system. In an affine combinator, an argument may not be used (cancellative) or used once (linear). CDFKQT are all affine combinators and since no amount of affine combinators can duplicate an argument, CDFKQT is affine and cannot implement duplicative combinators. Q.E.D.

Candidate 1 is not Turing-complete as a lack of duplicative combinators means you run out of stuff to apply, meaning no recursion or anything.

Candidate 2

Candidate 2 is an attempt to use only duplicative combinators and the Kestrel for a cancellative combinator. Notice how S and S' are not here, as SK is already a universal basis and S'K is likely universal too. J is also not included as if I is found, then C2 trivially reduces to the IJ basis which would make it trivially Crazy J.

Since C2 includes every (well-studied) duplicative combinator except for S, S', and J, it is likely more complicated than it has to be. The hope is that C2 will allow for further developments to four, three, or even two combinators.

The M combinator has been removed from the basis.

The W' combinator has been removed from the basis.

Hxyz = xyzy
Kxy = x
Lxy = x(yy)
M2xy = xy(xy)
Oxy = y(xy)
Uxy = y(xxy)
Wxy = xyy
W*xyz = xyzz
W**xyzw = xyzww
Combinator Bird name Formula Dimethylmercury C2 expression (CC) Dimethylmercury C2 expression (Unlambda) Proof
I Identity bird Ix = x WK or M2K `wk or `m2k
WKx = x
Kxx = x
x = x
Q.E.D.

M2Kx = x
Kx(Kx) = x
x = x
Q.E.D.
K' Kite K'xy = y K(WK) or K(M2K) `k`wk or `k`m2k
K(WK)xy = y
WKy = y
Kyy = y
y = y
Q.E.D.

K(M2K)xy = y
M2Ky = y
Ky(Ky) = y
y = y
Q.E.D.
K* Kite once removed K*xyz = z K(K(M2K)) `k`k`m2k
K(K(M2K))xyz = z
K(M2K)yz = z
M2Kz = z
Kz(Kz) = z
z = z
Q.E.D.
M Mockingbird Mx = xx L(M2K) `l`m2k
L(M2K)x = xx
M2K(xx) = xx
K(xx)(K(xx)) = xx
xx = xx
Q.E.D.
T Thrush Txy = yx H(K(M2K)) `h`k`m2k
H(K(M2K))xy = yx
K(M2K)xyx = yx
M2Kyx = yx
Ky(Ky)x = yx
yx = yx
Q.E.D.
W' Converse warbler W'xy = yxx H(H(K(M2K))) `h`h`k`m2k
H(H(K(M2K)))xy = yxx
H(K(M2K))xyx = yxx
K(M2K)xyxx = yxx
M2Kyxx = yxx
Ky(Ky)xx = yxx
yxx = yxx
Q.E.D.

Candidate 3

Candidate 3 is an attempt to forcibly minimize Candidate 2. It has 6 base combinators from C2's 9 base combinators. For convenience, the M2 combinator has been renamed to M.

Hxyz = xyzy
Kxy = x
Lxy = x(yy)
Mxy = xy(xy)
Uxy = y(xxy)
Wxy = xyy
Combinator Bird name Formula Dimethylmercury C3 expression (CC) Dimethylmercury C3 expression (Unlambda) Dimethylmercury C3 expression (brainfuck) Proof
I Identity bird Ix = x MK `mk .-
MKx = x
Kx(Kx) = x
x = x
Q.E.D.
K' Kite K'xy = y K(MK) `k`mk -[.-]
K(MK)xy = y
MKy = y
Ky(Ky) = y
y = y
Q.E.D.
K* Kite once removed K*xyz = z K(K(MK)) `k`k`mk -[-[.-]]
K(K(MK))xyz = z
K(MK)yz = z
M2Kz = z
Kz(Kz) = z
z = z
Q.E.D.
M Mockingbird Mx = xx L(MK) `l`mk ,[.-]
L(MK)x = xx
MK(xx) = xx
K(xx)(K(xx)) = xx
xx = xx
Q.E.D.
T Thrush Txy = yx H(K(MK)) `h`k`mk +[-[.-]]
H(K(MK))xy = yx
K(MK)xyx = yx
MKyx = yx
Ky(Ky)x = yx
yx = yx
Q.E.D.
W' Converse warbler W'xy = yxx H(H(K(MK))) `h`h`k`mk +[+[-[.-]]]
H(H(K(MK)))xy = yxx
H(K(MK))xyx = yxx
K(MK)xyxx = yxx
MKyxx = yxx
Ky(Ky)xx = yxx
yxx = yxx
Q.E.D.

Candidate 4

Candidate 4 is completely separate from C2 and C3 as it uses the HK basis.

Hxyz = xyzy
Kxy = x
Combinator Bird name Formula Dimethylmercury C4 expression (CC) Dimethylmercury C4 expression (Unlambda) Proof
I Identity bird Ix = x H(KK)K ``h`kkk
H(KK)Kx = x
(KK)KxK = x
KxK = x
x = x
Q.E.D.
K' Kite K'xy = y H(KK) `h`kk
H(KK)xy = y
(KK)xyx = y
Kyx = y
y = y
Q.E.D.
T Thrush Txy = yx H(H(KK)) `h`h`kk
H(H(KK))xy = yx
H(KK)xyx = yx
KKxyxx = yx
Kyxx = yx
yx = yx
Q.E.D.

Candidate 5

Candidate 5 is an experiment with the Ê (Bald eagle) combinator suggested by User:Dragoneater67. Here, it is combined with K' (Kite) and M (Mockingbird) to form a cancellative and duplicative. In short, it uses the ÊK'M basis.

Exyzwvut = x(yzw)(vut)
Kxy = y
Mx = xx
Combinator Bird name Formula Dimethylmercury C5 expression (CC) Dimethylmercury C5 expression (Unlambda) Proof
I Identity bird Ix = x KK `kk
KKx = x
x = x
Q.E.D.
M2 Double Mockingbird M2xy = xy(xy) Ê(KK)(KK)(KK)M(KK) `````e`kk`kk`kk`m`kk
Ê(KK)(KK)(KK)M(KK)xy = (KK)((KK)(KK)M)((KK)xy) = ((KK)(KK)M)((KK)xy) = ((KK)M)((KK)xy) = M((KK)xy) = M(xy) = xy(xy)
Q.E.D.

Methylmercury (Candidate 6)

Methylmercury (formerly Candidate 6) is an attempt to have a 3-combinator basis with strange combinators capable of universal computation. The basis used is the KфΘ basis, with the lowercase version being kфΘ. Note how the Phoenix is represented with a lowercase Cyrillic Ef as fonts tend to disagree whether to show the closed or open phi.

With the discovery of the I expression and фI being equivalent to S according to User:PkmnQ, the KфΘ basis is a complete basis as it can simulate the SK basis. This means that Candidate 6 is a success as it has produced a base capable of universal computation. But the question is, can we take this even further with the power of the Phoenix?

Kxy = x
фxyzw = x(yw)(zw)
Θx = x(Θx)
Derived combinators
Combinator Bird name Formula Expression (CC) Expression (Unlambda) Proof
I Identity bird Ix = x ф(KΘ)KK ```ф`kΘkk
ф(KΘ)KKx = x
KΘ(Kx)(Kx) = x
Θ(Kx) = x
Kx(Θ(Kx)) = x
x = x
Q.E.D.
O Owl Oxy = y(xy) фΘK ``фΘk
фΘKxy = y(xy)
Θ(Ky)(xy) = y(xy)
Ky(Θ(Ky))(xy) = y(xy)
y(xy) = y(xy)
Q.E.D.
S Starling Sxyz = xz(yz) ф(ф(KΘ)KK) `ф```ф`kΘkk
ф(ф(KΘ)KK)xyz
= ф(KΘ)KK(xz)(yz)
= KΘ(K(xz))(K(xz))(yz)
= Θ(K(xz))(yz)
= K(xz)(Θ(K(xz)))(yz)
= xz(yz)
Q.E.D.
Objects of interest
Assigned name Formula Expression (CC) Expression (Unlambda) Path Properties of interest Proof
Black hole ?x = ? ΘK `θk It was found while trying to find I. This is a black hole. It takes in one argument and returns itself.
ΘKx = ΘK
K(ΘK)x = ΘK
ΘK = ΘK
Q.E.D.
Incomplete Starling ?xyz = K(xz(yz)) ф(ф(KK)(ΘK)) `ф``ф`kk`Θk This was found while trying to find L. This is simply a Starling that takes in an extra argument and discards it. Because you can simply feed garbage into that extra argument, Dimethylmercury C6 is very likely a complete basis if you can find a way to get rid of that pesky Kestrel.
ф(ф(KK)(ΘK))xyz = K(xz(yz))
ф(KK)(ΘK)(xz)(yz) = K(xz(yz))
KK(ΘK(yz))(xz(yz)) = K(xz(yz))
K(xz(yz)) = K(xz(yz))
Q.E.D.
Identity crisis bird (Kestrel)
?x = K(Kx(Kx))
?xy = x
ф(ф(KK)(ΘK))KK ```ф``ф`kk`Θkkk This was found while trying to replicate I using the Incomplete Starling. It was mistaken to be an Identity bird with three parameters but a mistake was found which revealed it to be a fancy Kestrel. This is a fancy Kestrel.
ф(ф(KK)(ΘK))KKx = K(Kx(Kx))
ф(KK)(ΘK)(Kx)(Kx) = K(Kx(Kx))
KK(ΘK(Kx))(Kx(Kx)) = K(Kx(Kx))
K(Kx(Kx)) = K(Kx(Kx))
Q.E.D.

?xy = x
K(Kx(Kx))y = x
Kx(Kx) = x
x = x
Q.E.D.

Computational class

Dimethylmercury Candidate 1 is total as there are no duplicative combinators to make loops.

Candidates 2 and 3 is probably Turing-complete.

Candidate 4 might be a push-down automaton.

Candidate 6 is definitively Turing-complete as its combinators can be used to make the SKI basis which is Turing-complete.

Examples

These examples use Candidate 3's basis unless otherwise stated.

Infinite loop

```u`mk`k`u`mk``u`mk`k`u`mk

CC syntax: (U(MK)(K(U(MK))))(U(MK)(K(U(MK))))

brainfuck mimic syntax:

[<[.-][-[<[.-]]]][<[.-][-[<[.-]]]]

See also

  • Lazy K
  • Crazy J was one of two main inspirations for Dimethylmercury, except Crazy J uses the incomplete aristocratic IJ basis, unlike Dimethylmercury's candidates which have the luxury of having a cancellative combinator.
  • PsiK'