Local-First · Multi-Island GA · Theorem Garden

One Operator.
All of Math.
eml(x, y) = exp(x) − ln(y)

arXiv:2603.21852 Odrzywołek 2026 · "All elementary functions from a single binary operator"

A browser-native research console that replicates the result of Odrzywołek (2026): the single binary operator eml(x, y) = exp(x) − ln(y), paired with the constant 1, generates the entire scientific-calculator basis — constants e, π, i; arithmetic; and every standard transcendental and algebraic function. Six parallel populations evolve EML trees with migration; the 3D surface makes the operator's geometry legible; every discovery lands in a persistent, exportable theorem garden.
No API key. No cloud. Just math.

initializing…
— evolving —
1atomic operator
6parallel islands
0api keys
derivable identities

"All elementary functions from a single binary operator."

Andrzej Odrzywołek, March 2026. arXiv:2603.21852 [pdf] · cs.SC, cs.LG · revised 4 April 2026.

Abstract

A single two-input gate suffices for all of Boolean logic in digital hardware. No comparable primitive has been known for continuous mathematics: computing elementary functions such as sin, cos, sqrt, and log has always required multiple distinct operations. Here I show that a single binary operator, eml(x, y) = exp(x) − ln(y), together with the constant 1, generates the standard repertoire of a scientific calculator. This includes constants such as e, π, and i; arithmetic operations including addition, subtraction, multiplication, division, and exponentiation as well as the usual transcendental and algebraic functions. For example, exp(x) = eml(x, 1), ln(x) = eml(1, eml(eml(1, x), 1)), and likewise for all other operations. That such an operator exists was not anticipated; I found it by systematic exhaustive search and established constructively that it suffices for the concrete scientific-calculator basis. In EML (Exp-Minus-Log) form, every such expression becomes a binary tree of identical nodes, yielding a grammar as simple as S → 1 | eml(S, S). This uniform structure also enables gradient-based symbolic regression: using EML trees as trainable circuits with standard optimizers (Adam), I demonstrate the feasibility of exact recovery of closed-form elementary functions from numerical data at shallow tree depths up to 4. The same architecture can fit arbitrary data, but when the generating law is elementary, it may recover the exact formula.
— Odrzywołek (2026), abstract verbatim

What this site replicates

faithful

The grammar S → 1 | eml(S, S) is the literal data model in eml-core.js. Every checkpoint identity (e^x, ln(x), e) is the paper's exact tree.

faithful

Exact recovery at depth ≤ 4: the Discovery Lab's seeded targets reproduce the paper's depth-≤4 result in real time, in your browser, with MSE → 0.

extends

The paper uses Adam on a fixed-topology trainable circuit. We add a multi-island GA as a topology search outer loop, with Adam-style local refinement reserved for each island's elite.

extends

Every discovery lands in a persistent, localStorage-backed theorem garden: export as JSON or Markdown, import from a collaborator, share any tree as a deep-link URL that re-opens the sandbox with the exact expression.

Type a tree. See the math.

The EML operator takes two arguments and returns exp(x) − ln(y). Trees are written as Lisp-style S-expressions. A leaf is either the variable x or a numeric constant. Try a checkpoint, write your own, or load any identity from the gallery below.

Tree

— enter an expression —

Plot · domain x ∈ [−3, 3]

eml output

Look at the operator itself.

This is z = exp(x) − ln(y) as a 3D surface, the geometric shape every EML tree is composing transformations on. Notice the exponential ridge along positive x and the logarithmic wall at y → 0. Composition slides points along this surface to reach any target value. Drag to rotate. Wheel to zoom. Click the surface to pin a point.

Other "one-gate" math foundations exist. Why pick this one?

Universal-from-one bases are not new — NAND covers Boolean logic, Sheffer's stroke covers all of propositional calculus, Conway's base 13 is a pathological existence proof. EML is targeted at continuous, differentiable functions on the reals — the substrate AI workloads actually live on. Here's how it stacks up.

basisdomaincomplete fordifferentiablehardware cost
EML exp(x) − ln(y) ℝ × ℝ⁺ continuous functions on compact subsets (conjectured) yes — both branches smooth two transcendental ALUs
NAND {0, 1} Boolean logic (proven, Sheffer 1913) no — discrete one logic gate
FMA a·b + c ℝ³ polynomials of bounded degree yes multiplier + adder (the modern GPU)
Walsh basis L²[0, 1] square-integrable functions (exact, infinite) yes (in the L² sense) orthogonal-transform pipeline
Polynomials continuous on compact (Stone-Weierstrass) yes multiplier + adder
Conway base 13 all reals — but encoding is non-constructive no — Darboux but not continuous not implementable

Differentiable everywhere

Both exp and ln are smooth on their domains. EML trees compose smoothly — gradients flow. NAND, by contrast, is discrete and useless for the kind of continuous optimization modern AI does.

Multiplication is free

a · b = exp(ln a + ln b), and both exp and ln are right there in the operator. Multiplication, division, and powers all reduce to addition in log-space, expressed by composing EML.

Two transcendentals, no FMA

An EML-only ALU drops fused multiply-add — the densest, hottest block on a modern accelerator. The cost moves to two transcendental units, which can be table-lookup + interpolation. Smaller die. Lower power. New tradeoff.

200-byte models

A discovered EML tree fits in an SMS. A 7B-parameter neural net is 14 GB. Same target function, eight orders of magnitude difference in storage. EML trees are the world's most compressed AI models — and they're verifiable.

Provable identities, ready to inspect.

A growing catalog of mathematical objects expressed in pure EML. Click any card to load it into the sandbox and see the tree, the plot, and the evaluation at sample points. These are the seed corpus the discovery loop is bootstrapped against.

Six populations. One target. May the best mutation win.

Pick a target function. The engine launches six independent islands, each with its own personality — greedy, explorer, parsimony, tall, shallow, hybrid. Every twelve generations the best tree from each island migrates to the next, sharing genetic material across cultures. The page below shows all six evolving simultaneously, plus the global champion.

Islands · evolving in parallel

Tip: click plant in garden when you like a result — it persists across page loads.

Global champion · best of all islands

Target vs. discovered

target discovered residual

S-expression of champion

— awaiting first generation —

Lineage trace

lineage trace appears once a discovery beats the seed.

Your discoveries. Persisted across sessions.

Every time you click plant in garden in the lab, the discovered tree is written to localStorage. Reload the page and your collection is still here. Export to JSON, import from a collaborator, sort by accuracy or parsimony. Click any S-expression to copy.

0 theorems best so far ·

Fix a tree. Train the constants. Watch the loss fall.

The Discovery Lab above searches over topologies (which tree shape to try). Odrzywołek's paper uses a different lever: fix a tree shape, then gradient-train the constants at its leaves with Adam. Because exp and ln are smooth, an EML tree is a smooth function of every constant it contains; you can backprop through it like a tiny MLP. This panel runs that method live, in your browser, on WebGPU when available (WebGL fallback).

Target vs. learned circuit

target circuit residual

Learned constants

  • constants appear once training starts.

Current S-expression

— awaiting first step —

Paper (Odrzywołek 2026, §4): exact recovery at depth ≤ 4 on elementary targets; quality degrades beyond. This circuit is depth 3 — the paper's sweet spot.

reference code · the equivalent PyTorch loop
# Reference implementation the browser circuit above mirrors exactly.
import torch, torch.nn as nn

def eml(a, b): return torch.exp(a) - torch.log(b.clamp_min(1e-6))

class EmlCircuit(nn.Module):
    def __init__(self):
        super().__init__()
        self.k = nn.Parameter(torch.randn(4) * 0.3 + 0.5)

    def forward(self, x):
        k = self.k
        L = eml(eml(x, k[0]), k[1])
        R = eml(eml(x, k[2]), k[3])
        return eml(L, R)

xs = torch.linspace(-3, 3, 120)
ys = torch.sin(xs)            # any elementary target
net = EmlCircuit()
opt = torch.optim.Adam(net.parameters(), lr=5e-3)
for step in range(2000):
    pred = net(xs)
    loss = ((pred - ys) ** 2).mean()
    opt.zero_grad(); loss.backward(); opt.step()

If one operator replaces every elementary function, can it replace every activation inside a language model?

Yes — and the model is trained, checkpointed, and served from this site. Architecture: a small transformer where the entire nonlinearity is a single EML expression with one trainable scalar per layer. Training happens offline on Apple Silicon via MLX through the autoresearch loop; the final weights export as a single JSON and load in the browser for the chat demo below.

Forward pass

# input: char ids [B, T]
ids
 │
 ├─ wte(ids)                    # token embeddings
 ├─ + sinusoidal positional
 │
 ├─ for block in blocks (× n_layer):
 │    ├─ x = x + attn( norm(x) )          # causal MHA w/ RoPE
 │    └─ x = x + mlp ( norm(x) )
 │                   │
 │                   ├─ z = c_fc(x)                             # Linear D → 4D
 │                   ├─ a = eml(z, eml(z, k))                   # THE WHOLE NONLINEARITY
 │                   │   # = exp(z) − ln(exp(z) − ln(k))
 │                   │   # k ∈ ℝ, one trainable scalar per layer
 │                   └─ out = c_proj(a)                         # Linear 4D → D
 │
 ├─ norm(x)
 └─ lm_head(x)  →  logits [B, T, V]

`eml(z, eml(z, k))` — that's it. Four bytes of math per block. Matches the forward pass in eml-autoresearch/train.py:131-167 byte-for-byte. The browser inference runs the same expression against the same weights, validated by a per-logit parity test against the PyTorch-side dump.

Parameter budget

componentshapeparams
token embed[V, D]≈ V·D
positional (sinusoidal)[T, D]0 (buffer)
attn QKV (×n_layer)[D, 3D]≈ 3 n_layer D²
attn out proj (×n_layer)[D, D]≈ n_layer D²
FFN c_fc (×n_layer)[D, 4D]≈ 4 n_layer D²
FFN c_proj (×n_layer)[4D, D]≈ 4 n_layer D²
EML activation k [] (scalar) n_layer floats
lm_head[D, V]≈ V·D
total (training defaults: V=8192, D=256, n_layer=4, T=2048)≈ 8.5 M
trainable EML constants4 floats · 16 bytes

The full model is roughly 8.5 M parameters. Of those, 4 — four — floats parameterize the nonlinearity. Everything else is linear algebra. That's the claim worth screenshotting.

Pipeline

  1. 01
    Train offline (Apple Silicon + MLX). eml-autoresearch/train.py runs the autoresearch loop: 5-minute experiment budget, val_bpb metric, keep-or-discard per commit. Every topology, init, and LR choice for k is an experimental axis — the agent iterates overnight.
  2. 02
    Export to JSON. eml-autoresearch/export.py converts the MLX checkpoint + BPE tokenizer into a self-contained file at models/eml-lm-default.json. Base64 float32 weights, per-layer EML constants, tokenizer merges, SHA-256 provenance hash. ~60 KB gzipped.
  3. 03
    Serve in the browser. eml-lm-store.js loads the JSON into IndexedDB on first visit; eml-lm-chat.js runs the forward pass in TF.js (WebGPU → WebGL fallback) and streams tokens into the chat pane in § 10. Parity test against the PyTorch-side logit dump is a gating criterion.

Honest perf expectations

  • A ~8 M parameter char/BPE-level transformer is not a ChatGPT competitor. It will hallucinate confidently, mangle facts, and occasionally produce coherent-looking paragraphs. That's the point — this is the minimum-viable LM built from one binary operator, not an attempt at frontier quality.
  • Target val_bpb: ≲ 1.8 bits/char on the bundled corpus (Odrzywołek paper + mixed prose). Upstream ReLU²-activated autoresearch hit 1.808; the EML baseline will be measured fresh, not inherited.
  • Every published checkpoint will carry its SHA-256 weight hash, training seed, and eval sample alongside the JSON — so anyone else can re-train and verify bit-equivalence.
  • This section exists to answer the question the paper leaves open: is the EML operator expressive enough to run a modern workload, not just derive formulas? The rest of the page is the experimental apparatus.

Paste your writing. Five minutes. Get an adapter that knows you.

Drop a .txt or .md into the corpus area — or paste raw text — pick a training budget, and train a personal EML-LM right here in your browser. Nothing leaves the tab. The result saves to IndexedDB and exports as a single JSON you can email, Airdrop, or commit to a gist.

Live sample · from primer "Once"

train a model and the sample will stream here, updated every eval interval.

Save & next

→ chat with it in § 10

After training, click save. The model shows up in the chat's model picker and in § 11 · Personalize for export or sharing.

Talk to your adapter.

Any model you've trained or imported shows up in the picker below. Streaming, character-by-character. Temperature, top-k, max-tokens sliders. Optional toggle: use each reply as a personal prefix for the site's other WebLLM-backed assistants — see § 11.

▸ SHIPPED CHECKPOINT

eml-lm-default · trained via autoresearch

… verifying live
parameters 26.3 M (depth-6) · 11.5 M (depth-4)
architecture d_model 384 / depth 6 · or 256 / 4 · ctx 2048
tokenizer BPE · 8192 tokens · rustbpe
training Run 3: 113 steps · val_bpb 2.564 · 8 h
device Apple M1, 16 GB · MLX
activation eml(z, eml(z, k)) · 6 scalars
per-layer k (depth-6) 0.04 · 1.44 · 1.45 · 1.51 · 0 · 0
quantization int8 sym per-row · 4× smaller
size 35 MB int8 · 60 MB f32 · ~13 MB gz
seed 42 · bit-identical on rerun

Verified browser parity. The autoresearch architecture — RoPE, grouped-query attention, RMSNorm, per-layer sliding-window masks, residual lambdas, logit cap — is ported to TF.js and runs the shipped checkpoint below. Forward-pass parity against MLX is max|Δ| < 4e-6 across 32 generated tokens (threshold 1e-4). The BPE tokenizer parity is 15/15 PASS. First visit triggers a one-time ~23 MB gzipped download of this checkpoint; afterwards it lives in IndexedDB and loads instantly. The § 09 train-your-own flow continues to produce the simpler char-level model. Browser chat is in the picker immediately below — output will be mostly gibberish (the model saw 5 training steps of FineWeb, nowhere near enough to write English), but the forward pass is faithful to the original MLX weights.

Download it. Share it. Pack it into a URL.

Every model you've trained lives in the list on the left — export any as a single .emllm.json, or drop a file to import. On the right is the agent bundle: a role, tags, a one-liner, recent chat turns, and a style sample. The site's ZeroClaw and AI Assistant read it from localStorage['emlLmPersonalContext-v1'] and prepend it to their system prompt. Pack the whole bundle into a shareable URL — your own small agent, as a link.

Four layers. One operator. No cloud.

The whole experience runs from one static HTML page plus a handful of browser-side modules, a Python generator for offline training, and a small set of committed checkpoints. No server, no API keys, no build step — GitHub Pages serves everything.

johnjboren.github.io/
├── eml-foundation.html         # this page
├── css/
│   └── glassmorphic-theme.css   # shared site theme
├── scripts/eml-foundation/       # browser-side modules
│   ├── eml-core.js              # tree AST, parse/serialize, mutate, base64 URL encode
│   ├── eml-tree-viz.js          # node-link tree rendering (canvas)
│   ├── eml-plot.js              # plot, curve, sparkline (canvas)
│   ├── eml-3d-surface.js        # rotatable z = exp(x) − ln(y)
│   ├── eml-islands.js           # multi-population GA + migration (§ 05)
│   ├── eml-discovery.js         # single-pop GA + target registry
│   ├── eml-garden.js            # localStorage theorem garden (§ 06)
│   ├── eml-circuit-live.js      # TF.js Adam on a fixed tree (§ 07)
│   └── eml-app.js               # boot / wiring
├── eml-autoresearch/              # offline MLX trainer + /eml-autoresearch skill
│   ├── train.py                 # MLX mini-transformer w/ EML activation
│   ├── prepare.py               # BPE tokenizer + FineWeb shards + val_bpb  (read-only)
│   ├── export.py                # MLX checkpoint → browser JSON schema
│   ├── skill/ command/             # Claude Code skill for autonomous experiments
│   └── results.tsv              # experiment log (val_bpb + eml_config)
└── models/
    └── eml-lm-default.json        # shipped EML-LM checkpoint (ships to every visitor)
page
eml-foundation.html
The page you are on. Operator sandbox, 3D surface, islands GA, circuit, theorem garden, LM chat. Static HTML served directly from GitHub Pages.
modules
scripts/eml-foundation/
Browser-side JS: the math engine, tree visualizer, plotters, GA loop, garden, live-Adam demo, and chat runtime. No build step, no bundler — every file loads as a plain <script defer>.
core
eml-core.js
The math. Tree AST, evaluator, mutator, crossover, parse/serialize, URL-safe base64 encoder. Zero deps. Every other module imports it.
trainer
eml-autoresearch/
Offline MLX training for the EML-activated mini-transformer. Runs via the /eml-autoresearch Claude Code skill — autonomous overnight experimentation on Apple Silicon with a 5-minute-per-experiment budget.
artifact
models/eml-lm-default.json
The shipped checkpoint. Self-contained: weights (base64 float32), tokenizer, activation constants, weight hash. Browser loads it on first visit and streams tokens from it in the chat pane.

What you can build on top.

Sovereign AI

Zero-cloud inference. A pharma analyst on a plane can search for a binding formula without leaking the dataset to a third party. WebLLM + WebGPU means the data never leaves the device — and the proof can be replayed offline.

⟨ƒ⟩

Verifiable Science

An EML tree is a mathematical law, not a black-box weight tensor. You can audit it, simplify it, share it as 200 bytes of ASCII, and get the exact same numbers a year from now. That's reproducibility you can put in a paper.

One-Gate Hardware

If exp and ln are your two ALU primitives, the silicon-area picture for an inference accelerator collapses. EML-Foundation is the software argument for a "Universal Math Chip" — a radically simplified ASIC for AI workloads.

Eight phases from sandbox to sovereign lab.

The original sketch said start small, scale to trig, animate. That's right, but it under-budgets the scaffolding around discovery. Here's the version we're shipping against — each phase produces a checkpoint another researcher can pick up.

01

Operator + Sandbox

Prove the math. Type a tree, see the curve.

  • parser/serializer
  • numerical safety net
  • tree visualization
  • shipped on this page ↑
02

3D Operator Surface

Make the operator's geometry visible.

  • rotatable surface
  • pin-and-evaluate
  • shipped on this page ↑
03

Islands GA

Six-island parallel evolution with periodic migration.

  • 6 personality profiles
  • tournament + crossover + 5 mutators
  • migration every 12 gens
  • shipped on this page ↑
04

Theorem Garden

Persistent catalog. Export. Import. Sort. Share.

  • localStorage persistence
  • JSON export / import
  • sortable card grid
  • shipped on this page ↑
05

WebGPU Evaluator

Compile trees to a stack-tape, evaluate population in one dispatch.

  • WGSL kernel
  • tape encoder
  • 10⁶+ evals/sec target
  • fallback to CPU on no-GPU
06

WebLLM Proposer

Phi-3-mini emits structured EML trees as a seventh island.

  • JSON-schema response_format
  • tree validator → fitness penalty
  • LLM-as-mutation-operator
  • budget governor
07

Algebraic Simplifier

e-graph rewrite. Collapse equivalent subtrees. Bloat dies.

  • e-graph rewrite engine
  • numerical equivalence check
  • canonical form
  • identity catalog auto-update
08

MCP Bridge + Remotion

LLM emits tool call → video file lands on disk.

  • render_eml_derivation tool
  • shared visual-primitives pkg
  • determinism guarantee
  • Claude Desktop integration

What Odrzywołek 2026 left for the rest of us.

The paper resolves the existence question constructively for the scientific-calculator basis: yes, one operator suffices. These four questions are what's still open — and they're the ones the GA, the LLM, and the WebGPU evaluator can attack collectively, but a theorist, an empiricist, or a chip designer still has to weigh in.

Q1

Beyond elementary

Resolved by paper for the scientific-calculator basis. The next ring outward: is every continuous function on a compact domain — including non-elementary ones like ζ, the error function, Bessel — approximable arbitrarily well by a finite EML tree? (Equivalent to a Stone–Weierstrass theorem for the EML algebra.)

Q2

Tight depth bounds

The paper proves depth ≤ 4 suffices for the elementary functions Adam was tested on. For each individual function, what is the minimum-depth EML tree? The Discovery Lab finds some tree — we want the lower bound that says no smaller one exists.

Q3

Hardware ROI

On a real ASIC, what's the silicon-area saving from collapsing the ALU to exp and ln only? At what tree depth does the EML-only approach become cheaper than a general FMA pipeline? The paper's depth-4 result is the empirical input to this calculation.

Q4

GA + Adam vs. Adam alone

Odrzywołek's Adam recovery requires you to fix a tree topology first. On targets where the right topology isn't obvious, does our multi-island GA + Adam-refinement loop find shorter trees than blind Adam over a fixed depth-4 lattice? When?

Q5

LLM-as-proposer

Does a Phi-3-mini proposer (this site's seventh-island plan) beat a pure GA on convergence-per-watt? At what target complexity does the LLM start to dominate? When does a 7B model stop being worth the GPU?

Q6

e-graph canonicalization

eml(x, 1) = e^x is one normal form; eml(x, eml(0, 1)) = e^x is another, larger one for the same function. Build the e-graph rewrite engine that decides EML-tree equivalence, then audit the paper's constructions for minimality.

Cite the paper. Cite this site as a replication.

If you use anything you discovered here in published work, cite Odrzywołek for the operator and (optionally) this console as the artifact. Both attributions below; click to copy.

primary · the paper

@article{odrzywolek2026eml,
  title  = {All elementary functions from a single binary operator},
  author = {Odrzywo{\l}ek, Andrzej},
  year   = {2026},
  month  = {3},
  eprint = {2603.21852},
  archivePrefix = {arXiv},
  primaryClass  = {cs.SC},
  url    = {https://arxiv.org/abs/2603.21852}
}

artifact · this site

@misc{boren2026emlfoundation,
  title  = {{EML-Foundation}: A browser-native replication of
            Odrzywo{\l}ek's single-operator basis},
  author = {Boren, John J.},
  year   = {2026},
  howpublished = {\url{https://johnjboren.github.io/eml-foundation.html}},
  note   = {Multi-island GA + Adam refinement + Remotion-via-MCP visualizer.
            Replicates {arXiv:2603.21852}.}
}