EML Tree Builder

Type a mathematical function. The compiler translates it through the same F36 → EL → EML pipeline used in the Lean proof, and renders the resulting EMLTerm tree built only from 1, x, and eml(a, b) = exp(a) − log(b).

Atoms (7):
Real unaries (8):
Hyperbolic (6):
Real binaries (8):
Trigonometric (6, complex grammar):
From the paper / SI:
K (RPN length)
tree depth
leaves
eml nodes

RPN string (post-order)

EML tree

Each is an eml(a, b) = exp(a) − log(b) node; is the constant 1; is a variable lookup. Click any node to expand the sub-expression it computes.

What this does

The compiler implements the seven structural macros from SI §2.1 of the paper:

exp(z)  ↦  eml(z, 1)
ln(z)   ↦  eml(1, exp(eml(1, z)))    = eml(1, eml(eml(1, z), 1))
x − y   ↦  eml(ln(x), exp(y))
−z      ↦  ln(1) − z
x + y   ↦  x − (−y)
1/z     ↦  exp(−ln(z))
x · y   ↦  exp(ln(x) + ln(y))

Plus derived macros for , x/2, (x+y)/2, √x, x^y, log_b y, hypot(x, y), σ(x), sinh, cosh, tanh, arsinh, arcosh, artanh.

Trigonometric primitives are built from the complex EML grammar (EMLTermℂ). The closed constants i and π are shown as labelled leaves with their actual K-counts (their internal structure — the EMLRealizationℂ closure machinery — is hidden so the canvas stays legible). The result of a trig compile is read via .re or .im projection, shown above the metric tiles.

When an expression contains any trig sub-expression, the entire compile switches to the complex grammar (EMLTermℂ): all additions are routed through the 9-node mkAdd ADDsafe pattern, and any trig call with a non-variable argument is realised via Path C′ subst0 — the witness is built with a fresh placeholder variable and the caller's compiled argument is substituted in. So log(sin(1+x²)) now compiles end-to-end. The grammar pill above the metric tiles tells you which pipeline (real or complex) was used.

How tree sizes here compare to the K_count_* theorems and the DASHBOARD. The Lean artefact uses three different witness sources mixed together, only one of which this tool reproduces:

Bottom line: there is one mathematical artefact (the Lean proof). This tool implements a clean subset that agrees with the formal artefact for the majority of primitives, with two explicit divergence points (closed constants and the structural-compiler binaries) that are documented above.

All paper / SI / repository links are listed in the References panel at the top of the page.