Riemann Hypothesis Lean proof: what developers can verify

Share

The public Lean repository supports a machine-checked proof of the Riemann Hypothesis: as of 22 November 2026, independent checks had compiled all 175,187 modules and accepted the proof export against Mathlib’s standard statement. The practical verdict is clear: developers can verify the formal claim now, but cannot yet read a short human proof from the repository.

At a glance

  • The released Lean project contains about 17.4 million lines across 175,187 source files.
  • The public verification record reports zero compilation errors across all 175,187 modules.
  • The sandboxed rebuild reproduced a 61,570,595,788-byte proof export byte for byte.
  • The checked scope includes the Riemann Hypothesis and Generalized Riemann Hypothesis for Dirichlet L-functions.
  • The published source uses Lean 4.33.1, while the Comparator judge uses Lean 4.36.0.

What does the public Lean proof verify?

The public result verifies the standard Riemann Hypothesis statement already defined in Mathlib, Lean’s shared mathematics library. In plain English, every non-trivial zero of the Riemann zeta function has real part one-half. The Mathlib definition matters because it makes the target independent of the proof author’s own terminology.

The proof package also states stronger results for Dirichlet L-functions. The independent verification record lists five headline theorems: the Riemann Hypothesis, an equivalent explicit zeta-zero statement, and three claims covering Dirichlet L-functions. This is Generalized Riemann Hypothesis in the Dirichlet setting, not a blanket proof for every Hecke or automorphic L-function.

That distinction is useful for developers reading the code. A theorem can compile perfectly while proving a narrower claim than a headline suggests. The community’s joint Lean and Mathlib statement says reviewers isolated the target theorem in a file importing only Mathlib, then checked that the submitted theorem matched it with two separate comparison tools.

How can developers reproduce the check?

Developers can reproduce a meaningful check without trying to understand millions of lines first. The public mirror gives a staged route: build the target statements, build the main theorem, inspect its axioms, then use an independent replay tool. The mirror’s build guide pins Lean 4.33.1 and says the checked-out source occupies about 1.3 GB.

  • Read src/Statements.lean and src/Main.lean before compiling the full project.
  • Build the statements first, because that checks the named targets quickly.
  • Build Main, which pulls in the dependency tree for the five headline theorems.
  • Run #print axioms on each headline theorem.
  • Use an external checker or Comparator run for a stronger result than a local successful build.

The independent Comparator repository makes the separation explicit. Its clean-build instructions export a challenge from Mathlib-only declarations before the submitted proof is compiled, then build the solution in a network-free sandbox. It warns that its cache is convenient, not proof verification: a cached build may compile nothing.

Hardware is the immediate constraint. The Comparator guide says a fresh verification can take hours, consume about 100 GB of disk, and require substantial memory during the final comparison. That is why a reproducible export matters: it lets a reviewer test the proof object separately from the programs and tactics that produced it.

How long is the Riemann hypothesis proof?

The Lean source tree contains about 17.4 million lines in 175,187 files, not a 17-million-line sequence of mathematical prose. The public mirror breaks those files into libraries, with the Development directory accounting for 12.2 million lines and Formalism for 3.2 million. The repository inventory also lists smaller directories for ground theory, reciprocity, positivity and supporting lemmas.

By our calculation from that published directory inventory, about 70.4% of the listed source lines sit in Development. That is an important warning against treating line count as a measure of conceptual novelty. A large formal proof includes definitions, type conversions, repeated local bookkeeping, generated-looking intermediate steps and machinery needed to make each inference acceptable to Lean’s kernel.

Published library areaListed Lean linesShare of listed linesWhat it tells a reader
Development12.2 million70.4%Most of the visible code volume sits here.
Formalism3.2 million18.5%This is the second-largest named block.
GroundTheory1.1 million6.4%Foundational mathematical setup remains substantial.
ReciprocityTheory563,0003.3%A smaller but still large specialist component.
CompanionTheory194,0001.1%Supporting theory, rather than the main bulk.
PositivityTheory55,0000.3%Compact beside the two largest libraries.
Lemmata9,0000.1%Small helper-lemma layer.

Our calculation uses the repository’s published rounded line counts. The seven displayed groups total 17,321,000 lines, so the percentages describe that listed subtotal rather than an exact compiler measurement.

Most Lean source lines sit in the Development library: Development, Formalism, Ground theory, Reciprocity theory, Companion theory, Positivity theory, Helper lemmas
Most Lean source lines sit in the Development library · Source: github.com

Can AI prove Riemann’s hypothesis?

Yes, AI can contribute to a proof that Lean verifies, but Lean’s acceptance does not establish that an AI independently understood the mathematics. Levent Alpöge’s 20 November announcement credits Claude with key ideas and says a chain of theta lifts of length roughly √X emerged for a von Mangoldt sum of length X. He also describes his own role in selecting the mathematical setting and combining ideas.

What Lean verifies is narrower and stronger at once. It checks that a formally encoded conclusion follows from formal definitions and permitted axioms. It does not grade authorship, assign intellectual credit, explain why a path was chosen, or turn formal steps into a lecture that a number theorist can absorb quickly.

The resulting division of labour is visible in the release. Alpöge’s announcement describes a Stepanov-inspired approach: theta lifts play a role analogous to repeated zero multiplicity, while arithmetic-geometric bounds constrain the construction. That is an outline of the method, not a short derivation of every formal lemma.

What did independent verification test?

Independent verification tested more than “it builds on my machine.” Andrew Sutherland’s verification page reports that all 175,187 modules compiled without errors, while a sandboxed rebuild finished with zero errors on 21 November. It also reports that the build recreated the published export exactly, at 61,570,595,788 bytes.

The audit separately checked the axioms behind the five headline theorems. It reports only Lean’s three standard axioms: propositional extensionality, classical choice and quotient soundness. The same page records acceptance by the independently written nanoda and con-leche checkers, plus a successful statement comparison by con-leche and con-ron.

This layered design addresses two different risks. First, the target might be mistranslated into a weak theorem. Second, untrusted source code might use a trick, an extra axiom, or an altered definition. The four-test framework for Lean claims explains why statement review, compilation, comparison and kernel validation are separate jobs.

The most useful verification fact: the checked theorem is not merely named “Riemann Hypothesis.” It is compared with Mathlib’s independently defined proposition, then tested outside the submitted source tree.

Why is the proof still hard to understand?

A proof can be mechanically decisive while remaining difficult for people to survey. The author says the present argument is “incredibly long” and intends to write a clearer account. The 250,000-page figure refers to an attempted prose rendering, while the released artefact is Lean code rather than a conventional paper.

Kim Morrison’s post-verification assessment calls the current repository stylistically poor and suggests it may duplicate existing library results, contain dead code and use inefficient proofs. That is not a challenge to the checked conclusion. It is a warning that correctness, maintainability and explanation are separate engineering goals.

For a developer, this is familiar. A verified program can still need refactoring, documentation, test fixtures and a stable interface. The next useful public work is likely to identify intermediate theorems, give them readable names, remove duplication and transplant reusable pieces into Mathlib or other maintained libraries.

Who is making each claim, and why?

Levent Alpöge makes the discovery and AI-assistance claim in his announcement. His clear interest is authorship and professional reputation for the argument; the public announcement does not disclose a commercial licence for the proof archive. He also says he chose to release Lean rather than a massive prose account.

The Lean and Mathlib communities make the certification claim. Their institutional interest is trust in Lean, Mathlib and the review process, because those tools are the basis for the verification. Their joint statement grounds that confidence in compilation, theorem matching and several proof checkers rather than an appeal to the author.

Andrew Sutherland publishes a detailed independent verification log through MIT. His stated method uses automated tooling, including Claude Code, but the page’s value is its reproducible checks, hashes, tool versions and incomplete-versus-complete status labels. That is a stronger public interest than a general endorsement.

CocoSgt hosts an unmodified GitHub mirror for browsing and cloning. The mirror explicitly says it claims no authorship and notes that the original archive has no stated licence. Its interest is distribution and accessibility, not certification; developers should distinguish the mirror from the community comparator project.

What does the Masullo project show?

A separate Lean effort demonstrates a more cautious formalization model. The RiemannMasullo project is formalizing Alessandro Maria Masullo’s unrefereed Generalized Riemann Hypothesis manuscript while recording false statements, repairs and unresolved gaps. As of 21 November, it reported about 4,700 stated theorems and roughly 3,950 proved theorems.

That project has logged about 200 errata entries, including 45 statements described as false as printed. It has not started the trace-formula chapters carrying the manuscript’s central claim. The contrast is useful: Lean can certify a completed formal proof, but it can also turn an unfinished mathematical draft into an exact map of what works, what fails and what remains open.

What we could not verify?

No public source yet gives a short, peer-reviewed human exposition that lets specialists independently judge the new proof strategy without Lean. The public materials also do not establish how much of the source is redundant, how long a clean build takes on typical hardware, or which parts will survive later refactoring into maintained libraries.

A detailed prose paper from Levent Alpöge could settle the mathematical narrative. Public build logs from more hardware configurations could settle the practical resource cost. A maintained rewrite, with named intermediate results and conventional references, could settle whether the repository becomes a durable research library rather than a verified archive.

Sources


Maya Chen
Maya Chen
Maya Chen covers AI agents, orchestration frameworks, tool-use, and evaluation. She focuses on what actually works in production—failure modes, safety boundaries, and measurable performance—without the hype.

Read more

Local News