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.Real |
| 4 | import TauCeti.RingTheory.DedekindDomain.FiniteAdeleRing.FiniteIndexIdeal |
| 5 | import TauCeti.LinearAlgebra.Matrix.Range |
| 6 | import TauCeti.NumberTheory.NumberField.Global.Adeles.Lattice |
| 7 | import TauCeti.LinearAlgebra.Submodule.Prod.Index |
| 8 | public import TauCeti.LinearAlgebra.Submodule.Zeta |
| 9 | import TauCeti.NumberTheory.NumberField.CMField.AdelicLattice |
| 10 | import TauCeti.RingTheory.Ideal.Norm.AbsNorm |
| 11 | public import Lib.SiegelWeil.Mass |
| 12 | public import New.Spanning.RemainingTerms.SiegelLemma |
| 13 | import Lib.Adelic.Adeles.LocalFactors |
| 14 | import Lib.Adelic.Unitary.CongruenceLevels |
| 15 | import Lib.Adelic.Witt.WittTheorem |
| 16 | import Lib.General.NumberTheory.LatticeCovolumes |
| 17 | |
| 18 | /-! |
| 19 | # Discriminants of lattices and sums over sublattices |
| 20 | |
| 21 | Lattices of rational subspaces of a space with the standard hermitian form, written over `Ô`; |
| 22 | their discriminants; and a bound for the sum of a negative power of the index over all sublattices |
| 23 | of finite index. |
| 24 | |
| 25 | The bound for the sum over sublattices is a consequence of Hey's formula for the zeta function of a |
| 26 | lattice. Here we use Tau Ceti's bound, proved by induction on the rank over any ring whose |
| 27 | left ideals of finite index are principal. |
| 28 | |
| 29 | The formula that compares the discriminant of `L ∩ W` with that of the dual lattice in `W^⊥` is |
| 30 | `New.Filling.jacobi_perp_discriminant`, stated for Gram determinants. |
| 31 | -/ |
| 32 | |
| 33 | @[expose] public section |
| 34 | |
| 35 | noncomputable section |
| 36 | |
| 37 | namespace New.Filling |
| 38 | |
| 39 | open NumberField Matrix Module ENNReal |
| 40 | |
| 41 | section SubmoduleZeta |
| 42 | |
| 43 | variable {R N N' : Type*} [CommRing R] [AddCommGroup N] [Module R N] [AddCommGroup N'] [Module R N'] |
| 44 | |
| 45 | /-- The sum of `[range f : M] ^ (-s)` over the submodules `M` of finite index in the range of a |
| 46 | linear map `f` is at most the same sum over the submodules of finite index in its domain. -/ |
| 47 | lemma tsum_relIndex_range_le_submoduleZeta (f : N →ₗ[R] N') (s : ℕ) : |
| 48 | ∑' M : {M : Submodule R N' // M ≤ LinearMap.range f ∧ |
| 49 | M.toAddSubgroup.relIndex (LinearMap.range f).toAddSubgroup ≠ 0}, |
| 50 | (M.val.toAddSubgroup.relIndex (LinearMap.range f).toAddSubgroup : ℝ≥0∞)⁻¹ ^ s ≤ |
| 51 | submoduleZeta R N s := by |
| 52 | let Q := LinearMap.range f |
| 53 | -- Finite-index submodules contained in the range are exactly the finite-index submodules of Q. |
| 54 | let e : {M : Submodule R N' // M ≤ Q ∧ M.toAddSubgroup.relIndex Q.toAddSubgroup ≠ 0} ≃ |
| 55 | {L : Submodule R Q // L.cardQuot ≠ 0} := |
| 56 | (Equiv.subtypeSubtypeEquivSubtypeInter (· ≤ Q) _).symm.trans |
| 57 | (Q.mapIic.symm.toEquiv.subtypeEquiv fun _ ↦ Iff.rfl) |
| 58 | calc |
| 59 | _ = submoduleZeta R Q s := by |
| 60 | rw [submoduleZeta_def] |
| 61 | exact e.tsum_eq fun L ↦ (L.val.cardQuot : ℝ≥0∞)⁻¹ ^ s |
| 62 | _ ≤ submoduleZeta R N s := submoduleZeta_le_of_surjective f.surjective_rangeRestrict s |
| 63 | |
| 64 | end SubmoduleZeta |
| 65 | |
| 66 | section Columns |
| 67 | |
| 68 | variable {A l m n : Type} [CommRing A] {R : Subring A} [Fintype m] [Fintype n] |
| 69 | |
| 70 | /-- The lattice of the columns of `B * C` is the image under `B` of that of the columns of `C`. -/ |
| 71 | lemma colLattice_mul (B : Matrix l m A) (C : Matrix m n A) : |
| 72 | colLattice R (B * C) = (colLattice R C).map (B.mulVecLin.restrictScalars R) := by |
| 73 | rw [colLattice, colLattice, ← Submodule.map_comp, mulVecLin_mul, LinearMap.restrictScalars_comp] |
| 74 | |
| 75 | /-- If `U` has entries in `R`, then the lattice of the columns of `B * U` lies in that of the |
| 76 | columns of `B`. -/ |
| 77 | lemma colLattice_mul_le (B : Matrix l m A) {U : Matrix m n A} (hU : IsIntMatrix R U) : |
| 78 | colLattice R (B * U) ≤ colLattice R B := by |
| 79 | rw [colLattice_mul] |
| 80 | exact Submodule.map_mono (colLattice_le fun j i ↦ hU i j) |
| 81 | |
| 82 | omit [Fintype m] in |
| 83 | /-- Let `R` be a subring of a commutative ring `A`. The `R`-span `colLattice R B` of the columns of |
| 84 | an `m × n` matrix `B` over `A` is the range of an `R`-linear map from `R ^ n` to `A ^ m`. -/ |
| 85 | lemma exists_range_eq_colLattice (B : Matrix m n A) : |
| 86 | ∃ f : (n → R) →ₗ[R] (m → A), LinearMap.range f = colLattice R B := by |
| 87 | classical |
| 88 | rw [colLattice_eq_span] |
| 89 | exact ⟨Fintype.linearCombination R B.col, Fintype.range_linearCombination R B.col⟩ |
| 90 | |
| 91 | end Columns |
| 92 | |
| 93 | variable {E κ P : Type} [Field E] [NumberField E] [IsCMField E] [HasPrimitiveRoot5040 E] [Fintype κ] |
| 94 | [Fintype P] {r : ℕ} |
| 95 | |
| 96 | /-- Let `𝔸f E` be the finite adeles of the number field `E` and `Ô E` the integral ones. An |
| 97 | `Ô E`-submodule `L` of `(𝔸f E) ^ κ` is a lattice of rank `r` if it is spanned over `Ô E` by the |
| 98 | columns of `x a`, where the `r` columns of `x` are independent vectors in `E ^ κ` and `a` is an |
| 99 | invertible `r × r` matrix over `𝔸f E`. -/ |
| 100 | def IsLatticeOfRank (r : ℕ) (L : Submodule (Ô E) (κ → 𝔸f E)) : Prop := |
| 101 | ∃ (x : Matrix κ (Fin r) E) (a : GL (Fin r) (𝔸f E)), |
| 102 | HasLeftInv x ∧ colLattice (Ô E) (finAdeleMatrix x * a.val) = L |
| 103 | |
| 104 | open scoped Classical in |
| 105 | /-- The discriminant of a lattice `L` of rank `r`: the square root of `genIndex (det (Bᴴ * B))` for |
| 106 | some chosen basis `B = x a`. Here `ᴴ` is the conjugate transpose and `genIndex u` is the inverse of |
| 107 | the factor by which a unit `u` scales Haar measure on the finite adeles (`0` for a non-unit). The |
| 108 | value is `0` if `L` is not a lattice of rank `r`. -/ |
| 109 | def discriminant (r : ℕ) (L : Submodule (Ô E) (κ → 𝔸f E)) : ℝ := |
| 110 | if h : IsLatticeOfRank r L then |
| 111 | √(genIndex ((finAdeleMatrix h.choose * h.choose_spec.choose.val)ᴴ * |
| 112 | (finAdeleMatrix h.choose * h.choose_spec.choose.val)).det) |
| 113 | else 0 |
| 114 | |
| 115 | omit [IsCMField E] [HasPrimitiveRoot5040 E] in |
| 116 | /-- If `x` has a left inverse over `E` and `a` is an invertible matrix over the finite adeles |
| 117 | `𝔸f E`, then `finAdeleMatrix x * a` (with `x` read over `𝔸f E`) has a left inverse over `𝔸f E`. -/ |
| 118 | lemma hasLeftInv_finAdeleMatrix_mul {x : Matrix κ (Fin r) E} (hx : HasLeftInv x) |
| 119 | (a : GL (Fin r) (𝔸f E)) : HasLeftInv (finAdeleMatrix x * a.val) := by |
| 120 | exact Matrix.exists_mul_map_mul_eq_one_of_linearIndependent_col |
| 121 | (Matrix.mulVec_injective_iff.1 hx.injective_mulVec) a |
| 122 | |
| 123 | /-- Let `E` be a CM field with a primitive 5040th root of unity, `𝔸f E` its finite adeles and `Ô E` |
| 124 | the integral ones. Let `B`, `C` be matrices over `𝔸f E` whose columns have the same `Ô E`-span, and |
| 125 | let `B` have a left inverse. Then the Gram determinants `det (Bᴴ * B)` and `det (Cᴴ * C)`, with `ᴴ` |
| 126 | the conjugate transpose, have the same generalised index: `genIndex a` is the inverse of the factor |
| 127 | by which a unit `a` scales Haar measure, and `0` for a non-unit. -/ |
| 128 | lemma genIndex_det_gram_eq_of_colLattice_eq {B C : Matrix κ (Fin r) (𝔸f E)} (hB : HasLeftInv B) |
| 129 | (h_eq : colLattice (Ô E) B = colLattice (Ô E) C) : |
| 130 | genIndex (Bᴴ * B).det = genIndex (Cᴴ * C).det := by |
| 131 | -- The bases differ by an integral matrix with integral inverse. |
| 132 | obtain ⟨U, hU_int, rfl⟩ : ∃ U : Matrix (Fin r) (Fin r) (𝔸f E), |
| 133 | IsIntMatrix (Ô E) U ∧ B * U = C := |
| 134 | exists_isIntMatrix_mul_eq h_eq.ge |
| 135 | obtain ⟨V, hV_int, hV⟩ : ∃ V : Matrix (Fin r) (Fin r) (𝔸f E), |
| 136 | IsIntMatrix (Ô E) V ∧ B * U * V = B := |
| 137 | exists_isIntMatrix_mul_eq h_eq.le |
| 138 | have hUV : U * V = 1 := Matrix.mul_left_cancel_of_mulVec_injective hB.injective_mulVec |
| 139 | (by simpa only [← Matrix.mul_assoc, Matrix.mul_one] using hV) |
| 140 | rw [gram_mul_standard] |
| 141 | exact genIndex_det_conj_of_isIntMatrix hU_int hV_int (mul_eq_one_comm.1 hUV) hUV |
| 142 | |
| 143 | /-- Let `E` be a CM field with a primitive 5040th root of unity, `𝔸f E` its finite adeles and `Ô E` |
| 144 | the integral ones. Let `x` be a matrix over `E` with a left inverse, `a` an invertible matrix over |
| 145 | `𝔸f E`, and `B = finAdeleMatrix x * a`, with `x` read over `𝔸f E`. The discriminant of the |
| 146 | `Ô E`-span of the columns of `B`, defined from a chosen basis of this form, can be computed from |
| 147 | `B`: it is `√(genIndex (Bᴴ * B).det)`. -/ |
| 148 | lemma discriminant_colLattice {x : Matrix κ (Fin r) E} (hx : HasLeftInv x) (a : GL (Fin r) (𝔸f E)) : |
| 149 | discriminant r (colLattice (Ô E) (finAdeleMatrix x * a.val)) = |
| 150 | √(genIndex ((finAdeleMatrix x * a.val)ᴴ * (finAdeleMatrix x * a.val)).det) := by |
| 151 | have hL : IsLatticeOfRank r (colLattice (Ô E) (finAdeleMatrix x * a.val)) := ⟨x, a, hx, rfl⟩ |
| 152 | rw [discriminant, dite_eq_left hL] |
| 153 | -- The discriminant is defined by a chosen basis `y b`, which spans the same lattice as `x a`. |
| 154 | set y : Matrix κ (Fin r) E := hL.choose |
| 155 | set b : GL (Fin r) (𝔸f E) := hL.choose_spec.choose |
| 156 | obtain ⟨-, h_chosen⟩ : HasLeftInv y ∧ |
| 157 | colLattice (Ô E) (finAdeleMatrix y * b.val) = colLattice (Ô E) (finAdeleMatrix x * a.val) := |
| 158 | hL.choose_spec.choose_spec |
| 159 | rw [genIndex_det_gram_eq_of_colLattice_eq (hasLeftInv_finAdeleMatrix_mul hx a) h_chosen.symm] |
| 160 | |
| 161 | open ComplexOrder in |
| 162 | /-- Let `E` be a CM field with a primitive 5040th root of unity, `𝔸f E` its finite adeles and `Ô E` |
| 163 | the integral ones. Let `L` be a lattice of rank `r` in `(𝔸f E) ^ κ`: the `Ô E`-span of the columns |
| 164 | of `x a`, where `x` has `r` independent columns over `E` and `a` is invertible over `𝔸f E`. Then |
| 165 | the discriminant of `L`, the square root of the generalised index `genIndex` of the Gram |
| 166 | determinant of such a basis, is positive. -/ |
| 167 | lemma IsLatticeOfRank.discriminant_pos {L : Submodule (Ô E) (κ → 𝔸f E)} |
| 168 | (hL : IsLatticeOfRank r L) : 0 < discriminant r L := by |
| 169 | obtain ⟨x, a, hx, rfl⟩ := hL |
| 170 | rw [discriminant_colLattice hx] |
| 171 | exact Real.sqrt_pos.2 (genIndex_det_gram_finAdeleMatrix_mul_pos hx a) |
| 172 | |
| 173 | /-- For an adelic matrix `B` and an invertible adelic matrix `A`, passing from `B` to `B * A` |
| 174 | multiplies the square root of the generalised index `genIndex` of the Gram determinant by the |
| 175 | generalised index of `det A`. -/ |
| 176 | lemma sqrt_genIndex_det_gram_mul (B : Matrix κ (Fin r) (𝔸f E)) (A : GL (Fin r) (𝔸f E)) : |
| 177 | √(genIndex ((B * A.val)ᴴ * (B * A.val)).det) = |
| 178 | √(genIndex (Bᴴ * B).det) * genIndex A.val.det := by |
| 179 | rw [gram_mul_standard, genIndex_det_conj, Real.sqrt_mul' _ (sq_nonneg _), Real.sqrt_sq] |
| 180 | exact (genIndex_pos A.det).le |
| 181 | |
| 182 | omit [IsCMField E] [HasPrimitiveRoot5040 E] in |
| 183 | /-- The Haar index of a finite idele is the absolute norm of its fractional ideal. For an integral |
| 184 | idele `x`, both indices count the elements of `Ô E / x Ô E`. -/ |
| 185 | private lemma genIndex_eq_finiteAdeleGenIndex {a : 𝔸f E} (ha : IsUnit a) : |
| 186 | genIndex a = (NumberField.FiniteAdeleRing.genIndex E a : ℝ) := by |
| 187 | have integral (x : 𝔸f E) (hx : x ∈ Ô E) (hu : IsUnit x) : |
| 188 | genIndex x = (NumberField.FiniteAdeleRing.genIndex E x : ℝ) := by |
| 189 | rw [genIndex_eq_card isOpen_Ô isCompact_Ô hx hu] |
| 190 | have h := NumberField.FiniteAdeleRing.genIndex_eq_cardQuot (g := ⟨x, hx⟩) hu |
| 191 | exact_mod_cast h.symm |
| 192 | -- Clear the denominators of `a` and cancel the index of the positive integer `m`. |
| 193 | obtain ⟨m, hm, hma⟩ := NumberField.FiniteAdeleRing.exists_natCast_mul_mem_integralAdeles a |
| 194 | have hmunit : IsUnit (m : 𝔸f E) := by |
| 195 | simpa using (Nat.cast_ne_zero.2 hm : (m : E) ≠ 0).isUnit.map (algebraMap E (𝔸f E)) |
| 196 | have h := integral _ hma (hmunit.mul ha) |
| 197 | rw [map_mul, map_mul, Rat.cast_mul, ← integral m (by simp) hmunit] at h |
| 198 | exact mul_left_cancel₀ (genIndex_pos hmunit.unit).ne' h |
| 199 | |
| 200 | omit [IsCMField E] [HasPrimitiveRoot5040 E] [Fintype κ] in |
| 201 | /-- If `M` has finite index in the `Ô E`-span of the columns of an adelic matrix `B` over a number |
| 202 | field `E`, then `M` is spanned by the columns of `B * A` for some invertible `A`, and its index is |
| 203 | the generalised index of `det A`. -/ |
| 204 | lemma exists_colLattice_mul_eq_of_le {B : Matrix κ (Fin r) (𝔸f E)} |
| 205 | {M : Submodule (Ô E) (κ → 𝔸f E)} (h_le : M ≤ colLattice (Ô E) B) |
| 206 | (h_index : submoduleIndex M (colLattice (Ô E) B) ≠ 0) : |
| 207 | ∃ A : GL (Fin r) (𝔸f E), colLattice (Ô E) (B * A.val) = M ∧ |
| 208 | (submoduleIndex M (colLattice (Ô E) B) : ℝ) = genIndex A.val.det := by |
| 209 | classical |
| 210 | rw [colLattice_eq_span] at h_le h_index |
| 211 | obtain ⟨C, hC, hM, hdet⟩ := NumberField.FiniteAdeleRing.exists_span_col_mul_eq |
| 212 | (B := B) h_le h_index |
| 213 | refine ⟨((isUnit_iff_isUnit_det C).2 hC).unit, ?_, ?_⟩ |
| 214 | · rw [colLattice_eq_span] |
| 215 | exact hM |
| 216 | · rw [IsUnit.unit_spec, genIndex_eq_finiteAdeleGenIndex hC, colLattice_eq_span] |
| 217 | exact_mod_cast hdet.symm |
| 218 | |
| 219 | omit [IsCMField E] [HasPrimitiveRoot5040 E] in |
| 220 | /-- A finite-index submodule of the integral vectors over a number field is the column lattice |
| 221 | of a matrix invertible over the finite adeles. -/ |
| 222 | lemma exists_colLattice_eq_of_submoduleIndex_ne_zero {n : Type} [Fintype n] [DecidableEq n] |
| 223 | {M : Submodule (Ô E) (n → 𝔸f E)} (h_le : M ≤ intVectors (Ô E) n) |
| 224 | (h_index : submoduleIndex M (intVectors (Ô E) n) ≠ 0) : |
| 225 | ∃ A : GL n (𝔸f E), colLattice (Ô E) A.val = M := by |
| 226 | classical |
| 227 | -- Number the columns of the identity to apply the finite-index column-span theorem. |
| 228 | let e := Fintype.equivFin n |
| 229 | let B := (1 : Matrix n n (𝔸f E)).submatrix id e.symm |
| 230 | have cols {ι ι' : Type} [Fintype ι] [Fintype ι'] (X : Matrix n ι (𝔸f E)) (σ : ι' ≃ ι) : |
| 231 | colLattice (Ô E) (X.submatrix id σ) = colLattice (Ô E) X := by |
| 232 | rw [colLattice_eq_span, colLattice_eq_span] |
| 233 | exact congrArg (Submodule.span (Ô E)) (σ.surjective.range_comp X.col) |
| 234 | have hB : colLattice (Ô E) B = intVectors (Ô E) n := |
| 235 | (cols (1 : Matrix n n (𝔸f E)) e.symm).trans (by simp [colLattice]) |
| 236 | obtain ⟨A, hA, -⟩ := exists_colLattice_mul_eq_of_le (B := B) (hB.symm ▸ h_le) (hB.symm ▸ h_index) |
| 237 | let D := Units.map (reindexAlgEquiv (𝔸f E) (𝔸f E) e.symm).toMonoidHom A |
| 238 | refine ⟨D, ?_⟩ |
| 239 | rw [← hA, ← cols D.val e.symm] |
| 240 | congr 1 |
| 241 | ext i j |
| 242 | simp [D, B, Matrix.mul_apply, Matrix.one_apply, e.eq_symm_apply] |
| 243 | |
| 244 | omit [IsCMField E] [HasPrimitiveRoot5040 E] in |
| 245 | /-- A finite-index submodule of a rank-`r` lattice over the integral finite adeles of a number field |
| 246 | is a lattice of the same rank. -/ |
| 247 | lemma IsLatticeOfRank.of_submoduleIndex_ne_zero {L M : Submodule (Ô E) (κ → 𝔸f E)} |
| 248 | (hL : IsLatticeOfRank r L) (h_le : M ≤ L) (h_index : submoduleIndex M L ≠ 0) : |
| 249 | IsLatticeOfRank r M := by |
| 250 | obtain ⟨x, a, hx, rfl⟩ := hL |
| 251 | obtain ⟨A, hM, -⟩ := exists_colLattice_mul_eq_of_le h_le h_index |
| 252 | exact ⟨x, a * A, hx, by rw [Units.val_mul, ← Matrix.mul_assoc, hM]⟩ |
| 253 | |
| 254 | /-- Let `E` be a CM field with a primitive 5040th root of unity, `𝔸f E` its finite adeles and `Ô E` |
| 255 | the integral ones. Let `L` be a lattice of rank `r` in `(𝔸f E) ^ κ`: the `Ô E`-span of the columns |
| 256 | of `B = x a`, with `r` independent columns of `x` over `E` and `a` invertible over `𝔸f E`. If `M` is |
| 257 | an `Ô E`-submodule of `L` of finite non-zero index `submoduleIndex M L`, then its discriminant is |
| 258 | that of `L` times this index. -/ |
| 259 | lemma IsLatticeOfRank.discriminant_eq_mul_submoduleIndex {L M : Submodule (Ô E) (κ → 𝔸f E)} |
| 260 | (hL : IsLatticeOfRank r L) (h_le : M ≤ L) (h_index : submoduleIndex M L ≠ 0) : |
| 261 | discriminant r M = discriminant r L * submoduleIndex M L := by |
| 262 | -- If `x a` is a basis of `L`, then `x a A` is a basis of `M`, and the index is that of `det A`. |
| 263 | obtain ⟨x, a, hx, rfl⟩ := hL |
| 264 | obtain ⟨A, hM, h_det⟩ : ∃ A : GL (Fin r) (𝔸f E), |
| 265 | colLattice (Ô E) (finAdeleMatrix x * a.val * A.val) = M ∧ |
| 266 | (submoduleIndex M (colLattice (Ô E) (finAdeleMatrix x * a.val)) : ℝ) = genIndex A.val.det := |
| 267 | exists_colLattice_mul_eq_of_le h_le h_index |
| 268 | have h_basis : finAdeleMatrix x * (a * A).val = finAdeleMatrix x * a.val * A.val := |
| 269 | (Matrix.mul_assoc ..).symm |
| 270 | rw [h_det, ← hM, ← h_basis, discriminant_colLattice hx, discriminant_colLattice hx, h_basis, |
| 271 | sqrt_genIndex_det_gram_mul] |
| 272 | |
| 273 | /-- An `Ô E`-submodule `M` of finite index in a lattice `L` of rank `r` is a lattice of the same |
| 274 | rank, and its discriminant is the discriminant of `L` times the index `submoduleIndex M L` of `M` in |
| 275 | `L`. -/ |
| 276 | lemma IsLatticeOfRank.of_le_and_discriminant_eq_mul_index {L M : Submodule (Ô E) (κ → 𝔸f E)} |
| 277 | (hL : IsLatticeOfRank r L) (h_le : M ≤ L) (h_index : submoduleIndex M L ≠ 0) : |
| 278 | IsLatticeOfRank r M ∧ discriminant r M = discriminant r L * submoduleIndex M L := |
| 279 | ⟨hL.of_submoduleIndex_ne_zero h_le h_index, hL.discriminant_eq_mul_submoduleIndex h_le h_index⟩ |
| 280 | |
| 281 | omit [IsCMField E] [HasPrimitiveRoot5040 E] in |
| 282 | /-- The `Ô`-span `colLattice` of the columns of `B` lies in `preimageLattice (Ô E) H`, the vectors |
| 283 | that `H` maps to integral ones, if and only if `H * B` has all entries in `Ô`. -/ |
| 284 | lemma colLattice_le_preimageLattice_iff {σ τ : Type} [Fintype τ] {H : Matrix σ κ (𝔸f E)} |
| 285 | {B : Matrix κ τ (𝔸f E)} : |
| 286 | colLattice (Ô E) B ≤ preimageLattice (Ô E) H ↔ IsIntMatrix (Ô E) (H * B) := by |
| 287 | classical |
| 288 | exact ⟨fun h_le i j ↦ h_le (col_mem_colLattice j) i, |
| 289 | fun h_int ↦ colLattice_le fun j i ↦ h_int i j⟩ |
| 290 | |
| 291 | variable [DecidableEq κ] |
| 292 | |
| 293 | omit [IsCMField E] [HasPrimitiveRoot5040 E] [DecidableEq κ] in |
| 294 | /-- The image under a rational matrix `η` of the lattice spanned by the columns of `x a` is the |
| 295 | lattice spanned by the columns of `(η x) a`. -/ |
| 296 | lemma map_colLattice_finAdeleMatrix_mul (η : Matrix κ κ E) (x : Matrix κ (Fin r) E) |
| 297 | (a : Matrix (Fin r) (Fin r) (𝔸f E)) : |
| 298 | (colLattice (Ô E) (finAdeleMatrix x * a)).map |
| 299 | ((finAdeleMatrix η).mulVecLin.restrictScalars (Ô E)) = |
| 300 | colLattice (Ô E) (finAdeleMatrix (η * x) * a) := by |
| 301 | have h_map : finAdeleMatrix (η * x) = finAdeleMatrix η * finAdeleMatrix x := Matrix.map_mul |
| 302 | rw [h_map, Matrix.mul_assoc, colLattice_mul (finAdeleMatrix η)] |
| 303 | |
| 304 | omit [IsCMField E] [HasPrimitiveRoot5040 E] in |
| 305 | /-- A matrix `η` over `E` with a left inverse maps a lattice of rank `r` in `(𝔸f E) ^ κ` (the |
| 306 | `Ô E`-span of the adelic basis `x a` of an `r`-dimensional subspace of `E ^ κ`) to a lattice of |
| 307 | rank `r`. -/ |
| 308 | lemma IsLatticeOfRank.map_of_hasLeftInv {L : Submodule (Ô E) (κ → 𝔸f E)} |
| 309 | (hL : IsLatticeOfRank r L) {η : Matrix κ κ E} (hη : HasLeftInv η) : |
| 310 | IsLatticeOfRank r (L.map ((finAdeleMatrix η).mulVecLin.restrictScalars (Ô E))) := by |
| 311 | obtain ⟨x, a, hx, rfl⟩ := hL |
| 312 | exact ⟨η * x, a, hη.mul hx, (map_colLattice_finAdeleMatrix_mul η x a.val).symm⟩ |
| 313 | |
| 314 | /-- An isometry `η` of the standard hermitian form over `E` (`ηᴴ * η = 1`) keeps the discriminant |
| 315 | of a lattice of rank `r`, that is, the square root of the generalised index of the Gram determinant |
| 316 | of a basis of the lattice. -/ |
| 317 | lemma IsLatticeOfRank.discriminant_map_of_unitary {L : Submodule (Ô E) (κ → 𝔸f E)} |
| 318 | (hL : IsLatticeOfRank r L) {η : Matrix κ κ E} (hη : ηᴴ * η = 1) : |
| 319 | discriminant r (L.map ((finAdeleMatrix η).mulVecLin.restrictScalars (Ô E))) = |
| 320 | discriminant r L := by |
| 321 | -- The basis `x a` is moved to `(η x) a`, which has the same Gram matrix. |
| 322 | obtain ⟨x, a, hx, rfl⟩ := hL |
| 323 | have h_inv : HasLeftInv (η * x) := HasLeftInv.mul ⟨ηᴴ, hη⟩ hx |
| 324 | have h_gram : (finAdeleMatrix (η * x) * a.val)ᴴ * (finAdeleMatrix (η * x) * a.val) = |
| 325 | (finAdeleMatrix x * a.val)ᴴ * (finAdeleMatrix x * a.val) := by |
| 326 | simp_rw [gram_finAdeleMatrix_mul_self, gram_mul_standard, hη, Matrix.mul_one] |
| 327 | rw [map_colLattice_finAdeleMatrix_mul, discriminant_colLattice h_inv, |
| 328 | discriminant_colLattice hx, h_gram] |
| 329 | |
| 330 | /-- An isometry `η` of the standard hermitian form over `E` (`ηᴴ * η = 1`) maps a lattice of rank |
| 331 | `r` to a lattice of rank `r` with the same discriminant. -/ |
| 332 | lemma IsLatticeOfRank.map_of_unitary {L : Submodule (Ô E) (κ → 𝔸f E)} |
| 333 | (hL : IsLatticeOfRank r L) {η : Matrix κ κ E} (hη : ηᴴ * η = 1) : |
| 334 | IsLatticeOfRank r (L.map ((finAdeleMatrix η).mulVecLin.restrictScalars (Ô E))) ∧ |
| 335 | discriminant r (L.map ((finAdeleMatrix η).mulVecLin.restrictScalars (Ô E))) = |
| 336 | discriminant r L := |
| 337 | ⟨hL.map_of_hasLeftInv ⟨ηᴴ, hη⟩, hL.discriminant_map_of_unitary hη⟩ |
| 338 | |
| 339 | section Saturated |
| 340 | |
| 341 | variable {H' : Matrix κ P (𝔸f E)} {H : Matrix P κ (𝔸f E)} |
| 342 | |
| 343 | /-- The saturated lattice of a subspace `V` of `E ^ κ` for a matrix `H` with left inverse `H'`: the |
| 344 | `Ô`-span of the chosen basis `sublatticeBasis u V`, where `u` is the identity `H' * H = 1`. Its |
| 345 | columns are adelic points of `V`, and their image under `H` is a primitive integral matrix. -/ |
| 346 | def saturatedLattice (u : H' * H = 1) (V : Submodule E (κ → E)) : Submodule (Ô E) (κ → 𝔸f E) := |
| 347 | colLattice (Ô E) (sublatticeBasis u V).val |
| 348 | |
| 349 | /-- The matrix `H`, which has the left inverse `H'`, maps the saturated lattice of `V` to integral |
| 350 | vectors. -/ |
| 351 | lemma saturatedLattice_le (h_left_inv : H' * H = 1) (V : Submodule E (κ → E)) : |
| 352 | saturatedLattice h_left_inv V ≤ preimageLattice (Ô E) H := |
| 353 | colLattice_le_preimageLattice_iff.2 (isPrimitiveMatrix_mul_sublatticeBasis h_left_inv V).left |
| 354 | |
| 355 | /-- The saturated lattice of `V` is a lattice whose rank is the dimension of `V`. -/ |
| 356 | lemma isLatticeOfRank_saturatedLattice (h_left_inv : H' * H = 1) (V : Submodule E (κ → E)) : |
| 357 | IsLatticeOfRank (finrank E V) (saturatedLattice h_left_inv V) := by |
| 358 | obtain ⟨y, a, hy_inv, -, h_basis⟩ := exists_sublatticeBasis_eq_finAdeleMatrix_mul h_left_inv V |
| 359 | exact ⟨y, a, hy_inv, by rw [saturatedLattice, h_basis]⟩ |
| 360 | |
| 361 | /-- The discriminant of the saturated lattice of `V` is `sublatticeDiscriminant h_left_inv V`, the |
| 362 | square root of the generalised index of the Gram determinant of its chosen basis. -/ |
| 363 | lemma discriminant_saturatedLattice (h_left_inv : H' * H = 1) (V : Submodule E (κ → E)) : |
| 364 | discriminant (finrank E V) (saturatedLattice h_left_inv V) = |
| 365 | sublatticeDiscriminant h_left_inv V := by |
| 366 | obtain ⟨y, a, hy_inv, -, h_basis⟩ := exists_sublatticeBasis_eq_finAdeleMatrix_mul h_left_inv V |
| 367 | rw [saturatedLattice, sublatticeDiscriminant, h_basis, discriminant_colLattice hy_inv] |
| 368 | |
| 369 | /-- Let `E` be a CM field with a primitive 5040th root of unity, `𝔸f E` its finite adeles and `Ô E` |
| 370 | the integral ones. Let the matrix `H` over `𝔸f E` have the left inverse `H'`, and let `V` be a |
| 371 | subspace of `E ^ κ`. Suppose that, for every adelic matrix `m` with `finrank E V` columns, the Gram |
| 372 | matrix `mᴴ * m` has entries in `Ô E` whenever `H * m` has. Then the discriminant |
| 373 | `sublatticeDiscriminant h_left_inv V` is at least `1`. -/ |
| 374 | lemma one_le_sublatticeDiscriminant (h_left_inv : H' * H = 1) (V : Submodule E (κ → E)) |
| 375 | (h_int : ∀ m : Matrix κ (Fin (finrank E V)) (𝔸f E), |
| 376 | IsIntMatrix (Ô E) (H * m) → IsIntMatrix (Ô E) (mᴴ * m)) : |
| 377 | 1 ≤ sublatticeDiscriminant h_left_inv V := by |
| 378 | -- The Gram determinant is integral, and it is a unit because the discriminant is positive. |
| 379 | have h_pos := sublatticeDiscriminant_pos h_left_inv V |
| 380 | set m : Matrix κ (Fin (finrank E V)) (𝔸f E) := (sublatticeBasis h_left_inv V).val with hm |
| 381 | rw [sublatticeDiscriminant, ← hm] at h_pos ⊢ |
| 382 | have h_unit : IsUnit (mᴴ * m).det := genIndex.apply_ne_zero_iff.1 (Real.sqrt_pos.1 h_pos).ne' |
| 383 | have h_gram_int : IsIntMatrix (Ô E) (mᴴ * m) := |
| 384 | h_int m (isPrimitiveMatrix_mul_sublatticeBasis h_left_inv V).left |
| 385 | exact Real.one_le_sqrt.2 (one_le_genIndex h_gram_int.det_mem h_unit) |
| 386 | |
| 387 | /-- Let `E` be a CM field with a primitive 5040th root of unity, `𝔸f E` its finite adeles and `Ô E` |
| 388 | the integral ones, and let the matrix `H` over `𝔸f E` have the left inverse `H'`. Let `L` be a |
| 389 | lattice of rank `r` that `H` maps to integral vectors: the `Ô E`-span in `(𝔸f E) ^ κ` of the columns |
| 390 | of `x a`, with `r` independent columns of `x` over `E` and `a` invertible over `𝔸f E`. Then `L` is |
| 391 | spanned by the columns of `S * A` for some subspace `W` of `E ^ κ` of dimension `r` and some |
| 392 | integral `A` invertible over `𝔸f E`. Here `S = sublatticeBasis h_left_inv W` is the chosen basis of |
| 393 | the saturated lattice of `W`. The discriminant of a lattice is the square root of `genIndex` of the |
| 394 | Gram determinant of a basis, with `genIndex u` the inverse of the factor by which a unit `u` scales |
| 395 | Haar measure; that of `L` is `sublatticeDiscriminant h_left_inv W`, the one of `S`, times |
| 396 | `genIndex (det A)`. -/ |
| 397 | lemma IsLatticeOfRank.exists_eq_colLattice_sublatticeBasis_mul {L : Submodule (Ô E) (κ → 𝔸f E)} |
| 398 | {H' : Matrix κ P (𝔸f E)} {H : Matrix P κ (𝔸f E)} (h_left_inv : H' * H = 1) |
| 399 | (hL : IsLatticeOfRank r L) (h_le : L ≤ preimageLattice (Ô E) H) : |
| 400 | ∃ (W : Submodule E (κ → E)) (A : GL (Fin (finrank E W)) (𝔸f E)), |
| 401 | finrank E W = r ∧ |
| 402 | IsIntMatrix (Ô E) A.val ∧ |
| 403 | colLattice (Ô E) ((sublatticeBasis h_left_inv W).val * A.val) = L ∧ |
| 404 | discriminant r L = sublatticeDiscriminant h_left_inv W * genIndex A.val.det := by |
| 405 | classical |
| 406 | -- Take the rational column space of a basis of the lattice. |
| 407 | obtain ⟨x, a, hx, rfl⟩ := hL |
| 408 | obtain ⟨W, hW⟩ : ∃ W : Submodule E (κ → E), colSpan x = W := ⟨colSpan x, rfl⟩ |
| 409 | obtain rfl : finrank E W = r := by |
| 410 | rw [← hW, ← hx.card_eq_finrank_colSpan, Fintype.card_fin] |
| 411 | obtain ⟨A, hA_int, hA⟩ := exists_integral_sublatticeBasis_factor h_left_inv hW.le |
| 412 | (det_gram_ne_zero hx) a (colLattice_le_preimageLattice_iff.1 h_le) |
| 413 | refine ⟨W, A, rfl, hA_int, by rw [← hA], ?_⟩ |
| 414 | rw [discriminant_colLattice hx, hA, sqrt_genIndex_det_gram_mul, sublatticeDiscriminant] |
| 415 | |
| 416 | end Saturated |
| 417 | |
| 418 | omit [Fintype κ] [DecidableEq κ] [IsCMField E] [HasPrimitiveRoot5040 E] in |
| 419 | /-- For an adelic matrix `B` with `r` columns, the sum of `[L : M] ^ (-(r + μ))` over the submodules |
| 420 | `M` of finite index in the span `L = colLattice (Ô E) B` of its columns is at most `ζ(μ) ^ r`, where |
| 421 | `ζ(μ) = idealZeta (Ô E) μ` is the sum of `[Ô : I] ^ (-μ)` over the ideals `I` of finite index. -/ |
| 422 | lemma tsum_submoduleIndex_colLattice_inv_pow_le (B : Matrix κ (Fin r) (𝔸f E)) (μ : ℕ) : |
| 423 | ∑' M : {M : Submodule (Ô E) (κ → 𝔸f E) // M ≤ colLattice (Ô E) B ∧ |
| 424 | submoduleIndex M (colLattice (Ô E) B) ≠ 0}, |
| 425 | (submoduleIndex M.val (colLattice (Ô E) B) : ℝ≥0∞)⁻¹ ^ (r + μ) ≤ idealZeta (Ô E) μ ^ r := by |
| 426 | obtain ⟨f, hf⟩ := exists_range_eq_colLattice (R := Ô E) B |
| 427 | rw [← hf, show idealZeta (Ô E) μ = submoduleZeta (Ô E) (Ô E) μ from (submoduleZeta_def ..).symm] |
| 428 | exact (tsum_relIndex_range_le_submoduleZeta f (r + μ)).trans |
| 429 | (submoduleZeta_pi_le (fun _ ↦ |
| 430 | IsDedekindDomain.FiniteAdeleRing.isPrincipal_of_cardQuot_ne_zero (R := 𝓞 E) (K := E)) r μ) |
| 431 | |
| 432 | omit [DecidableEq κ] [IsCMField E] [HasPrimitiveRoot5040 E] in |
| 433 | /-- For a lattice `L` of rank `r`, the sum of `[L : M] ^ (-(r + μ))` over the sublattices `M` of |
| 434 | finite index is at most `ζ(μ) ^ r`, where `ζ(μ) = idealZeta (Ô E) μ` is the sum of |
| 435 | `[Ô : I] ^ (-μ)` over the ideals `I` of finite index in `Ô`. (Hey's formula would give the sum |
| 436 | exactly, as a product of zeta values; only this bound is used, and it is proved without the |
| 437 | formula.) -/ |
| 438 | theorem IsLatticeOfRank.tsum_submoduleIndex_inv_pow_le {L : Submodule (Ô E) (κ → 𝔸f E)} |
| 439 | (hL : IsLatticeOfRank r L) (μ : ℕ) : |
| 440 | ∑' M : {M : Submodule (Ô E) (κ → 𝔸f E) // M ≤ L ∧ submoduleIndex M L ≠ 0}, |
| 441 | (submoduleIndex M.val L : ℝ≥0∞)⁻¹ ^ (r + μ) ≤ idealZeta (Ô E) μ ^ r := by |
| 442 | obtain ⟨x, a, -, rfl⟩ := hL |
| 443 | exact tsum_submoduleIndex_colLattice_inv_pow_le _ μ |
| 444 | |
| 445 | end New.Filling |
| 446 | |
| 447 | end |