All posts

How Mathematicians Checked an AI-Assisted Proof About Primes

Levent Alpöge and Claude released a 17-million-line proof of the Riemann hypothesis. When a mathematician rebuilt it, one file differed by 38 bytes. Did the mathematics change?

Two violet routes from separate stations meet at the same bone ring.

One file came back different

MIT mathematician Andrew Sutherland rebuilt a proof about the distribution of prime numbers and compared the result with an earlier build. Of the 175,187 compiled files, all but one matched. The two versions of that file were exactly the same length. They differed in 38 bytes.3

The proof came from mathematician Levent Alpöge, who announced on November 20 that he had found it with Claude. For readers, Alpöge had four pages about the discovery. For a computer, he had 17 million lines written in a mathematical language called Lean.12

On November 21, the Lean and Mathlib communities certified that the proof established the Riemann hypothesis. Sutherland’s separate rebuild gives anyone who has ever compared two copies of a file a way into that achievement. What would it take to tell whether those 38 bytes changed the mathematics?23

Why prime numbers led to a line

Count the primes as you go. From 24 through 28, five integers pass without a single prime. Then 29 and 31 arrive with only 30 between them.

Over long stretches a formula gives a good estimate of the number of primes you will encounter. What mathematicians would like to know is how far the actual count can stray from that estimate as the numbers get large. In 1859 Bernhard Riemann connected the distribution of the primes to a function that looks, on first acquaintance, like a peculiar place to count anything.45

The zeta function takes a complex number as its input. Picture an input as a point on graph paper, with a horizontal coordinate and a vertical one. Certain inputs make the function return zero.4

A familiar family of these zeros sits at the negative even integers. Riemann proposed that every remaining zero lies on one vertical line, at horizontal coordinate one-half. The location of those zeros controls how much the count of primes can depart from the estimate. An assertion about a line on graph paper buys you a bound on a counting error.45

The Clay Mathematics Institute notes that the first ten trillion nontrivial zeros have been checked. One more zero on the line adds another instance. A single zero off it would overturn the hypothesis. What Alpöge and Claude offered was a logical argument that covers every one of them, including all the zeros beyond the reach of any computation anyone has run.14

Alpöge writes that as a student he had expected to spend decades equipping himself to work on this problem. In his account, a turning point came when he and Claude tried to carry ideas from a simpler setting into the setting they actually needed. He credits Claude with a specific suggestion about how long a chain of mathematical operations should be.1

Those are his recollections of discovery. An outsider had a way to assess the result even without access to a single conversation between the two.1

The answer has to match the question

On November 12, mathematician Kevin Buzzard gave a wonderfully small example of what can go wrong in translating a famous problem into computer language. Take Fermat's last theorem, which says that for an integer exponent greater than two, no three positive integers satisfy aⁿ + bⁿ = cⁿ.6

In Buzzard's deliberately faulty version the variables range over the natural numbers. In Lean, that set includes zero. Choose zero for all three numbers and cube them. Zero plus zero does indeed equal zero. One missing word and the famous theorem is false.6

Lean will let you write down that false claim. Its job when you supply a proof is to check whether the reasoning establishes the precise statement you wrote. Nobody should expect it to notice which theorem you intended. That last distinction mattered a great deal on November 20. The people looking at 17 million lines needed a target they could inspect without having to trust the person who supplied the answer.67

They had one. Mathlib, Lean's community mathematics library, already contained a formal statement of the Riemann hypothesis. Experts had reviewed it. You can read the exclusions in the definition, right down to the special treatment of the point 1, where the usual zeta function has a pole.28

The community isolated its statement in a file that depended only on Mathlib. Two separate tools then compared the claim proved in Alpöge's library with this independently specified target. Both found a match.23

The reference statement can be read on its own. Comparing it with the proved statement checks the target. Replaying the proof checks the reasoning used to reach it.2

There were five headline statements in the release. Two express the ordinary Riemann hypothesis in different forms. The others concern a related family of functions called Dirichlet L-functions. They let mathematicians study primes in arithmetic progressions, such as the numbers one more than a multiple of four. The scope matters when you see the word “generalized” in an account of the discovery. Other, wider families of functions lie beyond the five statements these researchers checked.39

What the 38 bytes changed

Sutherland took a different machine, made the source files read-only, turned off the build's network access and rebuilt the library. That was the build that gave him the odd file.311

His investigation found two nearby theorems that asked Lean to generate the same small helper while the compiler was working on them in parallel. Whichever got there first supplied the name of a variable. Six repetitions with identical inputs produced one spelling four times and the other twice. The spelling was immaterial to the logic. The final exported proof did not even use that helper.3

All 61,570,595,788 bytes of the proof export matched.311

That difference between files was worth investigating precisely because nobody knew in advance what it meant. A checksum can say that two files differ. It takes some knowledge of the compiler and a look at what the final proof depends on to explain whether the difference matters. Sutherland posted both the discrepancy and its explanation. Other people could judge the exception without taking the entire investigation on trust.3

Michael Rubinstein started with the fourteen parts of the archive on Alpöge's website. His run on the University of Waterloo’s servers hit a familiar limit. During one check, servers ran out of memory and stopped 63 batches partway through. The unfinished modules went back in the queue.10

By the morning of November 21, Waterloo had replayed all 175,187 modules through Lean's kernel, the part that checks the formal reasoning. An independently written checker called nanoda also accepted the proof. Rubinstein used Claude Code to help carry out the work and published the outputs of the programs that delivered those verdicts.10

The Waterloo record also answers a natural suspicion. Could a proof this long quietly assume the thing it set out to prove? Lean can report which axioms, or starting assumptions, a theorem actually depends on.10

All five top-level results named only three standard axioms of Lean. Anyone who wants to challenge that choice of foundations can see what the choice was. Riemann's hypothesis itself was absent from the list.10

The Lean and Mathlib communities issued a joint statement on November 21 certifying the statement and proof of the Riemann hypothesis. Their confidence rested on checks by several programs, including programs written independently of Lean, working from exported data. Sutherland's November 22 report still listed a slower repeat check in progress alongside completed independent checks.23

A piece of the result you can do on paper

There is another way into this proof, through the number 12. Its positive divisors are 1, 2, 3, 4, 6 and 12. Add them and you get 28. Thirteen is larger, but being prime it contributes only 1 and 13 to its own sum, for a total of 14.

How large can such a sum get for a given number? Jeffrey Lagarias showed that a particular answer to this elementary-sounding problem is equivalent to the Riemann hypothesis.5

Each rectangle contains twelve squares. Its two side lengths are divisors of 12. Together the three pairs give six different divisors, with a sum of 28.5

To see what the answer says, put the divisors aside for a moment. Add one whole, one half, one third, and so on down to one twelfth. The result, about 3.10321, is the twelfth harmonic number.5

Call that harmonic number H. Lagarias's upper bound is H + eᴴ × ln(H), where ln is the natural logarithm. Put our value of H into the formula and you get about 28.322. Our divisors come in just underneath it.5

You could check the next million integers the same way and still be in the business of collecting examples. The mathematics in the equivalence is that an assertion about every positive integer can settle the question about every nontrivial zero.5

Jonas Whidden had already translated the divisor results of Guy Robin and Lagarias into Lean with help from coding agents. Sutherland combined Whidden’s work with the new proof. His challenge file contains two statements about the sums of divisors. You can read the whole file without once seeing a zeta function in either formula.12

A checker accepted the combined proof and matched both results to those statements. The upper bound we just tried at 12 was one of them.1213

This gives a skeptical reader a choice.

  • To examine the meaning of the original formal statement, you need to know what the library means by the zeta function.8
  • To examine the conclusion of the second check, you can start with what it means to divide 12.1213

The underlying argument still depends on the library, the independent formal work on the equivalence and the checks of both. What changed was the number of unfamiliar ideas you have to take on board before you can understand what somebody claims to know.

What a mathematician can take home

Alpöge did try generating a written account. It ran to more than 250,000 pages. The first theorem opened by observing that a real number different from one-half must be greater than one-half or less than one-half. Perfectly true. Imagine the seminar. He released the Lean files and said he wanted to find a better way to communicate the argument.1

On Saturday, Rubinstein also released a first attempt at an explanation. On Sunday, he posted a 265-page second draft. Written with help from Claude, Codex and Gemini, it traces the ordinary Riemann hypothesis back to a particular inequality and works out a simple case in detail.14

It also identifies thirteen hypotheses to which the central inequality can be reduced. The guide leaves them unproved in its own pages and tells the reader where it draws on the Lean development. A reader can now pick a piece of the argument to study and know exactly where the explanation runs out.14

Robin Zhang took up a different part of the work. His November 22 note tries to recover the human sources for ideas in the new argument. He used another model to search the literature and help interpret the code, then rewrote its account.9

He is frank that he cannot vouch for a faithful translation of 17 million lines in that time. He also wants someone without access to powerful AI systems to be able to learn the mathematics. Identifying whose earlier work made a step possible gives the next reader a name to follow, a paper to read and a person to credit.9

The Clay Mathematics Institute has its own timetable. Its rules require qualifying publication, at least two years after that publication, and general acceptance in the world mathematical community before it will consider a solution for a Millennium Prize.15 The proof checkers had a narrower job, and their answer arrived over a weekend.2

A student can now open Rubinstein’s guide and work through its simplest case. Then there are those thirteen hypotheses. Each names a piece of mathematics the argument needs, with a precise statement and a place to look for it.14 Pick one, work out why it holds, and teach it to the next student.

Somewhere in those 17 million lines is the material for a very good seminar.

Sources