AI Formal Proof Controversy: The Engineering Reality Behind Code Redundancy
This article examines a controversy surrounding an AI-assisted formal proof of the Riemann Hypothesis and the Generalized Riemann Hypothesis. It explains why a proof can pass low-level logical verification while the codebase remains highly redundant, breaking down the four structural sources of bloat across roughly 17.5 million lines of code. It also outlines five engineering practices for trustworthy verification at scale and key takeaways for teams governing quality in AI-generated software deliverables.
1. What Happened: A Release That Broke the Traditional Math Publishing Model
In late November 2026, a mathematician working at an AI company posted a statement on a personal homepage claiming that, using AI coding tools working together with a general-purpose large language model, they had completed a formal proof of the Riemann Hypothesis and the Generalized Riemann Hypothesis. The full formal proof code was released at the same time. The project took about 41 days; the core proof chain was closed in mid-November, and within a few days it was extended to more general cases.
Unlike traditional math results published as natural-language papers, this release was a code asset of remarkable scale: roughly 175,000 source files and about 17.37 million lines of code, split into 14 compressed archives for distribution. Converted to conventional typesetting, the volume would amount to hundreds of thousands of pages. The author later clarified that this figure was a “joke”—he had deliberately kept a verbose description of the total order relation on the real numbers in the main theorem as a humor signal, but it was widely circulated as fact.
For verification, several overseas number theory researchers completed a local build on the day the statement was released and confirmed that the proof passed the low-level logic check, relying on only three of the most basic standard axioms, leaving almost no room for hidden assumptions. At the same time, the author acknowledged that the code contained substantial redundancy and quality problems. These two points may seem contradictory, and they are exactly the core technical proposition this article discusses.
2. Why “Verification Passed” and “Code Is Redundant” Can Both Be True
The essence of a formal proof is to translate a mathematical argument into a symbolic sequence containing only basic inference rules, which a kernel program checks step by step for legality. The trust model of such systems is extremely strict: as long as the kernel is small, the axioms are few, and the check is repeatable, the credibility of the conclusion has nothing to do with the author’s reputation.
This leads to a key conclusion: redundancy does not affect correctness; it only affects maintainability and audit cost. A proof checker does not care whether a lemma has been proven seven times over—it only cares whether the type of each step matches. So “passed the low-level logic check” and “poor code quality” describe two orthogonal dimensions: the former belongs to the logic layer, the latter to the engineering layer.
Three common misconceptions need clarifying:
- Passing formal verification is not the same as passing peer review; the former verifies symbolic derivation, while the latter evaluates mathematical significance and writing quality.
- Line count is not information content; a large volume may come from auto-generated intermediate terms and repeated expansions.
- A small number of axioms is a strong signal, but you still need to confirm that no custom axioms or untrusted extensions were introduced.
3. Where the Redundancy in 17 Million Lines of Code Comes From
Based on the disclosed information, the redundancy mainly stems from four structural factors.
The first is generative padding. Large models tend to expand reusable patterns in place rather than extract shared lemmas, causing the same logic to be instantiated repeatedly.
The second is the search traces of automated tactics. Intermediate goals, failed branches, and retry records produced during proving, if left uncleaned, can multiply the number of files.
The third is over-explicit typing and structures. For a basic structure like the total order relation on the real numbers, fully expanding the definition at every occurrence makes the code grow non-linearly.
The fourth is the lack of engineering cleanup. Without modular decomposition, naming conventions, and dead code elimination, 170,000 files are tightly coupled, making it hard for reviewers to locate the critical path.
Roughly speaking, the difference between redundant and streamlined code looks like this:
# Redundant style: fully expand the same structure at every occurrencedef lemma_A : Real.linearOrder := by unfold Real.linearOrder; ...def lemma_B : Real.linearOrder := by unfold Real.linearOrder; ...def lemma_C : Real.linearOrder := by unfold Real.linearOrder; ...# Streamlined style: extract a shared instance and keep only necessary referencesinstance : LinearOrder Real := ...def lemma_A := existing_instancedef lemma_B := existing_instance
4. Five Engineering Actions for Trustworthy Verification
For code assets of this scale, teams should build a repeatable verification pipeline rather than rely on a single manual read-through.
- Environment pinning: lock down toolchain versions, the dependency graph, and compiler flags so that anyone can reproduce the same local build.
- Minimal-dependency audit: enumerate all axioms and external assumptions and confirm that no custom axioms were injected.
- Critical-path extraction: work backward from the main theorem to slice the call graph, and audit only the nodes that actually participate in the derivation.
- Redundancy metrics: measure repeated lemmas, unreferenced declarations, and the ratio of repeated instantiations to form a quality baseline.
- Continuous verification: wire compilation and checking into continuous integration so that any change triggers a full rerun.
When deploying in the cloud, you can use a container platform to pin the build environment, object storage to distribute large code packages, a message queue to schedule distributed compilation tasks, and logging and monitoring with alerting to track failure rates and latency fluctuations. These are all general capability categories and do not point to any specific product.
5. Practical Takeaways for Developers
What is really worth attention in this controversy is not whether a given conjecture is true or false, but the quality governance problem that arises after AI participates in large engineering deliverables. Three takeaways are especially direct: first, correctness verification and code quality assessment must run in parallel on two tracks; second, the scale expansion of generated content needs explicit measurement and convergence mechanisms; third, public releases should provide both machine-verifiable artifacts and human-readable explanations to avoid distortion in propagation.
For enterprises, these practices can be codified into internal standards: measure on generation, verify on commit, and make releases reproducible. When AI coding tools become part of productivity, engineering discipline is not weakened but amplified—it determines whether the output is an asset or a liability.
