A site for visualizing the λ-calculus through John Tromp's diagrammatic notation — interactive, animated, and built to be played with.
Built by EmyoT, with substantial help from Claude (Anthropic). The whole project — parser, β-reducer, layout engine, animations, UI — was put together iteratively in conversation with the model.
The λ-calculus is a beautiful object: small enough to fit in a paragraph, powerful enough
to express all of computation. Most introductions to it lean heavily on syntax and rewrite rules,
which make it feel abstract. Tromp diagrams reverse that: they give you something concrete and
spatial. Watching plus 2 3 reduce, line by line, into the Church numeral for 5
is a different kind of understanding than reading the same reduction on paper.
This site is an excuse to spend more time with that visual intuition.
Pure HTML / CSS / JavaScript — no build step, no framework, no dependencies.
Just open the files in a browser. The visualizer's animation engine uses requestAnimationFrame
on raw SVG elements, with line-level transitions tracked through a substitution origin map
so each line "knows" where it came from after a β-reduction.
The project is local-first — all your user definitions and history are stored in your browser's
localStorage. Nothing is sent anywhere.
Bug reports, ideas, or just hello: emyotyyy@gmail.com
If you spot a bug or have an idea, the easiest place to look is the source: open
../visualizer/ and the JS modules in js/.