17 Million Lines of Lean: Not the Biggest Proof
The Riemann hypothesis’s recent formalization in Lean prompted a straightforward question: is 17 million lines of code exceptionally large? Surveying existing repositories provides context. Mathlib maintains over 1,000 famous theorems with only 259 Lean implementations, and none approach 17 million lines. A broader search of published Lean packages shows the benchmark is unremarkable—several projects exceed it, with the largest reaching 88 million lines.
Raw line count, however, reflects implementation approach more than mathematical complexity. The 88-million-line project is an unfinished AI-generated proof. A 36-million-line package consists mostly of automated validation scripts checking a database, with actual hand-written code comprising roughly 500,000 lines. A formalized proof of Fermat’s Last Theorem reached 27 million lines after AI expansion of a human project originally at 60,000 lines. Scale in Lean code is driven by mechanization and tool assistance rather than inherent proof difficulty.
Read the full article
Continue reading at Hacker News →This is an AI-generated summary. Read the original for the full story.