AI and the Riemann Hypothesis: How Formal Verification Is Changing Mathematical Proof

    Recent claims of an AI-assisted proof of the Riemann Hypothesis, accompanied by a machine-checkable artifact of more than 17 million lines, put formal verification in the spotlight. This article explains why such proofs run to millions of lines, how proof assistants and small trusted kernels make them checkable without human reading, why verifiable reward signals have made AI suddenly capable at mathematics, and what the collapse in verification cost means for mathematicians, reviewers, and the cloud infrastructure behind the training–inference–verification pipeline.

    1. Introduction: A Proof That Needs a Machine to Read It

    Not long ago, news broke simultaneously across the mathematics and AI communities: researchers at an AI lab announced that, after extended collaboration with their own AI assistant, they had found leads toward a proof of the Riemann Hypothesis, accompanied by a machine-checkable proof artifact of more than 17 million lines. Whether the claim holds up is beside the point. What it did was drag a long-running internal debate in mathematics into the spotlight: when a proof is larger than any human could read in a lifetime, on what grounds do we call it “correct”?

    That is precisely the question formal mathematics has spent decades answering. Traditionally, a theorem’s correctness rests on peer review: editors, referees, and domain experts work through the pages line by line and confirm the result through human consensus. This works well enough for a 200- to 300-line paper. Once a proof expands beyond the scale of manual inspection, however, human consensus stops working. So attention turned to machines, not to have machines “believe” a proof, but to have them “check” it, one inference step at a time.

    2. Why Proofs of the Riemann Hypothesis Run to Millions of Lines

    Posed in 1859, the Riemann Hypothesis remains one of the deepest open problems in number theory and one of the seven Millennium Prize Problems. It asserts that every nontrivial zero of the Riemann zeta function lies on the critical line where the real part equals one half. The statement looks simple, but it reaches into the distribution of prime numbers, analytic number theory, and much of the surrounding mathematical landscape.

    There are two reasons a proof might be extraordinarily long. The first is that the problem itself spans deep water in analytic number theory, algebraic geometry, and representation theory. Any single route requires enormous amounts of scaffolding, and with lemmas nested inside lemmas, the proof grows naturally.

    The second reason is more important: if the proof must be machine-checkable, then every “obviously,” “similarly,” and “by a standard result” has to be expanded into a complete logical derivation. A single “easy to verify” in a human proof can correspond to hundreds or thousands of explicit lines in a formal one. The abstract compression that human minds rely on has to be fully unpacked before a machine will accept it.

    3. Formal Verification: Translating Human Proofs into a Language Machines Understand

    To judge how trustworthy a 17-million-line proof is, start with the basic mechanism of formal verification. Its goal is not to explain mathematics, but to confine mathematical statements and reasoning to a formal system with strict rules.

    A usable formal system typically has three layers:

    • Bottom: the formal language and type system, which define what counts as a legal expression, what type each variable has, and which constructions are well formed;
    • Middle: axioms and inference rules, which specify every “legal move” for deriving a new proposition from existing ones;
    • Top: the proof assistant, software built to host and check proofs, which researchers use to rewrite a natural-language proof step by step into a chain of machine-decidable inferences.

    The following is an illustrative formal proof (pseudocode style, meant only to convey the idea):

    1. -- Proposition: for any natural number n, n + 0 = n
    2. theorem add_zero (n : Nat) : n + 0 = n :=
    3. proof by induction on n:
    4. case n = 0: -- base case
    5. by definition of add -- 0 + 0 is 0 by definition, so it holds directly
    6. case n = k+1: -- inductive case, assuming add_zero(k)
    7. rewrite using (add_succ) -- simplify (k+1)+0 with the addition successor rule
    8. apply induction_hypothesis-- reduce to the known k + 0 = k

    The value of this snippet is not what it proves. It is that it leaves no room for ambiguity: every step states its justification, whether that is a definition, a rewrite rule, or the induction hypothesis. A human still needs background knowledge to follow it, but a machine reads it with zero tolerance for error, because it only has to check mechanically that each step conforms to the inference rules.

    4. The Trusted Kernel: Why You Don’t Have to Read Every Line

    This answers the “how do you verify millions of lines” question: no human needs to read them. The checking is delegated to a very small, repeatedly audited core inside the proof assistant, commonly called the trusted kernel. Its job is narrow and strict, starting from the axioms and confirming that every inference step is permitted by a legal rule. A single illegal step causes the entire proof to be rejected.

    The key is that the so-called trusted computing base is small enough. A proof may run to tens of millions of lines, while the kernel’s logic may be only a few thousand, reviewed by both mathematicians and engineers and covered by extensive testing. Trust is thereby concentrated: we do not have to believe the author made no mistakes, only that this small, repeatedly verified kernel did not. It is a decentralized model of trust, in which a proof’s correctness is decided by logic rather than by the author’s authority.

    Independent re-verification becomes cheap for the same reason. Run the check with a separately implemented kernel, or have a different team rerun it, and as long as the two do not share the same defect, the conclusions corroborate each other. This is entirely different from consensus-based peer review: formal verification reduces “is this trustworthy?” from a social process to a computation.

    5. Why AI Is Suddenly Good at Mathematics

    If formal verification answers “how do we confirm correctness,” the change AI brings is making it feasible to find a correct proof in the first place. AI was historically mediocre at mathematics because the field demands extreme precision and long-range consistency, and “plausible but wrong” output from a language model has almost no value here. Recent progress rests on capturing something that did not previously exist: a verifiable reward signal.

    Concretely, several factors compound:

    1. Formalization supplies a natural automatic grader. A proof attempt is either accepted by the kernel or rejected, with no middle state. That let reinforcement learning obtain a clean reward on mathematical tasks for the first time, without human labels: try a million times, wrong attempts are discarded, correct ones are reinforced.
    2. Large-scale formal mathematics libraries have accumulated vast numbers of “reference answer” proofs, giving models high-quality imitation targets.
    3. Neural methods handle intuition and search; symbolic methods handle rigor and verification. The model guesses which lemma to use next and which rewrite to apply, and the kernel adjudicates, forming a “guess–verify–revise” loop.
    4. Tool calls let the model offload concrete computation to deterministic engines and focus on strategic planning.

    In other words, AI did not suddenly become strong because it mystically “understood mathematics.” It became strong because a property mathematics has always had, but that was hard to exploit at scale, namely that correctness can be judged instantaneously by a machine, has finally been unlocked by formal verification infrastructure.

    6. Verification Cost Collapse: What It Really Means for Mathematicians

    Once the cost of verifying a proof collapses from “months of human refereeing” to “one machine run,” the center of gravity of a mathematician’s work shifts structurally.

    A great deal of a mathematician’s day used to be consumed by derivation, calculation, and error-checking, all of it mechanizable. That portion can now be carried by AI systems and formal tools, freeing humans to concentrate on what machines are worst at: posing good questions, constructing new concepts, forming intuitive connections across fields, and judging which directions are worth pursuing. The core competitive strength of mathematics is moving from the execution of proofs toward taste and insight in asking questions.

    The division of labor is being reshaped as well. Future papers may well appear in a dual-track form: a natural-language account of the ideas plus a complete machine-checkable proof. The first is for human understanding of motivation, the second for machine confirmation of correctness. The reviewer’s role shifts from checking every line to assessing the importance of the problem and the novelty of the method, since correctness is now backed by a machine. This does not make mathematicians redundant; it relieves them of the role of human checker.

    7. Engineering Perspective: Putting Verification and Training on Solid Infrastructure

    In practical terms, this system rests on real compute and platform support. Training models that perform long-horizon reasoning on mathematical tasks requires large-scale heterogeneous compute, while repeated proof search and kernel checking are classic parallel, compute-intensive workloads. General-purpose capabilities offered by cloud platforms such as Baidu AI Cloud, including elastic compute, object storage, containerized scheduling, and monitoring and alerting, map neatly onto this three-stage “train–infer–verify” resource profile:

    • Training needs scalable compute clusters;
    • Inference needs low-latency elastic scaling;
    • Massive verification workloads need concurrent job orchestration, along with observable logs and metrics.

    Combining these general capabilities is what allows a pipeline of “AI proposes a proof, a machine checks it” to run stably, reproducibly, and traceably.

    Two engineering points deserve emphasis. The first is reproducibility: the verification environment (formal library versions, kernel implementation, dependencies) must be fully pinned, because a result that is correct but cannot be rerun is no result at all. The second is continuous auditing of the trusted base: the kernel is small, but it is the anchor for trust globally, so any change to it must pass rigorous testing and review.

    8. Conclusion: From Trusting Experts to Trusting Machine Verification

    Whether the Riemann Hypothesis has really been settled will not be decided by anyone’s announcement. It will be decided by whether that proof passes the trusted kernel’s step-by-step checking. That is the deepest change formal verification brings: the confirmation of mathematical truth is moving from authority and consensus toward reproducible machine verification.

    AI’s rise is so closely tied to mathematics precisely because mathematics offers a nearly perfect paradigm of verifiability, one that makes a model’s progress objectively measurable for the first time. For humans, this is both a tool upgrade and a reassessment of roles: as execution and verification are increasingly automated, what remains genuinely scarce is the ability to ask the right questions.