Anthropic shrinks Lean Riemann proof to 76K
Anthropic researchers, collaborating with Claude, released grh-lean to drastically compress their Lean 4 formalization of the Riemann Hypothesis and Generalized Riemann Hypothesis. The open-source project refactors the original 17.4-million-line machine-checked proof down to a 300,000-line readable edition and a 76,000-line compact edition.
Compressing a formal proof by over 99% using LLMs shows how AI can tackle the bloat problem of automated theorem proving. Machine-checked mathematics is moving past whether a model can generate a valid proof trace to whether that formalization can be made maintainable, auditable, and human-comprehensible.
- –Drastic scale reduction: Shrinks the initial 17.4M-line codebase across 175,000 files to ~76,000 lines in the compact edition, dropping full Lake build times to 1–2 hours on standard 12-core hardware.
- –Refactoring technique: Anthropic's Luke Sernau unrolled definitions into long flat proofs to spot cross-boundary simplifications and replace complex dependencies like Vandiver before rolling them back up.
- –Persistent readability gap: Although Lean's kernel verifies that the logic strictly checks out under standard axioms (`propext`, `Classical.choice`, `Quot.sound`), the code remains dense LLM output without an accompanying human-written paper.
- –Blueprint for formal math refactoring: Demonstrates that AI coding agents can treat formal proofs like legacy codebases, executing structural optimization, deduplication, and dependency elimination at scale.
DISCOVERED
22m ago
2026-11-26
PUBLISHED
3h ago
2026-11-25
RELEVANCE
AUTHOR
nb-t