When LLMs Meet Mathematical Proofs: Formal Verification and the 167-Year Riemann Hypothesis
A recent claim of finding a proof path for the Riemann Hypothesis using AI coding assistants highlights a new paradigm in mathematical research: human guidance combined with large-scale AI reasoning and formal verification. This article explores the technical mechanisms behind formal proofs, the role of AI in proof engineering, standards for verifying machine-generated proofs, and how this human-machine collaboration workflow is expanding into broader software engineering practices.
1. Event Review: A “Proof” Without a Traditional Paper
Recently, a 34-year-old mathematics researcher announced that, in collaboration with an AI coding assistant, he had found a proof path for the Riemann Hypothesis. Since its proposal in 1859, the Riemann Hypothesis has remained unsolved for 167 years, recognized as one of the most important open problems in mathematics, accompanied by a million-dollar prize. The announcement itself was sensational, but what truly deserves the attention of the tech community is how he published the results.
Instead of writing and submitting a complete, peer-reviewed paper following academic convention, the researcher directly published an entire set of formal proof code, split into 14 compressed files for anyone to download, inspect, and reproduce. By rough estimates, converting this formal proof back into a natural language document with all details would exceed 250,000 pages. Even more strikingly, in his documentation, he admitted that in the later stages of the research, the AI assistant’s progress far outpaced his own. He stated that he had presented the complete argument to the outside world “before fully grasping the extensive peripheral mathematical knowledge involved.” According to him, the same method could potentially be extended to the generalized Riemann Hypothesis and broader variations.
Regardless of whether this proof ultimately passes academic scrutiny, this event marks the formation of a new paradigm for mathematical research: humans provide direction and judgment, AI systems handle large-scale reasoning and detail expansion, and formal proof systems conduct the final mechanical verification. For developers, understanding the technical mechanisms behind this paradigm is far more valuable than merely speculating whether the conjecture has been cracked.
2. Formal Proofs: Turning Mathematics into Compilable Code
To understand the technical depth of this event, we first need to clarify what a formal proof is.
Proofs in traditional mathematical papers are written for humans to read, filled with omissions and intuitive leaps. Reviewers must rely on professional experience to judge whether each step of reasoning is rigorous. This approach has inherent flaws: the larger and more complex the proof, the more prone human review is to error. History is full of cases where papers in top-tier journals were found to have critical vulnerabilities years after publication.
The approach of formal proofs is entirely different. It requires researchers to express every definition, lemma, and inference step in a strict formal language, to be checked line by line by software systems known as proof assistants. The basic workflow can be summarized as follows:
- Formal Definition: Precisely define mathematical objects (such as complex functions, analytic continuation, zero distribution) using type systems and logical axioms.
- Theorem Statement: Write the proposition to be proved as a formal statement.
- Proof Construction: Step-by-step derivation using tactics, where each step must be accepted by the proof checker.
- Compilation Verification: Only when all proof scripts pass the kernel check is the theorem considered machine-verified.
You can think of a proof assistant as an extremely strict compiler: any ambiguity, any omission of “obvious” steps, will result in a “compilation failure.” In other words, once an entire set of proof code passes formal verification, its logical correctness no longer depends on the energy or expertise of human reviewers but is guaranteed by the foundations of mathematics itself. This is why the researcher chose to publish the code directly rather than a paper—if the code passes verification, the debate is no longer about “believing it or not,” but about “whether it has been verified.”
3. The Role of AI Assistants in Proof Engineering
The 250,000-page scale of proof details far exceeds what any individual can accomplish manually. This is where AI-assisted tools come into play. From an engineering perspective, AI assistants typically handle the following types of tasks in formal proofs:
1. Lemma Search and Auto-completion
Large proofs rely on a massive number of intermediate lemmas. AI assistants can infer which theorems might apply to the current proof goal based on existing mathematical libraries, automatically generating candidate proof scripts and significantly reducing the cost of manual search and trial-and-error.
2. Batch Expansion of Pattern-based Reasoning
Proofs contain numerous reasoning segments with similar structures and fixed routines. AI assistants excel at identifying these patterns and generating the corresponding formal code in batches, freeing mathematicians from repetitive labor.
3. Exploration Across Knowledge Boundaries
Modern mathematics is highly specialized, and a major conjecture often spans number theory, complex analysis, algebraic geometry, and other fields. It is difficult for human researchers to be proficient in all branches simultaneously. AI assistants can quickly call upon knowledge from different fields and explore paths in areas humans have not yet fully understood—exactly the phenomenon the researcher described as “the assistant running ahead of me.”
4. Rapid Elimination of Failed Paths
The search space for proofs is enormous. AI assistants can quickly try multiple paths, rapidly eliminating dead-end branches and allowing humans to focus their judgment on truly critical decision points.
It is important to emphasize that this is “human-machine collaboration” rather than “machine replacement”: the overall strategy of the proof, the inspiration for key constructions, and the interpretation of the mathematical significance of the results still depend on humans. The value of AI systems lies in increasing the throughput of search and verification by several orders of magnitude.
4. How to Rationally Verify a Machine Proof
For developers and technical decision-makers following this, a more practical question than “whether the result holds” is: by what standards should a machine proof be examined? The generally accepted verification paths in the industry include:
- Kernel Trustworthiness: The logical kernel of the proof checker should be as small as possible, with its implementation subject to long-term review. The Trusted Computing Base (TCB) should be kept minimal.
- Independent Reproduction: Third parties should be able to re-run all proof scripts in a clean environment, verifying that all theorem declarations pass the checks.
- Formal Review of the Proposition Itself: Machines can only guarantee that “the formalized proposition has been proven.” Whether the formalized proposition faithfully corresponds to the original statement of the Riemann Hypothesis still requires human experts to compare line by line. Historically, the downfall of many “major proofs” has occurred precisely at the translation of definitions, not the reasoning process.
- Dependency Auditing: Checking whether the proof has quietly introduced extra, unrecognized axioms or assumptions.
Only when all four aspects are passed can the conclusion that “the proof holds” be truly established. Until then, any claim should be treated as an “unverified candidate proof.”
5. Implications for Developers: Formal Methods Moving Toward Engineering Mainstream
Setting aside debates within the mathematical community, this event also has profound implications for the field of software engineering.
First, the application boundaries of formal verification are being significantly broadened by AI tools. In the past, due to high costs, formal methods were only used in a few high-value scenarios such as aerospace, chip design, and core financial systems. As AI assistants can automatically generate and repair proof scripts, the unit cost of formal verification will drop significantly, and it is expected to enter broader software development workflows in the future, such as correctness proofs for critical algorithms, model checking for concurrency protocols, and security arguments for smart contracts.
Second, “machine-checkable artifacts” are replacing “human-readable documents” as trusted deliverables. Whether for mathematical proofs or software systems, future trustworthiness will increasingly be backed by automated verification rather than relying on authority or peer reputation. When designing systems, developers should consider early on how to output specifications and assertions that can be automatically checked by toolchains.
Third, the core of human-machine collaboration is division of labor, not replacement. In this event, humans were responsible for proposing goals, controlling direction, and judging significance, while AI systems handled large-scale detail expansion. This division of labor is equally applicable to engineering practices like code generation, test construction, and documentation writing—leave judgment to humans and throughput to machines.
Fourth, new requirements are placed on engineering infrastructure. A 250,000-page-scale proof engineering project requires supporting capabilities like version control, incremental compilation, and distributed verification. When building R&D platforms, enterprises can leverage general object storage to save large proof artifacts, utilize container platforms to orchestrate parallel verification tasks, and track verification progress through logging services and monitoring alerts. These are capabilities supported by common cloud product categories. For instance, the storage, computing, and DevOps-related services provided by Baidu AI Cloud can offer a stable infrastructure foundation for such large-scale verification projects.
6. Conclusion: What Awaits Verification is More Than Just a Conjecture
From 1859 to the present day, the Riemann Hypothesis has witnessed the triumphs and setbacks of mathematics. This time, regardless of the final conclusion, the combination of “AI assistant + formal proof” has demonstrated a reproducible, verifiable, and scalable research paradigm to the world. It means that in the future, any major claim will no longer depend on belief, but on whether it can be independently re-verified by a machine.
For tech professionals, what is truly worth noting is not the fate of a single conjecture, but this three-stage workflow of “human judgment + AI generation + machine verification.” It is moving from mathematics into software engineering and every corner of scientific computing. A transformation that could rewrite how knowledge is produced has only just begun.
