Independent Statement Equivalence (FormalConjecturesStatement & FormalConjecturesChallenge)
Status on condensed
main@41c2716658c4: Following upstream's November 25, 2026 condensation ofleanprover-community/riemann-hypothesis, thecomparator/Formal Conjectures harness is temporarily pending re-integration onmain(while rootcomparator.jsonwithenable_nanoda: trueremains live forChallenge.leanvs.src/Main.lean). The completecomparator/files remain archived on upstream'salpogebranch at commitc900e67c2fcd1fdb041685820bbd2b867fbc5a4b.
This landmark page explains why Stage 00 tracks a second, independent Comparator setup drawn from Google DeepMind's formal-conjectures repository, and how it rules out the classic formalization risk of proving a subtly weakened statement. Return to the Stage 00 Overview or review Formal Statement Contracts for the submission's own predicates.
Level 1 — First-Principles
In machine-checked mathematicsformal verification, a proof kernel guarantees that every step follows validly from the definitions, yet the kernel alone cannot judge whether the author wrote down the right theorem. Suppose someone defines a custom predicate, accidentally adds an extra restriction, and proves it with zero errors. The kernel reports success, even though the famous conjecture was never proved.
To close that gap, the community maintainers added a second independent target drawn from an outside benchmark (formal-conjectures, written before this proof existed). That external benchmark states two theorems in the two-dimensional grid of complex inputscomplex plane:
- The Riemann Hypothesis (
RiemannHypothesis.riemannHypothesis): using Mathlib's built-in definition for the global function extendingRiemann zeta function. - The Generalized Riemann Hypothesis (
GRH.generalized_riemann_hypothesis): stated across the entire plane rather than just inside the open vertical bandcritical strip. For any minimal-period multiplicative weight primitive character (a periodic multiplicative label modulo Dirichlet character that comes from no smaller modulus), whenever its twisted function Dirichlet L-function equals and is not in the explicit set GRH.trivialZeros χof predictable non-positive integer zerostrivial zero, the pointmust sit on the central vertical line critical line.
Notice the subtle difference between the two formulations:
- The submission's
PrimitiveDirichletLZerosOnLinetalks only about zeros inside the critical strip (). - The external
GRH.generalized_riemann_hypothesistalks about every zero inoutside GRH.trivialZeros χ.
A separate bridge file (comparator/FormalConjecturesBridge.lean), written by reviewers using only Mathlib and src/Statements.lean (never importing the submission's proof), proves that the two statements are logically equivalent (↔). Because the external challenge file FormalConjecturesChallenge.lean is frozen and checked by Comparator against FormalConjecturesSolution.lean, the proof cannot silently redefine any symbol or weaken the theorem.
Where this analogy breaks
Treating the formal-conjectures Comparator check as a simple "string comparison" of theorem text misses why files like FormalConjecturesStatement.lean need subtle Lean-specific care. In Lean 4, two definitions that look identical to human eyes can fail Comparator's constant-matching check if an anonymous typeclass instance gets a different auto-generated name, or if a module versus non-module file elaborates a proof term (by rfl) into a slightly different auxiliary constant. Statement equivalence in Lean operates on fully elaborated kernel terms, not surface text.
Level 2 — Undergrad Bridge
The formal-conjectures setup (comparator/formal-conjectures.json) separates four files so that the submission can never interfere with how the target statement is elaborated:
comparator/FormalConjecturesChallenge.lean(frozen, imports onlyMathlib): Copies the exact declarations fromformal-conjecturesat commitd8d031d4998c78575159ccab9a7a9e95ce043883:DirichletCharacter.instDecidablePredOddOfDecidableEq_formalConjecturesForMathlibRiemannHypothesis.riemannHypothesis : RiemannHypothesis(by sorry)GRH.trivialZerosGRH.generalized_riemann_hypothesis(by sorry)
comparator/FormalConjecturesStatement.lean(solution-side definitions, imports onlyMathlib.NumberTheory.LSeries.DirichletContinuation): Provides the solution side's exact copies of the two definitions not in Mathlib (GRH.trivialZerosand itsOdddecidability instance), because the solution cannot import the challenge file (which containssorry).Why does
GRH.trivialZerosdepend on that oddly specific instance nameDirichletCharacter.instDecidablePredOddOfDecidableEq_formalConjecturesForMathlib? Look at its body:leannoncomputable def GRH.trivialZeros {q : ℕ} (χ : DirichletCharacter ℂ q) : Set ℤ := if q = 1 then {-2 * (n + 1) | (n : ℕ) } else if χ.Odd then { -2 * n - 1 | (n : ℕ) } else { - 2 * n | (n : ℕ) }The
if χ.Odd then ... else ...expression requires aDecidable (χ.Odd)witness inside the elaborated term ofGRH.trivialZeros. Informal-conjectures, that instance was unnamed, so Lean auto-generated the nameinstDecidablePredOddOfDecidableEq_formalConjecturesForMathlibfrom the file path; giving it that exact name in bothFormalConjecturesStatement.leanandFormalConjecturesChallenge.lean—and using Lean'smodulesystem so theby rflproof elaborates to the identical statementψ (-1) = -1 ↔ ψ.Odd—ensures Comparator matches the constants identically.comparator/FormalConjecturesBridge.lean(reviewer-authored, imports onlyStatements,FormalConjecturesStatement, andMathlib): ProvesprimitiveDirichletLZerosOnLine_iff : PrimitiveDirichletLZerosOnLine ↔ GeneralizedRiemannHypothesisin two directions:- Forward (
generalized_riemann_hypothesis_of_primitive): For primitiveand : is ruled out by LFunction_ne_zero_of_one_le_re_of_isPrimitive(using Mathlib'sLFunction_ne_zero_of_one_le_reandriemannZeta_one_ne_zeroat). forces via mem_trivialZeros_of_re_nonpos: apply the functional equation to(also primitive) and use for to show , forcing gammaFactor χ s = 0and splitting onq = 1,χ.Even, andχ.Odd.- What remains satisfies
, where PrimitiveDirichletLZerosOnLinegives.
- Converse (
primitive_of_generalizedRiemannHypothesis): Every element ofGRH.trivialZeros χis an integer, so no point with can be a trivial zero.
- Forward (
comparator/FormalConjecturesSolution.lean(importsMainandFormalConjecturesBridge): ProvesRiemannHypothesis.riemannHypothesisfrom_root_.riemannHypothesisandGRH.generalized_riemann_hypothesisviatype_of%applied toFormalConjecturesBridge.generalized_riemann_hypothesis_of_primitive _root_.LFunction_eq_zero_re_of_isPrimitive. Usingtype_of%guarantees that the statement type was elaborated inFormalConjecturesBridgewithout the submission in scope, preventing any instance declared by the submission from altering the theorem's meaning.
Level 3 — Formal Lean Contract
Current status on condensed main@41c2716658c4: Upstream's comparator/ Formal Conjectures harness is temporarily pending re-integration on condensed main (41c2716658c42ba08eb0648994a2efe83082a95c), so no 00_statement/formal_conjectures_* skeleton modules are currently extracted for this commit. On live main, root comparator.json checks Challenge against Main with permitted axioms (propext, Quot.sound, Classical.choice) and enable_nanoda: true.
Archived alpoge reference (c900e67c2fcd1fdb041685820bbd2b867fbc5a4b): In the archived alpoge snapshot, comparator/formal-conjectures.json designated FormalConjecturesChallenge as the frozen challenge module (2 sorry placeholders at comparator/FormalConjecturesChallenge.lean:84, 108) and FormalConjecturesSolution as the solution module, checked against the three permitted axioms (propext, Quot.sound, Classical.choice) and external kernels (leanchecker-paranoid and nanoda). Direct archival links on upstream commit c900e67c2fcd1fdb041685820bbd2b867fbc5a4b:
comparator/FormalConjecturesStatement.leancomparator/FormalConjecturesChallenge.leancomparator/FormalConjecturesBridge.leancomparator/FormalConjecturesSolution.leancomparator/formal-conjectures.json
Verification status (audit/verification-status.json): Local Lean build verification is unverified-locally. Because comparator/ is currently absent on pinned main@41c2716658c42ba08eb0648994a2efe83082a95c, live Comparator metadata checking covers root comparator.json only until upstream re-integrates Formal Conjectures.
Page Glossary
- formal verification
- Checking every logical step of a mathematical proof by a small computer kernel against explicit axioms, paired with statement-equivalence checks ensuring the proved theorem matches the intended conjecture.
- complex plane
- The two-dimensional coordinate plane of numbers s = σ + it, where the horizontal coordinate σ = Re(s) sets decay rate and the vertical coordinate t = Im(s) sets oscillation frequency.
- Riemann zeta function
- The meromorphic function ζ(s) extending ∑ n⁻ˢ to all of ℂ ∖ {1}, linking prime numbers via its Euler product to zeros in the complex plane.
- critical strip
- The open vertical band 0 < Re(s) < 1 in the complex plane that contains every nontrivial zero of ζ(s) and of every Dirichlet L-function.
- primitive character
- A Dirichlet character modulo q whose pattern does not come from any strictly smaller dividing modulus; its modulus q equals its minimal period (conductor).
- Dirichlet character
- A periodic multiplicative label χ : ℤ → ℂ modulo N that equals 0 when gcd(n, N) > 1, takes roots of unity when gcd(n, N) = 1, and satisfies χ(ab) = χ(a)χ(b).
- Dirichlet L-function
- The meromorphic continuation of ∑ χ(n) n⁻ˢ associated to a Dirichlet character χ, generalizing ζ(s) to track primes across residue classes modulo N.
- trivial zero
- A zero at a non-positive integer forced purely by poles of the gamma factor in the functional equation, carrying no hidden information about prime fluctuations.
- critical line
- The vertical line Re(s) = 1/2 bisecting the critical strip—the axis of mirror symmetry s ↦ 1 − s where the Riemann Hypothesis asserts all nontrivial zeros lie.