Independent developer Charlie Reams has used Claude Code to formalize the proof of the ternary Goldbach conjecture in roughly 194,000 lines of Lean 4 code. The repository contains no unfinished “sorry” steps. The work also surfaced and repaired multiple problems in the proof Harald Helfgott announced in 2013.

The report opens with a separate example: it says 1,000 Claude Fable 5.2 agents completed a full formal proof of Fermat’s Last Theorem in 30 hours. Reams’s project concerns a different theorem and was carried out by one developer working with Claude.
A formal proof in 194,000 lines of Lean
The ternary Goldbach conjecture, also called the weak Goldbach conjecture, states that every odd integer greater than 5 can be expressed as the sum of three primes. It is distinct from the strong Goldbach conjecture, commonly shortened to the Goldbach conjecture, which asks whether every even integer greater than 2 is the sum of two primes. The latter has not been fully proved.

In 2013, Peruvian mathematician Harald Helfgott announced a proof of the ternary conjecture, resolving a problem that had remained open for 271 years. The result was a major mathematical achievement, but the proof was difficult to check: its main manuscript alone ran to 300 pages and contained extensive inequality estimates and constant calculations. Helfgott released several revised versions over the following years to correct details. Even so, the length and complexity of the calculations made a full check of every constant a demanding task.
Reams assigned the formalization to Claude Code. The work is recorded in the cde-moebius branch of the GitHub repository calr3/ternary-goldbach, which contains about 194,000 lines of Lean code, helper scripts, and technical documentation. Reams set the overall goal and divided the work into tasks. Claude Code produced most of the Lean formalization, automation scripts, and documentation.

In Lean, “sorry” marks a proof step that has been skipped rather than completed. The repository’s zero-sorry result means the reasoning steps in the code have been checked by Lean’s kernel, with no such placeholder left in place.
Eleven discrepancies include calculation and proof errors
Helfgott’s argument uses the circle method, splitting the problem into major and minor arcs. The contribution from the major arcs must exceed the error from the minor arcs for the theorem to follow. The project README lists 11 places where its formalization differs from the book, including a constant calculation, an inequality that does not hold, and a section of the proof whose structure had to be rebuilt.

One discrepancy concerns equation (6.77). The book gives a key constant as 0.5, while the project’s calculation puts the correct value at 0.8102. After related corrections, the project uses 0.8764.
Another issue is in equation (5.32), which fails when v=2. The integral evaluates to 0.53344, above the stated upper bound of 0.37273·log 4, or about 0.5167.

The formalization also checks a step in a 1995 paper by Ramaré cited in the original proof. The paper states that a certain product is at most 8, but its value is about 8.0845. Claude did not carry that bound over unchanged. It used a different decomposition to obtain 7.04, which is below the required 7.284.
A further structural problem appears in the proof of Theorem 13.2.1, where the original argument mixed major arcs at two different scales. The project rebuilt that section. After the correction, the major-arc contribution falls from 1.058259 in the book to 1.049, while the minor-arc error rises from 1.00948 to 1.0376. The difference—the proof’s margin—shrinks from 0.04877 x²/κ to 0.0114 x²/κ, but remains positive.

Two external numerical results remain assumptions
Helfgott later responded on X. He said Reams had contacted him privately on October 4 of that year to say the formalization had run successfully. The report says that, in the meantime, Reams and Claude reduced the number of external assumptions required by the proof from five to two.
The repository’s analytic number theory deductions have been formalized with no sorry steps, but the proof still relies on two numerical results that have not been brought into Lean as assumptions: Platt’s numerical verification of the generalized Riemann hypothesis (GRH), and a local verification of the even Goldbach conjecture up to 4 × 10^18.

The report frames kernel verification as a possible additional standard for checking mathematical proofs. A conventional proof hundreds of pages long may take experts years to examine, while formalization offers a direct test of whether the stated steps pass the proof assistant’s kernel. Its suggestion that mathematicians might ask authors to run a proof through Claude and produce zero sorry is presented as a hypothetical, not as a description of current peer-review rules.
Reference: X post https://x.com/jdlichtman/status/2120301890504441905. The article was originally published by the WeChat account Xinzhiyuan, by Taozi.


