RH · checked in Lean

Proof map: from Main.lean to the deep inputs

40 key declarations out of more than a million. An arrow points from a result to what it uses. Click a box, or use the list below, to see a plain-language gloss, the Lean statement, and the file and line in the source.

TL;DR

  • A clickable map of 40 key steps of the Lean proof, out of more than a million.
  • Each box has a plain-language note, the exact Lean statement, and where it lives in the code.
  • Colours show how well we understand each step. The deep construction near the bottom is still only partly understood.

Our confidence in each gloss: ● clear (we can explain it fully) · ◐ partial (we know what it states, not every detail) · ○ thin (we can locate it but cannot honestly explain it). Paths are relative to the archive's lean/src/ directory; each links to that file and line in the public mirror at its first commit ("Mirror the submission exactly as published"; we checked all 31 linked files are byte-identical to the archive). The code excerpts are copied from the source and abbreviated where long.

New on 22 Nov 2026: steps 36–38 show where a public challenge points: the geometry predicate anyGeometry (defined as "true") is on the path; see Challenges and responses. Arrows are curated, not exhaustive. An arrow from A down to B means A's statement or proof uses B, along the one path we traced; most dependencies are not drawn. We don't distinguish proof dependencies from definition unfolding or from cross-links, because we have not classified each arrow that way.

All steps as a list

  1. M. Main.lean: the five headline theorems ● clear · Public statement

    The file everyone checks. It imports only the statement file and the final assembly, and states five theorems: RH (twice, in Mathlib's words and in the author's), and three forms of GRH for Dirichlet L-functions. This is the file the community compared against a trusted challenge file that imports only Mathlib.

    Lean: Main.lean, line 1

  2. 1. riemannHypothesis ● clear · Public statement

    The headline theorem. Its type, RiemannHypothesis, is Mathlib's own definition: every zero of ζ other than −2, −4, −6, … (and other than the conventional value at s = 1) has real part ½. The proof term is just a name, rhOfAll, defined elsewhere.

    Lean: Main.lean, line 4

  3. 2. rhOfAll ● clear · Assembly (glue)

    One line of glue: RH follows from the statement 'no Dirichlet L-function vanishes to the right of ½' (allChi), via rh_of_every.

    Lean: Supplements/Kernels/MainTheorems.lean, line 9

  4. 3. rh_of_every ● clear · Classical reductions

    Specialises the all-characters statement to the trivial character mod 1, whose L-function is exactly ζ (Mathlib's LFunction_modOne_eq). So: if ζ has no zeros with real part above ½, hand that to rh_of_right.

    Lean: Formalism/GammaFactorNonvanishing/CritLine.lean, line 29

  5. 4. rh_of_right ● clear · Classical reductions

    The classical mirror argument, written out in full in about 50 lines. Suppose ζ(s) = 0 with Re s < ½. The functional equation (Mathlib's riemannZeta_one_sub) writes ζ(s) as 2·(2π)^(−(1−s))·Γ(1−s)·cos(π(1−s)/2)·ζ(1−s). Each factor is shown to be non-zero (the cosine vanishes only at the trivial zeros, which are excluded), and ζ(1−s) ≠ 0 because 1−s lies to the right of ½. Contradiction. So a zero off the line is impossible.

    Lean: Formalism/GammaFactorNonvanishing/RhOfRight.lean, line 5

  6. 4′. riemannHypothesis_of_everyCharacter (parallel copy) ● clear · Classical reductions

    A second, independent write-up of the same reduction elsewhere in the library, used by UpperTheory.FinalTheorems.riemannHypothesis. It is not on the path Main.lean uses; it is shown here because it spells out the same idea with Mathlib's completed zeta function.

    Lean: Development/AutomorphicArithmetic/CharacterBoxes/RiemannHypothesisOfEveryCharacter.lean, line 215

  7. 5. critLine ● clear · Classical reductions

    The same mirror argument for a primitive Dirichlet character χ: a zero with Re s < ½ is reflected, by the functional equation for the completed L-function (IsPrimitive.completedLFunction_one_sub), to a zero of L(χ⁻¹, 1−s) with real part above ½, which allChi rules out. This gives the theorem LFunction_eq_zero_re_of_isPrimitive in Main.lean.

    Lean: Formalism/GammaFactorNonvanishing/CritLine.lean, line 11

  8. 6. EveryCharacter (definition) ● clear · Public statement

    The real target of the whole library: for every modulus N ≥ 1, every Dirichlet character χ mod N, and every s with Re s > ½, L(χ, s) ≠ 0 (except the pole of the trivial character at s = 1). Everything below this node exists to prove this one sentence.

    Lean: Development/AutomorphicArithmetic/CharacterBoxes/EveryCharacter.lean, line 13

  9. 7. allChi ● clear · Assembly (glue)

    Names the final proof of EveryCharacter, which lives in Development/…/MainConclusion.lean.

    Lean: Supplements/Kernels/MainTheorems.lean, line 7

  10. 8. FinalTheorems.everyCharacter ● clear · Assembly (glue)

    Feeds one big arithmetic input, the existence of Galois representations for certain automorphic forms (galoisLocalGlobalStrong_recParameter), into everyCharacter_of_row.

    Lean: Development/AutomorphicArithmetic/CharacterBoxes/MainConclusion.lean, line 10

  11. 9. everyCharacter_of_row ● clear · Assembly (glue)

    Takes the Galois-representation input (Row0b) and packages it, together with the local Langlands existence result recTExists, into a bundle of 'literature statements'. It also derives the Vandiver-type input VWin from the same Row0b. Then it calls every_character_of_literature_of_vWin.

    Lean: Development/AutomorphicArithmetic/CharacterBoxes/MainConclusion.lean, line 7

  12. 10. OpenLiteratureStatements (structure) ◐ partial · Big arithmetic inputs

    A record with three fields: two Galois-representation statements and local Langlands for GL_n. The file around it derives dozens of named results from the literature (functional equations of Hecke L-functions, Deligne–Ribet, Kawamata–Viehweg vanishing, resolution of singularities in characteristic 0, Zarhin, Fargues and more), each proved inside the project rather than assumed. Whether each project-local version is a faithful formalisation of the published theorem has not been checked by us; it does not affect correctness, because none of them is a hypothesis of the final theorem.

    Lean: Development/AutomorphicArithmetic/ThetaCorrespondence/ThetaPairLifts/ThirdPlaceSeries/EveryCharacterOfLiteratureOfVWin.lean, line 215

  13. 11. every_character_of_literature_of_vWin ◐ partial · Assembly (glue)

    From the literature bundle and VWin, assembles the hypotheses of the theta-integral step: unitary-group hypotheses, local theta inputs, matching of theta integrals, a covolume bound, and many geometric inputs.

    Lean: Development/AutomorphicArithmetic/ThetaCorrespondence/ThetaPairLifts/ThirdPlaceSeries/EveryCharacterOfLiteratureOfVWin.lean, line 810

  14. 12. every_character_of_theta_integrals_local_matching ◐ partial · Assembly (glue)

    Turns the theta-correspondence inputs into Green's parametrisation of GL_d(F_q) characters and the 'definite side' hypotheses, then calls every_character_of_green_v_win.

    Lean: Development/AutomorphicArithmetic/ThetaCorrespondence/ThetaPairLifts/ThirdPlaceSeries/SiegelEisensteinSecondTermHypotheses.lean, line 69

  15. 13. every_character_of_green_v_win ● clear · Assembly (glue)

    Two steps: prove ZeroFreeAll (no zeros right of ½ for every primitive character), then extend to all characters with imprimitive.

    Lean: Development/AutomorphicArithmetic/ThetaCorrespondence/ThetaPairLifts/ThirdPlaceSeries/TopPlug.lean, line 16

  16. 14. imprimitive ● clear · Classical reductions

    From primitive to all characters. An imprimitive character's L-function equals its primitive version times finitely many Euler factors (Mathlib's LFunction_changeLevel), which cannot vanish to the right of ½. So zero-freeness transfers.

    Lean: Development/AutomorphicArithmetic/CharacterBoxes/Imprimitive.lean, line 5

  17. 15. ZeroFreeAll (definition) ● clear · Analytic engine (prime counting)

    For every primitive Dirichlet character ψ and every s with Re s > ½, L(ψ, s) ≠ 0.

    Lean: Formalism/SharpRestriction/RamificationFrobenius/TotientGaloisClasses/ExplicitFormulaErrorOfHostConditions.lean, line 18

  18. 16. zero_free_all_of_green_v_win ◐ partial · Assembly (glue)

    Calls the analytic engine zeroFreeAll_of_topG with window exponent λ = 3/2: windows [Y, Y^1.5]. It supplies the two things that engine needs: TopG (from Green and the definite-side hypotheses) and, for each character, a 'host' (from supplyChi using VWin).

    Lean: Development/AutomorphicArithmetic/ThetaCorrespondence/ThetaPairLifts/ThirdPlaceSeries/TopPlug.lean, line 12

  19. 17. zeroFreeAll_of_topG ◐ partial · Analytic engine (prime counting)

    The hinge between the deep construction and classical analysis. It feeds the bound on G (level_gm_le_on_family_scales, built from ChainTied families) and the Landau-type implication (formB) into zeroFreeOn_of_tiedWin_cyc.

    Lean: Development/AutomorphicArithmetic/CharacterBoxes/ZeroFreeAllOfTopG.lean, line 26

  20. 18. TopG (definition) ◐ partial · Deep construction (theta lifts)

    Says: for every window exponent la > 1 and requirement G, if hosts exist at every scale (HostExW) and every family in the class satisfies HypV, then the class is 'connected' (FamilyClassConnected): for each small ε some family in the class satisfies ChainTied at every large scale in its windows. Partial match with Rubinstein's draft guide. Its interface matches: HypV (DivinNOfHypV.lean:10) is, by the guide's §III.9, the form in which a family receives the Galois-cohomology bound (Theorem G); HostExW is the host data of Estimates B and C; ChainTied is the data of (M). So TopG is the Lean statement of the construction step itself (building the maps and weights so that (M)'s hypotheses hold), which the guide says it has 'not begun' (§I.7). We know what it states, not how it is proved.

    Lean: Development/AutomorphicArithmetic/CharacterBoxes/ZeroFreeAllOfTopG.lean, line 12

  21. 19. zeroFreeOn_of_tiedWin_cyc ● clear · Analytic engine (prime counting)

    If, for each character, (a) the smoothed prime sum is bounded on the windows where families exist, (b) the Landau-type implication holds, and (c) families exist on windows at scale λ, then there are no zeros right of ½.

    Lean: Formalism/SharpRestriction/RamificationFrobenius/TotientGaloisClasses/TopWin.lean, line 90

  22. 20. level_of_tiedWin ● clear · Analytic engine (prime counting)

    A short real-analysis proof, shown in full: given a zero with Re s > ½, choose ε small enough that ½ + (constant)·ε lands strictly between ½ and Re s, use the bound G(x) ≤ x^(½ + Cε) on windows, and apply FormBAt to get a contradiction.

    Lean: Formalism/SharpRestriction/RamificationFrobenius/TotientGaloisClasses/TopWin.lean, line 68

  23. 21. FormBAt (definition) ● clear · Analytic engine (prime counting)

    The Landau-type principle as a statement: if Gm(x) ≤ x^θ holds on whole windows [Y, Y^λ] for arbitrarily large Y, then no L-function in the level has a zero with real part above θ. Note that only an upper bound is needed. The project proves this principle (formB) elsewhere.

    Lean: Formalism/SharpRestriction/RamificationFrobenius/TotientGaloisClasses/Window.lean, line 30

  24. 22. G(y), gChi, Gm (definitions) ● clear · Analytic engine (prime counting)

    The smoothed prime count. G(y) = Σ_{n≤y} Λ(n)·max(y/n − 1, 0) − y·(log y − 1 − γ), where Λ is the von Mangoldt function and γ is Euler's constant. gChi twists the sum by a character χ (with a y·L′/L(1,χ) correction); Gm is a weighted combination over a set of characters. This exactly matches step 5 of the announcement.

    Lean: Formalism/SharpRestriction/RamificationFrobenius/TotientGaloisClasses/ExplicitFormulaErrorOfHostConditions.lean, line 38

    Lean: Formalism/SharpRestriction/RamificationFrobenius/TotientGaloisClasses/Analytic.lean, line 14

    Lean: Formalism/SharpRestriction/RamificationFrobenius/TotientGaloisClasses/Analytic.lean, line 23

  25. 23. ChebyshevInequalityOnWindows (definition) ● clear · Analytic engine (prime counting)

    The bound that has to be proved: on the windows attached to a tied family, Gm(x) ≤ x^(½ + (eD + eL + 7)·ε). As ε → 0 this is square-root size, which is exactly what RH predicts. All the depth of the proof is in establishing this.

    Lean: Formalism/SharpRestriction/RamificationFrobenius/TotientGaloisClasses/TopWin.lean, line 26

  26. 24. level_gm_le_on_family_scales ○ thin · Deep construction (theta lifts)

    Proves that bound for every level, from 'Artin inputs' and the fact that every ChainTied family has a usable core (LevelGmLeOnFamilyScales.lean:28–30). This is the Lean form of the guide's step '(M), B, C ⇒ Estimate A ⇒ bound for G' in shape: its input is ChainTied (the data of (M)) and its output is the windowed bound. The guide proves that deduction in Part II §4–5; we did not compare the Lean proof line by line.

    Lean: Development/AutomorphicArithmetic/PrimitiveCosets/LevelGmLeOnFamilyScales.lean, line 28

  27. 25. ChainTied (definition) ◐ partial · Deep construction (theta lifts)

    A ~25-part existential statement tying a family at scale x to data: ranks, lattice slopes, heights, η-sums, error windows, size data for an 'L-chain', cost windows and so on. Checked against Rubinstein's draft guide term by term, it is the Lean package of the data and side conditions of the main inequality (M) at one scale. The guide never uses the name ChainTied, but it describes its parts: RestSize (SChain.lean:53) asks |T|/n ≥ ½x^(−ε/8), |T2|/n ≥ x^(−ε), m ≥ x^(1/2−ε) and aggregate scale a ≤ 2xb, exactly the sizes in the guide's §I.5 and Part II §4; GrowthInequalitySizes (SChain.lean:38) asks |a_t/b − x| ≤ 1 for each label t (§I.5); TieGlobal sets the constants γ (Euler's constant) and L′/L(1, χ_d) that appear in the main term M (I.26) and the scales b, b′, X′, X″ of §III.5; TiePts fixes the host primes q and d; TieArith fixes T, T2, the orders a_t and the weights w indexed by translate, repetition and cell, as in P_{u,t,j} (§I.5); and the index sets and fields T u0 u, h u0 u, d u0 u are the ones the guide's §III.8 describes for 'one record for each translate'. SizeData₂ is the structure whose fields the guide's §III.5 lists. ChainTied holds the hypotheses, not the inequality (M) itself: Lean derives the windowed bound from it (step 24). The √X chain length is fixed elsewhere, in RankVal (see step 27).

    Lean: Formalism/SharpRestriction/GlobalSchurBounds/TieGlobal.lean, line 97

  28. 26. supplyChi ◐ partial · Deep construction (theta lifts)

    For each primitive character ψ, the Vandiver-type condition VWinAt ψ 401 provides a 'host' at window exponent 3/2. Rubinstein's draft guide §III.9 explains this step: Theorem G is applied for twists below x^401 at a slightly shifted scale, and its window [Y, Y²] becomes a window [Z, Z^(3/2)], which is why the exponent here is 3/2.

    Lean: Development/AutomorphicArithmetic/CharacterBoxes/SupplyChi.lean, line 8

  29. 27. HostExW (definition) ◐ partial · Deep construction (theta lifts)

    For every 0 < ε < 1/52 there are constants and a set of scales (windows [Y, Y^la]) such that each large scale has ranks, a 'host' (a CM field E, auxiliary primes q, d, …) and data satisfying HostGood. Checked term by term against Rubinstein's draft guide, this is the per-scale existence of the auxiliary data, and the match is confirmed in content (the guide does not use the name): PairRow (PairRowIffQdRows.lean:68) asks q ≡ 3 mod 8 and d ≡ 7 mod 16 prime, with √X1 < q ≤ X1, X1 = exp(Y^(ε/5)), (−d/p) = 1 for primes p ≤ Y^(ε/5), and log(Qqd) ≤ 2Y^(ε/5)(log Y)², which is Theorem III.1.1(a)–(c) and the hypothesis of Theorem III.2.1; QDq bounds the three twisted sums for χ_q, χ_d, χ_qχ_d (Estimate B, Theorem III.1.1(d)); BoxH/Boxq exclude real zeros above 1 − 1/400 (Theorem III.1.1(e)); ThinOK (ThinScalesIffHostBound.lean:61) is word for word the conclusion of Estimate C, Theorem III.2.1: |G_χ(y)| ≤ y·exp(−c·x^(ε/8)) for y ≥ exp(x^(ε/3))/3; and RankVal (PairRowIffQdRows.lean:28, cited by the guide in §III.9) fixes n between x^(2+8ε) and 2x^(2+8ε), k between x^(9/2+10ε) and 2x^(9/2+10ε), and m between √(xδ₁) and 2√(xδ₁) with δ₁ = x^(−ε/8). That last condition is where the chain length about √X is set.

    Lean: Development/AbelianVarietyTheory/Definitions/GlobalTwisting/ThinScalesIffHostBound.lean, line 120

  30. 28. VWin / VWinAt (definitions) ◐ partial · Big arithmetic inputs

    For each primitive character, certain fields inside cyclotomic fields (cut out by 2^(e+2), ψ and two quadratic characters) must have finite and small Galois-cohomology 'Sha lengths' in each twist 0 < e < t. The announcement's step 17 describes a 'significant weakening of Vandiver'; reading VWin as that is our interpretation of the name and content. Rubinstein's draft guide (§III.9) identifies VWin as its 'Theorem G', the bound for Galois cohomology used to control denominators of the theta lifts (§I.7 item 3), and calls it a weakening of Vandiver's conjecture.

    Lean: Development/AutomorphicArithmetic/CharacterBoxes/ExistsPageN.lean, line 49

  31. 29. vwin_of_row ◐ partial · Big arithmetic inputs

    Proves VWin from the Galois-representation input Row0b (via automorphic windows and base change). So the Vandiver-type condition is a theorem inside the project, not an assumption.

    Lean: Development/AutomorphicArithmetic/AutomorphicVarieties/ModularityArgument/ThresholdArguments/DenseThresholdCases/VwinOfRow.lean, line 4

  32. 30. Row0b (definition) ◐ partial · Big arithmetic inputs

    Existence of Galois representations attached to regular algebraic, polarised cuspidal automorphic representations over CM fields, with the expected properties: continuous, semisimple, local–global compatible away from ℓ, given Hodge–Tate weights, crystalline above ℓ. In the published literature this is deep work of many authors; here it is proved inside the project.

    Lean: Development/AutomorphicArithmetic/Foundations/GaloisRepresentations/TypeConditions/WeightsConjBis.lean, line 69

  33. 31. galoisLocalGlobalStrong_recParameter ◐ partial · Big arithmetic inputs

    Proves Row0b from the theta-lift statement tLiftK.

    Lean: Development/AutomorphicArithmetic/Foundations/GaloisRepresentations/IntegralStructures/RowSrc.lean, line 6

  34. 32. galoisLocalGlobalStrong_of_geometry_lift ◐ partial · Big arithmetic inputs

    Row0b from a geometric input (GeoOne) plus theta lifts (TLiftK).

    Lean: Development/AutomorphicArithmetic/Foundations/GaloisRepresentations/IntegralStructures/Development.lean, line 30

  35. 33. TLiftK / tLiftK ◐ partial · Deep construction (theta lifts)

    Existence of theta lifts: over a CM field, every automorphic representation of a unitary group U(n) in a weight range has a theta lift to U(d) for d large enough. The announcement's key idea iterates such lifts U(X₀) → U(X₁) → … → U(X_m); this node states a single lift.

    Lean: Development/AutomorphicArithmetic/Foundations/GaloisRepresentations/ThetaParseval/HalfIndexLattices/TLiftK.lean, line 12

    Lean: Development/AutomorphicArithmetic/Foundations/GaloisRepresentations/ThetaParseval/ThetaKernels/TLiftK.lean, line 4

  36. 34. recTExists ◐ partial · Big arithmetic inputs

    Existence of a local Langlands-type map for GL_n over completions of number fields, with the expected dimension, twist, central-character and cuspidality laws. Proved in the project.

    Lean: Development/AutomorphicArithmetic/Foundations/LocalLanglands/LocalCentralUnits/RecTExists.lean, line 20

  37. 35. Green (definition) ◐ partial · Big arithmetic inputs

    Green's 1955-style parametrisation: for a prime g and d > 0, cuspidal characters of GL_d(F_g) are in bijection with 'prime labels', with degree ∏_{i<d}(gⁱ − 1). Our reading of the definitions. The draft guide (§III.8) says Green is used in a count in the rank step (labels distributed like random polynomials), and that the final theorem depends on it.

    Lean: Development/AbelianVarietyTheory/Definitions/NonGaloisDescent/LabelDatum.lean, line 108

  38. 36. nonempty_hyps_definite_side_of_closed_bound ◐ partial · Deep construction (theta lifts)

    Builds the bundle of hypotheses (HypsAlt) that feeds the zero-free step (TopG, steps 16–18). Its conclusion, Nonempty (HypsAlt …), does not mention any geometry predicate. Inside the proof it chooses the geometry parameter to be geoCl anyGeometry (lines 60, 63 and 67), and further down, through about a dozen intermediate lemmas, it reaches the degenerate model geoDegenerate (step 38). Added on 22 Nov 2026 after the 'vacuous geometry' challenge; see Sources → Challenges and responses.

    Lean: Development/AutomorphicArithmetic/ThetaCorrespondence/ThetaPairLifts/ThirdPlaceSeries/SiegelEisensteinSecondTermHypotheses.lean, line 44

  39. 37. anyGeometry (definition) ◐ partial · Deep construction (theta lifts)

    The geometry predicate that is simply True: it checks nothing. It is on the path of riemannHypothesis, 8 steps down (1 → 2 → 7 → 8 → 9 → 11 → 12 → 36 → here). The substantive version, geoOf (three lines above it in the same file), and the lemmas that would extract geometric content from a geoOf witness are not on the path. Most lemmas that take the geometry parameter are proved for every choice of it, so plugging in True is legitimate and the proof uses no geometric property. That makes this a gap between the names and the logic, not a soundness gap: the checkers confirm the final statement is exactly Mathlib's RH using only the three standard axioms. Our 'carries no logical weight' reading is a structural argument, not an exhaustive proof, hence 'partial'.

    Lean: Development/AbelianVarietyTheory/Definitions/AutomorphicMembership/OverIx.lean, line 14

  40. 38. geoDegenerate (definition) ◐ partial · Deep construction (theta lifts)

    A 'degenerate' geometry model, named so in the code: every divisor counts as effective (Eff := True), the space of sections is everything (H0 := ⊤), the canonical class is 0. It is on the path, about 21 steps below riemannHypothesis, through divEx_prov (which fills the geometry field with trivial) and geoOver_stages. So whatever later steps use from these geometric predicates is also true of this degenerate model: they don't encode real algebraic geometry on this path.

    Lean: Formalism/LocalToGlobal/LatticeGeometry/Inhabited.lean, line 241

What this map is and isn't. It follows one path from the headline theorems down through the reductions and the analytic engine to the deep inputs. It is not the full dependency graph (the full graph has over a million declarations), and the deep construction under ChainTied, TopG and HostExW is described by what it states, not how it is proved. Alpöge's announcement describes a chain of about \(\sqrt{X}\) theta lifts. Rubinstein's draft guide explains why the chain has length about \(\sqrt{x}\) (guide §I.8). In the code, that length is fixed by RankVal, a condition inside HostExW (step 27): \(\sqrt{x\delta_1}\le m\le 2\sqrt{x\delta_1}\) with \(\delta_1=x^{-\varepsilon/8}\). How the lifts themselves are built is inside TopG (step 18) and is still not explained. The guide reports finding no trace in the Lean development of the "sixfold cover of GL5" step, which it reads as an earlier formulation (§I.9). Alpöge himself warns that the timeline is partly a paraphrase: "The parts in which Claude is the expert and not me I am sort of paraphrasing a "slop" summary, which might make zero sense, and I apologize, though the Lean should suffice to clarify everything" (announcement, footnote 4). So a timeline step we can't find in the code may simply be described loosely. See How the argument works.