Skip to content

Independent Statement Equivalence (FormalConjecturesStatement & FormalConjecturesChallenge) ​

Status on condensed main@41c2716658c4: Following upstream's November 25, 2026 condensation of leanprover-community/riemann-hypothesis, the comparator/ Formal Conjectures harness is temporarily pending re-integration on main (while root comparator.json with enable_nanoda: true remains live for Challenge.lean vs. src/Main.lean). The complete comparator/ files remain archived on upstream's alpoge branch at commit c900e67c2fcd1fdb041685820bbd2b867fbc5a4b.

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

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 extending ∑n=1∞n−sRiemann zeta function.
  • The Generalized Riemann Hypothesis (GRH.generalized_riemann_hypothesis): stated across the entire plane rather than just inside the open vertical band 0<Re(s)<1critical strip. For any minimal-period multiplicative weight χprimitive character (a periodic multiplicative label modulo qDirichlet character that comes from no smaller modulus), whenever its twisted function L(χ,s)Dirichlet L-function equals 0 and s is not in the explicit set GRH.trivialZeros χ of predictable non-positive integer zerostrivial zero, the point s must sit on the central vertical line Re(s)=1/2critical line.

Notice the subtle difference between the two formulations:

  • The submission's PrimitiveDirichletLZerosOnLine talks only about zeros inside the critical strip (0<Re(s)<1).
  • The external GRH.generalized_riemann_hypothesis talks about every zero in C outside 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.

Stage 00 formal statement and Comparator audit architecture linking Statements, Challenge, Main, FormalConjectures, and external kernels

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

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:

  1. comparator/FormalConjecturesChallenge.lean (frozen, imports only Mathlib): Copies the exact declarations from formal-conjectures at commit d8d031d4998c78575159ccab9a7a9e95ce043883:

    • DirichletCharacter.instDecidablePredOddOfDecidableEq_formalConjecturesForMathlib
    • RiemannHypothesis.riemannHypothesis : RiemannHypothesis (by sorry)
    • GRH.trivialZeros
    • GRH.generalized_riemann_hypothesis (by sorry)
  2. comparator/FormalConjecturesStatement.lean (solution-side definitions, imports only Mathlib.NumberTheory.LSeries.DirichletContinuation): Provides the solution side's exact copies of the two definitions not in Mathlib (GRH.trivialZeros and its Odd decidability instance), because the solution cannot import the challenge file (which contains sorry).

    Why does GRH.trivialZeros depend on that oddly specific instance name DirichletCharacter.instDecidablePredOddOfDecidableEq_formalConjecturesForMathlib? Look at its body:

    lean
    noncomputable 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 a Decidable (χ.Odd) witness inside the elaborated term of GRH.trivialZeros. In formal-conjectures, that instance was unnamed, so Lean auto-generated the name instDecidablePredOddOfDecidableEq_formalConjecturesForMathlib from the file path; giving it that exact name in both FormalConjecturesStatement.lean and FormalConjecturesChallenge.lean—and using Lean's module system so the by rfl proof elaborates to the identical statement ψ (-1) = -1 ↔ ψ.Odd—ensures Comparator matches the constants identically.

  3. comparator/FormalConjecturesBridge.lean (reviewer-authored, imports only Statements, FormalConjecturesStatement, and Mathlib): Proves primitiveDirichletLZerosOnLine_iff : PrimitiveDirichletLZerosOnLine ↔ GeneralizedRiemannHypothesis in two directions:

    • Forward (generalized_riemann_hypothesis_of_primitive): For primitive χ and L(χ,s)=0:
      • Re(s)≥1 is ruled out by LFunction_ne_zero_of_one_le_re_of_isPrimitive (using Mathlib's LFunction_ne_zero_of_one_le_re and riemannZeta_one_ne_zero at q=1,s=1).
      • Re(s)≤0 forces s∈Int.cast″GRH.trivialZerosχ via mem_trivialZeros_of_re_nonpos: apply the functional equation to χ−1 (also primitive) and use L(χ−1,1−s)≠0 for Re(1−s)≥1 to show Λ(χ,s)≠0, forcing gammaFactor χ s = 0 and splitting on q = 1, χ.Even, and χ.Odd.
      • What remains satisfies 0<Re(s)<1, where PrimitiveDirichletLZerosOnLine gives Re(s)=1/2.
    • Converse (primitive_of_generalizedRiemannHypothesis): Every element of GRH.trivialZeros χ is an integer z≤0, so no point with 0<Re(s) can be a trivial zero.
  4. comparator/FormalConjecturesSolution.lean (imports Main and FormalConjecturesBridge): Proves RiemannHypothesis.riemannHypothesis from _root_.riemannHypothesis and GRH.generalized_riemann_hypothesis via type_of% applied to FormalConjecturesBridge.generalized_riemann_hypothesis_of_primitive _root_.LFunction_eq_zero_re_of_isPrimitive. Using type_of% guarantees that the statement type was elaborated in FormalConjecturesBridge without the submission in scope, preventing any instance declared by the submission from altering the theorem's meaning.

Level 3 · Formal Lean Contract

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:

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.