An AI Just Verified the Hardest Prime-Number Proof Mathematicians Have Ever Checked
Axiom Math's AxiomProver confirmed a result that sits at the very edge of what we know about primes. The real prize, though, is what this means for the safety of AI-written code.

Key points
- Axiom Math's AI system AxiomProver formally verified the "246 theorem" about prime numbers in 2025, the most complex mathematical proof an AI has checked to date.
- The 246 theorem proves there are infinitely many pairs of primes separated by no more than 246, the closest mathematicians have come to the centuries-old twin prime conjecture.
- Axiom Math built a reusable library of results alongside the verification, not just a one-off proof check.
- The same formal-verification technology could one day confirm that AI-generated software code does exactly what it is supposed to do, with no hidden bugs.
A company called Axiom Math has used its AI system, AxiomProver, to formally verify a proof about prime numbers called the "246 theorem." Formal verification is when a computer checks a mathematical proof written in machine-readable form, confirming step by step that the logic holds. As IEEE Spectrum AI reported, no AI system has confirmed a proof this complex before.
What is the 246 theorem, and why should anyone care?
The 246 theorem says there are infinitely many pairs of prime numbers (numbers divisible only by 1 and themselves) separated by a gap of no more than 246. That may sound narrow and abstract, but it is the closest anyone has got to one of mathematics' oldest unsolved puzzles.
The puzzle is the twin prime conjecture. Twin primes are pairs like 11 and 13, or 17 and 19, separated by a gap of exactly two. They become rarer as numbers get larger, but they keep appearing. The conjecture, first written down precisely in the 19th century, says they never stop appearing, no matter how far along the number line you go. Nobody has proved it.
The push toward that gap-of-two target started in 2013, when Yitang Zhang proved infinitely many prime pairs exist with a gap below 70 million. Oxford professor James Maynard then cut that to 600. Working with fellow Fields Medal winner Terence Tao (the Fields Medal is widely regarded as mathematics' Nobel Prize), Maynard brought the gap down to 246. AxiomProver has now confirmed that 246 result is airtight.
| Milestone | Researcher(s) | Year | Gap proven |
|---|---|---|---|
| First bounded-gap proof | Yitang Zhang | 2013 | 70,000,000 |
| Gap reduced sharply | James Maynard | 2013 | 600 |
| Gap reduced further | Maynard, Tao, Polymath8b | 2014 | 246 |
| AI formal verification | Axiom Math / AxiomProver | 2025 | 246 |
What makes this different from earlier AI proof checks?
Axiom Math's approach went beyond a single verification. The team built a library of reusable mathematical results about prime-number gaps that other researchers can draw on for future work. Sidharth Hariharan, a PhD student at Carnegie Mellon University now interning at Axiom Math, put it plainly: a one-off proof check is useful; a library of building blocks is more valuable still.
Formal verification is not a perfect guarantee. Researchers have shown that a bug in the checking method can, in rare cases, cause a system to accept a false proof. But it is as close to a guaranteed stamp of correctness as mathematics currently offers.
Why does a prime-number proof matter to ordinary people?
Number theory, the branch of mathematics studying primes, underpins almost all modern cybersecurity. The codes that protect your bank account, your messages, and your medical records rely on properties of prime numbers. Better formal-verification tools could eventually confirm that the mathematical foundations of those codes are sound.
Axiom Math's founding mathematician Ken Ono sees an even more pressing use. AI systems already write software code used in financial systems, power grids, and healthcare. Most of that code is never read by a human expert. If the properties of a piece of code can be expressed as precise mathematical statements, a system like AxiomProver could check whether those statements are true, catching bugs and security holes before they cause harm. "The world is about to run on computer code that nobody has read," Ono said.
One honest takeaway: formal verification is not magic, and Axiom Math still needs to show this technology scales to messy, real-world software. But if you use any AI-built tool at work, this is the kind of research that could one day give you genuine confidence that what it produces is correct.


