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 | public import Mathlib.LinearAlgebra.Lagrange |
| 4 | import Mathlib.Algebra.Order.Star.Rat |
| 5 | import Mathlib.Analysis.Matrix.Order |
| 6 | import Mathlib.LinearAlgebra.Matrix.Charpoly.Eigs |
| 7 | import Mathlib.RingTheory.Ideal.Quotient.HasFiniteQuotients.Norm |
| 8 | import TauCeti.NumberTheory.NumberField.RingOfIntegers.Norm |
| 9 | public import Lib.General.NumberTheory.ImaginaryQuadraticField |
| 10 | public import Lib.Shimura.Uniformisation.AdelicFrames |
| 11 | public import Lib.Weil.Unramified.HeckeGL |
| 12 | public import Lib.Adelic.Adeles.IdeleModulus |
| 13 | public import Lib.Cohomology.Etale.Basic |
| 14 | import Lib.Adelic.Adeles.StrongApproximation |
| 15 | |
| 16 | /-! |
| 17 | # Hecke elements in group rings, marked triples, local terms and neat levels |
| 18 | |
| 19 | Hecke operators for a group `G` with a subgroup `K` are realised inside the group ring `k[G]`, so |
| 20 | they act on every representation of `G` without convolution. With this, the file sets up the data |
| 21 | for counting fixed points of Hecke correspondences for a CM field `E` over K₀ = ℚ(√-d₀). A rigidity |
| 22 | result for frames then shows that the objects counted have no automorphisms at deep level: levels |
| 23 | inside a large place are neat. |
| 24 | |
| 25 | ## Main definitions and results |
| 26 | |
| 27 | * `New.Variety.fixedToEigen`: the elements that send `K`-fixed vectors to eigenvectors of a |
| 28 | subgroup, in every representation. |
| 29 | * `New.Variety.MarkedTriple`, `New.Variety.countTerm`: triples (coset, rational matrix, mark) and |
| 30 | the term that an orbit of triples contributes; `New.Variety.IsRegularHecke`: only separable |
| 31 | matrices contribute. |
| 32 | * `New.Variety.IsSafe`, `New.Variety.invHeckeIsogeny`, `New.Variety.heckeSum`: the safe split places |
| 33 | and the Hecke elements that appear in the congruence relation. |
| 34 | * `New.Variety.localTerm`: the local term of a fixed point, a polynomial whose coefficients are |
| 35 | built from the roots of the characteristic polynomial. |
| 36 | * `New.Variety.IsSignedFrameFor.similitude_and_root_norm`: an automorphism scales the form, and its |
| 37 | eigenvalues have equal moduli. |
| 38 | * `New.Variety.IsSignedFrameFor.eq_one_of_congr_large_norm`: if such an automorphism is congruent to |
| 39 | `1` modulo an ideal of large norm, it is `1`. |
| 40 | * `New.Variety.eventually_isNeat`: hence levels inside a large place are neat. |
| 41 | |
| 42 | Notions from other files: |
| 43 | * `New.levelSpace`: For a representation π of G, a subgroup K and a character χ of K, the submodule |
| 44 | of vectors v with π(k)v = χ(k)v for all k in K; for χ = 1, the K-fixed vectors. |
| 45 | * `New.ofSplitPlace`: For a split place w, the homomorphism sending g in GL_n(E_w) to the unitary |
| 46 | finite adelic matrix with component g at w and 1 off w, w̄. |
| 47 | * `New.Variety.GU`: The unitary similitudes: the frames of the scalar forms `c • 1`, `c > 0` |
| 48 | rational. `New.Variety.GUPlus`: those whose inverse has integral entries. |
| 49 | * `New.Gf`: The finite adelic unitary group G_f: matrices g in GL_n(𝔸_f) with gᴴg = 1; |
| 50 | `New.stdLevel` is its subgroup of integral points, `New.stdSpace E n` the definite space with form |
| 51 | `1`. |
| 52 | * `New.basicCosetRep U`: for a subspace U of k_wⁿ of dimension r (k_w the residue field at w), a |
| 53 | chosen g in GL_n(E_w) with g and ϖg⁻¹ integral, det g of valuation r, and U the kernel of the |
| 54 | reduction of g. |
| 55 | * `New.levelOf w H`: the elements of `New.stdLevel` whose reductions modulo the places `w i` lie in |
| 56 | `H`; `New.classAut Γ K g`: the stabiliser Γ ∩ gKg⁻¹ of the coset gK. |
| 57 | |
| 58 | ## Relation to the literature |
| 59 | |
| 60 | Known; see `Lib.Shimura.HeckeTower.Model`, `Lib.Shimura.IntegralModel.TowerExistence` and |
| 61 | `Lib.Shimura.Uniformisation.AppellHumbert` for sources. |
| 62 | -/ |
| 63 | |
| 64 | @[expose] public section |
| 65 | |
| 66 | noncomputable section |
| 67 | |
| 68 | /-! |
| 69 | ## The Hecke algebra inside the group ring, acting on fixed vectors |
| 70 | |
| 71 | * `New.Variety.cosetFn`: the map `k[G] → k[G / K]`, `[g] ↦ [gK]`. |
| 72 | -/ |
| 73 | |
| 74 | section GroupRingOperators |
| 75 | |
| 76 | open MonoidAlgebra Submodule QuotientGroup Representation |
| 77 | |
| 78 | namespace New.Variety |
| 79 | |
| 80 | variable {G : Type*} (k : Type*) [Group G] [CommRing k] (K : Subgroup G) |
| 81 | |
| 82 | /-- The submodule of the group ring k[G] spanned by the basis elements [g] for g in D. -/ |
| 83 | def spanOn (D : Set G) : Submodule k k[G] := span k (of k G '' D) |
| 84 | |
| 85 | variable {k} {a b : k[G]} {W : Type*} [AddCommGroup W] [Module k W] |
| 86 | |
| 87 | lemma asAlgebraHom_eq_sum_support (π : Representation k G W) : |
| 88 | π.asAlgebraHom a = ∑ g ∈ a.coeff.support, a.coeff g • π g := |
| 89 | rfl |
| 90 | |
| 91 | /-- The linear map `k[G] → k[G / K]` sending `∑ a_g [g]` to `∑ a_g [gK]`. It is written as the |
| 92 | action of the group ring element on the basis vector of the trivial coset. -/ |
| 93 | @[local simp] |
| 94 | def cosetFn (a : k[G]) : G ⧸ K →₀ k := |
| 95 | ((ofMulAction k G (G ⧸ K)).asAlgebraHom a (MonoidAlgebra.single ⟦1⟧ 1)).coeff |
| 96 | |
| 97 | /-- The submodule of elements `a` of k[G] with the following property: for every representation π of |
| 98 | G, `a` sends the K-fixed vectors to vectors on which the subgroup J of H acts through π∘ι by the |
| 99 | character χ. By default J = ι⁻¹(K) and χ is trivial. -/ |
| 100 | def fixedToEigen {H : Type*} [Group H] (ι : H →* G) (J : Subgroup H := K.comap ι) |
| 101 | (χ : J →* k := 1) : |
| 102 | Submodule k k[G] where |
| 103 | carrier := |
| 104 | {a : k[G] | |
| 105 | ∀ ⦃W : Type⦄ [AddCommGroup.{0} W] [Module k W] ⦃π : Representation k G W⦄ ⦃v : W⦄, |
| 106 | v ∈ levelSpace π K → |
| 107 | π.asAlgebraHom a v ∈ levelSpace (π.comp ι) J χ} |
| 108 | add_mem' ha hb := by |
| 109 | intro W _ _ π v hv |
| 110 | rw [map_add, LinearMap.add_apply] |
| 111 | exact add_mem (ha hv) (hb hv) |
| 112 | zero_mem' := by |
| 113 | intro W _ _ π v hv |
| 114 | rw [map_zero, LinearMap.zero_apply] |
| 115 | exact zero_mem _ |
| 116 | smul_mem' c a ha := by |
| 117 | intro W _ _ π v hv |
| 118 | rw [map_smul, LinearMap.smul_apply] |
| 119 | exact Submodule.smul_mem _ c (ha hv) |
| 120 | |
| 121 | variable {K} {D D' D'' : Set G} |
| 122 | |
| 123 | /-- For ψ from G/K to a k-module W, the linear map sending a = ∑ a_g [g] in k[G] to ∑ a_g ψ(gK). -/ |
| 124 | def Model.cosetSum (ψ : G ⧸ K → W) (a : k[G]) : W := (cosetFn K a).linearCombination k ψ |
| 125 | |
| 126 | /-- The basis vector of the trivial coset in k[G / K] is fixed by K. -/ |
| 127 | lemma single_one_mem_levelSpace : |
| 128 | MonoidAlgebra.single (QuotientGroup.mk 1 : G ⧸ K) (1 : k) ∈ |
| 129 | levelSpace (ofMulAction k G (G ⧸ K)) K := by |
| 130 | intro κ |
| 131 | -- `κ • (1 K) = κ K = 1 K` as `κ ∈ K` |
| 132 | simp [← mk_mul_of_mem 1 κ.property] |
| 133 | |
| 134 | /-- If `a` is supported on `D`, its image in `k[G / K]` is supported on the cosets of elements of |
| 135 | `D`. -/ |
| 136 | lemma spanOn.exists_mem_of_cosetFn_ne_zero (ha : a ∈ spanOn k D) {q : G ⧸ K} : |
| 137 | cosetFn K a q ≠ 0 → ∃ d ∈ D, (d : G ⧸ K) = q := by |
| 138 | -- The elements whose function vanishes at `q` form a submodule, which contains `of k G d` |
| 139 | -- whenever the coset of `d` is not `q`. |
| 140 | contrapose! |
| 141 | intro hq |
| 142 | induction ha using span_induction with |
| 143 | | mem x hx => |
| 144 | obtain ⟨d, hd, rfl⟩ := hx |
| 145 | simp [hq d hd] |
| 146 | | zero => simp |
| 147 | | add x y hx_mem hy_mem hx hy => simp_all |
| 148 | | smul r x hx_mem hx => simp_all |
| 149 | |
| 150 | /-- If `a` is supported on `D`, `b` on `D'`, and `D * D' ⊆ D''`, then `a * b` is supported on |
| 151 | `D''`. -/ |
| 152 | lemma spanOn.mul (ha : a ∈ spanOn k D) (hb : b ∈ spanOn k D') |
| 153 | (h_mul : ∀ g ∈ D, ∀ g' ∈ D', g * g' ∈ D'') : |
| 154 | a * b ∈ spanOn k D'' := by |
| 155 | have h_prod : a * b ∈ spanOn k D * spanOn k D' := mul_mem_mul ha hb |
| 156 | rw [spanOn, spanOn, span_mul_span] at h_prod |
| 157 | -- `[g] [g'] = [g g']`, and `g g' ∈ D''` |
| 158 | refine span_mono (Set.mul_subset_iff.mpr ?_) h_prod |
| 159 | rintro _ ⟨g, hg, rfl⟩ _ ⟨g', hg', rfl⟩ |
| 160 | exact ⟨g * g', h_mul g hg g' hg', map_mul (of k G) g g'⟩ |
| 161 | |
| 162 | end New.Variety |
| 163 | |
| 164 | end GroupRingOperators |
| 165 | |
| 166 | /-! |
| 167 | ## Marked triples, safe places and Hecke elements in the fixed point count |
| 168 | |
| 169 | `Φ v` is the embedding chosen by the CM type at the infinite place `v`, and `v₀` is the one place at |
| 170 | which the hermitian forms may be indefinite. `New.Variety.IsSignedFrame x J` says that the adelic |
| 171 | matrix `x` is a frame for a rational form β that is positive definite off `v₀`, with β J positive |
| 172 | definite at `v₀`. `New.Variety.toFinGL` embeds rational matrices in adelic ones. |
| 173 | -/ |
| 174 | |
| 175 | section HeckeData |
| 176 | |
| 177 | open NumberField Cardinal Polynomial Module Matrix.GeneralLinearGroup Prod MulAction |
| 178 | |
| 179 | variable (E : Type) [Field.{0} E] [NumberField E] [IsCMField E] |
| 180 | {n : Type} [Fintype.{0} n] [DecidableEq n] {d d₀ : ℕ} [Fact (d % 4 = 3)] |
| 181 | |
| 182 | /-- The prime u of ℚ(√−d) contains an element x = (1 + √−d)/2 − b, b ∈ ℤ, that is coprime to its |
| 183 | conjugate x̄; here `QuadField.betaK d` is (1 + √−d)/2. -/ |
| 184 | def New.GaloisRep.IsSplitPrimeToDisc (u : FinPlace (QuadField d)) : Prop := |
| 185 | ∃ b : ℤ, |
| 186 | let x : 𝓞 (QuadField d) := QuadField.betaK d - b |
| 187 | x ∈ u.asIdeal ∧ IsCoprime x (star x) |
| 188 | |
| 189 | /-- Let the place w of ℚ(√−d) satisfy `New.GaloisRep.IsSplitPrimeToDisc`. Then w̄ ≠ w, the order |
| 190 | `w.q` of the residue field of w is prime, and the places of ℚ(√−d) that contain `w.q` are exactly |
| 191 | w and w̄. -/ |
| 192 | lemma New.GaloisRep.IsSplitPrimeToDisc.isSplit_and_prime_q {w : FinPlace (QuadField d)} |
| 193 | (h_split : IsSplitPrimeToDisc w) : |
| 194 | w.IsSplit ∧ |
| 195 | w.q.Prime ∧ |
| 196 | ∀ u : FinPlace (QuadField d), u = w ∨ u = star w ↔ ↑w.q ∈ u.asIdeal := by |
| 197 | obtain ⟨b, hx, hx_coprime⟩ := h_split |
| 198 | -- `w` lies over a prime number `p` |
| 199 | obtain ⟨p, _, -, hp_mem, hp, -⟩ := w.asIdeal.exists_prime_and_absNorm_eq_pow |
| 200 | -- The places over `p` are `w` and `J` (possibly equal), and `star w` is one of them. Either |
| 201 | -- `w = J` with `w.q = p ^ 2`, or `w.q = J.q = p` and `(p) = w J`. |
| 202 | obtain ⟨J, h_over, h_cases⟩ := QuadField.prime_inert_or_eq_mul (hp := ⟨hp⟩) w hp_mem |
| 203 | -- `w` contains `QuadField.betaK d - b` but not its conjugate, which is coprime to it. |
| 204 | have h_ne : star w ≠ w := by |
| 205 | intro h_eq |
| 206 | have h_mem_star : QuadField.betaK d - (b : 𝓞 (QuadField d)) ∈ (star w).asIdeal := by |
| 207 | rwa [h_eq] |
| 208 | have h_star_mem : star (QuadField.betaK d - (b : 𝓞 (QuadField d))) ∈ w.asIdeal := |
| 209 | mem_star_place.mp h_mem_star |
| 210 | exact w.isPrime.notMem_of_isCoprime_of_mem hx_coprime hx h_star_mem |
| 211 | have hp_star : (p : 𝓞 (QuadField d)) ∈ (star w).asIdeal := by simpa using hp_mem |
| 212 | obtain rfl : star w = J := ((h_over (star w)).mp hp_star).resolve_left h_ne |
| 213 | -- The inert case `w = J` is excluded, so `w.q = p`. |
| 214 | obtain rfl : w.q = p := by |
| 215 | rcases h_cases with ⟨h_inert, -⟩ | ⟨h_norm, -⟩ |
| 216 | · exact absurd h_inert.symm h_ne |
| 217 | · exact h_norm |
| 218 | exact ⟨h_ne, hp, fun u ↦ (h_over u).symm⟩ |
| 219 | |
| 220 | /-- The number d is 3 mod 4, and the field E is an algebra over the imaginary quadratic field |
| 221 | ℚ(i√d). -/ |
| 222 | class New.HasQuadSubfield (d : outParam ℕ) (E : semiOutParam Type) |
| 223 | [semiOutParam (Field E)] extends Fact (d % 4 = 3), Algebra (QuadField d) E |
| 224 | |
| 225 | namespace New.Variety |
| 226 | |
| 227 | /-- The finite places w of E with w̄ ≠ w, that is, those split over the maximal real subfield. -/ |
| 228 | abbrev SplitFinPlace : Type := {w : FinPlace E // w.IsSplit} |
| 229 | |
| 230 | variable {E : Type} [Field.{0} E] [CMBase E] {n : Type} [Fintype.{0} n] [DecidableEq n] |
| 231 | [HasQuadSubfield d₀ E] (t : E →+* ℂ) {ν : ℕ} (α : Fin ν → 𝓞 E) (P : E[X]) (μ : ℂ) (k : Type*) |
| 232 | [CommRing k] (𝔑 : 𝓞 E) |
| 233 | |
| 234 | omit [DecidableEq n] in |
| 235 | /-- A finite type embeds in ℂ. -/ |
| 236 | lemma nonempty_embedding_complex : Nonempty (n ↪ ℂ) := |
| 237 | (Cardinal.le_def n ℂ).mp (mk_le_aleph0.trans (aleph0_le_mk ℂ)) |
| 238 | |
| 239 | /-- A chosen injection `n ↪ ℂ` that lists the roots of `t(P)` when these, counted with |
| 240 | multiplicity, are `|n|` distinct numbers (`roots_map_eq_map_numberedRoots`). Otherwise it is an |
| 241 | arbitrary injection. -/ |
| 242 | def numberedRoots (t : E →+* ℂ) (P : E[X]) : n ↪ ℂ := |
| 243 | have : Nonempty (n ↪ ℂ) := nonempty_embedding_complex |
| 244 | Classical.epsilon fun r : n ↪ ℂ ↦ (P.map t).roots = Finset.univ.val.map r |
| 245 | |
| 246 | omit [CMBase E] [DecidableEq n] in |
| 247 | /-- If some injection `n ↪ ℂ` lists the roots of `t(P)`, then `numberedRoots t P` does. -/ |
| 248 | lemma roots_map_eq_map_numberedRoots {t : E →+* ℂ} {P : E[X]} |
| 249 | (h_exists : ∃ r : n ↪ ℂ, (P.map t).roots = Finset.univ.val.map r) : |
| 250 | (P.map t).roots = Finset.univ.val.map (numberedRoots t P : n ↪ ℂ) := |
| 251 | Classical.epsilon_spec h_exists |
| 252 | |
| 253 | section |
| 254 | |
| 255 | open Equiv Matrix Polynomial Finset Lagrange IsAlgClosed Function |
| 256 | |
| 257 | variable {E n : Type} [Field E] [Fintype n] [DecidableEq n] {y : GL n E} |
| 258 | |
| 259 | /-- For y in GL_n(E) with separable characteristic polynomial P and an embedding t of E into ℂ, |
| 260 | the numbering `New.Variety.numberedRoots` lists the complex roots of t(P), each once. -/ |
| 261 | lemma roots_eq_map_numberedRoots (h_sep : y.val.charpoly.Separable) (t : E →+* ℂ) : |
| 262 | (y.val.charpoly.map t).roots = (univ : Finset n).val.map (numberedRoots t y.val.charpoly) := by |
| 263 | -- A separable polynomial of degree `card n` has `card n` distinct complex roots, so they can be |
| 264 | -- numbered by `n`, and `roots_map_eq_map_numberedRoots` applies. |
| 265 | obtain ⟨r, hr⟩ : ∃ r : n ↪ ℂ, |
| 266 | univ.map r = ⟨(y.val.charpoly.map t).roots, nodup_roots h_sep.map⟩ := |
| 267 | Embedding.exists_of_card_eq_finset (by simp [card_roots_eq_natDegree]) |
| 268 | exact roots_map_eq_map_numberedRoots ⟨r, (congrArg Finset.val hr).symm⟩ |
| 269 | |
| 270 | /-- If the characteristic polynomial of y is separable, then each numbered root of its image under t |
| 271 | is a root of the characteristic polynomial of the image of y under t. -/ |
| 272 | lemma isRoot_numberedRoots (h_sep : y.val.charpoly.Separable) (t : E →+* ℂ) (i : n) : |
| 273 | (y.map t).val.charpoly.IsRoot (numberedRoots t y.val.charpoly i) := |
| 274 | isRoot_of_mem_roots (by simp [roots_eq_map_numberedRoots h_sep, charpoly_map]) |
| 275 | |
| 276 | lemma eval_interpolate_univ_node (r : n ↪ ℂ) (f : n → ℂ) (i : n) : |
| 277 | (interpolate univ r f).eval (r i) = f i := |
| 278 | eval_interpolate_at_node _ r.injective.injOn (mem_univ i) |
| 279 | |
| 280 | end |
| 281 | |
| 282 | open scoped Classical in |
| 283 | /-- The matrix that describes the signature at `v₀`, written as a polynomial in `Φ v₀ (y)`. The |
| 284 | proposition `ε` chooses the case. In the marked case (`ε` holds) it is `markedReflection y i`. In |
| 285 | the definite case (`ε` fails) it is the identity. -/ |
| 286 | def eigenReflection (ε : Prop) (y : GL n E) (i : n) : Matrix n n ℂ := |
| 287 | aeval (y.val.map (Φ v₀)) |
| 288 | (if ε then |
| 289 | Lagrange.interpolate Finset.univ (numberedRoots (Φ v₀) y.val.charpoly) |
| 290 | fun j : n ↦ if j = i then 1 else -1 |
| 291 | else 1) |
| 292 | |
| 293 | /-- The marked case of `eigenReflection`: the matrix `Q(Φ v₀ (y))`, where `Q` is the Lagrange |
| 294 | polynomial with value `1` at the `i`-th listed root of the characteristic polynomial of `y` and |
| 295 | `-1` at the others (`markedReflection_eq_aeval`). If the roots are distinct, it is `1` on the |
| 296 | `i`-th eigenline and `-1` on the other eigenlines. -/ |
| 297 | abbrev markedReflection (y : GL n E) (i : n) : Matrix n n ℂ := |
| 298 | eigenReflection True y i |
| 299 | |
| 300 | lemma markedReflection_eq_aeval (y : GL n E) (i : n) : |
| 301 | markedReflection y i = aeval (y.val.map (Φ v₀)) |
| 302 | (Lagrange.interpolate Finset.univ (numberedRoots (Φ v₀) y.val.charpoly) |
| 303 | fun j : n ↦ if j = i then 1 else -1) := by |
| 304 | simp [markedReflection, eigenReflection] |
| 305 | |
| 306 | section |
| 307 | |
| 308 | variable {E : Type} [Field.{0} E] [NumberField E] (K : Subgroup (GL n (𝔸f E))) (y : GL n E) |
| 309 | |
| 310 | /-- Triples (xK, y, z): a coset of `K` in GL_n of the finite adeles, an element `y` of GL_n(E), and |
| 311 | a mark `z : Z`. In `New.Variety.countTerm` the type of marks is `Z = n`, the index of an eigenvalue |
| 312 | of `y`; the default is `Z = ℂ`. GL_n(E) acts by left multiplication on the coset, by |
| 313 | conjugation on `y`, and trivially on the mark. -/ |
| 314 | def MarkedTriple (Z : Type := ℂ) : Type := (GL n (𝔸f E) ⧸ K) × GL n E × Z |
| 315 | |
| 316 | instance {Z : Type} : MulAction (GL n E) (MarkedTriple K Z) := |
| 317 | @mulAction _ _ _ _ (.compHom _ toFinGL) |
| 318 | (@mulAction _ _ _ _ (.compHom _ MulAut.conj) (.ofEndHom 1)) |
| 319 | |
| 320 | /-- For y in GL_n(E) and x in GL_n of the finite adeles of E, the element x⁻¹y⁻¹x of that adelic |
| 321 | group, with y embedded diagonally. -/ |
| 322 | abbrev invAutInFrame (x : GL n (𝔸f E)) : GL n (𝔸f E) := x⁻¹ * toFinGL y⁻¹ * x |
| 323 | |
| 324 | end |
| 325 | |
| 326 | /-! ### Split places and the Hecke elements of the congruence relation -/ |
| 327 | |
| 328 | section |
| 329 | |
| 330 | variable {E : Type} [Field.{0} E] [NumberField E] [IsCMField E] (v : SplitFinPlace E) |
| 331 | |
| 332 | /-- For a split place v, the homomorphism sending g in GL_n(E_v) to the adelic matrix that is |
| 333 | g⁻ᵀ at v, the conjugate of g at v̄, and 1 elsewhere. -/ |
| 334 | def conjAtSplit : GL n (LocField (v : FinPlace E)) →* GL n (𝔸f E) := |
| 335 | (invTransposeGL (n := n)).toMonoidHom.comp |
| 336 | (MonoidHom.comp (N := Gf E n) (U 1).subtype (ofSplitPlace v.property)) |
| 337 | |
| 338 | /-- For a split place v, the homomorphism sending an adelic matrix to the inverse transpose of |
| 339 | its component at v, in GL_n(E_v); a left inverse of `New.Variety.conjAtSplit` at v. -/ |
| 340 | def dualComponent : GL n (𝔸f E) →* GL n (LocField (v : FinPlace E)) := |
| 341 | (invTransposeGL (n := n)).symm.toMonoidHom.comp (Matrix.GeneralLinearGroup.map (evalAt v.val)) |
| 342 | |
| 343 | end |
| 344 | |
| 345 | /-- Cuspidality of χ: for every idempotent matrix ε ≠ 0, 1, χ is non-trivial on the elements of |
| 346 | J lying in the unipotent group 1 + εM_n(1 − ε). -/ |
| 347 | def IsCuspidalType {F : Type*} [Field F] (J : Subgroup (GL n F)) (χ : J →* ℂ) : Prop := |
| 348 | ∀ ε : Matrix n n F, IsIdempotentElem ε → ε ≠ 0 → ε ≠ 1 → |
| 349 | ∃ (j : J) (Y : Matrix n n F), 1 + ε * Y * (1 - ε) = ((j : GL n F) : Matrix n n F) ∧ χ j ≠ 1 |
| 350 | |
| 351 | section |
| 352 | |
| 353 | variable {E : Type} [Field.{0} E] [NumberField E] [IsCMField E] [HasQuadSubfield d₀ E] |
| 354 | (v : SplitFinPlace E) |
| 355 | |
| 356 | /-- The norm from E to K₀ of the finite idele that is the chosen uniformiser at v and 1 |
| 357 | elsewhere. -/ |
| 358 | abbrev uniformizerNorm : (𝔸f (QuadField d₀))ˣ := |
| 359 | (locIdele v.val (uniformizer v.val)).map (adeleNorm (QuadField d₀) E) |
| 360 | |
| 361 | /-- The homomorphism sending a finite idele x of K₀ to the scalar matrix x̄·1 in GL_n of the |
| 362 | finite adeles of E. -/ |
| 363 | abbrev centralScalar : (𝔸f (QuadField d₀))ˣ →* GL n (𝔸f E) := |
| 364 | (scalar n).comp |
| 365 | (Units.map ((starRingEnd (𝔸f E)).comp (finAdeleIncl (QuadField d₀) E)).toMonoidHom) |
| 366 | |
| 367 | end |
| 368 | |
| 369 | /-- Safe places w of E: the place u of ℚ(√−d₀) below w satisfies `New.GaloisRep.IsSplitPrimeToDisc`, |
| 370 | and 𝔑 lies neither in w nor in any place above ū. -/ |
| 371 | def IsSafe (w : FinPlace E) : Prop := |
| 372 | GaloisRep.IsSplitPrimeToDisc (w.below (QuadField d₀)) ∧ |
| 373 | 𝔑 ∉ w.asIdeal ∧ |
| 374 | ∀ v : FinPlace E, v.below (QuadField d₀) = star (w.below (QuadField d₀)) → 𝔑 ∉ v.asIdeal |
| 375 | |
| 376 | /-- The split places of E that are safe for K₀ and the level 𝔑, in the sense of |
| 377 | `New.Variety.IsSafe`. -/ |
| 378 | abbrev SafePlace {E : Type} [Field.{0} E] [NumberField E] [IsCMField E] [HasQuadSubfield d₀ E] |
| 379 | (𝔑 : 𝓞 E) : Type := {w : SplitFinPlace E // IsSafe 𝔑 w} |
| 380 | |
| 381 | section |
| 382 | |
| 383 | omit [CMBase E] |
| 384 | |
| 385 | end |
| 386 | |
| 387 | /-- For a subspace U of k_vⁿ (k_v the residue field) of dimension r, the scalar matrix of the |
| 388 | conjugate of the (-r)-th power of `New.Variety.uniformizerNorm` at v, times |
| 389 | `New.Variety.conjAtSplit` of the transpose of `New.basicCosetRep` U. -/ |
| 390 | def invHeckeIsogeny {E : Type} [Field.{0} E] [NumberField E] [IsCMField E] [HasQuadSubfield d₀ E] |
| 391 | (v : SplitFinPlace E) |
| 392 | (U : Submodule (ResField (v : FinPlace E)) (n → ResField (v : FinPlace E))) : |
| 393 | GL n (𝔸f E) := |
| 394 | centralScalar (n := n) (uniformizerNorm v ^ finrank (ResField v.val) ↥U)⁻¹ * |
| 395 | conjAtSplit v (transposeGL (basicCosetRep U)) |
| 396 | |
| 397 | variable (n) |
| 398 | |
| 399 | section |
| 400 | |
| 401 | variable {E : Type} [Field.{0} E] [NumberField E] [IsCMField E] (n : Type) [Fintype.{0} n] |
| 402 | [DecidableEq n] [HasQuadSubfield d₀ E] (k : Type*) [CommRing k] (v : SplitFinPlace E) (𝔑 : 𝓞 E) |
| 403 | |
| 404 | /-- The principal level: the similitudes in `GL_n(Ô E)` that are congruent to `1` modulo `𝔑`. -/ |
| 405 | def levelGU : Subgroup (GL n (𝔸f E)) := |
| 406 | GU E n ⊓ congruenceGL (Ô E ∙ algebraMap (𝓞 E) (𝔸f E) 𝔑) id |
| 407 | |
| 408 | /-- The element τ_{v,j} of the group ring over k: the sum of the elements |
| 409 | `New.Variety.invHeckeIsogeny` over all j-dimensional subspaces U of k_vⁿ. -/ |
| 410 | def heckeSum (j : ℕ) : MonoidAlgebra k (GL n (𝔸f E)) := |
| 411 | ∑ U ∈ {U : Submodule (ResField v.val) (n → ResField v.val) | finrank (ResField v.val) U = j}, |
| 412 | MonoidAlgebra.of k (GL n (𝔸f E)) (invHeckeIsogeny v U) |
| 413 | |
| 414 | /-- The Hecke algebra of level K = `New.Variety.levelGU` for 𝔑. It is the subalgebra of elements |
| 415 | ∑ a_g [g] of k[GL_n(𝔸_f)] that are supported on `GUPlus E n` and whose function ∑ a_g 1_{gK} is |
| 416 | left K-invariant. -/ |
| 417 | def heckeAlgebra : Subalgebra k (MonoidAlgebra k (GL n (𝔸f E))) := |
| 418 | (spanOn k (GUPlus E n) ⊓ |
| 419 | fixedToEigen (levelGU n 𝔑) (MonoidHom.id (GL n (𝔸f E))) (levelGU n 𝔑)).toSubalgebra |
| 420 | ⟨Submodule.subset_span ⟨1, by simp, rfl⟩, fun _ _ _ π v hv ↦ by |
| 421 | rw [map_one, one_apply_eq_self] |
| 422 | exact hv⟩ fun a b ha hb ↦ |
| 423 | -- `GUPlus E n` is closed under products, and `a * b` acts as `b` followed by `a` |
| 424 | ⟨spanOn.mul ha.1 hb.1 fun _ hg _ ↦ mul_mem hg, fun _ _ _ π v hv ↦ by |
| 425 | rw [map_mul, mul_apply_eq_comp] |
| 426 | exact ha.2 (hb.2 hv)⟩ |
| 427 | |
| 428 | end |
| 429 | |
| 430 | variable {n 𝔑} |
| 431 | |
| 432 | /-- The principal level consists of similitudes. -/ |
| 433 | lemma levelGU_le_GU {𝔑 : 𝓞 E} : levelGU n 𝔑 ≤ GU E n := |
| 434 | inf_le_left |
| 435 | |
| 436 | /-- For an element f = ∑ a_g [g] of the Hecke algebra of level 𝔑, the function ∑ a_g 1_{gK} on |
| 437 | cosets of the principal level subgroup K. -/ |
| 438 | abbrev heckeCosetFn {E : Type} [Field.{0} E] [NumberField E] [IsCMField E] {𝔑 : 𝓞 E} |
| 439 | (f : heckeAlgebra n ℂ 𝔑) : GL n (𝔸f E) ⧸ levelGU n 𝔑 →₀ ℂ := cosetFn (levelGU n 𝔑) f.val |
| 440 | |
| 441 | open scoped Classical in |
| 442 | /-- The term of a `GL n E`-orbit of triples, read at a chosen representative `(q, y, μ)` of the |
| 443 | orbit and a chosen representative `x` of the coset `q`. It is `f(x⁻¹ y⁻¹ x K) * ω(charpoly y, μ)` |
| 444 | if `x` is a signed frame for `eigenReflection ε y μ`, and `0` otherwise. So `ε = True` gives |
| 445 | the marked count and `ε = False` the definite count. The value does not depend on the two choices; |
| 446 | see `New.Variety.countTerm_mk` in `Lib.Shimura.Transfer.MarkedPairs`. -/ |
| 447 | def countTerm (ε : Prop) {𝔑 : 𝓞 E} (f : heckeAlgebra n ℂ 𝔑) (ω : E[X] → n → ℂ) |
| 448 | (c : orbitRel.Quotient (GL n E) (MarkedTriple (levelGU n 𝔑) n)) : ℂ := |
| 449 | let (q, y, μ) := c.out |
| 450 | if IsSignedFrame q.out (eigenReflection ε y μ) then |
| 451 | heckeCosetFn f (invAutInFrame y q.out) * ω y.val.charpoly μ |
| 452 | else 0 |
| 453 | |
| 454 | /-- Regularity of f: whenever f(x⁻¹y⁻¹x) ≠ 0 with y in GL_n(E) and x adelic, the characteristic |
| 455 | polynomial of y is separable. -/ |
| 456 | def IsRegularHecke {E : Type} [Field.{0} E] [NumberField E] [IsCMField E] {𝔑 : 𝓞 E} |
| 457 | (f : heckeAlgebra n ℂ 𝔑) : Prop := |
| 458 | ∀ ⦃y : GL n E⦄ ⦃x : GL n (𝔸f E)⦄, |
| 459 | heckeCosetFn f (invAutInFrame y x) ≠ 0 → y.val.charpoly.Separable |
| 460 | |
| 461 | open scoped Classical in |
| 462 | /-- For μ : ℂ, the eigenline of the root r at the embedding t : E →+* ℂ lies in the Lie algebra: if |
| 463 | t = Φ v₀, then r = μ; if t is the other embedding above v₀, then r ≠ μ̄; if t lies above a place |
| 464 | v ≠ v₀, then t = Φ v. -/ |
| 465 | def IsLieRoot (r : ℂ) : Prop := |
| 466 | if InfinitePlace.mk t = v₀ then |
| 467 | if t = Φ v₀ then r = μ else r ≠ star μ |
| 468 | else |
| 469 | t = Φ (InfinitePlace.mk t) |
| 470 | |
| 471 | /-! ### The local term -/ |
| 472 | |
| 473 | open scoped Classical in |
| 474 | /-- For an embedding `σ : E →+* ℂ`, the roots `r` of σ(P), as polynomials: `r X` if the eigenline of |
| 475 | `r` lies in the Lie algebra, the constant `r` otherwise. It is `r X` exactly in these cases: |
| 476 | * σ = Φ v₀: only `r = μ`; |
| 477 | * σ the other embedding above `v₀`: all `r` other than the conjugate of `μ`; |
| 478 | * σ above a place `v ≠ v₀`: all `r` if σ = Φ v, none otherwise. -/ |
| 479 | def lieRoots (σ : E →+* ℂ) : Multiset ℂ[X] := |
| 480 | (P.map σ).roots.map fun r : ℂ ↦ (if IsLieRoot σ μ r then X else 1) * C r |
| 481 | |
| 482 | /-- For P : E[X] and α : Fin ν → 𝓞 E, with μ the `j`-th listed root of the image of P under Φ v₀: |
| 483 | the polynomial L(μX), with L the Lagrange basis polynomial that is 1 at μ and 0 at the other listed |
| 484 | roots, times ∏ (1 − σ(α i) η), over all i, all embeddings σ and all η in `New.Variety.lieRoots` at |
| 485 | σ. -/ |
| 486 | def localTerm (j : n) : ℂ[X] := |
| 487 | let r : n ↪ ℂ := numberedRoots (Φ v₀) P |
| 488 | (Lagrange.basis Finset.univ r j).comp (X * C (r j)) * |
| 489 | ∏ i : Fin ν, ∏ σ : E →+* ℂ, ((lieRoots P (r j) σ).map fun x : ℂ[X] ↦ 1 - C (σ (α i)) * x).prod |
| 490 | |
| 491 | end New.Variety |
| 492 | |
| 493 | end HeckeData |
| 494 | |
| 495 | /-! |
| 496 | ## Rigidity of frames, neat levels and free action |
| 497 | |
| 498 | Rigidity of frames, used to show that the objects counted have no automorphisms at deep level. A |
| 499 | matrix `x` over the finite adeles of the CM field `E` is a frame for the form `β` |
| 500 | (`New.Variety.IsFrameFor`) if `xᴴ β x` is the scalar matrix of a unit of `Ô ℚ`. |
| 501 | `New.Variety.IsSignedFrameFor x ℓ β` adds that `β` is positive definite at the infinite places other |
| 502 | than the base place `v₀`, and `β * ℓ` is so at `v₀`. `New.Variety.ratConj y ℓ` is `ℓ` conjugated by |
| 503 | the image of `y` under `Φ v₀`. |
| 504 | -/ |
| 505 | |
| 506 | section NeatLevel |
| 507 | |
| 508 | open NumberField Fintype Matrix Multiset Ideal ComplexOrder AddMonoidHom Rat RingHom Module Algebra |
| 509 | |
| 510 | namespace New.Variety |
| 511 | |
| 512 | section |
| 513 | |
| 514 | variable {E : Type} [Field.{0} E] [NumberField E] [IsCMField E] |
| 515 | {n : Type} [Fintype.{0} n] [DecidableEq n] {x : GL n (𝔸f E)} {β : Matrix n n E} {𝔑 : 𝓞 E} |
| 516 | |
| 517 | /-- A CM field that contains a primitive `5040`-th root of unity has degree at least `3` over `ℚ`, |
| 518 | hence at least two infinite places. -/ |
| 519 | instance [h : HasPrimitiveRoot5040 E] : Nontrivial (InfinitePlace E) := by |
| 520 | -- A primitive root of unity of order `5040` makes the degree of `E` at least `3`, and the |
| 521 | -- degree is twice the number of infinite places. |
| 522 | obtain ⟨ζ, hζ⟩ := h.exists_primitive_root |
| 523 | have h_deg : 3 ≤ Module.finrank ℚ E := |
| 524 | (show 3 ≤ Nat.totient 5040 * Nat.totient 1 by decide +kernel).trans |
| 525 | (totient_mul_totient_le_finrank _ 1 rfl .one hζ) |
| 526 | have h_finrank : Module.finrank ℚ E = 2 * Fintype.card (InfinitePlace E) := |
| 527 | finrank_eq_two_mul_card_infinitePlace E |
| 528 | exact one_lt_card_iff_nontrivial.1 (by omega) |
| 529 | |
| 530 | /-- If `xᴴ x` is the scalar matrix of a finite idele `a` of `ℚ`, then the idele norm |
| 531 | `finIdeleAbs a` is a rational number `c`, and `x` is a frame for the positive scalar form `c • 1`. |
| 532 | -/ |
| 533 | lemma exists_isScalarFrame_of_gram_eq (a : (𝔸f ℚ)ˣ) |
| 534 | (h_gram : xᴴ * x.val = finAdeleIncl ℚ E a • 1) : |
| 535 | ∃ c : ℚ, (c : ℝ) = finIdeleAbs a ∧ IsScalarFrame x c := by |
| 536 | -- As `ℚ` has class number one, `a = s * u` with `s ∈ ℚˣ` and `u` a unit at every place. |
| 537 | obtain ⟨_, ⟨s, rfl⟩, u, hu, rfl⟩ := Subgroup.mem_sup.1 |
| 538 | (by simpa [classNumber_eq] using pow_classNumber_mem_principal_sup a) |
| 539 | let ν : (Ô ℚ)ˣ := (Ô ℚ).unitsEquivUnitsType ⟨u, idelesUnitOff_empty.le hu⟩ |
| 540 | refine ⟨|(s : ℚ)|⁻¹, ?_, inv_pos.2 (abs_pos.2 s.ne_zero), ?_⟩ |
| 541 | · rw [map_mul, finIdeleAbs_principalIdele] |
| 542 | simp [finIdeleAbs, ideleAbs_eq_prod_of_v_eq_one, mem_idelesUnitOff.1 hu, Algebra.norm_self] |
| 543 | -- With `c = |s|⁻¹`, `xᴴ (c • 1) x = c • s • u`, which is `u` or `-u` by the sign of `s`. |
| 544 | · rcases abs_choice (s : ℚ) with hs | hs |
| 545 | · exact ⟨ν, by simp [h_gram, hs, ν, principalIdele, mul_smul, map_smul']⟩ |
| 546 | · exact ⟨-ν, by simp [h_gram, hs, ν, principalIdele, Matrix.map_neg, mul_smul, map_smul']⟩ |
| 547 | |
| 548 | /-- A matrix `x` with `xᴴ x` the scalar matrix of a finite idele of `ℚ` is a similitude. -/ |
| 549 | lemma mem_GU_of_gram_eq (a : (𝔸f ℚ)ˣ) (h_gram : xᴴ * x.val = finAdeleIncl ℚ E a • 1) : |
| 550 | x ∈ GU E n := |
| 551 | let ⟨c, _, h_frame⟩ := exists_isScalarFrame_of_gram_eq a h_gram |
| 552 | ⟨c, h_frame⟩ |
| 553 | |
| 554 | /-- If `xᴴ x` is the scalar matrix of a finite idele `a` of `ℚ` and the rational `c` is the idele |
| 555 | norm `finIdeleAbs a`, then `x` is a frame for the positive scalar form `c • 1`. -/ |
| 556 | lemma isScalarFrame_of_gram_eq (a : (𝔸f ℚ)ˣ) (h_gram : xᴴ * x.val = finAdeleIncl ℚ E a • 1) |
| 557 | {c : ℚ} (hc : (c : ℝ) = finIdeleAbs a) : |
| 558 | IsScalarFrame x c := by |
| 559 | obtain ⟨c', hc', h_frame⟩ := exists_isScalarFrame_of_gram_eq a h_gram |
| 560 | rwa [show c = c' by exact_mod_cast hc.trans hc'.symm] |
| 561 | |
| 562 | /-! ### Frames and their multipliers -/ |
| 563 | |
| 564 | /-- An element of the principal level is a similitude whose inverse has integral entries. -/ |
| 565 | lemma mem_GUPlus_of_mem_levelGU (hx : x ∈ levelGU n 𝔑) : x ∈ GUPlus E n := by |
| 566 | obtain ⟨h_sim, h_int, -⟩ := Subgroup.mem_inf.1 hx |
| 567 | exact ⟨h_sim, h_int.isIntMatrix_inv⟩ |
| 568 | |
| 569 | /-- If `x` is a frame for the form `β`, the image of `β` under every complex embedding is |
| 570 | hermitian. -/ |
| 571 | lemma IsFrameFor.isHermitian_map {f : E →+* ℂ} : IsFrameFor β x → (β.map f).IsHermitian := by |
| 572 | rintro ⟨ε, hx⟩ |
| 573 | -- Over the adeles `β = ε • x⁻¹ᴴ * x⁻¹`, and conjugation fixes the rational adele `ε`. |
| 574 | have hε_star : star (finAdeleIncl ℚ E ε) = finAdeleIncl ℚ E ε := by |
| 575 | simp [star_eq_adeleMap, Subsingleton.elim ((starRingEnd E).comp _) (algebraMap ℚ E)] |
| 576 | refine IsHermitian.map ?_ _ (map_star_complex f) |
| 577 | apply Matrix.map_injective (algebraMap E (𝔸f E)).injective |
| 578 | simp [conjTranspose_map _ fun a ↦ (star_algebraMap_finAdele a).symm, ← gram_inv_of_gram_eq hx, |
| 579 | hε_star] |
| 580 | |
| 581 | end |
| 582 | |
| 583 | variable {E : Type} [Field.{0} E] [Ψ : CMBase E] {n : Type} [Fintype.{0} n] [DecidableEq n] |
| 584 | {x : GL n (𝔸f E)} {ℓ : Matrix n n ℂ} {y : GL n E} {β : Matrix n n E} {x' : GL n (𝔸f E)} |
| 585 | {ℓ' : Matrix n n ℂ} {β' : Matrix n n E} {𝔑 : 𝓞 E} [Nonempty n] {c : ℚ} {ι : Type*} [Fintype ι] |
| 586 | |
| 587 | omit [Nonempty n] in |
| 588 | /-- A point `g` of the finite adelic unitary group `Gf E n` (so `gᴴ g = 1`) is a signed frame for |
| 589 | the identity form, with `ℓ = 1` at the base place. -/ |
| 590 | lemma isSignedFrameFor_one (g : Gf E n) : IsSignedFrameFor g.val 1 1 := |
| 591 | ⟨⟨1, by simpa [star_eq_conjTranspose] using mem_unitaryGroupOf_iff.1 g.property⟩, |
| 592 | by simp [PosDef.one]⟩ |
| 593 | |
| 594 | /-- If `x` is a similitude whose inverse has integral entries (`x ∈ GUPlus E n`) and `x` is a frame |
| 595 | for the scalar form `c • 1`, then the rational number `c` is an integer. -/ |
| 596 | lemma IsFrameFor.exists_intCast_eq (hx : x ∈ GUPlus E n) (h : IsFrameFor ((c : E) • 1) x) : |
| 597 | ∃ z : ℤ, z = c := by |
| 598 | obtain ⟨ε, hframe⟩ := h |
| 599 | obtain ⟨-, h_inv_int⟩ : x ∈ GU E n ∧ ∀ i j : n, x⁻¹ i j ∈ Ô E := hx |
| 600 | -- `c • 1 = ε • x⁻¹ᴴ * x⁻¹` has integral diagonal entries, because `x⁻¹` and `ε` are integral. |
| 601 | have h_diag_mem (i : n) : ((c : E) • (1 : Matrix n n E)).map (algebraMap E (𝔸f E)) i i ∈ Ô E := by |
| 602 | rw [← gram_inv_of_gram_eq hframe] |
| 603 | refine sum_mem ?_ |
| 604 | -- `coe_units_inv` is left out: it would turn `x⁻¹` into the matrix inverse, unlike `h_inv_int`. |
| 605 | simp [mul_mem, adeleMap_mem_Ô, star_mem_Ô (h_inv_int _ _), h_inv_int, -coe_units_inv] |
| 606 | -- A rational number that is integral at every place of `E` is an integer. |
| 607 | simpa [isIntegral_ratCast_iff, IsIntegrallyClosed.isIntegral_iff] using h_diag_mem |
| 608 | (Classical.arbitrary n) |
| 609 | |
| 610 | /-- If `x` lies in the principal level `levelGU n 𝔑` and `x⁻¹` is a frame for the positive scalar |
| 611 | form `c • 1`, then `c = 1`. -/ |
| 612 | lemma IsScalarFrame.eq_one_of_mem_levelGU (hx : x ∈ levelGU n 𝔑) (hframe : IsScalarFrame x⁻¹ c) : |
| 613 | c = 1 := by |
| 614 | -- Both `x` and `x⁻¹` lie in `GUPlus E n`, so `c` and `c⁻¹` are integers; and `c` is positive. |
| 615 | obtain ⟨hc_pos, h_frame⟩ := hframe |
| 616 | -- `x⁻¹ * x = 1` is a frame for `c⁻¹ • c • 1 = 1`, so `x` is one for `c⁻¹ • 1`. |
| 617 | have h_inv_frame : IsFrameFor (((c⁻¹ : ℚ) : E) • 1) x := |
| 618 | h_frame.mul_iff.1 ⟨1, by simp [hc_pos.ne']⟩ |
| 619 | -- `c⁻¹ = k` and `c = z` for integers `k` and `z` |
| 620 | obtain ⟨k, hk⟩ := h_inv_frame.exists_intCast_eq (mem_GUPlus_of_mem_levelGU hx) |
| 621 | obtain ⟨z, rfl⟩ := h_frame.exists_intCast_eq (mem_GUPlus_of_mem_levelGU (inv_mem hx)) |
| 622 | have hzk : z * k = 1 := by |
| 623 | qify |
| 624 | rw [hk, mul_inv_cancel₀ hc_pos.ne'] |
| 625 | exact_mod_cast Int.eq_one_of_mul_eq_one_right (by exact_mod_cast hc_pos.le) hzk |
| 626 | |
| 627 | /-- The inverse of an element of the principal level is a frame for the identity form. -/ |
| 628 | lemma levelGU.isScalarFrame_inv_one (h : x ∈ levelGU n 𝔑) : IsScalarFrame x⁻¹ 1 := by |
| 629 | obtain ⟨⟨c, hc⟩, -⟩ := Subgroup.mem_inf.1 (inv_mem h) |
| 630 | rwa [hc.eq_one_of_mem_levelGU h] at hc |
| 631 | |
| 632 | /-! ### Uniqueness of the form, and automorphisms -/ |
| 633 | |
| 634 | /-- For a CM field `E` with a chosen base place (`CMBase E`), if a finite adele `u` of `ℚ` |
| 635 | satisfies `finAdeleIncl ℚ E u * algebraMap E (𝔸f E) a = algebraMap E (𝔸f E) a'` for elements `a` |
| 636 | and `a'` of `E` with `a ≠ 0`, then `u` is rational (`u = algebraMap ℚ (𝔸f ℚ) s` for some |
| 637 | `s : ℚ`). -/ |
| 638 | private lemma exists_eq_algebraMap_of_finAdeleIncl_mul_eq {u : 𝔸f ℚ} {a a' : E} (ha : a ≠ 0) |
| 639 | (h : finAdeleIncl ℚ E u * algebraMap E (𝔸f E) a = algebraMap E (𝔸f E) a') : |
| 640 | ∃ s : ℚ, u = algebraMap ℚ (𝔸f ℚ) s := by |
| 641 | -- One coordinate of `a` in a basis of `E / ℚ` is not zero; comparing that coordinate of both |
| 642 | -- sides gives `u` as a quotient of two rationals. |
| 643 | let b : Basis (Free.ChooseBasisIndex ℤ (𝓞 E)) ℚ E := integralBasis E |
| 644 | obtain ⟨k, hk⟩ : ∃ k : Free.ChooseBasisIndex ℤ (𝓞 E), b.repr a k ≠ 0 := by |
| 645 | simpa [b.ext_elem_iff] using ha |
| 646 | have h_coord : |
| 647 | (adeleBasis b).repr (finAdeleIncl ℚ E u * algebraMap E (𝔸f E) a) k = |
| 648 | (adeleBasis b).repr (algebraMap E (𝔸f E) a') k := by |
| 649 | rw [h] |
| 650 | -- In coordinates over `ℚ` this says `u * b.repr a k = b.repr a' k`. |
| 651 | simp [← smul_toAlgebra, adeleBasis_repr_algebraMap] at h_coord |
| 652 | use (b.repr a k)⁻¹ • b.repr a' k |
| 653 | simpa [algebraMap_eq_smul_one, ← eq_inv_smul_iff₀ hk, mul_smul] using h_coord |
| 654 | |
| 655 | /-- A frame determines its form: let `x` in GL_n of the finite adeles of the CM field `E` be a frame |
| 656 | for both `β` and `β'` (`IsFrameFor`: xᴴβx = ε • 1 and xᴴβ'x = δ • 1 for units ε and δ of Ẑ). If |
| 657 | both forms are positive definite at the infinite place `w` (mapped to `ℂ` by the chosen embedding |
| 658 | `Φ w`), then `β' = β`. -/ |
| 659 | lemma IsFrameFor.unique (w : InfinitePlace E) (h : IsFrameFor β x) (h' : IsFrameFor β' x) |
| 660 | (hpos : (β.map (Φ w)).PosDef) (hpos' : (β'.map (Φ w)).PosDef) : |
| 661 | β' = β := by |
| 662 | -- The multipliers differ by a unit `u` of `Ô ℚ`, so `β' = u • β` over the adeles. Taking traces |
| 663 | -- shows that `u` is a rational `s`; it is positive and a unit everywhere, hence `1`. |
| 664 | obtain ⟨ε, hβ⟩ := h |
| 665 | obtain ⟨δ, hβ'⟩ := h' |
| 666 | obtain ⟨u, rfl⟩ : ∃ u : (Ô ℚ)ˣ, u * ε = δ := mul_right_surjective ε δ |
| 667 | have h_adelic : |
| 668 | finAdeleIncl ℚ E u • β.map (algebraMap E (𝔸f E)) = β'.map (algebraMap E (𝔸f E)) := by |
| 669 | simp [← gram_inv_of_gram_eq hβ, ← gram_inv_of_gram_eq hβ', mul_smul] |
| 670 | -- The trace of `β` is not zero, so comparing traces gives `u` as a rational `s`. |
| 671 | obtain ⟨s, hs⟩ : ∃ s : ℚ, ((u : Ô ℚ) : 𝔸f ℚ) = algebraMap ℚ (𝔸f ℚ) s := |
| 672 | exists_eq_algebraMap_of_finAdeleIncl_mul_eq (a := β.trace) (a' := β'.trace) |
| 673 | (by simpa [← map_trace] using hpos.trace_pos.ne') |
| 674 | (by simpa [← map_trace] using congrArg trace h_adelic) |
| 675 | -- So multiplying by `u` over the adeles is multiplying by `s` over `E`, and `β' = s • β`. |
| 676 | have h_smul (A : Matrix n n E) : |
| 677 | ((s : E) • A).map (algebraMap E (𝔸f E)) = |
| 678 | finAdeleIncl ℚ E u • A.map (algebraMap E (𝔸f E)) := by |
| 679 | simp [hs, map_smul'] |
| 680 | obtain rfl : (s : E) • β = β' := |
| 681 | map_injective (algebraMap E (𝔸f E)).injective ((h_smul β).trans h_adelic) |
| 682 | -- The trace of `s • β` at `w` is `s` times the positive trace of `β`. |
| 683 | have hs_pos : 0 < s := by |
| 684 | simpa [← Complex.ofReal_ratCast, hpos.trace_pos, map_smul'] using hpos'.trace_pos |
| 685 | -- The identity matrix, of level `0`, is a frame for `s • 1` with multiplier `u`. |
| 686 | have h_one_frame : IsScalarFrame (1 : GL n (𝔸f E))⁻¹ s := |
| 687 | ⟨hs_pos, u, by simpa using h_smul 1⟩ |
| 688 | have hs_one : s = 1 := |
| 689 | IsScalarFrame.eq_one_of_mem_levelGU (levelGU n (0 : 𝓞 E)).one_mem h_one_frame |
| 690 | rw [hs_one, Rat.cast_one, one_smul] |
| 691 | |
| 692 | /-- Let `E` have a base place `v₀` (`CMBase`, so at least two infinite places), let `(x, ℓ, β)` and |
| 693 | `(x', ℓ', β')` be signed frames (`IsSignedFrameFor`), and let `y ∈ GL_n(E)`. If `(x'⁻¹ y x)⁻¹` is a |
| 694 | frame for the scalar form `c • 1` with `c > 0` rational, then `yᴴ β' y = c β`. -/ |
| 695 | lemma IsSignedFrameFor.conjTranspose_mul_mul_eq_smul (h : IsSignedFrameFor x ℓ β) |
| 696 | (h' : IsSignedFrameFor x' ℓ' β') (h_frame : IsScalarFrame (x'⁻¹ * toFinGL y * x)⁻¹ c) : |
| 697 | yᴴ * β' * y.val = (c : E) • β := by |
| 698 | -- Both forms have the frame `x * (x'⁻¹ * y * x)⁻¹` and are positive at a place `w ≠ v₀`. |
| 699 | obtain ⟨w, hw⟩ := exists_ne (v₀ : InfinitePlace E) |
| 700 | refine (h.1.mul_iff.2 h_frame.2).unique w ?_ ?_ ?_ |
| 701 | · rw [IsFrameFor.conj_iff, show toFinGL y * (x * (x'⁻¹ * toFinGL y * x)⁻¹) = x' by group] |
| 702 | exact h'.1 |
| 703 | · convert (by simpa [hw] using h.2 w : (β.map (Φ w)).PosDef).smul h_frame.1 |
| 704 | simp [← Matrix.ext_iff, Rat.smul_def] |
| 705 | · rw [map_conjTranspose_mul_mul (Φ w) (map_star_complex (Φ w))] |
| 706 | simpa [star_eq_conjTranspose] using |
| 707 | (y.map (Φ w)).isUnit.posDef_star_left_conjugate_iff.2 (by simpa [hw] using h'.2 w) |
| 708 | |
| 709 | /-- Let `(x, ℓ, β)` be a signed frame (`IsSignedFrameFor`) and let `y ∈ GL_n(E)` fix `ℓ` under |
| 710 | `ratConj`, with `(x⁻¹ y x)⁻¹` a frame for the scalar form `c • 1`; so `y` is an automorphism of the |
| 711 | object given by `x`. Then `y` is a similitude of `β` with multiplier `c` (`yᴴ β y = c β`), and each |
| 712 | root `r` of the characteristic polynomial of `y` mapped by `Φ w`, at each infinite place `w`, has |
| 713 | `r * star r = c`. -/ |
| 714 | lemma IsSignedFrameFor.similitude_and_root_norm (h : IsSignedFrameFor x ℓ β) |
| 715 | (h_frame : IsScalarFrame (x⁻¹ * toFinGL y * x)⁻¹ c) (hℓ : ratConj y ℓ = ℓ) : |
| 716 | yᴴ * β * y.val = (c : E) • β ∧ |
| 717 | ∀ w : InfinitePlace E, ∀ r ∈ (y.val.charpoly.map (Φ w)).roots, r * star r = c := by |
| 718 | -- Uniqueness of the form of a frame gives `yᴴ β y = c β`. So `Φ w y` scales the positive |
| 719 | -- form `Φ w β * J` by `c`, and evaluating this on an eigenvector gives `r * star r = c`. |
| 720 | have h_form : y.valᴴ * β * y.val = (c : E) • β := h.conjTranspose_mul_mul_eq_smul h h_frame |
| 721 | refine ⟨h_form, fun w r hr ↦ ?_⟩ |
| 722 | obtain ⟨-, h_pos_all⟩ := h |
| 723 | let J : Matrix n n ℂ := if w = v₀ then ℓ else 1 |
| 724 | have h_pos : (β.map (Φ w) * J).PosDef := h_pos_all w |
| 725 | -- `J` is `ℓ` at `v₀`, which `y` fixes by `hℓ`, and `1` at the other places. |
| 726 | have hJ_fixed : ConjAct.toConjAct (y.map (Φ w)) • J = J := by |
| 727 | rcases eq_or_ne w v₀ with rfl | hw |
| 728 | · simpa [J, ratConj] using hℓ |
| 729 | · simp [J, hw] |
| 730 | have h_comm : y.val.map (Φ w) * J = J * y.val.map (Φ w) := |
| 731 | (y.map (Φ w)).mul_inv_eq_iff_eq_mul.1 hJ_fixed |
| 732 | obtain ⟨u, hu_ne, hu⟩ : ∃ u : n → ℂ, u ≠ 0 ∧ r • u = y.val.map (Φ w) *ᵥ u := by |
| 733 | simpa [← charpoly_map, eval_charpoly, ← exists_mulVec_eq_zero_iff, sub_mulVec, |
| 734 | sub_eq_zero] using |
| 735 | Polynomial.isRoot_of_mem_roots hr |
| 736 | -- Pair `h_form` with `u` and `J u`: the left side is `r * star r` times the positive number |
| 737 | -- `q = uᴴ (Φ w β * J) u` by `h_comm` and `hu`, and the right side is `c * q`. |
| 738 | have hq_ne : star u ⬝ᵥ (β.map (Φ w) * J) *ᵥ u ≠ 0 := (h_pos.dotProduct_mulVec_pos hu_ne).ne' |
| 739 | refine mul_right_cancel₀ hq_ne ?_ |
| 740 | calc r * star r * (star u ⬝ᵥ (β.map (Φ w) * J) *ᵥ u) |
| 741 | = star u ᵥ* (y.valᴴ * β * y.val).map (Φ w) ⬝ᵥ J *ᵥ u := by |
| 742 | rw [mul_assoc] |
| 743 | symm |
| 744 | simp [map_conjTranspose_mul_mul (Φ w) (map_star_complex (Φ w)), ← vecMul_vecMul, |
| 745 | ← star_mulVec, ← dotProduct_mulVec, ← J.mulVec_mulVec, ← hu, h_comm, mulVec_smul] |
| 746 | _ = star u ᵥ* ((c : E) • β).map (Φ w) ⬝ᵥ J *ᵥ u := by rw [h_form] |
| 747 | _ = c * (star u ⬝ᵥ (β.map (Φ w) * J) *ᵥ u) := by |
| 748 | simp [map_smul', ← dotProduct_mulVec, smul_mulVec] |
| 749 | |
| 750 | variable {E : Type} [Field.{0} E] [NumberField E] {x : GL n (𝔸f E)} {y : GL n E} in |
| 751 | omit [Nonempty n] Ψ in |
| 752 | /-- If `x⁻¹ y x` is congruent to `1` modulo the ideal `J` of `Ô E`, and `J` meets `𝓞 E` inside the |
| 753 | ideal `I`, then the trace of `y - 1` is an algebraic integer `t` that lies in `I`. -/ |
| 754 | private lemma exists_eq_trace_sub_one_mem_of_mem_congruenceGL {I : Ideal (𝓞 E)} {J : Ideal (Ô E)} |
| 755 | (h_cong : x⁻¹ * toFinGL y * x ∈ |
| 756 | congruenceGL (Submodule.map (Algebra.linearMap (Ô E) (𝔸f E)) J) id) |
| 757 | (hJI : under (𝓞 E) J ≤ I) : |
| 758 | ∃ t : 𝓞 E, (t : E) = (y.val - 1).trace ∧ t ∈ I := by |
| 759 | obtain ⟨-, h_row⟩ := h_cong |
| 760 | -- The trace is invariant under conjugation by `x`, and the diagonal entries lie in `J`. |
| 761 | have h_conj : ((x⁻¹ * toFinGL y * x).val - 1).trace ∈ |
| 762 | Submodule.map (Algebra.linearMap (Ô E) (𝔸f E)) J := |
| 763 | Submodule.sum_mem _ fun i _ ↦ h_row i i |
| 764 | have h_mem : algebraMap E (𝔸f E) (y.val - 1).trace ∈ |
| 765 | Submodule.map (Algebra.linearMap (Ô E) (𝔸f E)) J := by |
| 766 | simpa [map_trace, trace_mul_cycle] using h_conj |
| 767 | obtain ⟨⟨a, ha_int⟩, ha_mem, ⟨⟩⟩ := h_mem |
| 768 | exact ⟨⟨(y.val - 1).trace, algebraMap_mem_Ô.1 ha_int⟩, rfl, hJI ha_mem⟩ |
| 769 | |
| 770 | omit [Nonempty n] in |
| 771 | /-- If every complex eigenvalue `r` of `y` at the infinite place `v` has `r * star r = 1`, then the |
| 772 | image of the trace of `y - 1` under `Φ v` has modulus at most `2 * card n`. -/ |
| 773 | private lemma norm_trace_sub_one_le_of_mul_star_eq_one (v : InfinitePlace E) |
| 774 | (h_root : ∀ r ∈ (y.val.charpoly.map (Φ v)).roots, r * star r = 1) : |
| 775 | ‖Φ v (y.val - 1).trace‖ ≤ 2 * card n := by |
| 776 | have h_unit (r : ℂ) (hr : r ∈ (y.val.charpoly.map (Φ v)).roots) : ‖r‖ ≤ 1 := by |
| 777 | simpa [← sq] using (congrArg norm (h_root r hr)).le |
| 778 | have h_sum : Φ v (y.val - 1).trace = (y.val.charpoly.map (Φ v)).roots.sum - card n := by |
| 779 | simp [map_trace, trace_eq_sum_roots_charpoly, charpoly_map] |
| 780 | grw [h_sum, norm_sub_le, norm_multiset_sum_le, sum_map_le_sum_map _ 1 h_unit] |
| 781 | simp [IsAlgClosed.card_roots_eq_natDegree, two_mul] |
| 782 | |
| 783 | section |
| 784 | |
| 785 | variable {E : Type} [Field.{0} E] [NumberField E] [IsCMField E] {x : GL n (𝔸f E)} {y : GL n E} |
| 786 | {β : Matrix n n E} |
| 787 | |
| 788 | omit [Nonempty n] Ψ in |
| 789 | /-- Let `x⁻¹ y x` be congruent to `1` modulo the ideal `J` of `Ô E`, where `J` meets `𝓞 E` inside an |
| 790 | ideal `I` of norm above `(2 * card n) ^ [E : ℚ]`. If the images of the trace of `y - 1` under all |
| 791 | the embeddings `Φ v` have modulus at most `2 * card n`, then the trace of `y` is `card n`. -/ |
| 792 | private lemma trace_eq_card_of_mem_congruenceGL {E : Type} [Field.{0} E] [CMType E] |
| 793 | {x : GL n (𝔸f E)} {y : GL n E} {I : Ideal (𝓞 E)} {J : Ideal (Ô E)} |
| 794 | (h_cong : x⁻¹ * toFinGL y * x ∈ |
| 795 | congruenceGL (Submodule.map (Algebra.linearMap (Ô E) (𝔸f E)) J) id) |
| 796 | (hJI : under (𝓞 E) J ≤ I) (h_large : (2 * card n) ^ finrank ℚ E < absNorm I) |
| 797 | (h_conj_le : ∀ v : InfinitePlace E, ‖Φ v (y.val - 1).trace‖ ≤ 2 * card n) : |
| 798 | y.val.trace = card n := by |
| 799 | obtain ⟨t, ht_eq, ht_mem⟩ : ∃ t : 𝓞 E, (t : E) = (y.val - 1).trace ∧ t ∈ I := |
| 800 | exists_eq_trace_sub_one_mem_of_mem_congruenceGL h_cong hJI |
| 801 | have h_norm_lt : |Algebra.norm ℤ t| < absNorm I := by |
| 802 | rify at h_large ⊢ |
| 803 | rw [← ht_eq] at h_conj_le |
| 804 | refine (NumberField.RingOfIntegers.abs_norm_le_pow t (fun σ ↦ ?_)).trans_lt h_large |
| 805 | simpa only [PlaceEmbedding.norm_mk_eq] using h_conj_le (.mk σ) |
| 806 | -- The norm of `t` is a multiple of `absNorm I` and smaller in absolute value, hence `0`. |
| 807 | have h_zero : t = 0 := Algebra.norm_eq_zero_iff.1 |
| 808 | (Int.eq_zero_of_abs_lt_dvd (absNorm_dvd_norm_of_mem ht_mem) h_norm_lt) |
| 809 | simpa [h_zero, sub_eq_zero] using ht_eq.symm |
| 810 | |
| 811 | omit [Nonempty n] Ψ in |
| 812 | /-- Let `β` be positive definite at the infinite place `w`. If `y` preserves `β` (`yᴴ β y = β`) and |
| 813 | the trace of `y` is `card n`, then `y = 1`: the positive definite form `A ↦ tr (β⁻¹ Aᴴ β A)` at |
| 814 | `w` takes the value `n - n - n + n = 0` at `A = y - 1`. -/ |
| 815 | private lemma eq_one_of_conjTranspose_mul_mul_eq_of_trace_eq {E : Type} [Field.{0} E] [CMType E] |
| 816 | {y : GL n E} {β : Matrix n n E} (w : InfinitePlace E) |
| 817 | (h_pos : (β.map (Φ w)).PosDef) (h_form : y.valᴴ * β * y.val = β) |
| 818 | (h_trace : y.val.trace = card n) : |
| 819 | y = 1 := by |
| 820 | refine Units.ext (map_injective (Φ w).injective ?_) |
| 821 | -- `vec_sub` is left out: it would split `vec (y - 1)` before the form is evaluated. |
| 822 | simpa [kronecker_mulVec_vec, star_vec_dotProduct_vec, sub_mul, ← mul_assoc, |
| 823 | ← map_conjTranspose_mul_mul, -vec_sub, h_pos.det_pos.ne', ← map_trace, h_form, h_trace, |
| 824 | sub_eq_zero, trace_mul_cycle] using |
| 825 | (h_pos.inv.transpose.kronecker h_pos).dotProduct_mulVec_pos (x := vec (y.map (Φ w) - 1)) |
| 826 | |
| 827 | end |
| 828 | |
| 829 | /-- Let `(x, ℓ, β)` be a signed frame, let `y ∈ GL_n(E)` fix `ℓ` under `ratConj`, and let |
| 830 | `(x⁻¹ y x)⁻¹` be a frame for the identity form (so `y` is an automorphism of the object given by |
| 831 | `x`). If `x⁻¹ y x` is congruent to `1` modulo an ideal `J` of `Ô E`, and `J` meets `𝓞 E` |
| 832 | inside an ideal `I` of norm above `(2 * card n) ^ [E : ℚ]`, then `y = 1`. -/ |
| 833 | lemma IsSignedFrameFor.eq_one_of_congr_large_norm (h : IsSignedFrameFor x ℓ β) {I : Ideal (𝓞 E)} |
| 834 | (J : Ideal (Ô E)) (h_frame : IsScalarFrame (x⁻¹ * toFinGL y * x)⁻¹ 1) |
| 835 | (h_cong : x⁻¹ * toFinGL y * x ∈ |
| 836 | congruenceGL (Submodule.map (Algebra.linearMap (Ô E) (𝔸f E)) J) id) |
| 837 | (hℓ : ratConj y ℓ = ℓ) (h_large : (2 * card n) ^ finrank ℚ E < absNorm I) |
| 838 | (hJI : under (𝓞 E) J ≤ I) : |
| 839 | y = 1 := by |
| 840 | -- The eigenvalues of `y` have modulus `1`, so the conjugates of `tr y - n` have modulus at most |
| 841 | -- `2 * n`. This number lies in `I`, so its norm is a multiple of `absNorm I` and smaller, hence |
| 842 | -- `0`. An isometry of a positive form whose trace is `n` is the identity. |
| 843 | obtain ⟨h_form, h_root⟩ := h.similitude_and_root_norm h_frame hℓ |
| 844 | obtain ⟨-, h_pos_all⟩ := h |
| 845 | have h_conj_le (v : InfinitePlace E) : ‖Φ v (y.val - 1).trace‖ ≤ 2 * card n := |
| 846 | norm_trace_sub_one_le_of_mul_star_eq_one v fun r hr ↦ by exact_mod_cast h_root v r hr |
| 847 | have h_trace : y.val.trace = card n := |
| 848 | trace_eq_card_of_mem_congruenceGL h_cong hJI h_large h_conj_le |
| 849 | have h_isom : y.valᴴ * β * y.val = β := by simpa using h_form |
| 850 | obtain ⟨w, hw⟩ := exists_ne (v₀ : InfinitePlace E) |
| 851 | have h_pos : (β.map (Φ w)).PosDef := by simpa [hw] using h_pos_all w |
| 852 | exact eq_one_of_conjTranspose_mul_mul_eq_of_trace_eq w h_pos h_isom h_trace |
| 853 | |
| 854 | /-! ### Neat levels and freeness -/ |
| 855 | |
| 856 | variable (n 𝔑) in |
| 857 | /-- The level 𝔑 is neat: 𝔑 ≠ 0 and, whenever `x` is a signed frame with `ℓ` for some form |
| 858 | (`New.Variety.IsSignedFrame`), every y in GL_n(E) with x⁻¹yx in `levelGU n 𝔑` that fixes ℓ under |
| 859 | `New.Variety.ratConj` equals 1. -/ |
| 860 | def IsNeat : Prop := |
| 861 | 𝔑 ≠ 0 ∧ |
| 862 | ∀ {x : GL n (𝔸f E)} {ℓ : Matrix n n ℂ} {y : GL n E}, IsSignedFrame x ℓ → |
| 863 | x⁻¹ * toFinGL y * x ∈ levelGU n 𝔑 → ratConj y ℓ = ℓ → y = 1 |
| 864 | |
| 865 | omit [Nonempty n] in |
| 866 | lemma IsNeat.ne_zero (h_neat : IsNeat n 𝔑) : 𝔑 ≠ 0 := |
| 867 | h_neat.1 |
| 868 | |
| 869 | omit [Nonempty n] in |
| 870 | /-- On a neat level automorphisms are trivial: if `x` is a signed frame with `ℓ`, and `y ∈ GL_n(E)` |
| 871 | has `x⁻¹ y x` in `levelGU n 𝔑` and fixes `ℓ` under `ratConj`, then `y = 1`. -/ |
| 872 | lemma IsNeat.eq_one_of_mem_levelGU (h_neat : IsNeat n 𝔑) {x : GL n (𝔸f E)} |
| 873 | {ℓ : Matrix n n ℂ} {y : GL n E} (hx : IsSignedFrame x ℓ) |
| 874 | (h_level : x⁻¹ * toFinGL y * x ∈ levelGU n 𝔑) (hℓ : ratConj y ℓ = ℓ) : y = 1 := |
| 875 | h_neat.2 hx h_level hℓ |
| 876 | |
| 877 | /-- Let `E` have a base place (`CMBase`, so at least two infinite places) and let `n` be nonempty. |
| 878 | For all but finitely many finite places `w` of `E`, every nonzero `𝔑 : 𝓞 E` that lies in `w` is a |
| 879 | neat level (`IsNeat n 𝔑`). -/ |
| 880 | lemma eventually_isNeat : |
| 881 | ∀ᶠ w : FinPlace E in Filter.cofinite, ∀ 𝔑 ≠ (0 : 𝓞 E), 𝔑 ∈ w.asIdeal → IsNeat n 𝔑 := by |
| 882 | -- All but finitely many places have norm above `(2 * n) ^ [E : ℚ]`; there |
| 883 | -- `IsSignedFrameFor.eq_one_of_congr_large_norm` applies. |
| 884 | filter_upwards [(Northcott.finite_le (h := FinPlace.q) |
| 885 | ((2 * Fintype.card n) ^ Module.finrank ℚ E)).compl_mem_cofinite] with w hw 𝔑 h𝔑 h𝔑w |
| 886 | have hw_large : (2 * card n) ^ finrank ℚ E < w.q := not_le.1 hw |
| 887 | refine ⟨h𝔑, fun {x ℓ y} h_signed h_level hℓ ↦ ?_⟩ |
| 888 | obtain ⟨β, hx⟩ := h_signed |
| 889 | -- The level `𝔑` as an ideal of `Ô E`. |
| 890 | let J : Ideal (Ô E) := span {algebraMap (𝓞 E) (Ô E) 𝔑} |
| 891 | obtain ⟨-, h_cong_𝔑⟩ := Subgroup.mem_inf.1 h_level |
| 892 | have h_algebraMap : |
| 893 | algebraMap (Ô E) (𝔸f E) (algebraMap (𝓞 E) (Ô E) 𝔑) = algebraMap (𝓞 E) (𝔸f E) 𝔑 := rfl |
| 894 | have h_cong : x⁻¹ * toFinGL y * x ∈ |
| 895 | congruenceGL (Submodule.map (Algebra.linearMap (Ô E) (𝔸f E)) J) id := by |
| 896 | simpa [J, Submodule.map_span, h_algebraMap] using h_cong_𝔑 |
| 897 | -- An integer divisible by `𝔑` in `Ô E` is divisible by `𝔑` in `𝓞 E`, so lies in `w`. |
| 898 | have hJI : under (𝓞 E) J ≤ w.asIdeal := fun a ha ↦ |
| 899 | mem_of_dvd _ ((dvd_iff_Ô h𝔑).1 (mem_span_singleton.1 ha)) h𝔑w |
| 900 | exact hx.eq_one_of_congr_large_norm J (levelGU.isScalarFrame_inv_one h_level) h_cong hℓ hw_large |
| 901 | hJI |
| 902 | |
| 903 | omit [Nonempty n] Ψ |
| 904 | |
| 905 | /-- Freeness for the definite space `stdSpace E n`: let `E` be a CM field with at least two infinite |
| 906 | places, and let the `w i` be distinct finite places whose norms have product above |
| 907 | `(2 * card n) ^ [E : ℚ]`. Let `γ` be a rational unitary element and `g` lie in G_f. If the conjugate |
| 908 | `g⁻¹ γ g` (with γ embedded in G_f) lies in the integral level `stdLevel E n`, which is |
| 909 | G_f ∩ GL_n(Ô E) (hypothesis `hk`), and reduces to `1` modulo every `w i`, then `γ = 1`. -/ |
| 910 | lemma eq_one_of_reduceAt_eq_one {E : Type} [Field.{0} E] [CMType E] {w : ι → FinPlace E} |
| 911 | (hw : w.Injective) |
| 912 | (h_large : (2 * card n) ^ finrank ℚ E < ∏ i : ι, (w i).q) |
| 913 | {γ : U (stdSpace E n).J} {g : Gf E n} |
| 914 | (hk : g⁻¹ * (stdSpace E n).embFin γ * g ∈ stdLevel E n) |
| 915 | (h_red : ∀ i : ι, stdLevel.reduceAt (w i) ⟨g⁻¹ * (stdSpace E n).embFin γ * g, hk⟩ = 1) : |
| 916 | γ = 1 := by |
| 917 | -- The number `tr (γ - 1) = tr (g⁻¹ γ g - 1)` lies in the product of the `w i`, and its conjugates |
| 918 | -- have modulus at most `2 * card n`. Comparing norms shows that it is `0`, and then |
| 919 | -- `tr (γ - 1)ᴴ (γ - 1) = 0`. |
| 920 | let y : GL n E := γ |
| 921 | have h_isom : y.valᴴ * (1 : Matrix n n E) * y.val = 1 := mem_unitaryGroupOf_iff.1 γ.property |
| 922 | have h_conj_le (v : InfinitePlace E) : ‖Φ v (y.val - 1).trace‖ ≤ 2 * card n := by |
| 923 | -- The image of `y` under `Φ v` is unitary, so its entries have modulus at most `1`. |
| 924 | have h_unitary : y.val.map (Φ v) ∈ unitaryGroup n ℂ := by |
| 925 | simpa [mem_unitaryGroup_iff', star_eq_conjTranspose, |
| 926 | ← conjTranspose_map (Φ v) (map_star_complex (Φ v))] using |
| 927 | congrArg (fun A : Matrix n n E ↦ A.map (Φ v)) h_isom |
| 928 | have h_entry (i : n) : ‖Φ v (y.val i i) - 1‖ ≤ 1 + 1 := |
| 929 | norm_sub_le_of_le (entry_norm_bound_of_unitary h_unitary i i) norm_one.le |
| 930 | calc ‖Φ v (y.val - 1).trace‖ |
| 931 | _ = ‖∑ i : n, (Φ v (y.val i i) - 1)‖ := by simp [Matrix.trace] |
| 932 | _ ≤ ∑ _i : n, (1 + 1 : ℝ) := norm_sum_le_of_le _ fun i _ ↦ h_entry i |
| 933 | _ = 2 * card n := by simp [two_mul] |
| 934 | -- The kernel `J` of reduction at all the `w i` meets `𝓞 E` in the product of the `w i`. |
| 935 | let J : Ideal (Ô E) := ⨅ i : ι, ker (reduceAt (w i)) |
| 936 | have h_cong : g.val⁻¹ * toFinGL y * g.val ∈ |
| 937 | congruenceGL (Submodule.map (Algebra.linearMap (Ô E) (𝔸f E)) J) id := by |
| 938 | rw [← stdSpace_embFin γ] |
| 939 | -- The entries of `g⁻¹ γ g - 1` reduce to `0` at every `w a`, so they lie in `J`. |
| 940 | refine ⟨hk, fun i j ↦ ?_⟩ |
| 941 | let k : intGL n (Ô E) := ⟨(g⁻¹ * (stdSpace E n).embFin γ * g).val, hk⟩ |
| 942 | have h_entry_mem : intGL.toMatrix k i j - intGL.toMatrix (1 : intGL n (Ô E)) i j ∈ J := |
| 943 | mem_iInf.2 fun a ↦ intGL.map_eq_one.1 (h_red a) i j |
| 944 | exact Submodule.mem_map_of_mem h_entry_mem |
| 945 | have h_under : under (𝓞 E) J ≤ ∏ i : ι, (w i).asIdeal := by |
| 946 | simp [J, IsConcreteLE.le_iff, mem_prod_finPlace_iff hw] |
| 947 | have h_trace : y.val.trace = card n := |
| 948 | trace_eq_card_of_mem_congruenceGL h_cong h_under (by rwa [map_prod]) h_conj_le |
| 949 | obtain ⟨v⟩ : Nonempty (InfinitePlace E) := inferInstance |
| 950 | have h_pos : ((1 : Matrix n n E).map (Φ v)).PosDef := by simpa using PosDef.one |
| 951 | exact Subtype.ext (eq_one_of_conjTranspose_mul_mul_eq_of_trace_eq v h_pos h_isom h_trace) |
| 952 | |
| 953 | /-- Let `E` be a CM field with at least two infinite places. Let the `w i` be distinct finite places |
| 954 | whose norms have product above `(2 * card n) ^ [E : ℚ]`. Let `K` be a subgroup of the finite adelic |
| 955 | unitary group `Gf E n` whose elements are integral and reduce to `1` modulo every `w i`. Then for |
| 956 | `g` in `Gf E n`, the stabiliser of the coset `g K` is trivial. The stabiliser is taken in the |
| 957 | unitary group over `E` of the definite form `stdSpace E n` (identity matrix, sum of norms of |
| 958 | coordinates), embedded in `Gf E n`. A case of Minkowski's lemma on integral matrices of finite |
| 959 | order. -/ |
| 960 | lemma classAut_eq_bot {E : Type} [Field.{0} E] [CMType E] {w : ι → FinPlace E} |
| 961 | (hw : w.Injective) |
| 962 | (h_large : (2 * card n) ^ finrank ℚ E < ∏ i : ι, (w i).q) |
| 963 | {K : Subgroup (Gf E n)} (hK : K ≤ levelOf w ⊥) (g : Gf E n) : |
| 964 | classAut (stdSpace E n).Γf K g = ⊥ := by |
| 965 | refine bot_unique ?_ |
| 966 | rintro _ ⟨⟨γ, rfl⟩, hγ⟩ |
| 967 | obtain ⟨hk, h_red⟩ := mem_levelOf.1 (hK hγ) |
| 968 | simp [eq_one_of_reduceAt_eq_one hw h_large hk fun a ↦ congrFun h_red a] |
| 969 | |
| 970 | end New.Variety |
| 971 | |
| 972 | end NeatLevel |
| 973 | |
| 974 | end |