Riemann Hypothesis Proof Passes Formal Verification: How AI and Proof Assistants Actually Work

    A recent episode in which an AI-assisted candidate proof of the Riemann Hypothesis passed formal verification—set against a human-only proof that reviewers found flawed within hours—offers a concrete lens on machine-checked mathematics. This article breaks down what formal verification really guarantees (and what it does not), why proof assistants based on dependent type theory are structurally well suited to large language models, and what it means when a proof balloons to roughly 17 million lines and becomes an engineering project with its own build, caching, and auditing concerns. It closes with a practical checklist for auditing AI-assisted formal proofs and a set of takeaways for general software development around verifiable generation.

    Riemann Hypothesis Proof Passes Formal Verification: A Technical Look at AI and Proof Assistants

    1. What Happened: Two Candidate Proofs, Two Outcomes

    On the evening of November 20, a mathematician at an AI research organization posted a statement on a personal website. Working together with the organization’s large model, he said, he had found a proof method for the Riemann Hypothesis and its stronger variant, the Generalized Riemann Hypothesis. The delivered materials came in three parts: a four-page note, formalized code split across 14 compressed archives (around 17 million lines), and more than 250,000 pages of textual derivation that were withheld for being too long to publish.

    On November 22, the organizations behind major interactive theorem provers, together with a large open-source mathematics library community, issued a joint announcement confirming that the proof had passed verification and extending their congratulations. A mathematician who has won one of the highest international awards in the field also voiced his support. He argued that anyone claiming “mathematical research is about to end” was likely mistaken, and that AI would instead drive mathematics to flourish further. His core point: the competitive edge of the future will shift from “building complex chains of proof” toward “posing good questions, observing, and exploring,” with AI treated as a new research tool and source of information.

    At almost the same moment, the president of an international mathematical society published a roughly 940-page candidate proof of the Generalized Riemann Hypothesis written by a mathematician who stressed that the entire work was done by humans, without AI. About eight hours later, the president updated the announcement: several people, using different AI models, had already found problems in the manuscript. He also cautioned that the soundness of the proof strategy was not guaranteed—every problem must be resolved and the work must gain acceptance from the mathematical community before the proof could be recognized.

    The two submissions form a sharp contrast. The core asset of the first is machine-checkable code; the second is unverified human derivation that has not been formalized. This shows that generating and reviewing are two distinct capabilities: a machine can serve as a rigorous, efficient “checker,” yet it can also go wrong during generation. Whether verification can keep pace with generation comes down to converting natural language into a machine-executable representation.

    2. The Key Premise: What Formal Verification Actually Proves

    Before discussing engineering implications, one frequently misread point needs clarifying: passing formal verification does not mean the conclusion “the Riemann Hypothesis has been proven” is automatically accepted by the mathematical community. For an AI-assisted formal result to gain academic recognition, it must still answer at least the following questions:

    1. Statement equivalence. Does the goal the code proves actually correspond to the Riemann Hypothesis (or its generalized form)? In proof assistants built on dependent type theory, the conclusion, the intermediate lemmas, and even the proof itself are typed objects, and the theorem ultimately amounts to an “inhabitant” of a certain type. The kernel only checks internal consistency within the code; it does not judge whether the goal statement faithfully reflects the original mathematical proposition. This is why the “statement characterization” step must rely on mathematicians reading it—it is the most easily overlooked link and the most vulnerable to a single point of failure.
    2. Trustworthiness of axioms and definitions. A proof may rely on additional axioms, or use definitions that are inconsistent with standard mathematical conventions.
    3. Handling of unfinished parts. Does the code contain “placeholders” that let incomplete proofs through by default, extra declared axioms, or trusted-computation entry points that bypass the kernel?
    4. Expert readability. A conceptual note of a few dozen pages is usually just entry-level material for mathematicians. To genuinely convince peers, someone must be able to grasp the overall idea of the proof and fit it into the existing body of theory.

    History offers a reference point. Ever since the Four Color Theorem was proved with computer assistance in the 1970s, debate over whether its proof counts as a “genuine mathematical proof” has continued for decades. It was not until 2005 that the theorem’s mainstream proof was fully formalized. Clearly, “checkable” and “understood and accepted” have always been two different things.

    For developers, this is exactly analogous to the gap between “tests pass” and “the requirements are correct” in software engineering: tests only guarantee that an implementation matches its specification, while whether the specification itself is flawed must be assured by an entirely different set of means.

    3. How It Works: Why a Proof Can Be Machine-Checked

    From “trusting people” to “trusting programs”

    In traditional mathematics, whether a theorem holds ultimately depends on whether reviewers and peers believe the author’s reasoning. Standard mathematics is a web of concepts accumulated over centuries: a large number of results are cited repeatedly, and readers take for granted that the derivations behind them have been vetted. The mechanism is efficient, but it has three structural weaknesses:

    • Implicit assumptions. “Obvious” claims taken as given may not hold.
    • Error propagation. Incorrect results cited many times are hard to detect.
    • Limited review bandwidth. Modern proofs that run to hundreds of pages have already exceeded the limit of what humans can read closely.

    The formalization approach changes the source of trust. A natural-language proof relies on “the reader trusting the author”; a formalized proof relies on “a program checking step by step.” The prerequisite is that this checking program is small and simple enough that its correctness can itself be scrutinized. That is precisely how mainstream interactive theorem provers work: the core kernel implements only a small set of basic inference rules and type-checking logic, and the large amount of higher-level automation must eventually reduce to a chain of basic steps handed to the kernel for one-by-one verification.

    Propositions as types, proofs as programs

    Most modern proof assistants are built on dependent type theory. Dependent type theory allows types themselves to depend on concrete terms—for example, “lists of length n” can constitute a type. This gives rise to an important correspondence:

    • propositions correspond to types;
    • proofs correspond to terms that can be assigned that type;
    • the deductive steps in a proof correspond to a piece of program;
    • the kernel checking a proof is equivalent to a type checker checking a program.

    Schematically:

    1. # Target proposition: every positive even number n (n > 2) can be written as the sum of two primes (Goldbach's conjecture)
    2. Declaration: Conjecture = Type (of the form "∀ n : positive even, n > 2 → ∃ p q : prime, n = p + q")
    3. Goal: Provide a "term" of this type, i.e., a proof
    4. Steps: Use a tactic language to construct the term step by step; each step is
    5. reduced by the kernel into the corresponding basic deductions
    6. Any step fails → the entire proof does not hold
    7. All steps pass → the kernel accepts the type; the proposition holds within this axiom system

    This also means that, in a sufficiently strong axiom system, “whether a proof exists” is generally undecidable, and there is no universal proof algorithm that applies to all propositions. This limitation stems from basic results in formal logic concerning completeness and decidability, and it is the fundamental reason automated proof tools cannot solve open problems at the push of a button.

    The asymmetric architecture: generation is loose, verification is strict

    This is the core of the whole technical approach: the cost of generation and the cost of verification are highly asymmetric.

    Dimension Natural-language proof Formalized proof
    Verification method Relies on peer reading and trust chains Kernel verifies each step
    Can local errors be found locally Often not; they spread easily Yes; errors localized to specific steps
    Main cost Reviewers’ time and attention Engineering effort to write the proof + modest compute
    Scale limit Bounded by review bandwidth Bounded by build and storage resources

    At its heart, a proof assistant is a compiler “custom-built for mathematical problems”: the proof is the source code, the theorem statement is the type signature, the kernel is the type checker, and the mathematics library is the standard library. It has run this way for decades; what large models change lies mainly on the “generate the source code” side.

    4. Why AI Is Naturally Suited to Formalization

    The reliability weakness of large models has always been “hallucination”—producing content that looks plausible but does not actually hold. In natural-language proofs, hallucination typically takes the form of citing nonexistent lemmas, skipping steps by tacitly assuming a conclusion, or quietly swapping hypotheses. Such errors are hard to catch automatically and can only be caught through line-by-line expert review. This is why, as noted above, the purely human-written candidate manuscript had its problems found within eight hours by several reviewers using AI models—far faster than a traditional review cycle.

    A formalization environment closes the feedback loop: any lemma a model “fabricates,” and any logical leap, cannot pass in front of the kernel. This shows up concretely in four ways:

    1. Verifiable feedback. Every compilation of a proof script produces a clear success or failure signal, with the error location pinpointed to a specific step. This is exactly the kind of feedback that reinforcement learning and various automated reasoning systems rely on for training.
    2. Retrieval-based premise selection. Large mathematics libraries already contain formalized code on the order of millions of lines—effectively a searchable “knowledge repository.” A model can retrieve and reuse existing theorems, which is also where the most important value of a large formalized-mathematics ecosystem lies.
    3. Agent loops. A model can repeatedly “attempt a proof, invoke the proof assistant, read the errors, and revise its strategy” until it passes:
    1. # Basic loop of a formalization agent (pseudocode)
    2. while budget remains and goal is not proven:
    3. attempt = Model(current goal, relevant lemma set, history of past failures)
    4. result = ProofAssistant.check(attempt) # Kernel verifies each step
    5. if result.status == "passed":
    6. return attempt # A locally verified success, guaranteed by the kernel
    7. append result.error_info to history of past failures
    8. # Overall proof = a directed acyclic dependency graph of individually verified fragments

    If the whole goal is hard to prove directly at once, the system will usually decompose it into several subgoals, forming a dependency graph. No matter how large it grows, as long as the graph has no cycles and every leaf passes the kernel, the whole thing holds. Those 17 million lines of formalized code are, in essence, most likely exactly such a dependency graph.

    1. Lowering the barrier. The number of mathematicians who command formalization languages and can skillfully use tactic tools is limited. Automatic conversion between natural language and formalization languages could bring more mathematical workers into the fold.

    But the limits must also be recognized. What models excel at is “searching for a passing path given a sufficiently precise goal.” Whether the goal matters, is worth formalizing, or is equivalent to some profound conjecture still depends on human judgment. Add in the trust-chain issues of axiom and definition trustworthiness and statement equivalence, and a machine-assisted formal proof is no more “exempt from review” than a traditional proof. It merely shifts the focus of review from “checking derivations line by line” to “checking the starting points and modeling of the trust chain.”

    5. 17 Million Lines: When a Proof Becomes an Engineering Problem

    Scale assessment

    Large open-source mathematics libraries have already reached the millions-of-lines scale, and this single proof’s formalized code comes to roughly 17 million lines—stacking another order of magnitude on top of the existing ecosystem. This is no longer “writing a proof” but a software project requiring version management, build management, dependency management, and audit processes. A considerable share of the content is likely supplementary formalization of foundational theories such as complex analysis, Fourier analysis, L-functions, and random matrix theory. Some of these areas previously had relatively thin coverage in mathematics libraries and require a large amount of “infrastructure” to be laid down first.

    Build reproducibility

    The toolchain, the mathematics library, and the proof scripts must correspond to one another by strict version. Any version drift in any link can make a proof that used to pass fail to build. In practice, this means pinning versions, locking dependencies, and keeping complete build logs.

    Incremental builds and caching

    The build cost and memory footprint of tens-of-millions-of-lines code are not trivial. Roughly speaking, if each line averages 1–2 KB of memory, 17 million lines corresponds to about 20–40 GB. The actual figure depends on project structure, but one thing is certain: a full rebuild without caching or incremental compilation is usually only viable at release points. The normal practice is to rebuild only affected modules and restore unchanged proofs directly from cache.

    Lessons from algorithmic complexity

    When formalizing a theory, the choice of which equivalent characterization to use to define an object can make the difficulty of subsequent proofs differ by orders of magnitude. Taking the prime-counting function as a reference:

    • Defining it intuitively as “the number of primes not exceeding x” requires a nontrivial analytic argument to establish the connection between the Riemann Hypothesis and the distribution of primes.
    • Introducing a complex-integral representation (for instance, an integral whose integrand is the logarithmic derivative) lets the relevant questions be characterized directly through the distribution of zeros.

    So the choice of representation in formalization directly determines the search space for the subsequent proof. These design decisions ultimately still come down to mathematicians’ judgment.

    The knowledge-sharing bottleneck

    When a large formalized proof repeatedly restates basic lemmas, community-style or cross-institution organizations usually need to negotiate repeatedly over concept correspondence, naming conventions, and unified notation. This coordination cost is often higher than the compute cost in cross-organization, cross-toolchain settings, and it is an important reason large formalization projects advance slowly.

    6. An Evaluation Checklist: How to Review an AI-Assisted Formal Proof

    For any result claiming that “formal verification has passed,” it is worth checking against the following list item by item:

    • Goal statement. Is the theorem’s goal strictly identical to the original conjecture? Are the definitions consistent with standard conventions?
    • Axiom audit. Does the exported dependency list contain only well-accepted axioms? Has any proposition that should have been a proof target been introduced as a premise?
    • Placeholder scan. Are there placeholders that let incomplete proofs through by default, extra declared axioms, or trusted-computation entry points that bypass the kernel?
    • Build reproducibility. Can you build from scratch in a clean initial environment, following the documented steps, and independently reproduce the result?
    • Dependency trustworthiness. Has every line of mathematics-library code you rely on been held to the same review standard?
    • Readability materials. Is the conceptual note enough to let an expert grasp the overall approach within a reasonable time?
    • Value judgment. Even if verification passes, does the result actually answer the conjecture itself? Were any unverified extra assumptions introduced along the way?

    Among these, the axiom audit is the most critical. Taking a dependent-type-theory-style proof assistant as an example, a proof can declare and depend on any axioms, and as long as those axioms are logically consistent, the kernel will not reject them. Once a mathematical result accidentally depends on some conjectural proposition, its conclusion degrades from “proven” to “conditionally true.” And auditing axioms in AI-generated large-scale code can itself be automated: traverse the dependency relations of the proof terms, collect all axiom references, and output a list. This brings us back to the asymmetric architecture: the audit script is only a few hundred lines, while the audited code runs to tens of millions of lines.

    7. Lessons for Software Development: Verifiable Generation Is Becoming a Mainstream Paradigm

    The logic of combining formal mathematics with AI applies equally to general software development.

    1. Write specifications as executable checks. The core of formal mathematics is “propositions as types, proofs that can be checked.” The software analog is adding executable specifications to critical logic—for example, invariant assertions, property-based testing and differential testing, model checking of protocol state machines, and runtime assertions with circuit-breaker checks. The closer specifications come to being machine-decidable, the more easily code produced by generative tools can be verified automatically.

    2. Let AI generate; let the toolchain guard the gate. Scenarios such as code generation, test generation, and attribution of logs and exception messages are structurally identical to the “generate–check” loop in formal proofs:

      • Let the model produce a fix suggestion;
      • Have the compiler, static analysis, unit tests, and integration tests act as gatekeepers;
      • Only proceed to the next stage when everything passes.

      In the pipeline, these checks can run at the CI stage and in quality gates. Logs and monitoring alerts then handle problems that only surface at runtime, closing the feedback loop.

    3. Minimize the trusted computing base. Just as a kernel keeps only the minimum set of rules by design, critical systems should likewise shrink the part that must be trusted unconditionally—cryptographic implementations, authentication logic, base libraries. Other components can pursue iteration speed, with testing and auditing as a safety net.

    4. Hand “verification” to AI too, but treat it differently. In the earlier case, several AI models found problems in a human manuscript within a short time, showing that AI also has practical value in a “review” role, and that generation and review are two capabilities that can be evaluated and tuned independently. But generative review can itself produce false positives and false negatives, so it is best used alongside deterministic checks (compilers, tests, formal tools) rather than as a conclusion on its own.

    8. Conclusion

    The episode sends at least three signals:

    1. Formal verification has moved from the ivory tower into large-scale engineering. A 17-million-line codebase means resource planning, build reproducibility, and dependency management must be treated like a large software project.
    2. AI’s value lies in “constrained creativity.” The kernel provides strict boundaries, and the model searches at high speed within them; only their combination produces trustworthy results.
    3. Human judgment remains irreplaceable. What question to pose, how to model it, and what the result means are still the core value of mathematicians and developers alike.

    As that award-winning mathematician put it, the focus of future competition will shift from “whether one can complete a proof” to “whether one can pose good questions.” For software engineers, the same holds true: when code can be generated and verified quickly, the truly scarce abilities are defining the problem, designing verifiable constraints, and building a reliable chain of trust.