Yes, 17M lines of Lean is a lot

An AI-generated Lean proof of the Riemann Hypothesis, weighing in at around 17 million lines of code, has raised questions about what counts as a meaningful mathematical proof when no human can feasibly read it end to end. Commenters debate the reliability of formal verification systems like Lean, the likelihood of hidden errors, and whether such massive, verbose proofs can ever yield human understanding or only black-box certainty. The thread also explores broader implications: how AI may reshape mathematical practice, whether future work will refactor these proofs into reusable theory, and what it means for humans to rely on results they cannot themselves fully comprehend.

Scale and nature of the 17M-line proof

  • 17M lines (fluctuating between ~13M and ~19M as refactors land) feels enormous: likened to hundreds of thousands of pages or “Satan’s Book.”
  • Many lines come from inlining existing theorems and re-formalizing math not yet in the standard library, not just RH-specific reasoning.
  • Lean proofs are compared to compiled binaries: verbose, low-level “machine math” built from higher-level ideas.

Trust, verification, and Lean’s kernel

  • One camp: formal verification is the whole point. If the kernel, axioms, and statement are trusted, the proof is correct regardless of size or messiness.
  • Others push back: Lean is “just a compiler”; bugs in kernel, axioms, or libraries (or platform issues) remain possible.
  • Multiple independent checkers and formally verified kernels (and even assembly-level ports) are cited as reasons for high, though not absolute, confidence.

Understanding, elegance, and usefulness

  • A major worry: correctness without human understanding. Math is valued for insight and “why,” not just truth.
  • Length is not a direct measure of impressiveness; any theorem can be proven in a painfully expanded style.
  • Some argue elegance ≈ information/compression; others say aesthetic and conceptual structure matter beyond mere brevity.
  • There is expectation that the community will “decompile” the formal proof into human-level blueprints and isolate new intermediate results.

LLMs’ behavior: verbosity and structure

  • LLMs are seen as bad at compression and refactoring, prone to duplication, dead code, and re-deriving existing results.
  • Explanations and generated prose often over-elaborate trivialities and skate over novel steps; models lack robust “theory of mind” about readers.
  • Some attribute this to training and reward setups that don’t prioritize readability, audience modeling, or conciseness.

Labor, economics, and AI’s role

  • One line of debate: frontier AI firms and investors are assumed to be betting on large-scale labor displacement, not hiring more experts.
  • Others counter that AI should be viewed as power tools that raise human capability, but acknowledge markets are pricing in massive cost-cutting.
  • Anxiety surfaces over where “new jobs” would come from if AI automates large swaths of white-collar work.

Philosophical and epistemic concerns

  • Some suggest accepting proofs we can’t understand as a new normal; many strongly reject this as missing the point of science and math.
  • Questions raised: if humans can’t read it, should it “count”? Are we hitting limits of human comprehension?
  • Analogies are drawn to prior computer-assisted proofs and to speculative futures where human scientists mainly interpret machine-generated theories.