Axiom Formalizes the Entire Stacks Project in Lean With AI Agent Swarms: About 16 Million Lines, Billed as the Largest Reusable Formal Math Library Yet
Axiom released a Lean formalization of the entire Stacks Project on November 4 (official X post at 17:13 UTC, with over 2 million views). The roughly 7,500-page open-source algebraic geometry reference, started by Johan de Jong in 2005, becomes about 16 million lines of code, which Axiom calls the largest integrated, reusable formal math library ever built. Hierarchically coordinated AI agent swarms did the work and surfaced dozens of statements in the original that needed local fixes, with counterexamples. The library is open source and browsable side by side with the original text at stacks.axiommath.ai.

Key Takeaways
- Scale: about 7,500 pages of source text and roughly 16 million lines of Lean, which Axiom calls the largest integrated reusable formal math library (vendor claim).
- Method: hierarchical AI agent swarms translate statements, search Mathlib for existing abstractions and build proofs in parallel, with multi-agent auditing and semantic cross-checks against the source to keep statements faithful.
- Findings: the system surfaced dozens of statements needing local refinement, including missing hypotheses and edge cases in positive characteristic, and built explicit counterexamples where claims failed.
- The permanent Stacks tag structure is preserved so every Lean declaration links back to the original text; stacks.axiommath.ai offers side-by-side reading and a dependency graph.
- This follows Axiom's October 27 formalization of the Classification of Finite Simple Groups (CFSG); per de Jong's request, corrections are kept in Axiom's own repository rather than sent upstream.







