RESEARCH BRIEF · FORMAL SYSTEMS · NOVEMBER 21, 2026

Architectural blueprint of the 17.37-million-line Lean 4 Riemann Hypothesis archive.

On November 20, 2026, Levent Alpoge released a 175,187-file Lean 4 formalization of the Riemann Hypothesis and Generalized Riemann Hypothesis (alpo.ge, Lean v4.33.1, Mathlib 0df444a3). Below is a verified structural map of the live proof path, its zero-axiom scan, and the 185-interface boundary separating classical literature from the core theorem chain.

175,187
Lean 4 source files (1.031 GB raw)
17,374,215
Total lines (15.53M code lines)
909,822
Import edges (753,569 internal)
0 / 0
Custom axioms / sorry or admit
86 files
Live architectural spine (7,313 lines)
185
Literature wrappers (177 closed)

01 / LIVE PROOF PATH

Five stages from foundational Galois representations to RH and GRH.

All five top-level exports in Main.lean pass through MainTheoremsAll, MainTheoremsCritical, MainTheorems, and a 14-line master switchboard in MainConclusion.lean. Although module imports also include an earlier pre-RecTExists shadow path (EveryCharacterE and ShapeWin) for shared definitions, the live proof executes through the ThirdPlaceSeries spine mapped below.

Ordered bottom-up from foundational inputs (Stage 05) to top-level exports (Stage 01).

STAGE 05Foundations, Galois Compatibility & the Literature FirewallMainConclusion.lean (14L) · RowSrc · RecTExists · EveryCharacterOfLiteratureOfVWin (814L)

Constructed Primitives

RowSrc combines definite unitary theta lifts (TPGHolds to TLiftK) with the holomorphic Lefschetz fixed-point formula (WeightOneGeometricRealization) to emit h : Row0b recT.

RecTExists builds Local Langlands on w.adicCompletion E across 12 laws (5 restricted to Good representations).

Firewall Closure

EveryCharacterOfLiteratureOfVWin.lean bundles 185 classical literature-interface wrappers into 9 typed hypothesis records. 177 wrappers are completely independent of OpenLiteratureStatements; its final 3 fields (2 distinct types: Row and RecTExists) are closed in MainConclusion.lean by ⟨h, recTExists, h⟩.

STAGE 04Uniform Prime-Weighted Cohomology Window (VWin)VwinOfRow · DefiniteNHolds · TopMainZj · PublishedHypothesesFromPatching · HVCore.of_four_alt

Inputs & Machinery

Single top-level input h : RowT (entering LiteratureAutomorphyHypothesis.gal) plus unconditional rank-n isobaric base change (baseChangeN), weak descent (descWeak), quadratic base change (quadBC2), Ferrero-Washington, and LemmaK.

Output Exported

VWin (∀ ψ, VWinAt ψ 401): across cyclotomic-twisted fields built from prime pairs (q ≡ 3 mod 8, d ≡ 7 mod 16, q | d+1), bounds Σ log(l) Σ_(k < floor(x^401)) shaLen(ld l, k) ≤ exp(x^ε / 2) via five counting regimes (CountI Kato Selmer vanishing, CountII/III adjoint lifting & Sp4 rigidity, CountV unitary lift, countZ PropZ).

STAGE 03Iterated Theta Lifts, Arakelov Covolumes & HypsAlt AssemblyThirdPlaceSeries/SiegelEisensteinSecondTermHypotheses · LinkedBundlesL3OfOpen · TopCovolSlim2Use · FunctionModelRallisFromInputs

Live Assembly

Synchronizes grid thresholds at max CF0 CF1, combining row rationality, Fourier-coefficient fit (ConstantFunctionFits), linked-bundle covolume bounds (CovolumeBoundOfX from 15 Arakelov, toroidal, and Chow inputs), and 2-and-3 prime bounds (BoundAtTwoThreeFamilyFonAlt).

Theta-Lift Tower & Output

Supporting FunctionModelRallisFromInputs proves archimedean Rallis descent, Bessel unfolding and seesaw propagation (stmt2c), and Rallis inner-product definite lift chains π_0 → … → π_m (stmt3c). Emits the 46-field container Nonempty (HypsAlt S0.NL DefiniteSideCondition).

STAGE 02Combinatorial, Divisibility & Parameter-Routing EngineThirdPlaceSeries/{TopPlug, ShapeOf, TopShape} · DesWin · DivinNOfHypV · SupplyChi · AdmChi

Unpacking & 9 Closed Links

forall_goal_of_shape_of_hyps unpacks all 46 fields of HypsAlt (splitting h.σ into 6 projections plus 2 external props) into the 53 parameters of TopShapeAlt. shape_closed_link_n_of_green forwards LinkN and builds 8 Closed links: LinkEta, LinkIRR (sole use of Green), SmallLevelRankEq, LinkDIVt (Cabs=2), ChosenE Fm 3 CH → NuFullF ∧ MuRank, LinkG, TuSize → LinkS Fm 3, and TuSize → DGamSize → LinkGLOBAL Fm 2 CH 3 2 0.

Export to Analytic Stage

DesWin.topDesWin intersects all 9 asymptotic links with DesignExists to prove FamilyClassConnected (ChainTied). SupplyChi converts VWinAt ψ 401 into HostExW (3/2) (GChi ψ).req.

Key cross-stage unlock (DivinNOfHypV.lean): LinkDIVt cannot fire from LinkN alone because LinkN carries the prime-weighted shaLen error sum. Stage 4's VWin supplies HypV, bounding that sum by √b ≤ b (with (log x)² ≤ x^ε eventually). divinN_of_hypV absorbs both error terms into DIVinN, unlocking LinkDIVt, deducing LinkMu inside DesWin.topDesWin, and firing LinkGLOBAL.
STAGE 01Analytic Finish Line: Half-Plane Nonvanishing to RH & Full GRHZeroFreeAllOfTopG · Analytic · ExplicitFormulaErrorOfHostConditions · Imprimitive · CritLine · RhOfRight · ClaimStrip · Main.lean

Half-Plane to Critical Line

Uses once-integrated von Mangoldt sums (An.G, An.gChi) and weighted cyclic levels Level.Gm with weights 1/(3o+1) (psK := none on Level.cyc ψ) to obtain ZeroFreeAll on Re(s) > 1/2. Imprimitive lifts to all characters via Euler-factor nonvanishing; RhOfRight (uncompleted functional equation) and CritLine / ClaimStrip (completed functional equations) reflect zeros from 0 < Re(s) < 1/2.

Five Final Exports (Main.lean)

riemannHypothesis · riemannZeta_eq_zero_re · LFunction_ne_zero_of_half_lt_re · LFunction_eq_zero_re (full GRH) · LFunction_eq_zero_re_of_isPrimitive (primitive GRH). Definitions in Statements.lean import standard Mathlib only.

02 / SCALE ANATOMY

Why the repository is 17.37 million lines.

Nearly half of the entire archive sits in Development/AbelianVarietyTheory (8.14 million lines across 99,187 files). A source scan across all 175,187 files found zero custom axiom, sorry, or admit tokens; decades of classical algebraic geometry, representation theory, and automorphic forms appear in source alongside the core RH argument.

Top 10 Subsystems (within MainTheorems, 175,179 files)

Line volume and share of the 17,374,215-line repository

Development/AbelianVarietyTheory
8.14M (46.87%)
Development/AutomorphicArithmetic
1.78M (10.22%)
Development/AutomorphicSpectrum
1.20M (6.88%)
Formalism/LocalToGlobal
0.96M (5.50%)
Development/WeilBound
0.85M (4.88%)
Formalism/SharpRestriction
0.71M (4.08%)
GroundTheory/HeightsAndTheta
0.64M (3.69%)
Formalism/HermitianCurvature
0.46M (2.65%)
Formalism/PeriodIntegrals
0.45M (2.60%)
ReciprocityTheory/ReductiveGroups
0.41M (2.36%)

Apex Import Funnel (BFS depth 0 to 42)

Modules by shortest import distance from Supplements.Kernels.MainTheorems

The full dependency graph funnels through just 12 modules at distance 0 to 2 before expanding to 423 modules at distance 3 and peaking at 16,736 modules at distance 9.

dist 0 (1)dist 3 (423)peak dist 9 (16,736)max 42 (18)
Apex bottleneck (dist 0 to 2)
12 modules
First expansion (dist 3)
423 modules
Peak layer (dist 9 / max 42)
16,736 modules

03 / CLASSICAL BILL OF MATERIALS

The 185-wrapper literature firewall.

EveryCharacterOfLiteratureOfVWin.lean declares 195 theorems (185 individual literature-interface wrappers, 9 composite bundle builders, and 1 master assembly call, plus 1 structure OpenLiteratureStatements). All 185 wrappers are transitively used; 177 are completely independent of OpenLiteratureStatements. Raw wrapper count includes 1 no-op slot (UnusedSlot72 := trivial), cross-namespace re-exports, and internal combiners.

Showing all 7 domains (185 individual wrappers).

Mathematical DomainWrappersRepresentative Formalized Interfaces
Automorphic Forms, Theta Correspondence, Siegel-Weil, Rallis, Doubling & Base Change44Siegel-Weil (unitary, convergent, Schrodinger, standard), Rallis inner product, Doubling method, Howe duality (real and GL), Weil/metaplectic representation, Stone-von Neumann, Kudla splitting, Flath factorization, Jacquet-Shalika rigidity, Gelfand-Kazhdan, Clozel purity, Base change (includes 1 no-op UnusedSlot72)
Galois Cohomology, Class Field Theory, Hermitian Forms & Automorphic Galois Reps36Poitou-Tate, Greenberg-Wiles, Local/Global Tate duality and Euler characteristic, Bloch-Kato local, Global Artin reciprocity, Ray class fields, Chebotarev, Hasse norm theorem, Landherr, Hermitian Hasse principle, Caraiani local-global, Polarized automorphic Galois representations
Local Langlands, p-adic & Finite GL_n Representation Theory35Local Langlands for GL_n, Local Converse, Bernstein-Zelevinsky finiteness and geometric lemma, Zelevinsky polynomial ring, Langlands classification/multisegments/exhaustion, Moy-Prasad, Depth-zero induction, Borel-Casselman, Green characters, Weyl branching
Abelian Varieties, CM, Deformations, Toroidal Compactifications & p-adic Hodge Theory23Elliptic Main Theorem of CM, Grothendieck-Messing and Grothendieck deformation, Semistable reduction, Toroidal compactifications and Siegel toroidal integrals, Dual abelian schemes, Zarhin, Fontaine B_cris, de Rham implies potentially semistable, Bhatt-Scholze integral/crystalline lattices, Prismatic Dieudonne-Hodge, Fargues exactness
Arakelov Geometry, Heights, Resolution of Singularities & Complex Geometry21Resolution of singularities and principalization in char 0, Arithmetic Hilbert-Samuel, Kawamata-Viehweg, Nadel vanishing, L^2-extension, Poincare-Lelong, Arakelov cycle heights and Chow forms, Formal algebraization, Serre holomorphic sections (plus 2 unwrapped Moriwaki/Hilbert-Samuel proofs)
Real Groups, Harish-Chandra Modules & Discrete Series17Harish-Chandra discrete series existence, classification, lowest K-type, analyticity, and finiteness; Casselman-Wallach; Dixmier-Malliavin factorization; Schur orthogonality; Formal degree compact dual
Analytic Number Theory, Hecke L-Functions & Deligne-Ribet9Hecke-Tate functional equation, Partial zeta functional equation, Deligne-Ribet, Siegel-Klingen-Deligne-Ribet, Linnik's theorem, LogDerOne, join_out_of_literature
Total matching individual wrappers185177 O-independent · 8 O-dependent (closed by RowSrc and RecTExists)

04 / VERIFICATION BOUNDARY

What this study verifies, and what remains below the spine.

Formal audits are only trustworthy when their exact boundary is stated alongside the findings. Source archive: alpo.ge (released November 20, 2026).

Verified directly in source

Full-archive scan + 86-file live spine audit

  • Zero custom axiom, sorry, sorryAx, admit, unsafe, implemented_by, or extern tokens across all 175,187 files.
  • Exact live proof-term call chain from Main.lean and standard Mathlib Statements.lean through ThirdPlaceSeries, DesWin, VwinOfRow, RowSrc, and RecTExists.
  • Exact formal signatures for key bridge predicates (VWin, VVle, Row0b, TLiftK, RecTExists, HypsAlt, LinkN, LinkDIV, BesselId, LemmaK, KatoTwoW).

Below this blueprint's depth

Deeper leaf proofs and local builds not run in this top-level map

  • Local Lean 4 compilation and #print axioms kernel verification of the full 17.37M-line build (reported in the archive release on alpo.ge against standard Mathlib axioms; not re-executed locally in this structural source audit).
  • Internal proof bodies of zeroFreeOn_of_tiedWin_cyc, galoisLocalGlobalStrong_of_geometry_lift, sp4Main_alt, descWeak, and baseChangeN_of.
  • Disjointness proofs of Host.CaseI/II/III/V/Z and the internal call site wiring Formalism.BehrendSets into host construction.
  • Individual statement-strength audits for each of the 185 wrapped GlobalTheory.Published.* interfaces.

FORMAL SYSTEMS & CODEBASE AUDITS

Need an auditable specification map for a large formal or regulated codebase?

Dark Vector Cognition delivers fixed-scope architecture audits, specification-boundary reviews, and accessible compliance systems for federal, state, local, and regulated engineering teams.

Request a scoped audit →