Article

89 Lemmas Pulled From a 17-Million-Line Riemann Proof: Formal Math's Value Is Shifting From Proofs to Parts

On November 24, 2026, a developer without a formal math background used GLM-5.4 to extract 89 reusable lemmas from the roughly 17-million-line Lean proof of the Riemann Hypothesis, each depending only on Lean's three standard axioms, and filed 3 pull requests to Mathlib with green CI, not yet merged. GLM-5.4 then derived a conditional result, K_{4k}(Z)=0 for 3<=k<=12, cross-verified five ways. This article explains why it matters: when a machine can generate a full proof, reusable lemmas are the scarce asset.

One-line takeaway

Proofs can be generated automatically; reusable lemmas still have to be extracted one at a time. That is the real gap in AI-era mathematical infrastructure.

What happened ​

On November 24, 2026, a developer posting as CocoSgt published a long first-person account of using GLM-5.4 on two tasks built around the formalized Riemann Hypothesis proof.

The first: extracting, line by line, 89 reusable theorems from the Lean library that Levent Alpöge built with Claude, roughly 17 million lines long. The shared property of these theorems is that they depend only on Lean's three standard axioms, propext, Classical.choice and Quot.sound, introducing no extra assumptions. The repository CocoSgt/rh-mathlib-lemmas is public.

The second: packaging those lemmas into 3 pull requests to Mathlib, the largest open-source mathematics library. CI is green, but none has been merged. One reviewer called the work of extracting useful lemmas from 17 million lines "noble", and suggested routing such AI contributions first to Tau Ceti, a library specifically collecting AI mathematics.

GLM-5.4 then followed 41 sub-roadmaps that Chris Birkbeck wrote for the Alpöge proof and submitted a first Tau Ceti PR (TauCetiProject/TauCeti#45478): zero sorries, compilation and test CI fully passing, now in Tau Ceti's AI review, with first-round comments returned.

The same day, Zixuan Li, who leads GLM at Z.ai, relayed the work on X. The checkable status of the results:

ItemResultStatus
Lemmas extracted89, depending only on 3 standard axiomsRepository public
Mathlib submissions3 pull requestsCI green, not merged
Tau Ceti submissionPR #45478Zero sorries, CI pass, in AI review
Conditional resultK_{4k}(Z)=0 for 3<=k<=12Depends on published theorems
Cross-checks5 (12 certificates, dual implementations, positive controls, clean reproduction, second-model review)Author's own account
Independent model evaluation28 on Bug Hunt BenchPersonal third-party test, not peer reviewed

The backdrop ​

To gauge the significance, go back to November 20-21.

Levent Alpöge, a mathematician at Anthropic, published a Lean formalization claiming a proof of the Riemann Hypothesis developed with Claude: about 17 million lines across more than 170,000 modules, roughly 239MB compressed. On November 21, Lean and Mathlib issued a joint statement confirming that the code proves the standard Riemann Hypothesis the field has studied for 167 years, with an axiom audit showing only the three standard axioms.

The controversy was never whether the proof was valid. It was whether humans understand it. Alpöge's own framing: the argument is enormous, and simplifying it is the real open problem.

That explains the value of extracting lemmas. When a proof grows too large to read, its methods cannot be used by anyone else. Only when broken into independent, citable, composable lemmas do those methods enter public knowledge.

Why extraction is harder than proving again ​

At first glance, extracting lemmas looks like tidying, technically below the proof itself. The difficulty comes from three directions.

Entangled dependencies. Every lemma in 17 million lines sits inside a context, so pulling one out drags along implicit premises: a typeclass instance, a local notation, an equivalence valid only in a particular namespace. Extracting one lemma often means extracting its definition tree first.

Axiom hygiene. The extracted lemma must still depend only on the three standard axioms. This is the easiest step to botch: the original may have leaned on classical choice in some branch, or introduced a non-standard assumption elsewhere. Slip once and a lemma that looks clean becomes non-portable.

Naming and statement. To enter Mathlib, names must follow the library's conventions, statements must be reusable rather than tuned to the original proof, and proofs must pass lint. This is engineering discipline rather than mathematical insight, but it decides whether a PR lands.

All three fall inside current model strengths: pattern matching, cross-file tracing, rewriting to spec. What humans contribute is the judgement of what counts as reusable and the design of the validation.

The second task: transplanting a criterion ​

More notable than the extraction is the conditional result that followed.

While dissecting the proof, the author noticed a criterion used inside it and tried transplanting it to another problem: vanishing of K_{4k}(Z) in algebraic K-theory. GLM-5.4 completed the proof and the computation, deriving K_{4k}(Z)=0 for 3 <= k <= 12 on the assumption that a set of published theorems holds. Together with the known K_4(Z)=K_8(Z)=0, that covers twelve items from K_4 to K_48. Code, data and Lean certificates are public at CocoSgt/k4k-z-vanishing.

The methodological point: it demonstrates how a by-product of a huge proof can become a new result. A formal library written for one conjecture often sediments technique more general than the conjecture itself, and once someone, human or model, can pull that technique out and try it sideways, results the original authors had no time to attempt become reachable.

The qualifier must be kept: this is a conditional result. It depends on a set of published theorems, and the author states it strictly within that boundary.

Five cross-checks ​

The verification design deserves attention as an operating template for AI-assisted mathematics.

  1. Twelve Lean certificates, one per conclusion;
  2. Two independent implementations built without seeing each other, agreeing item by item;
  3. Positive controls on the already-known K_4 and K_8, confirming the method does not produce wrong answers on solved cases;
  4. Full reproduction in a clean copy, with 13 tests passing;
  5. A second model reviewing the paper argument sentence by sentence.

These are not formal requirements but patches for the specific risk of AI-generated proofs: a kernel checks whether a derivation is legal, not whether the statement is the question the author meant to ask. Independent implementations and positive controls close that gap.

The review channel: Mathlib, Tau Ceti, and AI review ​

There is an institutional dimension that is easy to miss: where AI-generated mathematics should be submitted.

Mathlib's bar is human comprehension and long-term maintainability, which makes it naturally cautious about large machine-generated contributions. Three PRs with green CI but no merge is that caution at work: CI guarantees legality, not worth.

Tau Ceti differs. It exists to collect AI-involved mathematics and uses AI review. A first PR entering AI review with comments returned means the channel is actually running.

Whether this division of labour is sustainable has no answer yet. The observable fact is that the reviewer is a model and the reviewed is model output, leaving the author to design validation and judge. Whether that loop catches errors like a statement drifting from intent needs far more samples.

Relation to earlier coverage ​

On November 23 this site recorded the progress and limits of the Riemann formalization (Formal Verification: What It Can and Cannot Do), concluding that formalization confirms derivations are legal but cannot confirm that humans understand.

The lemma extraction answers that positively: you do not need to understand the whole proof to make its methods usable. The bar for understanding did not drop, but the bar for using did.

A companion data note (Riemann Verification: The Data Checklist) records the underlying scale, 17 million lines, 170,000 modules and 819,000 theorems, useful for checking the figures cited here.

Counter-evidence: one brilliant result is not general capability ​

A separate evaluation published the same day is worth reading side by side. According to AI product manager Paweł Huryn, on a self-built Bug Hunt Bench (two repositories, 105 re-injected bugs), GLM-5.4 scored only 28, less than half of Gemini 4 Neon, with 73 "529 overloaded" errors logged during the run.

This does not contradict the lemma work; it contextualizes it. On structured tasks with clear verification feedback and room for retries, a model can look excellent. On tasks needing a first-pass catch of hidden defects, it may not. Formal mathematics is firmly in the former category: CI tells you immediately where you went wrong.

Put differently, part of the success belongs to the model and part to a task structure that provided reliable feedback. Judging model strength requires keeping the two apart.

Three conclusions ​

First, the scarce resource in formal mathematics is relocating. When full proofs can be generated, what is scarce is a reusable, auditable, community-accepted lemma library. Whoever can dismantle large proofs into parts is building infrastructure for future mathematics.

Second, the bottleneck for AI contributions moves from generation to review. Green CI only means legal code; merging depends on whether humans accept the value, and Tau Ceti's AI review is an experiment still in progress.

Third, conditional results are worth exactly as much as their premises. A result like K_{4k}(Z)=0 is bound to the standing of the published theorems it assumes; marketing it as a solved problem is a misreading.

Boundaries ​

  • The 89 lemmas, the three-axiom dependency, the CocoSgt/rh-mathlib-lemmas repository, the 3 Mathlib PRs and their CI status, the reviewer comment, Tau Ceti PR #45478 with zero sorries, the 41 sub-roadmaps, the conditional K_{4k}(Z)=0 for 3<=k<=12 and the five cross-checks come from the author's own account (November 24, 2026) and BAAI community relay;
  • Zixuan Li's X post is a secondary source, used here only to establish that the official side acknowledges the work exists; no undisclosed details are cited from it;
  • Scale figures (17 million lines, more than 170,000 modules, 819,000 theorems) come from the Lean/Mathlib joint statement and third-party audits;
  • "Not merged in Mathlib" reflects the author's statement at the time and may change;
  • The 28 on Bug Hunt Bench comes from Paweł Huryn's personal evaluation with self-defined samples and methods, not peer review;
  • This article does not assess the mathematical correctness of the Riemann proof and does not independently verify the K-theory result;
  • This article states no ranking of any model's capability.

Sources ​