
Author: Wang Shengyi, Researcher at Shanghai Qizhi Research Institute, Tencent Research Institute
The Riemann Hypothesis, which has troubled the mathematical community for 167 years, has arrived at a historic moment. On November 21, Anthropic research scientist Levent Alpöge, in collaboration with the artificial intelligence model Claude, publicly released the Lean 4 formal proof of the Riemann Hypothesis and the generalized Riemann Hypothesis. This proof consists of 175,187 files, approximately 17 million lines of code. The next day, Lean FRO and the Mathlib community issued a joint statement confirming that the code passed strict compilation and statement comparison. Unlike any previous major breakthrough in mathematics, before the cheers could spread, a "reversal" controversy regarding the code details quickly brewed online.
A “Reversal” Controversy Triggered by anyGeometry
Shortly after the proof was released, a highly impactful challenge began circulating on social platforms and media: PhD student Jenny Lorraine Nelson from the University of Kansas (who previously questioned proofs of significant mathematical conjectures, such as the counterexample to Connes' rigidity conjecture proposed by OpenAI) found a critical definition named anyGeometry in the massive source code, written as follows:

In simple terms, this function always returns "true" regardless of the input.
As a challenger, Nelson claimed that the entire proof set the geometric conditions as "hollow true propositions"; although Lean ran the code, it was essentially running in logical void, and the proof lacked substantive mathematical content.
This resonates with public concerns about AI: Is AI fooling people again by exploiting loopholes in rules to deceive verification programs?
The definition of anyGeometry does indeed exist in Levent Alpöge's source code and is utilized in 24 files. However, for those familiar with Lean and formal verification, this is not a major issue and cannot overturn the validity of the proof.
To understand why, we need to see what True really means in the code.
In Lean 4's standard library, True is an always-true proposition defined by inductive type, which only has one proof (True.intro) that can be constructed directly without any prerequisites. Thus, fun _ _ _ => True logically imposes no additional constraints. If it’s called in the proof, its only practical effect is to make Lean's type checker confirm whether the three underscore _-represented parameters passed in have the correct types.
Why does it not invalidate the final theorem? Because the logic rules of formal proof assistants are extremely rigid: they do not care how many redundant structures, mediocre auxiliary definitions, or remnants of "scaffolding" were left by AI-generated code.
As long as the top-level theorem to be proved itself is not tampered with, the reasoning process does not carry illegal premises, and the underlying verification system has no logical loopholes, then even if you write a hundred definitions that are always true in between, as long as you can logically derive the final conclusion from standard axioms, this proof is logically absolutely valid.
Therefore, the presence of anyGeometry in Levent Alpöge's code only indicates that a specific geometric condition interface previously reserved here is not needed, rather than the proof being “cheaty.”
Deviations Between Doubts and Targets
It is not surprising that the public and academia raised doubts at first.
The real issue is that the challenge regarding anyGeometry targeted the wrong aspect. When faced with a machine proof spanning 17 million lines, which humans cannot read thoroughly, the real layer of questioning should be how reliable the Lean formal verification system itself is.
Following the chain of trust, we can peel away this system layer by layer, questioning from four aspects:
Is the proposition proven in the code really the Riemann Hypothesis that we understand?
The first iron rule of formal verification is: machines can only guarantee "you proved what you wrote," but cannot guarantee "what you wrote is the Riemann Hypothesis recognized by the mathematical community."
If manipulations occurred when defining propositions, even the most rigorous proof is meaningless. Fortunately, the top statement of this proof is extremely concise, with the core aim being to prove the Generalized Riemann Hypothesis (GRH), of which the Riemann Hypothesis is a special case: that all nontrivial zeros of the Riemann ζ function have real parts equal to 1/2.
We can list it out directly:

Even without programming knowledge, it’s easy to understand by comparing line by line:
- ∀ (s : ℂ): For any complex number s;
- riemannZeta s = 0: If it is a zero of the Riemann ζ function;
- ¬∃ n : ℕ, s = -2 * (n + 1): And it is not a negative even number (-2, -4, -6, …, excluding trivial zeros);
- s ≠ 1: And s is not equal to 1 (because s = 1 is a pole, and the standard library has made value assignments here, hence explicitly excluded);
- s.re = 1 / 2: Then its real part must be equal to 1/2.
More importantly, this definition was not drafted by the author on the spot, but had already been written in Mathlib as a standard definition long before AI participated in the mathematical proof.
Mathlib is a formal mathematical library maintained by a vast community of mathematicians and developers worldwide. Not only the sentence RiemannHypothesis itself but every underlying component it relies on—the complex type ℂ, the natural number type ℕ, the Riemann ζ function riemannZeta and its analytic continuation—are all foundational definitions that have been extensively reviewed and widely used in Mathlib, and can generally be fully trusted.
Moreover, the Lean FRO and Mathlib community has confirmed through independent comparison tools that the final conclusion of this proof is identical to the standard statement in Mathlib.
Does the derivation process sneak in extra axioms?
Lean is built on a rigorous system of mathematical type theory. As long as the final core check passes, it means that every step of reasoning from premise to conclusion is logically intact. Therefore, the only thing to focus on next is the origin—the axioms that these inferences ultimately depend on.
In Lean, users can manually declare axioms, which do not require proof. If someone secretly declares “the Riemann Hypothesis is true” or some equivalent unproven proposition as an axiom, the kernel will still accept it.
Thus, the community verification (including independent audits by MIT mathematician Andrew Sutherland) specifically checked the axiomatic dependencies throughout the proof, and the results confirmed: there are no skipped proof placeholders (sorry) in the entire 17 million lines of code, no custom axioms were used, nor were any escape mechanisms relying on external compilers invoked.
It only depends on three basic axioms built into Lean's standard library, which are widely accepted by the modern mathematical community: propositional extensionality (propext), the axiom of choice (Classical.choice), and reliability of quotient types (Quot.sound).
The most suspicious link: Does Lean software itself have vulnerabilities?
While there are no issues in the first two links, Lean is ultimately a piece of software written by humans. What if its kernel checker has bugs?
Just a few months ago (July 2026), Lean recently experienced a “kernel vulnerability crisis” that shook the community. At that time, researcher Ramana Kumar, utilizing AI, released a “disproof of the Collatz conjecture (3n+1 conjecture)” that neither contained sorry nor additional axioms.
This was essentially a vulnerability report: three days later, another researcher simplified it into a minimal counterexample proving False (contradiction). The vulnerability lay in Lean’s kernel handling of codes involving nested inductive types, and more alarmingly, this false proof had deceived not only the official Lean kernel but also passed independent external checker nanoda and shared partial implementations lean4lean from a week earlier.
Subsequently, from July to August 2026, during adversarial testing for vulnerability hunting using AI, several logical implementation vulnerabilities were discovered in Lean; AI even found extreme methods to falsify False proofs by exploiting overflow memory reference counters and precisely triggering known bugs in the old version of the underlying high-precision arithmetic library GMP.
Additionally, Lean 4's powerful metaprogramming and elaborator mechanism are also recognized by the community as engineering weaknesses.
According to design principles, elaborator is responsible only for translating strategies written by humans or AI into underlying proof items and is not within a trusted range, and ultimately must pass the kernel check; however, in engineering practice, malicious metaprograms can not only hijack local symbols and overwrite output from audit commands but also bypass frontend protections and directly assemble malformed expressions to hit hidden vulnerabilities in the kernel—several significant kernel vulnerabilities in the summer of 2026 were triggered through metaprogramming.
For this reason, in facing this proof of the Riemann Hypothesis, the community invoked extremely high standards of defensive verification, including:
- Static scanning: Scanning the entire codebase to ensure that no escape primitives like native_decide, @[implemented_by], @[extern], etc., that may bypass logical checks have been used;
- Exporting replays independent of the original environment: Not taking the original project’s output at face value, but exporting the underlying proof items as pure data files and providing them to multiple completely independently written external proof checkers like nanoda (written in Rust), con-leche, lean4lean for replays from the beginning, all passed;
- Independent clean file comparison and reproducible sandbox offline: The verifying party created clean files to compare statements, and in a disconnected read-only sandbox, recompiled from source to confirm that the resulting file bytes are completely identical.
However, even reaching this point, we must remain clear-headed.
Pioneer in computer science Edsger W. Dijkstra left a famous saying in 1969: “Program testing can be used to prove the existence of bugs, but can never prove the absence of bugs.” The cross-replay of multiple independent checkers is fundamentally an engineering redundancy; it greatly compresses the probability of error and increases credibility, but logically still cannot provide an absolute “zero defect guarantee”—you can never completely rule out that within these 17 million lines of extensive code, there may be some hidden vulnerabilities that all independent checkers failed to detect.
The Endpoint of Trusted Computing Base (TCB)
Stepping further back: even if Lean's theory and code are truly flawless, the “trusted computing base” that a machine verification relies on is far more than just Lean itself.
We are also silently trusting the compiler compiling Lean and external checkers, the underlying mathematical library, operating system, runtime environment, hardware design of CPU chips, and even on a physical level—during the hours of program operation, the server memory was not coincidentally hit by a cosmic ray particle causing a bit flip.
It can be said that every verification ultimately touches a baseline of trust that cannot be further decomposed.
The Subject of Trust Has Changed
Some may feel: There are so many parts of machine verification that require trust, so how is it stronger than human mathematicians?
Let’s reflect on how humans established trust in mathematics in the past.
In elementary school, when learning addition, subtraction, multiplication, and division, we can calculate ourselves using scratch paper or do the calculations together to confirm there are no mistakes; in middle school when learning plane geometry, teachers and textbooks provide proofs, and we follow the logic to verify, which is essentially an independent verification; by the time we reach university mathematics departments, students must personally walk through the entire reasoning structures of foundational subjects like mathematical analysis and abstract algebra from beginning to end.
It is only upon entering extremely complex cutting-edge branches, surpassing the limits of individual effort, that we started to transfer trust to the “mathematical community”—believing in peer review and trusting that the top group of mathematicians would not systematically err or commit fraud.
Compared to fields like physics, chemistry, and biology that heavily rely on expensive laboratories and precision instruments, mathematics has always been an exception: the cost of independent verification is extremely low.
In experimental sciences, common people have long since entrusted "trust" to the academic community; however, in mathematics, the tradition of holding verification power in one's own hands has persisted into modern times. But the problem is, as modern mathematics grows increasingly vast and abstract, human mathematicians and peer review itself have begun to frequently make mistakes.
A particularly representative example is Vladimir Voevodsky, a Fields Medal winner in 2002. A paper he co-authored about ∞-group schemes passed rigorous peer review and was published without issues.
Years later, another mathematician provided a counterexample, pointing out that his core conclusion was erroneous; however, due to the extreme complexity of the paper, even Voevodsky himself firmly believed that the other party was mistaken until he ultimately confirmed years later that he was the one who was wrong.
In a similar vein, while teaching another published work on motivations for homotopy, which was foundational for his Fields Prize, he suddenly discovered a critical lemma had serious flaws.
These two shocks led him to deeply realize that cutting-edge mathematics had become so complex that even the smartest brains and the strictest reviews could not provide adequate coverage.
Unfortunately, Voevodsky passed away at a young age (in 2017 at age 51), but the computer formalization movement he vigorously promoted in the last decade of his life has become a significant precursor to today’s wave of formalization with Lean.
In fact, long before AI intervened in mathematics, the mathematical community had already initiated a series of arduous formalization projects driven by a very pure motivation—the desire for a more reliable guarantee than human peer review:
- Four Color Theorem: The computer-aided proof from 1976aroused decades of controversy because humans could not individually verify the thousands of configurations enumerated by the program until Georges Gonthier completed a full formalization using the proof assistant Coq in 2005, which completely quelled doubts about the program's potential bugs.
- Kepler Conjecture: In 1998, Thomas Hales submitted a proof containing extensive calculations; after years of exhausting scrutiny from the review team, they ultimately concluded, “We are 99% sure it’s correct, but we can’t check it any further.” To argue for that last 1%, Hales initiated the Flyspeck project, which took over a decade and was finally completed with full formalization using a proof assistant in 2014.
- Odd Order Theorem (Feit–Thompson Theorem): The purely human proof from 1963 spanned 255 pages and was extremely difficult to verify linearly, formalization was similarly completed by Coq in 2012.
- Scholze’s “Liquid Tensor Experiment”: At the end of 2020, another Fields Medal winner, Peter Scholze, proactively sought help from the Lean community due to his lack of absolute confidence in a lengthy proof he had written in condensed mathematics; with the community's collaboration, the proof was formally completed between 2021 and 2022, allowing Scholze to completely rest easy. In November 2026, the American Mathematical Society (AMS) awarded the first “Foundational Work in Formal Verification Milestone Prize” to the project's main contributors, Johan Commelin and Adam Topaz, marking formal mathematics' official acceptance by mainstream mathematics.
In the AI era, the power of formal error checking has become even more intuitive.
Just a month before the publication of the Riemann Hypothesis proof (October 2026), the AI company Axiom Math announced that its AI agent had completed the Lean formalization of the “Classification of Finite Simple Groups” in 24 days, spanning 15,000 pages and involving hundreds of papers (producing about 43.1 million lines of code).
In the process of translating the paper proofs accumulated over half a century into machine code, numerous typos, tabulation errors, and omitted assumptions were identified, with 34 notable material discrepancies pulled out (the most severe concerning a theorem on non-balance groups).
Although these vulnerabilities were ultimately resolved and did not shake the final conclusion of the classification theorem, they indicate a large number of submerged reefs that are difficult to detect by the human eye within human paper proofs.
This leads to a clear judgment: as long as the formalization process itself has no loopholes, the reliability of formal mathematics exceeds that of traditional non-formal mathematics.
So, why has today’s formal proof of the Riemann Hypothesis instead triggered such great anxiety? The core reason lies in the change in the subject of trust.
In the past, the costs of formalization were astonishingly high, achievable only by top mathematicians and computer scientists dedicating years to manual effort. In that era, people believed scholars, driven by academic ethics and professional reputation, would never deliberately exploit kernel vulnerabilities of proof assistants to “cheat.”
Today, AI has reduced the costs of formalization by several orders of magnitude, yet simultaneously introduced a new kind of trust crisis.
AI does not have a professional reputation; its training mechanism is targeted towards achieving final goals and gaining rewards. What people are truly worried about is not that AI will make careless calculation errors like humans, but whether AI will "stop at nothing" to exploit loopholes in toolchains, metaprogramming, or even the underlying kernel in order to get the reward of “passing checks.”
Ironically and intriguingly, the reason AI has evolved to excel at mathematics today is precisely due to the support of formal verification tools themselves.
On one hand, pure mathematics is a logical reasoning detached from the physical world, requiring no reagents or collision detectors, which allows AI to conduct massive trial-and-error and fast iterations at minimal costs, essentially akin to playing a more advanced game of Go; on the other hand, proof assistants play a crucial "referee" role in this process. In today's mainstream "Reinforcement Learning with Verified Rewards (RLVR)" paradigm (for example, DeepMind's integration of the AlphaZero algorithm with Lean to create AlphaProof), the proof assistant can immediately block every illegal reasoning and provide absolutely objective negative feedback, thoroughly curbing the "nonsense" generated by large language models.
This closed loop has shaped AI into a powerful tool capable of tackling century-old mathematical problems.
What Should Humanity Do Next?
Having undergone multiple rounds of independent comparisons, axiom audits, cross-replays across multiple cores, and sandbox reproductions, how should we view the proof of the Riemann Hypothesis today?
While theoretically we cannot forget Dijkstra's warning—"Program testing can prove the existence of bugs but can never prove the absence of bugs”—we must also confront the objective existence of a trusted computing base. Considering all current verification evidence, for human society, we can basically conclude that the Riemann Hypothesis is confirmed to be true.
However, at the same time, the real work that belongs to humanity has only just begun—receiving a 17 million line machine code is akin to obtaining an encrypted map validated through multiple notaries leading to the mountain peak. The machine has told us that the conclusion is correct, but the true value of mathematics has never been just knowing “right or wrong,” but understanding “why.”
The next primary task for human mathematicians is to delve into this vast codebase, stripping away unnecessary engineering scaffolding like anyGeometry, and translating machine language back into mathematical ideas that are readable, teachable, and intuitively graspable for humans.
From the preliminary analysis of this proof by the academic community, it does not seem to propose any revolutionary new mathematical theories or perspectives, but rather fully mobilizes and combines existing modern mathematical tools developed by humanity (such as results from the Langlands program and arithmetic geometry).
In a sense, this is actually very exciting news: it indicates that the true power of the mathematical tools invented by humanity over the past few decades may far exceed our previous understanding—that they are powerful enough to directly penetrate the Riemann Hypothesis.
In other words, these tools can solve a problem that has plagued humanity for 167 years, so once human mathematicians fully digest the techniques involved, they can definitely explore what other uncharted territories can be pried open with them.
The proof of the Riemann Hypothesis may only be the prologue. If this “human proposes direction, AI rapidly explores, and rigorous verification systems provide coverage in real time” collaboration model can cross the boundaries of pure mathematics in the future and find similar verification loops rooted in fields like physics, chemistry, biology, materials, etc., the boundaries of human exploration of the unknown will be vastly expanded.
If we can truly reach that point, the future is indeed promising.
免责声明:本文章仅代表作者个人观点,不代表本平台的立场和观点。本文章仅供信息分享,不构成对任何人的任何投资建议。用户与作者之间的任何争议,与本平台无关。如网页中刊载的文章或图片涉及侵权,请提供相关的权利证明和身份证明发送邮件到[email protected],本平台相关工作人员将会进行核查。




