[KongchangAI]
· 5 min read· 2,542 words

17M Lines of Code Compressed to 76K: Inside the AI Riemann Hypothesis Proof

17M Lines of Code Compressed to 76K: Inside the AI Riemann Hypothesis Proof

AI compressed 17M lines of Lean code to 76K in eight days, completing a machine-verified proof of the Generalized Riemann Hypothesis—while leaving 'understanding' to humans.

The article recounts an eight-day mathematical storm: Levent Alpoga jokingly posted a Riemann Hypothesis note with 17M lines of AI-generated Lean code; Anthropic researcher Luke Cernow and Claude compressed it to 76K lines in five days (99.5% reduction), verified by multiple independent kernels. The proof attacks the Generalized Riemann Hypothesis using prime-power weighted sums, the Mellin transform, theta lifts, and the Artin-Whaples product formula, conscripting Deligne-Weil proofs, Arakelov geometry, Galois representations, and the Langlands correspondence. Mathematicians stress understanding over correctness—an AI proof is a compass, but humans still need paper-and-pen struggle; the mathematical career ladder is shifting.

From Joke to Milestone: An Eight-Day Mathematical Storm

Eight days ago, a four-page note shook the mathematical world—it came with a 17-million-line Lean code generated by AI, and a footnote mentioning 250,000 pages of text. A few days later, the author Levent Alpoga posted "The Stupid Thing I Did," admitting that "250,000 pages" was a joke: "I think big numbers are really funny." He never intended to attach 250,000 pages of unreadable AI garbage to the Riemann Hypothesis; the code had been deliberately padded to an absurd length.

Yet the real turning point came within five days: Anthropic researcher Luke Cernow and colleagues, with the help of Claude, compressed the 17.37 million lines into a readable 300,000-line version, then further condensed it to a tight 76,000 lines—a reduction of 99.5%. Mathematicians finally pried open the black box and, for the first time, saw the engine inside the proof.

Konturovich compares it to Andrew Wiles in his attic in year six

For the Riemann Hypothesis, which had been stalled for 167 years, progress is usually measured in decades; yet in the autumn of 2026, it began advancing by the week.

Key Milestones: From 41.7% to a "Complete Proof"

In August 2026, Alpoga, Furman, and Claude raised the proven proportion of zeros on the critical line from 41.7% to 67.2%—more than two-thirds. But Rutgers mathematician Alex Konturovich cautioned at the World Science Festival: even proving that 100% of zeros lie on the line does not amount to proving the Riemann Hypothesis—in an infinite set, 100% is merely a limit. Just as almost all integers are not perfect squares, yet perfect squares are still infinite, deviating zeros could still hide off the line.

In October, OpenAI released a so-called quasi-Riemann Hypothesis proof, clearing a fixed zero-free strip (above 7/8) and pinning down the first eighth of the digits in the Gaussian prime count. On November 20, the complete Lean proof appeared. By November 27, MIT's Andrew Sutherland had completed full independent checks of both the 17-million-line original and the 76,000-line compact version. Multiple independent kernels verified every line of code, relying only on Lean's three standard axioms. Konturovich says our certainty about this result now exceeds 100% of the published literature.

Meanwhile, Alessandro Masullo's 940-page hand-written manuscript, 12 years in the making, was released the same day—but remains incomplete and under revision. Konturovich compares it to Andrew Wiles toiling in his attic in year six—while AI crossed the finish line first. Fields Medalist James Maynard calls for giving human mathematicians time and space.

Lean and Formal Proofs

Lean is an interactive theorem prover initiated by Leonardo de Moura at Microsoft Research in 2013; its companion math library, mathlib, has become the world's largest formal mathematics library. Unlike traditional computer algebra systems, Lean does more than symbolic computation—it can produce machine-checkable proofs of mathematical propositions: every line of a proof is a type-checked object, and only derivations that are logically airtight and free of hidden assumptions pass kernel verification. This is the significance of the article's repeated emphasis on "relying only on Lean's three standard axioms"—it means the proof smuggled in no extra premises. Because Lean's verification is deterministic, anyone can independently rerun the check on their own machine, turning "trusting a mathematician" into "trusting reproducible code." The 17-million-line scale is a typical product of formalized AI-generated content: the machine can tirelessly unfold every step, but humans struggle to read it—which is precisely where the value of the subsequent compression lies.

Inside the Proof: A Leap from Classical Analysis to Arithmetic Geometry

Just days after release, Robin Zhang of IHHS posted a 76-page preliminary map, using AI to sift through the code and trace its ideas back through a century of human mathematics. This is not yet full human verification, and Luke Surnow's reading guide stresses that no one has read every line. But the grand architecture is already visible.

The proof actually attacks the Generalized Riemann Hypothesis: every nontrivial zero of every Dirichlet L-function lies on the critical line with real part one-half. The first step is a classical inversion—building a weighted sum over prime powers using the von Mangoldt function, which "lights up" only on primes and their powers. Take its Mellin transform, and the L-function lands exactly in the denominator. Divide by zero and the function blows up; every hidden zero of L(s, χ) flips into a pole racing to infinity. Finding zeros becomes finding poles.

Modular forms, lift that symmetry onto the complex plane

Next, subtract a clean linear correction to remove the spurious pole at s=1, yielding a corrected sum G_χ, then combine its powers with strictly positive weights into a master sum 𝒢_ψ, ensuring that poles from shared zeros cannot cancel each other. With the classical Landau-Turán trick, you don't even need to control the sum everywhere—you only need a one-sided upper bound: as long as 𝒢 stays below x^(1/2+η) on sparse, enormous intervals, no zero can survive to the right of one-half.

How do you trap a sum over prime powers beneath the square-root ceiling? This is where the proof leaps from classical analysis into modern arithmetic geometry. Start with sines and cosines—waves repeating neatly along a line; modular forms lift that symmetry onto the complex plane; automorphic forms push the same idea higher, onto the symmetries of matrix groups like unitary groups. Integrate one automorphic form against another, and a higher-dimensional cousin of Fourier coefficients—a Bessel period—surfaces as a nonzero algebraic number p_m.

Then enter the Artin-Whaples product formula—the cosmic balance scale of algebraic numbers. The left pan holds prime divisibility, i.e., the depth to which each finite prime ideal divides the period p_m, engineered so that this divisibility towers over the prime-power sum; the right pan holds ordinary complex magnitude, the sum of logarithms of p_m over all complex embeddings. The two pans must balance, so pinning down the right side's size traps the primes on the left.

A single period is not enough to compress the sum to x^(1/2), so the proof builds a pair of transformation ladders called theta lifts. Apply m theta lifts on each side of the unitary group, and each rung pumps additional prime divisibility into the period. After m lifts, the left side of the inequality is amplified to m·𝒢(x), while the complex-magnitude cost on the right grows like x + m². Divide both sides by m, and the master prime sum is squeezed between x/m + m.

Observe the trade-off: lift too little, and x/m soars; lift too much, and the m² term soars. Eventually m itself blows up. Slide m into the valley—set m about √x, and x/√x + √x = 2√x. This exact sweet spot, Claude's signature parameter choice, yields the x^(1/2) ceiling and locks every zero of every Dirichlet L-function onto the critical line.

one half ceiling and locks every zero of every Die-Frick L function onto the critical line

The von Mangoldt Function and the Mellin Transform

The von Mangoldt function Λ(n) is defined as: if n is a power p^k of some prime p, take ln p; otherwise 0. It acts like a probe that "lights up" only for prime powers, so a weighted sum over Λ(n) encodes information about primes into an analytic object—this is the core idea of the von Mangoldt explicit formula and the bridge between the Riemann Hypothesis and prime distribution. The Mellin transform is an integral transform mapping f(x) to ∫ f(x) x^{s-1} dx; it belongs to the same family as the Fourier and Laplace transforms but is especially natural in number theory: the Dirichlet series ∑ a_n n^{-s} is essentially the Mellin transform of the sequence a_n. When the Mellin transform is applied to a weighted sum over prime powers, the Dirichlet L-function appears exactly in the denominator, so the zeros of the L-function become poles of the integrand. This dual perspective—"zeros are poles"—allows the zero problem in analytic number theory to be recast as contour integration and residue estimation, paving the way for controlling sums with geometric and algebraic tools.

Automorphic Forms, Bessel Periods, and Theta Lifts

Automorphic forms are the higher-dimensional generalization of modular forms: complex-valued functions with specific transformation laws under a matrix group (such as unitary or general linear groups), they can be seen as "lifting" symmetries on the complex plane to higher-dimensional symmetric spaces. Modular forms are the special case on SL(2,Z), and automorphic representations are the equivalent formulation in representation-theoretic language. A Bessel period is the value obtained by integrating an automorphic form along a subgroup; it plays the role of a higher-dimensional Fourier coefficient and often lands in an algebraic number field—this is precisely the meaning of "surfacing as a nonzero algebraic number p_m." The theta lift is a correspondence constructing an automorphic form on one group from that on another, originating in classical theta series and systematized in the Langlands program as a concrete instance of "functoriality." Each theta lift acts like "pumping" new arithmetic information into the period, so repeated lifts amplify control over prime divisibility level by level—explaining why the proof builds a pair of lifting ladders.

The Three Pillars: Why a 17-Million-Line Start Still Needed 76,000-Line Compression

Because balancing these periods conscripts nearly every corner of modern number theory. Robin Zhang organizes the machinery into three towering pillars:

First, finite primes and theta lifts. On Numberphile, James Maynard revealed a stunning gem buried in this layer: an exceptionally simple, concrete new proof of Pierre Deligne's famous Weil conjectures—something human mathematicians had labored for decades to construct but failed to achieve.

Second, measuring complex magnitude. Here the proof brings in elliptic curves with complex multiplication—complex grids with extra rotational symmetry—unlocking exact period formulas. Close by is Arakelov geometry, which adds geometric structure to the integers at infinity, much as Bézout's theorem needs points at infinity to count intersections cleanly, plus the 2023 prismatic Piatto-Hodge theory. Even experts were stunned that Arakelov theory played a central role.

Third, controlling hidden denominators when splitting automorphic spaces into Hecke eigenspaces. This requires Galois representations, which convert the arithmetic symmetries of polynomial roots into invertible matrices, along with the Langlands correspondence and the Taylor-Wiles machinery that conquered Fermat's Last Theorem. As Alvaro Lozano-Robledo puts it, corners of number theory that once seemed distant and hyper-specialized suddenly locked together into a single machine.

Arakelov Geometry and Prismatic Piatto-Hodge Theory

Arakelov geometry is a branch of arithmetic geometry that treats geometry on algebraic curves and the "prime at infinity" in number theory in a unified way: on the usual ring of integers, each prime ideal corresponds to a finite place, while real and complex embeddings correspond to infinite places. Arakelov theory equips the infinite places with metric structure so that geometric tools such as intersection theory and the Riemann-Roch theorem can be used on arithmetic surfaces. The article's mention of "adding geometric structure to the integers at infinity" refers precisely to this idea. Prismatic Piatto-Hodge theory is a new p-adic cohomology framework developed around 2023 by Bhatt, Lurie, and others; it unifies crystalline cohomology, de Rham cohomology, and other classical theories, and is regarded as a major consolidation of p-adic Hodge theory. Applying such cutting-edge, highly technical tools to a proof of the Riemann Hypothesis is exactly why experts were shocked: it means the proof does not merely circle within classical analytic number theory but deeply conscripts the latest advances in contemporary arithmetic geometry.

The Meaning of Mathematics: Understanding Matters More Than Correctness

As the code was certified at astonishing speed, the conversation shifted from "does the proof work" to "what is mathematics actually for." Alex Konturovich says plainly: mathematics is not about correct statements but about understanding. For centuries, you could not reach a proof without first understanding it; now the cart is before the horse. But he calls the Lean proof a compass pointing north—dropped in a forest, you no longer wander blindly; you know which way the treasure lies.

James Maynard was in a hotel room in China, on the eve of a conference commemorating the 200th anniversary of Riemann's birth, when his phone lit up with the news. The title of his talk the next morning was "The Riemann Hypothesis: Past, Present, and Future." At first, that 250,000-page footnote terrified him—would AI hand humanity an opaque monster no one could understand? Now, having seen the gems inside, he believes humans will understand the proof within a year or two. But he still compares an unexplained proof to a message from aliens: claiming a solution without showing why. True understanding cannot be downloaded by reading the answer. He chats with AI like a clever colleague, then tells it: "Now stop telling me things." To truly understand, you still have to sit down with paper and pen, bang your head against the wall, and struggle until the puzzle cracks.

This leaves an urgent question for mathematics as a profession. The romantic era of the lone scholar battling a conjecture with paper and pen for years is fading. Some warn that machines will blast open hundreds of open problems at once, like dynamite fishing. What worries Maynard and Konturovich most is young mathematicians. Until last week, the career ladder was simple: find a hard problem and solve it. Soon, Konturovich says, you will have to evaluate all work the way you evaluate AI-generated work. Human craft shifts toward good taste, asking the right questions, and drawing maps, because "I don't know how to gradient-descend to interesting." Robin Zhang reminds us that mathematics is a gift economy: even AI proofs stand on 150 years of generously shared human concepts.

James Maynard was in a hotel room in China

Princeton mathematician Peter Sarnak poses the next challenge: give AI only the bare axioms in Lean, as AlphaZero learned chess from scratch, and see whether it can invent a genuinely new field of mathematics. So far, no AI has. As Brian Greene notes, mathematics is only the testing ground. What happens when these tools reach theoretical physics, quantum gravity, or medicine?

In eight days: a 250,000-page joke, 17 million lines of code shrunk to 76,000, and a living map of modern mathematics. The Clay Institute still lists the Riemann Hypothesis as open, because turning the machine's compass into human understanding has only just begun.

One-line Summary

AI compressed 17 million lines of Lean code to 76,000 in eight days, completing a machine-verified proof of the Generalized Riemann Hypothesis—while leaving "understanding" to humans.

Paragraph Summary

The article recounts an eight-day mathematical storm: Levent Alpoga initially posted, as a joke, a Riemann Hypothesis note with 17 million lines of AI-generated Lean code; Anthropic researcher Luke Cernow and Claude compressed it to 76,000 lines in five days—a 99.5% reduction—verified by multiple independent kernels. The proof actually attacks the Generalized Riemann Hypothesis, with core machinery including weighted sums over prime powers, the Mellin transform, theta lifts, and a delicate balance in the Artin-Whaples product formula, conscripting modern number-theoretic tools such as a new proof of the Deligne-Weil conjectures, Arakelov geometry, Galois representations, and the Langlands correspondence. Mathematicians stress that understanding matters more than correctness: an AI proof is like a compass, but humans still need paper-and-pen struggle to truly master it; the mathematical profession faces disruption as the career ladder for young mathematicians shifts.

#Riemann Hypothesis#Lean theorem prover#AI mathematical proof#formal verification#Generalized Riemann Hypothesis#Claude Anthropic#arithmetic geometry
Share:

Related articles