Expression constructor
.app fn arg
Kernel-level constructor fields. A source example is illustrative; the type checker validates the complete expression.
What the kernel sees is not a paragraph of tactics. It is a typed expression built from twelve constructor forms. Here is the complete structural alphabet our CoreGIR exporter handles, each with its ordered semantic fields, a Lean example, and its limits.
theorem, def, by, pattern matching, tactics, notation and macros. Rich, expandable syntax.
Applications, binders, constants, projections, literals, metadata and references. Twelve constructors, formal scope.
Checks a term has its expected type in an environment. Drawings are explanatory views, not substitutes for checking.
Select a form to explore its inputs, output, binding behavior and examples. The coloring indicates abstract syntax roles—not theorem truth values. Six forms were observed in the exported SE(2) benchmark; the other six are part of the universal exporter.
Loading the Lean expression visual grammar…
These diagrams provide a proposed visual grammar for the complete Lean.Expr constructor algebra. They do not yet constitute a certified translation of the entire Lean surface grammar, a tactic-language visualizer, or a proof-net calculus for every theorem. Terms still need typed boundaries, references and environments; scope cannot be inferred from mere visual proximity.
The initial research benchmark publishes the structure and exported term payloads of CrossingData.crossing. The Lean.Expr reference and our exhaustive CoreGIR exporter define the scope of the twelve rules.
The diagram vocabulary begins with the twelve actual Lean kernel expression constructors. Each has ordered fields and a visual role. The same proof can then be seen as a full syntax graph, a collapsed module with its context preserved, or a mathematical explanation linked back to the checked term.
Lean applications connect a function expression to an argument expression.
.app fn arg
Kernel-level constructor fields. A source example is illustrative; the type checker validates the complete expression.
An expression graph distinguishes child expressions from references.
A collapsed module must preserve external assumptions and evidence.
The full theorem context is needed to interpret the mathematical reasoning.
The proposed diagrams are not proof certificates.
theorem · def · by · match · notationRich, extensible syntax. A tactic script is not a single additional kernel expression constructor.
goals · metavariables · local contextElaborators and tactics construct checked terms; their execution history is not fully retained by a final certificate.
Γ ⊢ proof : PropositionValidity comes from the kernel checking a well-formed term against a type in an environment.