Anthropic Cuts Riemann Hypothesis Proof Code by 99.5% Using Claude

Original title: 黎曼猜想 AI 证明代码暴砍 99.5%:只剩 7.6 万行,又是 Anthropic
78AI Score

Anthropic researcher Luke Sernau and colleagues used Claude to rewrite and refactor a 17.4-million-line Lean formalization of the Riemann Hypothesis down to roughly 76,000 lines, a 99.56% reduction. The new version builds in one to two hours on an ordinary 12-core, 24GB machine, versus 21 hours on high-end AWS hardware for the original. The effort answers community criticism that the original proof was too large to verify.

Full Report

Contents2 sections

Down to just 76,000 lines!! Just now, the 17.4 million-line proof of the Riemann Hypothesis that stunned the entire internet has undergone an epic slimming down. The code volume has been slashed by 99.56%.

The original proof's 175,188 files would take a full 21 hours to compile on a high-spec AWS machine;

whereas the new version only needs an ordinary machine with 12 cores and 24GB of RAM, and with the existing Mathlib cache, it can be built from scratch in 1 to 2 hours.

We're saved, we're saved!!

But then I looked at the repository author — why is it A➗ again???

Hello everyone, for the past few days I've been sprinting alongside several colleagues at Anthropic to develop a streamlined version of this proof. We've successfully reduced its length by about two orders of magnitude, from roughly 15 million lines down to about 76,000 lines.

image.png

The person behind this is Luke Sernau, an Anthropic researcher**.** This streamlining was completed by him + colleagues + Claude together.

Slimming Down Seemed Hopeless

A few days ago, mathematician Levent Alpöge, in collaboration with Anthropic's AI model Claude, released a 17.4 million-line Lean formal proof of the Riemann Hypothesis (RH) and the Generalized Riemann Hypothesis (GRH), a scale equivalent to 7 times the official Lean math library (Mathlib), which stunned the entire mathematics and AI community.

But the problem was that this massive, tome-like proof had over 175,000 files, of which only one contained comments.

The community's first reaction was to try to understand and verify it. A GitHub project called rh-trim was quickly established, with the goal of checking, mapping, and shrinking this enormous proof.

The results showed that multiple independent kernels — Tenet written in C#, nanoda written in Rust, and tenet-jvm written in Java — all successfully accepted the entire proof, and further analysis revealed its internal structure:

The vast majority is foundational work. The final argument only requires 6.6% of the entire proof. The rest is building the tools it needs, many of which are mature mathematical theories that the Lean math library never had.

However, when the community tried to "slim it down," they ran into difficulties. After using automated tools to delete all "dead code" not referenced by the final theorem, the rh-trim project found that it could reduce the code volume by at most about 8%, and this reduced version never successfully compiled.

At one point it seemed hopeless — code cleanup alone simply couldn't finish the job.

But now, the center of the storm — Anthropic — has stepped in personally to refactor this mountain of code.

Slashing the Riemann Hypothesis

Just as hundreds of community contributors were toiling away cleaning up Claude's mess, grh-lean burst onto the scene.

It performed a thorough rewrite and refactoring of Alpöge's original proof, and released two versions in one go.

  • Readable version (grh/)
  • Compact version (grh-compact/)

Advertising statement: External redirect links contained in this article (including but not limited to hyperlinks, QR codes, passcodes, etc.) are used to convey more information and save selection time; the results are for reference only. All articles on IT Home containing external links include this statement.