Sign in

Blog › Hacker News

Image: Hans / Pixabay
Hacker News · 3 min read

Lean 4 Proof of the Riemann Hypothesis Shrinks to 76,000 Lines

Published Nov 26, 2026

A GitHub repository from Anthropic claims a machine-checked Lean 4 proof of the Riemann Hypothesis and its generalization, now in a much shorter form. No mathematician has read it yet.

A repository published on GitHub under the name grh-lean claims something extraordinary: a formal proof, written in the Lean 4 proof assistant, of the Riemann Hypothesis and of the Generalized Riemann Hypothesis for Dirichlet L-functions. The authors describe it as a research artifact, unmaintained and closed to contributions, and the claim comes with a significant caveat that deserves to sit at the front of any discussion.

What the repository contains

The project builds on Mathlib, the community-maintained mathematical library for Lean, and says it relies only on the three standard axioms that Lean developers routinely accept: propositional extensionality, classical choice and quotient soundness. The mathematical approach is based on work by Levent Alpöge, developed together with Claude, Anthropic's AI assistant. This repository is a shorter version, produced by Anthropic colleagues working with Claude.

There are two editions of the same five theorems:

  • grh/, a readable edition of about 300,000 lines, with a guide file as the entry point.
  • grh-compact/, a condensed edition of about 76,000 lines.

Each folder is an independent Lake project with its own README. The code is released under the Apache 2.0 license.

The caveat that matters

The repository is candid about the state of verification. The proof has passed machine checks only, and no mathematician has read it through. No accompanying paper exists. That distinction is central. A Lean proof that compiles without unexpected axioms is strong evidence, but it is evidence about the formal statement as written. Whether the theorems stated in Lean faithfully capture the Riemann Hypothesis as mathematicians understand it is a separate question, and one that human experts usually settle by reading the definitions closely.

Formalization has a track record of surfacing subtle mismatches between a formal statement and the intended mathematics, which is why independent review of the key definitions matters as much as a green build. The Riemann Hypothesis has resisted proof since 1859, and any claim touching it will rightly face heavy scrutiny.

Reproducing the check

For developers curious enough to verify the work themselves, the instructions are concrete. The project pins Lean v4.35.0 and a specific Mathlib commit. In either folder, the steps are to fetch the Mathlib cache, run the build, and then execute a script that prints the axioms used by the main theorems. That last step is the quickest way to confirm the claim about relying only on the three standard axioms.

The cost is not trivial. A build takes one to two hours on 12 cores with 24 GB of memory, and roughly 85 more minutes if the Mathlib cache is unavailable. That is a useful reminder of how heavy large formal developments have become.

Why it matters for developers

Even setting the headline claim aside, the repository is notable as an example of AI-assisted formal mathematics at scale. A 300,000-line proof being compressed to 76,000 lines shows that machine-generated formal developments can be refactored and shortened, which is a prerequisite for anyone ever reading them. Proof size and readability are practical bottlenecks for the whole field of formal verification, and Lean and Mathlib are where much of that engineering is happening in the open.

It also fits a broader pattern of Lean becoming a verification layer for AI-generated reasoning. When a model produces a long argument, a proof checker can validate it mechanically in a way no human reviewer could at this length.

What to watch next

The key developments will not be in the code but around it. Watch for independent experts examining whether the formal statements match the classical conjecture, for any Mathlib maintainers commenting on the definitions used, and for whether a written paper follows. Until human mathematicians weigh in, the sensible reading is that this is a striking and checkable artifact, not yet an accepted resolution of one of mathematics' most famous open problems.

Original reporting: github.com

Discussion

Loading comments …

The Repocharts newsletter

Once a week: the biggest repo clashes, the fastest risers and the AI and tech stories that matter. Free, no spam, unsubscribe with one click.

We send a confirmation link first (double opt-in). See our privacy policy.