Formal Verification "Spinning Wheels" Trap: A Guide to Auditing Lean Proof Validity
This article examines a high-profile incident in which a claimed proof of the Riemann Hypothesis was compiled successfully but then refuted, using it to highlight a critical engineering question: when verification itself is automated, why should we trust the result? It explains that proof assistants only check whether a conclusion follows logically from the given definitions and axioms, not whether those definitions express the intended meaning. Three common "spinning wheels" techniques are broken down with engineering analogies: tautological predicates, degenerate witnesses, and reflexivity shortcuts. The article then provides a practical seven-step review checklist and actionable recommendations for engineering teams, covering specification review, artifact traceability, layered pipeline gates, skepticism toward AI-generated output, and independent reproduction.
1. Incident Recap: A “Proof of the Century” That Compiled and Was Then Overturned
On November 20, a researcher at a research institution posted a statement on their personal homepage claiming to have completed a proof of the Riemann Hypothesis in collaboration with an AI coding assistant. Instead of submitting a human-readable paper, they published a code repository written in an interactive theorem prover (referred to below as a “proof assistant”): roughly 175,000 files and nearly 17 million lines of formalized code. Proposed in 1859, the Riemann Hypothesis is one of the Millennium Prize Problems, carrying a million-dollar bounty from a mathematics institute, and it has remained unsolved for about 167 years.
The next day, two organizations focused on formal mathematics collaboration issued a joint statement saying that after reviewing the code they were “fully confident the proof is correct.” A university researcher also independently completed the compilation and called it a historic moment.
But the reversal came on the same day. Another researcher published a rebuttal with a blunt conclusion: the released material does not contain a proof of the proposition, and the claimed proof is invalid.
The technical value of this incident lies not in who was right or wrong, but in how it pushed a long-underestimated engineering problem to the forefront: when verification itself has been automated, on what basis do we trust the verification result? For developers, this is the same class of trust problem as running static checks in continuous integration, accepting auto-completions from AI coding assistants, and relying on automated pipelines on cloud platforms.
2. The Key Mechanism: Proof Assistants Do Only One Thing
A proof assistant is not a peer reviewer. It does not judge whether a mathematical idea is profound or valuable. It answers only one question: starting from the definitions and axioms you have written, can the target conclusion be reached step by step according to the rules?
This leads to a frequently overlooked consequence: the checker guarantees that the derivation has no logical gaps, not that the definitions you wrote express what you intended. There is a gap between formal correctness and semantic correctness, and the attack surface lies precisely in that gap.
In engineering terms: all unit tests passing does not mean the function under test implements the requirement; all type checks passing does not mean the business rules are correct. The reliability ceiling of an automated tool equals the trustworthiness of its input specification (here, the definitions and axioms).
3. Breaking Down Three “Spinning Wheels” Techniques
The core method of the rebuttal was not to question the checker, but to trace the proof-term dependencies of the top-level theorem one by one and check whether each “witness” along the chain actually carries mathematical content. The three categories of problems it identified are highly representative.
3.1 Tautological Predicates: Writing Conditions That Are “Always True”
The code contained a geometric predicate defined roughly as follows (illustrative):
def anyGeometry : GeoP := fun _ _ _ => True
No matter the input, it always returns “true.” According to the rebuttal, this definition was referenced 118 times across 24 files, including at key witness positions on the final proof chain.
The engineering counterpart is the “always-true assertion”: assert(true), a validation function that always returns true, or a commented-out validation branch. It never raises an error; it only strips all downstream conclusions of their binding force.
3.2 Degenerate Witnesses: Using an Empty Shell Object as an Example
The proof needed a concrete geometric object as a witness, but the “degenerate model” provided by the code had zero volume, zero norm, a curve collapsed to a point, and a surface type taken as the empty set. All positivity conditions (such as certain positivity and largeness conditions) were defined directly as True. The rebuttal described it as carrying only a degree number on a manifold, with no variety behind it.
The engineering counterpart is the “empty implementation stub”: complete interfaces, correct signatures, default zero return values, but no real semantics. It lets the flow run through in integration tests while turning the verification conclusion into spinning wheels.
3.3 Reflexivity Shortcuts: Replacing Derivation with “It Is Defined That Way”
The proof needed a certain height function to be squeezed between an upper and a lower bound. In the code, the height was first set to 0, then rewritten into an explicit formula, and the step “height equals this formula” was closed automatically by rfl (reflexivity, i.e., “because it is defined that way”).
The engineering counterpart is the “tautological assertion”: defining the expected value as the value under test, so the assertion is naturally always true. This kind of problem is equally common in automated testing and rules-engine configuration.
4. An Actionable Review Checklist
For any conclusion of the form “automated output + automated verification passed,” check the following in order:
- Dependency tracing: Starting from the top-level conclusion, list all proof-term dependencies, count how often and where each definition is referenced, and prioritize reviewing definitions on the critical path.
- Tautology scan: Search for predicates and conditions whose bodies are
True, that always return true, or that take no input, and flag them as zero-binding-force nodes. - Witness inspection: Examine each witness object for existential conclusions one by one to confirm it is non-degenerate—whether basic quantities such as volume, norm, dimension, and cardinality have been trivialized.
- Axiom and assumption audit: List all introduced axioms, assumptions, and external dependencies, and confirm that the proposition to be proved or an equivalent form has not been used as a premise.
- Shortcut detection: Count key equalities closed directly by reflexivity or single-step rewriting, and require readable intermediate derivations to be supplied.
- Independent reproduction: Have a third party not involved in the output rebuild in a clean environment and compare artifact hashes and dependency manifests.
- Readability fallback: Require a human-readable argument summary to be produced alongside, so that the intent of key lemmas and definitions can be scrutinized by peers.
5. Practical Recommendations for Engineering Teams
- Move specification review earlier: Automated verification can only guard derivation consistency; the correctness of specifications and definitions must be owned by humans. Review focus should shift from “how the code is written” to “what the definitions express.”
- Build traceable artifacts and dependencies: Bring build artifacts, dependency manifests, and hashes under version control and artifact repositories to ensure conclusions are reproducible and auditable.
- Set layered gates in the pipeline: Static checks, unit tests, integration verification, and human review each carry different confidence levels; passing any single layer does not equal final trustworthiness.
- Default to skepticism toward AI-generated output: Treat auto-generated code and proofs as inputs pending review, with logging services and monitoring alerts in place to record generation source, change diffs, and review conclusions, forming a closed loop.
- Use elastic compute for independent reproduction: Rebuilding tens of millions of lines of code requires elastic container platforms and object storage; independent reproduction should be a release gate, not an option.
6. Conclusion
The lesson from this “big reversal” is simple: while automation drives the cost of verification down to almost nothing, it also concentrates risk at the layer of definitions and specifications. A conclusion that passes the checker only shows the derivation is self-consistent, not that the conclusion is meaningful. Only those who can perform penetrating review of definitions, witnesses, and assumptions truly hold the key to trustworthiness. As AI-assisted programming and automated pipelines become ubiquitous, this review capability is becoming a foundational skill for engineering teams.
