Vertex Operator Algebras in Lean: a formal library and its companion book
Vertex operator algebra theory, including the Moonshine module, Zhu's modular invariance, Huang's tensor categories and recent classification results, had no machine-checked formal development.
The authors built LeanVOA in Lean 4 on Mathlib. It derives the Borcherds identity from locality, constructs Heisenberg, Virasoro, affine and lattice VOAs, and develops module theory, Zhu's algebra and modular invariance. AI coding agents (Claude, Codex) wrote all of the Lean code under human direction, with AI referee loops reviewing the work. Large finite certificate data is generated by Python and re-checked by kernel reduction. A companion book places each Lean declaration verbatim next to its textbook statement.
The library constructs the Moonshine module, formalizes the Gannon–Rayhaun c=1 classification, and proves the Arakawa–Dai and van Ekeren–Heluani classical-freeness results. It also contains new rigidity, freeness and graded-unitarity results. It spans 11,660 files and about 3.75M lines, uses only Lean's standard axioms, and contains no sorry or native_decide.
| Directory | Files | Lines |
|---|---|---|
| Classification (c=1) | 1,756 | 1,627,513 |
| DeligneAudit | 6,173 | 1,241,760 |
| Huang | 931 | 183,719 |
| Moonshine | 170 | 55,246 |
