Yes, 17M lines of Lean is a lot

268 points · 346 comments on HN · read original →

Points and comments are a snapshot, not live.

17 million lines of Lean for a Riemann hypothesis proof dwarfs most human-generated proofs.

The author investigated Lean proof sizes by analyzing Mathlib's collection of 259 famous theorems and 938 Lean packages on Reservoir. Human-generated proofs in Mathlib nearly all fall between 100k and 1.2 million lines, far below 17 million. Reservoir data shows three AI-assisted packages exceed 17 million lines: Qiuzhen-CFSG/CFSG at 88 million lines (AI-built, work in progress), CBirkbeck/LeanBridge at 36 million (98% script-generated), and anthropics/fermats-last-theorem at 27 million (produced by AI agents, roughly 450 times longer than the human project it builds on).

The author concludes that 17 million lines is indeed a lot compared to existing Lean proofs.

What commenters are saying

Commenters debated whether AI-generated proofs' extreme verbosity indicates lack of understanding or is acceptable if correctness is verified. Some argued AI models are bad at information compression, introducing duplication; others noted lean proofs are inherently more rigorous than human proofs. A recurring theme was labor displacement: one camp argued AI's promise was always to replace mathematicians, while others countered it should augment human expertise, creating new kinds of work. One commenter humorously noted "God created the universe in seven days and over 22 billion lines of lean."