AI Tackles Mathematical Conjectures: Formal Verification in Practice

    This article examines a recent attempt at a human-AI collaboration to prove the Riemann Hypothesis and its generalization, which involved the release of over 17 million lines of formal code. It explains why machine-checkable proof code is an engineering fact rather than mathematical consensus, how work was divided between human and model, and why formal verification has become a practical requirement. The article also outlines a layered review process for large-scale formal codebases and offers actionable recommendations for engineering teams. Readers will learn how to evaluate the validity of massive AI-assisted proofs, the risks of output outpacing human review, and how to build verifiable, reproducible, and auditable delivery pipelines.

    1. What Happened: A Human-AI Formalization Effort

    Recently, a mathematical researcher at a cloud vendor’s research organization stated publicly that, working with an intelligent coding tool, they had claimed to find proof paths for the Riemann Hypothesis and the generalized Riemann Hypothesis. They released over 17 million lines of formal code in 14 compressed archives. They also mentioned that the collaboration produced more than 250,000 pages of written derivations, which were not published due to their sheer volume and poor readability.

    A technical clarification is necessary here: in the context of formal methods, “writing 17 million lines of machine-checkable proof code” and “the mathematical community accepting a proof of a conjecture” are entirely different things. The former is an engineering fact; the latter is academic consensus, which requires peer review, semantic scrutiny, and community verification. Conflating the two is the most common source of misreading in such news.

    From an engineering perspective, what deserves attention is not the conclusion but the collaboration model and verification bottlenecks it reveals.

    2. Breaking It Down: The Real Structure of Human-AI Division of Labor

    According to public descriptions, the collaboration followed a three-tier division:

    • Humans handled top-level architecture: defining the proof strategy, splitting main theorems, and setting the boundaries of key intermediate propositions;
    • The model handled the grunt work: generating lemmas in bulk, filling in intermediate steps, and translating natural-language arguments into formal language;
    • The model “overstepped” in the later stage: some derivations exceeded the author’s immediate comprehension.

    The third point is the key risk. When both the complexity of the objects being verified and the speed of output far exceed human review bandwidth, the traditional quality gate of “the author understands it before submitting” breaks down. In the author’s own words, near the finish line the model was almost “flying near the finish line,” while human reviewers could do little more than outsource the entire verification responsibility to the machine.

    3. Why Formal Verification Has Suddenly Become a Must-Have

    The core idea of formal verification is straightforward: turn “I believe this is correct” into “a machine can check step by step that it is correct.” Toolchains represented by interactive theorem provers such as Lean require every reasoning step to have an explicit type and term; any skipped step is rejected.

    A schematic example looks roughly like this (for structure only, not a real proof):

    1. theorem riemann_hypothesis_weak (s : ℂ) (hs : s ≠ 1) :
    2. (riemannZeta s = 0 ∧ 0 < s.re ∧ s.re < 1) → s.re = 1/2 := by
    3. intro h
    4. -- Fill in several intermediate lemmas here
    5. sorry

    The value of this code lies not in the conclusion but in this: once all sorry placeholders are eliminated and all dependencies pass the check, the proposition holds within that formal system. Conversely, as long as a single sorry remains, the entire “proof” is incomplete in an engineering sense.

    This also explains why the first acceptance criterion for large-scale formalization projects is so clear: not the line count, but whether there are unclosed proof holes, whether axioms have been weakened, and whether custom strong assumptions have been quietly introduced.

    4. The Real Challenge: How to Review 17 Million Lines of Code

    Volume itself is an attack surface. Facing formal code at the scale of tens of millions of lines, engineering typically requires a layered review process:

    1. Reproducible builds: pin toolchain versions, dependency lockfiles, and caching strategies so that anyone can pull the code in a clean environment and pass the check in one go;
    2. Dependency minimization: audit all external theorem libraries introduced to confirm that no equivalent form of the proposition being proved is treated as an established result;
    3. Assumption auditing: tally all axioms and classical assumptions used throughout, and explicitly list and justify any new strong assumptions;
    4. Structural slicing: split by main theorems into independently checkable modules, and verify module by module that there is no sorry, no admit, and no commented-out branch;
    5. Diff review: mark separately the human-written skeleton and the model-generated fill-ins, and prioritize reviewing sections where the model “overstepped.”

    It can be compared to a super-large-scale code review: line count does not equal quality, coverage does not equal correctness, and passing compilation only means syntax and type consistency.

    5. Practical Recommendations for Technical Teams

    To borrow this approach in your own projects, start with four things:

    • Write “verifiability” into the definition of done. Any model-generated proof, script, or configuration must include automatically executable check commands; failure to pass the check means the task is incomplete.
    • Establish a bandwidth-matching mechanism between output and review. When model output speed exceeds human review speed, automatically downgrade to “draft status” and prevent it from going directly into the main branch.
    • Preserve a complete provenance chain. Record the generation source, modification history, and dependencies of each intermediate lemma for easier problem tracing.
    • Use general-purpose cloud capabilities to handle heavy lifting. Massive code and build artifacts can be stored in object storage, build tasks can scale elastically on container platforms, full-process logs can go to logging services, and exceptions can be handled by monitoring and alerting—turning “reproducibility” from a slogan into a hard constraint in the pipeline.

    6. Conclusion: Stay Excited, Stay Skeptical

    What makes this event reasonable is that it demonstrates the potential of human-AI collaboration in ultra-large-scale symbolic reasoning; what makes it questionable is that the credibility of the conclusion currently depends entirely on unfinished community verification. For developers, the right attitude is neither “AI has already replaced mathematicians” nor “this is just hype,” but to focus on the verification system: who defines the assumptions, who can reproduce the build, and who takes responsibility for review.

    In engineering practices for trustworthy AI, models expand the boundaries of what is possible, while formal tools and review processes guard the boundary of correctness. Baidu AI Cloud, in its relevant engineering practices, also emphasizes that the value of capabilities ultimately lies in verifiable, reproducible, and auditable deliverables—perhaps this is the most useful takeaway this event leaves for the technical community.