Riemann hypothesis: the Lean proof, cleaned up together
The 2026 Lean proof of the Riemann hypothesis and GRH, machine-checked by others, not refereed, no word from Clay; cleaned up together: more readable, faster to build, the theorems unchanged

| 1 | module |
| 2 | |
| 3 | import Mathlib.Algebra.Order.Star.Int |
| 4 | public import New.Determinant.Chain.NormOfChain |
| 5 | public import New.Reduction.Lattices.TwistedLattice |
| 6 | import New.Determinant.Chain.ChainNorms |
| 7 | |
| 8 | /-! |
| 9 | # The target forms as a twisted lattice |
| 10 | |
| 11 | The target forms `D.targetForms` have no evident integral structure, so a target form is called |
| 12 | integral if its lifts are. The maps `Θ_ϑ`, with the inner products, conjugates and integrality of |
| 13 | algebraic forms, make the target a twisted lattice (`New.Data.targetLattice`). Its twists are the |
| 14 | `m`-fold twists `ϑ`, and `ϑ` is allowed at `l` if the norm of its modulus is prime to `l`. The file |
| 15 | identifies the integral vectors, the conjugate norms and the volumes of this lattice. |
| 16 | |
| 17 | Notions from other files: |
| 18 | * `New.TwistedLattice`: maps `Θ_ϑ` from a space to inner product spaces with integral structures. |
| 19 | * `New.Data.targetForms`: the target forms, the good forms on the space `Y_0`. |
| 20 | * `New.Data.TameChar`: an automorphic character `ϑ` of `U(1)` of weight `0` whose tame part is |
| 21 | supported on a finite set `Q` of places, its modulus. |
| 22 | * `New.Data.MFoldTwist`: a twist `ϑ` whose tame part `ψ` has `ψ_w^n ≠ 1` for `w ∈ Q`, `1 ≤ n ≤ m`. |
| 23 | * `New.Data.Θ`: the chain of `m` lifts with twist `ϑ`, from the target forms to forms on `Y_m`. |
| 24 | * `New.Data.lastResidueLevel`: the group of reductions that cuts out the level of the forms on |
| 25 | `Y_m`. |
| 26 | * `New.LevelPlaces.LevelForm.integralForms`: the forms integral at an embedding `ℂ → ℂ_l`. |
| 27 | -/ |
| 28 | |
| 29 | @[expose] public section |
| 30 | |
| 31 | noncomputable section |
| 32 | |
| 33 | namespace New.Data |
| 34 | |
| 35 | open LevelPlaces.LevelForm |
| 36 | |
| 37 | variable {P : Parameters} {D : Data P} |
| 38 | |
| 39 | /-- Let `ϑ` be a tame character. Its level places, listed by `placeAt`, are the chosen places and |
| 40 | the places of `Q`. The left side is the group of elements of the finite adelic unitary group of |
| 41 | `Y_m` that are integral at every finite place and whose reductions lie in `lastResidueLevel ϑ`, that |
| 42 | is, are `1` at the chosen places and block upper triangular at the places of `Q`. It lies in |
| 43 | `D.chosenLevel`, the integral elements that reduce to `1` at every chosen place. -/ |
| 44 | lemma levelOf_lastResidueLevel_le_chosenLevel (ϑ : D.TameChar) : |
| 45 | levelOf (D.levelPlaces ϑ).placeAt (lastResidueLevel ϑ) ≤ D.chosenLevel := by |
| 46 | refine Subgroup.map_mono fun k hk ↦ ?_ |
| 47 | rw [Subgroup.mem_comap, Subgroup.mem_bot] |
| 48 | funext w |
| 49 | exact eq_one_of_mem_lastResidueLevel ϑ hk w |
| 50 | |
| 51 | /-- Let `ϑ` be a tame character, and `K` the level cut out by `lastResidueLevel ϑ`: the integral |
| 52 | elements that reduce to `1` at the chosen places and to a block upper triangular matrix at the |
| 53 | places of `Q`. Then `K` is sufficiently small: for every `g`, the stabiliser |
| 54 | `classAut Γ K g = Γ ∩ gKg⁻¹` of the coset `gK` in the group `Γ = stdRatPoints` of rational points is |
| 55 | trivial. -/ |
| 56 | lemma classAut_lastResidueLevel_eq_bot (ϑ : D.TameChar) (g : Gf D.E (D.Y D.m)) : |
| 57 | classAut stdRatPoints (levelOf (D.levelPlaces ϑ).placeAt (lastResidueLevel ϑ)) g = ⊥ := by |
| 58 | have h_card : Fintype.card (D.Y D.m) ≤ 2 * D.n D.m := by linarith [D.card_Y_le le_rfl] |
| 59 | exact D.classAut_eq_bot_of_le_chosenLevel (levelOf_lastResidueLevel_le_chosenLevel ϑ) h_card g |
| 60 | |
| 61 | variable (D) in |
| 62 | /-- The target forms `D.targetForms` as a twisted lattice. Its twists are the `m`-fold twists `ϑ`: |
| 63 | twists whose tame part `ψ` has `ψ_w^n ≠ 1` for `1 ≤ n ≤ m` and `w` in its modulus, a finite set `Q` |
| 64 | of places. The map at `ϑ` is the chain of lifts `Θ_ϑ` to the forms on `Y_m` with the level and |
| 65 | character of `ϑ` and the weight given by the column counts `D.columnsY` and the last entries |
| 66 | `D.lastEntry D.m`. The lattice at `ι` consists of the forms integral at `ι`, and `ϑ` is allowed at |
| 67 | `l` if the norm `ϑ.normQ` of its modulus is prime to `l`. The coordinates of a form for the |
| 68 | trivial twist are those of its values at representatives of the classes, in the standard basis of |
| 69 | the Weyl module. -/ |
| 70 | def targetLattice : TwistedLattice D.targetForms D.MFoldTwist where |
| 71 | Space (ϑ : D.MFoldTwist) := (D.levelPlaces ϑ.toTameChar).LevelForm (lastResidueLevel ϑ.toTameChar) |
| 72 | (lastLevelChar ϑ.toTameChar) D.columnsY (D.lastEntry D.m) |
| 73 | lift := D.Θ |
| 74 | IsAllowed (l : ℕ) (ϑ : D.MFoldTwist) := l.Coprime ϑ.normQ |
| 75 | lattice (_ : D.MFoldTwist) (ι : PrimePadicIso) := integralForms ι.place |
| 76 | norm_inner_le_one {ϑ} ι _ φ hφ φ' hφ' := by |
| 77 | -- The place of `ῑ` is that of `ι` composed with complex conjugation. |
| 78 | have hφ_conj : φ ∈ integralForms ι.place.conj := hφ |
| 79 | have h_card (g : Gf D.E (D.Y D.m)) : Nat.card (classAut stdRatPoints |
| 80 | (levelOf (D.levelPlaces ϑ.toTameChar).placeAt (lastResidueLevel ϑ.toTameChar)) g) ∣ 1 := by |
| 81 | rw [classAut_lastResidueLevel_eq_bot, Subgroup.card_bot] |
| 82 | have h_bound : ‖ι.place.ιₚ ((1 : ℕ) • inner ℂ φ φ')‖ ≤ 1 := |
| 83 | norm_nsmul_inner_le_one φ φ' ι.place h_card hφ_conj hφ' |
| 84 | rwa [one_nsmul, ι.norm_place] at h_bound |
| 85 | Coord := ValueIndex (lastResidueLevel (1 : D.MFoldTwist).toTameChar) D.columnsY |
| 86 | coord := valueCoord |
| 87 | gramMatrix := valueMetric (lastResidueLevel (1 : D.MFoldTwist).toTameChar) D.columnsY |
| 88 | posDef_gramMatrix := posDef_valueMetric |
| 89 | inner_eq := inner_eq_valueCoord (classAut_lastResidueLevel_eq_bot _) |
| 90 | |
| 91 | /-- Let `y` be a target form: an automorphic form on the unitary group of the space `Y_0`, of |
| 92 | principal level at the chosen places, in the image of the idempotent `D.e₀`. Let `ι : ℂ ≃ ℚ̄_l`, |
| 93 | where `l = ι.prime`, and let `ι.place` be the embedding `ℂ → ℂ_l` that it gives. Then `y` is an |
| 94 | integral vector of the twisted lattice at `ι` if and only if `Θ_ϑ y` is integral at `ι.place` for |
| 95 | every `ϑ` with `ϑ.normQ` prime to `l`. -/ |
| 96 | lemma mem_integralVectors_targetLattice {ι : PrimePadicIso} {y : D.targetForms} : |
| 97 | y ∈ D.targetLattice.integralVectors ι ↔ |
| 98 | ∀ ϑ : D.MFoldTwist, Nat.Coprime ι.prime ϑ.normQ → D.Θ ϑ y ∈ integralForms ι.place := |
| 99 | TwistedLattice.mem_integralVectors |
| 100 | |
| 101 | /-- Let `y` be a target form, `σ ∈ Aut ℂ`, and `φ = Θ₁ y` the lift of `y` to an algebraic form on |
| 102 | `Y_m` for the trivial twist, of level `K`. The coordinates of `y` in the twisted lattice are those |
| 103 | of the values `φ(g_c)` in the standard basis of the Weyl module, where `g_c` runs over |
| 104 | representatives of the classes `c ∈ Γ\G_f/K`. The left side is the sum over `c` of the squared norms |
| 105 | of the vectors `σ(φ(g_c))` for the Gram matrix of the Weyl module. The right side `‖φ‖²_σ` is the |
| 106 | same sum with the term at `c` divided by `#(Γ ∩ g_c K g_c⁻¹)`. They agree since these stabilisers |
| 107 | are trivial. -/ |
| 108 | lemma normSqAt_targetLattice (y : D.targetForms) (σ : ℂ ≃+* ℂ) : |
| 109 | D.targetLattice.normSqAt y σ = (D.Θ 1 y).normSqAt σ := |
| 110 | (normSqAt_eq_re_valueCoord (classAut_lastResidueLevel_eq_bot _) σ (D.Θ 1 y)).symm |
| 111 | |
| 112 | /-- For every `m`-fold twist `ϑ`, the map `D.targetLattice.lift ϑ` is injective on the target forms |
| 113 | `D.targetForms`. -/ |
| 114 | lemma injective_lift_targetLattice (ϑ : D.MFoldTwist) : |
| 115 | Function.Injective (D.targetLattice.lift ϑ) := by |
| 116 | change Function.Injective (D.lowerChainAtLevel ϑ ∘ D.targetForms.subtype) |
| 117 | exact (D.lowerChainAtLevel_injective ϑ).comp D.targetForms.injective_subtype |
| 118 | |
| 119 | end New.Data |
| 120 | |
| 121 | end |