Representing a significant milestone in AI-assisted mathematical research, a team at Axiom Math has automatically verified the proof of a theorem relating to prime numbers—colloquially referred to as the “246 theorem”—for the first time using the company’s AI system AxiomProver.
In formal verification, mathematicians task a computer with checking a machine-readable version of a proof. The process is not a 100 percent guarantee that the proof is correct, as a recent demonstration showed, exposing how a bug in the method could be exploited to accept a false, AI-generated proof. Still, the computational method is as close to a rubber stamp as you can get.
This particular verification formalizes an important advance in number theory. Beyond this particular proof, it demonstrates how automated AI verification could be used in the future to ensure the correctness of AI-generated computer code that will soon underlie software across the globe.
Useful formalization by design
This is not AxiomProver’s first rodeo. Axiom Math has used its autonomous, multi-agent system that turns mathematical statements into machine-checkable proofs to crack several unsolved mathematical problems and verify many more proofs this year. But proof formalization of the 246 theorem is by far the most significant, as Ken Ono, Axiom Math’s founding mathematician, explains: “This theorem currently represents the threshold of human knowledge about prime numbers.”
Earlier this year, Axiom Math competitor Math, Inc. used its Gauss agent to verify Maryna Viazovska’s 2022 Fields Medal-winning proof of the sphere-packing problem in 8 and 24 dimensions. Sidharth Hariharan, a Ph.D. student at Carnegie Mellon University who led human efforts that were critical in the Math, Inc. breakthrough, says that Axiom Math’s AI approach to formalizing the 246 theorem is more comprehensive and useful. Hariharan’s group continues to work toward fully formalizing Viazovska’s proof.
RELATED: Watershed Moment for AI-Human Collaboration in Math
Now an intern at Axiom Math, Hariharan has been heavily involved in the company’s formalization of the 246 theorem proof. He says that one of the main differences here is that rather than it being a one-shot approach relating to a single problem, Axiom Math has expressly aimed to make components of the formalization reusable for other formalization tasks and mathematical research. The team has wielded AxiomProver to build a library of results about gaps in primes. The 246 theorem is the flagship result within that library.
What is the 246 theorem?
The first few primes are close together: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, .... And there are several instances where they are separated by a difference of two: 3:5, 5:7, 11:13, 17:19, ....
These pairs of primes are called twin primes. Twin primes become rarer the further you get from zero, but they do still seem to pop up occasionally. The twin prime conjecture, first precisely formulated in the 19th century by French mathematician Alphonse de Polignac, posits that they will keep popping up regardless of how far along the number line you look. In other words, there are infinitely many twin primes.
Though easy to state, the venerable twin prime conjecture remains unproven. First progress toward solving it only occurred in 2013 when Yitang Zhang, now a professor at Sun Yat-sen University, in Guangzhou, China, proved that there are infinitely many pairs of primes that are separated by 70 million. A few months later, using a different technique, University of Oxford professor James Maynard dramatically reduced this gap from 70 million to just 600; a feat which substantially contributed to Maynard being awarded the 2022 Fields Medal—widely regarded as the Nobel Prize for mathematics.
As part of a group of mathematicians known as the Polymath8b collaboration, Maynard and fellow Fields Medalist Terence Tao, professor at the University of California, Los Angeles, brought the gap down to just 246, the closest mathematicians have gotten to the target gap of two. It is this 246 theorem—which states that there are infinitely many primes that differ by 246—that AxiomProver has verified to be correct.
Safe and correct AI-generated code
The techniques formalized in this work are important in number theory, the branch of mathematics that underpins all present-day cybersecurity and cryptography. They could therefore prove to be useful in verifying specific ways in which we keep our digital data safe in the future.
But Axiom Math’s Ono is more excited by the bigger picture. He sees formalizing mathematical proofs as a stepping stone to verifying AI-generated code, which is starting to be used across society in systems that run our infrastructure, manage our finances, and protect our data. This is despite safety concerns surrounding hallucinations, bugs, and other unintended vulnerabilities.
If properties of code—such as whether an algorithm terminates or if a program’s output is correct for any input—can be translated into precise mathematical statements, technologies derived from AxiomProver would be ideally suited to formally stating and proving them. In this way, mathematically verifying the correctness of AI-generated code would make this code safe to use.
“The world is about to run on computer code that nobody has read,” Ono concludes. “AI is here and we can no longer look away—proof formalization is a test bed for solving what I think is the most important challenge we will face from AI.”
This article was updated on 18 August to clarify the nature of Hariharan’s work formalizing Viasovska’s proof.
- What It Means to Be a Mathematician When AI Does the Math ›
- Watershed Moment for AI–Human Collaboration in Math ›
Benjamin Skuse is a professional freelance writer of all things science and technology. Previously, he earned a Ph.D. in applied mathematics from the University of Edinburgh and an M.Sc. in science communication from the University of the West of England. His work has appeared in New Scientist, WIRED, Physics World, Sky & Telescope, Photonics Focus, and many more.
Facts Only
* Axiom Math used AxiomProver to automatically verify a theorem relating to prime numbers, the "246 theorem."
* Formal verification involves checking machine-readable proofs, which is not a 100 percent guarantee of correctness due to potential flaws in the method.
* The formalization demonstrates how automated AI verification could be used to ensure the correctness of AI-generated computer code.
* Axiom Math has used its multi-agent system to turn mathematical statements into machine-checkable proofs.
* The 246 theorem states that there are infinitely many primes that differ by 246.
* Mathematicians have worked to reduce prime gaps, with the Polymath8b collaboration bringing the gap down to 246.
* A competitor used its Gauss agent to verify Maryna Viazovska’s proof of the sphere-packing problem in 8 and 24 dimensions.
* Sidharth Hariharan was involved in Axiom Math's formalization of the 246 theorem.
* The work has developed a library of results about gaps in primes, with the 246 theorem as a flagship result.
Executive Summary
A team at Axiom Math used their AI system, AxiomProver, to automatically verify a proof related to the "246 theorem" concerning prime numbers. Formal verification involves checking machine-readable proofs, though this process is not a guarantee of correctness, as errors in the method can lead to false proofs. This work formalizes an advance in number theory and demonstrates potential for using automated AI verification to ensure the correctness of future AI-generated code.
Axiom Math has used its multi-agent system previously to verify mathematical statements, most significantly formalizing the 246 theorem. This effort builds a reusable library of results regarding gaps in primes, with the 246 theorem being a key component. This contrasts with previous work where a competitor used an agent for another problem.
The underlying concept involves twin primes and the twin prime conjecture, which posits infinitely many pairs of primes separated by two. The 246 theorem specifically states that there are infinitely many primes that differ by 246. Progress toward related problems, such as reducing prime gaps, has involved significant mathematical breakthroughs, like the work leading to the 2022 Fields Medal for James Maynard.
Full Take
The narrative pivots on the tension between algorithmic certainty and mathematical truth, positioned against the backdrop of rapidly evolving AI capabilities. The core implication is that formalizing mathematics serves not just to solve abstract problems, but to establish a verifiable framework for trusting complex systems, particularly those built by AI. The focus shifts from single proofs to creating reusable, verifiable methodologies—a 'proof formalization' framework—which establishes a precedent for applying rigorous verification outside of pure theoretical mathematics.
The contrast between the specific achievement (the 246 theorem) and the broader vision (verifying global code) suggests an attempt to frame AI advancement not as a threat to human understanding, but as a necessary tool for achieving epistemological certainty in the age of complex computational systems. The skepticism implied by acknowledging verification is not absolute; the acknowledgment that bugs in the method can lead to false proofs introduces a critical layer of caution regarding the assumption of 'perfect' automated truth.
The pattern suggests a deliberate framing where esoteric mathematical breakthroughs are used as an analogy for the challenges inherent in ensuring AI reliability across infrastructure and software. The move from verifying prime number theorems to verifying code implies a projection: if we can formally verify a theorem, we should be able to formalize the properties of algorithms, thereby closing the gap between programmed instruction and guaranteed outcome. This connection invites inquiry into whether the current methods for capturing the semantics of software correctness are sufficiently rigorous to support this ambitious leap from number theory to computation. What is the cost associated with trusting an automated guarantee in systems underpinning global infrastructure?
