Community simplifies the formal RH proof: line counts and module compression use different measures

After joint Lean/Mathlib verification of RH, the community is simplifying its code. Reported line counts and module results reflect the article’s time frame. VerifyTask covers a subset; self-reported model/tool tags and unequal retry budgets preclude a general ability ranking.
Editorial fact-check (November 25, 2026): The Lean FRO and Mathlib Initiative jointly confirmed the correctness of the RH statement and proof on November 21. This article concerns subsequent code cleanup and simplification. Different statistics must not be conflated: rh-shrink counts text using textual rules and does not run Lean; line reductions, repeated statements, dependency analysis and normalized-token compression are different measures. VerifyTask’s 39 core modules cover a subset of the proof. Its 92.23% is based on character volume, not the fraction of files or the compression rate of the entire proof; the dashboard separately lists whole-RH replay status. Model and tool names are self-reported, with human guidance, unequal retry budgets and local preselection, so this is neither a blinded test nor a ranking of intrinsic model ability. Public-submission pass rates also do not establish first-attempt success rates. Counts retain the original report’s time frame rather than representing current live figures. Lean FRO and Mathlib Initiative joint RH verification statement (opens in a new tab)Lean community RH maintenance repository: theorems and verification scope (opens in a new tab)VerifyTask: subset scope and model/tool telemetry limitations (opens in a new tab)rh-shrink: line-counting method and limitations (opens in a new tab)
In 2026, humans have begun working for AI—and competing to take turns doing it.
Claude’s 17.37-million-line formal proof of the Riemann hypothesis has sparked a worldwide compression relay.
Soon after formal verification passed, the official GitHub repository had already received 359 pull requests. More than 2.4 million effective lines of Lean 4 code and over 25,000 files had been removed.
Meanwhile, on VerifyTask’s public leaderboard, compression of 39 core modules had undergone nearly a thousand runs, with over 300 breakthroughs and reductions exceeding 99% for some modules.

Even Musk came to watch.
Early yesterday morning, he reposted VerifyTask’s compression-progress curve with a comment.
“Indeed, the question now is how small the proof can be made.”

In this “great compression campaign,” Claude fired the starting gun, humans rushed to take the baton, and then passed it to other AI systems.
Gemini 4 Neon, DeepSeek, GPT-6.2 and others joined the compression relay.
Quite a spectacle of human-machine-human-machine collaboration.
A human-AI relay removes over two million lines in two days
Last weekend, Anthropic mathematician Levent Alpöge released a formal proof of the Riemann hypothesis completed in collaboration with Claude.
The proof contains 17.37 million lines of Lean 4 across 175,187 files.
Less than a day later, the Lean open-source formal-verification community and Mathlib, the Lean ecosystem’s open mathematical formalization library, issued a joint statement confirming that the proof met four criteria for formal verification.
The news quickly spread through mathematics and AI. Dozens of scholars ran checks on their computers overnight, with many calling it “the craziest day in mathematical history.”

The problem was that machines had checked the logic, but people could not make sense of it.
What does 17.37 million lines mean? The mathematical library accumulated over years by the Mathlib community totals only about 2.5 million lines; this proof is nearly seven times as large.
Alpöge also tried having Claude convert the code into natural language, reportedly producing over 250,000 pages.
He later clarified that 250,000 pages was a joke and the actual amount was smaller. Still, humans find it difficult to digest all the derivation steps.

Developers around the world therefore began slimming down the 17.37 million lines so that humans could understand and review them.
The Lean community’s official riemann-hypothesis mirror quickly shifted from checking without editing to cleanup and organization. At the reporting time, it had accumulated over 800 commits and nearly 300 pending pull requests.

Someone created a live tracking site, rh-shrink. Its figures as of nine that morning, excluding blank lines, comments and imports, showed that effective code had fallen from 14.62 million to 12.11 million lines. Those two rounded values imply a reduction of approximately 17.2%, inconsistent with the original report’s 16.5%; the original statistics from the same commit time should determine the precise figure.

Why could so much be removed in two days?
Another site, rh-kernel-backbone, examined the code and reported that only 10.737 million of the original 17.374 million lines were actually used by the main proof—just over 60%.
It also identified 2.694 million lines as dead code unused by the main proof and roughly 241,000 repeated theorems.
These redundant parts were the first targets of cleanup.

While the main GitHub repository removed dead code and upgraded its toolchain, third parties turned compression into a public leaderboard challenge.
The dashboard supports RSS and also has a Chinese version.

The platform tracks 39 core modules that do not assume RH, involving 158,055 deduplicated Lean files. The 92.23% figure is the ratio of their 904.20 million characters to the original repository’s 980.4 million characters—not a file-count proportion or a whole-proof compression rate. Participants submit shorter equivalent Lean 4 code module by module, passing Lean 4.34.1, Lean 4.33.1 and Comparator checks with no sorry placeholders and standard axioms only.
As of 8:30 that morning, the leaderboard had recorded 955 verified runs and 301 successful breakthroughs. The total normalized-token count for these core modules had fallen by 50.48 million, an overall compression rate of 8.4%.
Claude wrote the proof; other AIs take turns refining it
With a public leaderboard in place, developers naturally brought their preferred models to try it out.
On VerifyTask’s leaderboard, Anthropic’s family—the source of the original proof—was not at the top.
Across 1,047 submission records, Claude Opus 5.5 with Claude Code ranked only seventh, holding eight core modules.
- First was developer Andrew Pullin’s multimodel system The Council with the pi toolchain, holding 28 core modules with an average compression rate of 66.6%;
- second was Google’s Gemini 4 Neon, released on November 18, paired with Antigravity. It held 18 modules, and all 103 recorded public submissions passed checks. That does not establish the absence of internal retries or filtering. Its average compression rate was 66.4%;
- third was Vladyslav Larin’s Fortytwo Engine with DeepSeek Flash V4.1, covering 17 modules;
- fourth was OpenAI’s GPT-6.2 Astra with Codex CLI, covering 14 modules.

Some developers even assembled mixed teams of models from several companies.
Mikko Nyman and kissa connected four models—Claude Fable 5.2, GPT-6.2 Astra, Gemini 4 Neon and Gemini 4 Carbon—with three terminal tools, Claude Code, Codex and Antigravity, in one pipeline.
Using this mixed combination, Mikko Nyman reduced module 1 from 21 files to one and cut its token count by 95.4%.

One might expect Claude, which wrote the original proof, to know its ideas best. Yet at simplification, other models and mixed combinations achieved larger reductions.
It is like people being unable to spot flaws in their own writing; the same applies to large models writing code.
On Reddit’s Singularity forum, one developer compared this cross-model collaboration to software-security fuzzing.
One model’s redundancy and reasoning blind spots often need another model with different training structures and reasoning paths to criticize and refactor them.

AI refused three years ago; now everyone is working on its output
Slimming the code line by line is about more than saving tens of gigabytes of memory.
Only after removing duplicated lemmas generated through AI’s circuitous route can human mathematicians see which ideas it actually used.
Tools to help people read the proof have also appeared as the code gets smaller.
Someone organized 416 statements and 209 references into riemann-diagrams, a collection of 16 zoomable SVG maps. A draft natural-language paper of approximately 164 pages also appeared on a University of Waterloo webpage.

The audience extends beyond mathematicians and programmers.
When Musk reposted the compression curve, he simply asked how small it could become. The preceding day, discussing the breakthrough, he had also exclaimed, “Welcome to the singularity.”
Meta’s chief AI officer Alexandr Wang argued in a lengthy post that models had already surpassed human intelligence; the remaining gaps, he said, were domain knowledge, infrastructure and experiments.

As different models took turns slimming the RH proof, some recalled an incident from three years earlier.
A user on X posted a video of an August 2025 interview with Fields Medalist Terence Tao.
On camera, Tao recalled that when ChatGPT first appeared in 2023, the first thing he did—like other mathematicians—was ask AI to solve the Riemann hypothesis.
ChatGPT then refused outright, saying only that it was a famous unsolved problem.

In three years, AI has changed so very much.
References:
[1]https://github.com/leanprover-community/riemann-hypothesis
[2]https://x.com/elonmusk/status/2124630854395940955
[3]https://riemann.verifytask.cn
[4]https://x.com/DariaIv27369195/status/2124712417825591402
This article comes from QbitAI, written by Keleixi.
Related topics
After reading
Join the AINRK community
Read how to join the community and connect with people working in AI.




