AI News

Independent developer completes formalization of the ternary Goldbach conjecture with Claude Code: 194,000 lines of Lean 4 code with zero sorry

36Kr · AIUpdated Nov 13 12:37

AI summary

Independent developer Charlie Reams used Claude Code to formalize Helfgott's 2013 proof of the ternary Goldbach conjecture, producing 194,000 lines of Lean 4 code with zero sorry across the entire repository. The repository README lists 11 places where it diverges from the original book, including that the constant in equation (6.77) should be 0.8102 rather than 0.5, that equation (5.32) does not hold when v=2, and that the Ramaré 1995 result cited in the original proof is actually about 8.0845 rather than 8. Original author Helfgott responded on X, saying he had been privately informed on October 4 of this year that the external assumptions the entire proof relies on had been reduced from 5 to 2, and that it still depends on Platt's numerical verification of GRH and verification of the even Goldbach conjecture up to 4x10^18.

Why read this

SelectedAI score 83

An independent developer used Claude Code to complete a 194,000-line Lean 4 formalization and listed 11 inconsistencies in the original proof, offering insight into the boundaries of AI-assisted formal verification.

Topics

Tags

Body · AI translation

This really is pushing human mathematicians to the brink...

Fermat's Last Theorem: 1,000 Claude Fable 5.2 instances, working in teams over 30 hours, completed a full formal proof.

And just today, one person plus Claude actually formalized the proof of the "ternary Goldbach conjecture," which was proven 13 years ago.

This feat came from independent developer Charlie Reams, who hammered out 194,000 lines of Lean 4 code, with "zero sorry" across the entire repository.

Even more remarkable, Claude autonomously discovered that the original 2013 proof actually contained multiple errors!

Without a second thought, it went ahead and patched up these mathematical gaps.

One person plus one Claude, grinding out 194,000 lines of source code

We need to make one thing clear here first: what people commonly call "1+1" is the strong Goldbach conjecture, which no one has yet been able to fully prove.

The "ternary Goldbach conjecture," known as the weak Goldbach conjecture, refers to—

any odd number greater than 5 can be expressed as the sum of three primes.

In 2013, Peruvian mathematician Harald Helfgott announced that he had completely proven this problem that had plagued humanity for 271 years.

At the time, this was a mathematical feat that stunned the world.

But problems followed: Helfgott's proof was simply too long and too tedious! The main manuscript alone ran 300 pages, packed with endless inequality estimates and constant calculations.

Over the following decade or so, Helfgott himself released several updated versions to correct details.

Even so, because the computational process was so dauntingly lengthy, few mathematicians worldwide had the energy to check every constant from beginning to end.

Independent developer Charlie Reams decided to hand it to Claude Code to tackle.

Open the GitHub repository calr3/ternary-goldbach (cde-moebius branch), and you'll see a stunning numerical engineering project:

a full 194,000 lines of Lean code, auxiliary scripts, and technical documentation.

In this campaign, Charlie Reams was responsible for setting top-level goals and breaking down task instructions.

The vast majority of the Lean formalization code, automation scripts, and even documentation were handled entirely by Claude Code.

The final result stunned everyone: 194,000 lines of source code, 0 sorry!

In the Lean language, sorry represents skipping an unproven step; zero sorry means every line of reasoning has undergone extremely rigorous machine verification, with not a single gap left.

Catching 11 issues, and casually "grading the homework" of a top mathematician

You should know that Helfgott's proof was hard to verify precisely because it was "all numbers."

It used the circle method: splitting the problem into major arcs and minor arcs, where the major arcs are "income" and the minor arcs are "expenses," and as long as income steadily exceeds expenses, the theorem holds.

Human eyes start to balk at checking this kind of thing by page 50, but Lean doesn't.

The repository README lists 11 places that don't match the original book; below are the three most memorable details.

First, an arithmetic slip. Equation (6.77) in the book writes a key constant as 0.5, when the correct value should be 0.8102; after the associated corrections, the project ultimately uses 0.8764.

Second, one inequality simply doesn't hold.

Equation (5.32) in the book is wrong when v=2: an integral actually computes to 0.53344, exceeding the upper bound given in the book of 0.37273·log 4 (about 0.5167).

Third, in finding errors, it even found someone else's error.

The original proof cited a step from Ramaré's 1995 paper, claiming that a certain product does not exceed 8, when it is actually about 8.0845. Claude did not stubbornly copy it, but instead switched to a different decomposition to work around it, obtaining 7.04, still within the required 7.284.

In addition, there was one "hard flaw" in the proof. The proof of Theorem 13.2.1 mixed together major arcs of two different scales, and this section was effectively rebuilt from scratch.

After Claude's fixes, the major-arc "income" dropped from the original book's 1.058259 to 1.049, and the minor-arc "expenses" rose from 1.00948 to 1.0376.

The difference between the two, that is, the proof's safety margin, shrank from 0.04877 x²/κ to 0.0114 x²/κ, a reduction of more than three-quarters. But it is still greater than zero.

The original author himself steps in, revealing two "unfinished premises"

After this blew up, everyone was curious—

how would original author Harald Helfgott react upon seeing his famous work have errors caught and fixed by AI?

It turned out Helfgott himself soon appeared on X, extremely candid: as early as October 4 this year, Charlie Reams had already contacted him privately to inform him that the formalization work had run through.

The external additional assumptions (axioms) that the entire proof depends on were cut all the way from the initial 5 down to only 2!

In this repository, all the analytic number theory derivation logic has been 100% formalized with zero sorry, but externally in Lean it still relies on two existing numerical verification results as premises:

Platt's numerical verification of the generalized Riemann hypothesis (GRH) and the local verification of the even Goldbach conjecture up to 4x10^18.

Put these two "giant numerical stepping stones" that humanity had long since computed but had not yet moved into the Lean kernel, and the entire edifice of the ternary Goldbach conjecture closes seamlessly.

Superintelligence is defining what "proven" means

Whether a several-hundred-page proof counts as "proven" used to require a handful of experts spending years digging through it, and even then they might not dare to vouch for it.

Now, the standard is being replaced by another sentence: did it pass the kernel?

Perhaps before long, the hardest-core peer review in the mathematics world will be just one sentence:

"Don't send the PDF—first feed your proof to Claude and get zero sorry."

References:

This article comes from the WeChat public account "Xinzhiyuan," author: Taozi, published by 36Kr with authorization.

Source

36Kr · AI