Formal Verification of LLM-Generated Proofs and the Vacuous Truth Problem
This article examines a controversy around a large language model–assisted formal proof of the Riemann hypothesis and its stronger version, the generalized Riemann hypothesis, released as roughly 17 million lines of formal proof code rather than a natural-language paper. It explains why a compiling proof is not necessarily a valid proof, how vacuous truth arises when a predicate is defined as always true, four common forms of the problem, and a practical review checklist covering predicate audits, assumption strength measurement, counterexample injection, cross-checker verification, semantic alignment review, and change traceability. It also outlines how to turn these checks into pipeline gates, and concludes that higher automation makes semantic review more essential, not less.
Background: A Result Released as Formal Code, Not a Paper
On November 20, an academic symposium marking the 200th anniversary of the birth of a founding figure of number theory opened in Shenzhen. At the event, researchers from an overseas AI research team announced that, with the help of a large language model, they may have completed a proof of the Riemann hypothesis and its stronger variant, the generalized Riemann hypothesis. Unlike a conventional mathematical result, what was published was not a natural-language paper but roughly 17 million lines of formal proof code, packaged into 14 volumes. Expanded into human-readable text, it would exceed 250,000 pages.
The next day, a community-driven formal verification collaboration and a large, well-populated math library initiative publicly stated that they were fully confident in the correctness of the proof and that the code had passed multiple independent checks. A university researcher published a re-verification result showing that all 175,187 modules compiled successfully, and several mutually independent proof checkers accepted the relevant conclusions.
Then came a reversal. A researcher posted a critique on an open preprint platform, pointing out a “vacuous truth” problem in the proof: a geometry-related predicate had been defined as always true, so some geometric conditions effectively imposed no constraint at all. Subsequent review confirmed that the definition did exist, but whether it is enough to overturn the overall conclusion remains undecided. As of this writing, the community has not withdrawn its verification statement, and the relevant award bodies have not declared the conjecture solved.
Why “It Compiles” Does Not Mean “The Proof Holds”
The core value of a formal proof is that the conclusion is checked step by step by the kernel, and a single invalid step makes the whole thing fail. But this system rests on one assumption: every proposition you write genuinely expresses the mathematical meaning you intend. The kernel only checks whether the derivation is legal; it does not judge whether the proposition “says the right thing.”
That is exactly where vacuous truth survives. When a predicate is defined as always true, all reasoning built around it remains perfectly valid at the type level, and the kernel has no reason to raise an error.
A minimal illustrative reproduction:
-- Counterexample: the predicate is defined as always truedef anyGeometry (X : Type) (P : X → Prop) : Prop := Truetheorem geo_lemma (X : Type) (P : X → Prop) (h : anyGeometry X P) : P x := by-- h has type True and carries no information about Pexact trivial.elim h -- type checking passes, but the conclusion is empty
The real issue is that the assumption h looks like it carries a geometric constraint, when in fact it is just a discarded piece of evidence. This kind of defect never triggers a compile error; it only inflates the apparent strength of the theorem.
Four Common Forms of Vacuous Truth
- Always-true predicates: the definition body is
Truedirectly, or an always-holding expression equivalent toTrue. - Unsatisfiable assumptions: the premise is itself contradictory and can derive any conclusion, a vacuity in the opposite direction.
- Definition–intent drift: the formal definition diverges from the original mathematical statement on boundary conditions or degenerate cases.
- Over-generalized type parameters: quantifier ranges are loosened to make compilation pass, quietly weakening the original proposition.
An Actionable Review Checklist
- Predicate audit: extract the definition bodies of all custom
def/abbrevdeclarations and flag always-true, always-false, andTrue-only branches. - Assumption strength measurement: tally the assumption list of each main theorem and separately tabulate “zero-information assumptions” for review.
- Sampled counterexample injection: deliberately replace a key predicate with an always-true one; if the main theorem still compiles, the constraint there is not actually being used.
- Cross-checker verification: repeat the check with mutually independent verification implementations to reduce the systemic risk of a defect in a single implementation.
- Semantic alignment review: have domain experts compare the formal statements against the original mathematical statements line by line, especially degenerate and extreme cases.
- Change traceability: bind an intent note and source citation to every definition to form an auditable chain.
Putting It into Practice: Turning Review into Pipeline Gates
In real development settings, these problems can be intercepted up front. You can build a reproducible build environment on a container platform, archive each volume and its checksum in object storage, drive parallel compilation jobs through a message queue, and use logging services plus monitoring and alerting to set threshold alarms on metrics such as “number of always-true predicates” and “number of zero-information assumptions.” If you use AI coding tools to help generate formal code, the static audit rules above should be enabled by default rather than treating a successful compile as the delivery standard.
Conclusion
Formal verification moves mathematical correctness from “peer trust” to “machine-checkable,” but what it checks is the legality of the derivation, not the correctness of the intent behind a proposition. Vacuous truth is a reminder that the higher the degree of automation, the less you can skip semantic review. For engineering teams, the reusable lessons are three: make definition audits part of the gate, use counterexample injection to test whether constraints are effective, and fall back on cross-implementation verification.
