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.RingTheory.Polynomial.IsIntegral |
| 4 | import Mathlib.RingTheory.Valuation.Integral |
| 5 | public import Lib.GaloisRep.BaseChange.CommutingHeckeFamilies |
| 6 | import Lib.Adelic.Witt.WittTheorem |
| 7 | import Lib.ClassField.Local.ArtinMap |
| 8 | import Lib.GaloisRep.Hilbert90.TameActions |
| 9 | import Lib.GaloisRep.Hilbert90.UnitaryGroups |
| 10 | import Lib.General.LinearAlgebra.Eigenvalues |
| 11 | import Lib.General.LinearAlgebra.MatrixPolynomials |
| 12 | |
| 13 | /-! |
| 14 | # Matching unit pairs at congruence levels and at unramified places of a step |
| 15 | |
| 16 | This file concerns base change along a step `E' / E` (`New.IsStep`): an extension of prime degree |
| 17 | with a character `μ` of the finite ideles of `E`. It constructs levels at which the unit functions |
| 18 | match in the sense of `New.IsMatchingPair`. |
| 19 | |
| 20 | ## Main definitions and results |
| 21 | |
| 22 | * `New.cocyclesSplit_and_isMatchingPair_of_congruence`: at a principal congruence level over a |
| 23 | profinite ring with tame action, the cocycles split and the indicator functions of the level form |
| 24 | a matching pair. |
| 25 | * `New.IsStepUnramifiedAt`: `w` is unramified in `E'`, and `μ ∘ Nm` kills the local units above `w`. |
| 26 | * `New.exists_isTameAtLevel_intAdeleMap`: `σ ≠ 1` is tame (`New.IsTameAtLevel`) on the integral |
| 27 | adeles of `E'` at every `σ`-fixed level that vanishes at the totally ramified places dividing a |
| 28 | fixed integer `C`. |
| 29 | * `New.exists_isBaseChangeLevel`: below any open subgroup `H` over `E` there are local levels over |
| 30 | `E'` whose groups above any set of places are `σ`-stable, have split cocycles, and carry matching |
| 31 | indicator functions. |
| 32 | |
| 33 | Notions from other files: |
| 34 | * `New.IsTameAtLevel`: the conditions on a ring endomorphism `τ` with `τ ^ p = 1` and a level `m` |
| 35 | under which descent works. |
| 36 | * `New.CocyclesSplit`: every `s` in `K` of twisted norm `1` under `τ` is a coboundary `t * (τ t)⁻¹` |
| 37 | on the support of `u`, for some `t ∈ K` that is `1` off it. |
| 38 | * `New.IsMatchingPair`: a function `f` and a twisted function `φ` match, one characteristic |
| 39 | polynomial at a time, through a polynomial root (`New.IsNormRoot`). |
| 40 | * `New.localLevel`: the elements of `New.Gf E n` whose component at each place of a set `S` lies in |
| 41 | a given local group, by default `GL_n` of the local integers, with no condition outside `S`. |
| 42 | |
| 43 | ## Relation to the literature |
| 44 | |
| 45 | Known; see `Lib.GaloisRep.BaseChange.PrimeDegreeTransfer` for sources. |
| 46 | -/ |
| 47 | |
| 48 | @[expose] public section |
| 49 | |
| 50 | open IsDedekindDomain (FiniteAdeleRing) |
| 51 | |
| 52 | /-! |
| 53 | ## Matching pairs at a congruence level over a profinite ring |
| 54 | |
| 55 | The main lemma, `New.cocyclesSplit_and_isMatchingPair_of_congruence`, is the local input to the |
| 56 | comparison of trace formulas in base change at places with a principal congruence level. |
| 57 | -/ |
| 58 | |
| 59 | section UnitPairs |
| 60 | |
| 61 | open Matrix Polynomial New U Set |
| 62 | |
| 63 | /-- If `ι Y = v • (g - 1)` with `ι` injective, `ι` carries `τ` to `σ`, and `σ` fixes `v` and the |
| 64 | characteristic polynomial of `g`, then `τ` fixes the characteristic polynomial of `Y`. -/ |
| 65 | lemma New.charpoly_map_eq_self_of_smul_sub_one {O R n : Type} [CommRing O] [CommRing R] [Fintype n] |
| 66 | [DecidableEq n] {ι : O →+* R} (h_inj : (⇑ι).Injective) {τ : O →+* O} {σ : R →+* R} |
| 67 | (hιτ : ∀ x : O, ι (τ x) = σ (ι x)) {v : R} (hσv : σ v = v) {Y : Matrix n n O} {g : Matrix n n R} |
| 68 | (hY : Y.map ι = v • (g - 1)) (hg : g.charpoly.map σ = g.charpoly) : |
| 69 | Y.charpoly.map τ = Y.charpoly := by |
| 70 | -- Compare coefficients after applying the injective `ι`: `ι` carries `charpoly Y` to the |
| 71 | -- characteristic polynomial of `v • (g - 1)`, whose coefficients are powers of `v` times those |
| 72 | -- of `charpoly (g - 1) = (charpoly g).comp (X + 1)`, and `σ` fixes all of these. |
| 73 | have h_shift : (g - 1).charpoly = g.charpoly.comp (X + 1) := by |
| 74 | simpa using g.charpoly_sub_scalar 1 |
| 75 | refine AddMonoidAlgebra.ext <| Finsupp.ext fun i ↦ h_inj ?_ |
| 76 | rw [coeff_map, hιτ] |
| 77 | simp [← coeff_map, ← charpoly_map, hY, hσv, hg, h_shift, charpoly_smul_coeff, |
| 78 | Polynomial.map_add, map_comp] |
| 79 | |
| 80 | /-- Let `O` be integrally closed in `R`, and let `-C` be a matrix over `R` killed by a monic |
| 81 | polynomial over `O`. If `M ∣ m` in `O`, then `det (1 + m • C)` is the image of an element of `O` |
| 82 | that is `1` modulo `M`. -/ |
| 83 | lemma New.exists_det_one_add_smul_eq {O R k : Type} [CommRing O] [CommRing R] [Algebra O R] |
| 84 | [Fintype k] [DecidableEq k] (h_closed : IsIntegrallyClosedIn O R) {C : Matrix k k R} {F : O[X]} |
| 85 | (hF : F.Monic) (hC : aeval (-C) (F.map (algebraMap O R)) = 0) {m M : O} (hM : M ∣ m) : |
| 86 | ∃ w : O, (1 + m • C).det = 1 + algebraMap O R (M * w) := by |
| 87 | -- The characteristic polynomial of `-C` divides a power of `F`, so its coefficients are integral |
| 88 | -- and come from `O`. Its reverse takes the value `det (1 + m • C)` at `m` and `1` at `0`. |
| 89 | have h_dvd : (-C).charpoly ∣ (F ^ Fintype.card k).map (algebraMap O R) := by |
| 90 | simpa [hC] using charpoly_dvd_charpoly_aeval_comp (Y := -C) (F.map (algebraMap O R)) |
| 91 | have h_int : (-C).charpoly.reverse ∈ lifts (algebraMap O R) := by |
| 92 | refine (reverse _).lifts_iff_coeff_lifts.mpr fun i ↦ h_closed.isIntegral_iff.mp ?_ |
| 93 | simpa [reverse] using isIntegral_coeff_of_dvd _ _ (hF.pow _) (charpoly_monic _) h_dvd _ |
| 94 | obtain ⟨Q, hQ⟩ := (mem_lifts _).mp h_int |
| 95 | obtain ⟨w, hw⟩ : M ∣ Q.eval m - Q.eval 0 := |
| 96 | hM.trans (by simpa only [sub_zero] using Q.sub_dvd_eval_sub m 0) |
| 97 | use w |
| 98 | have h_eval (r : O) : algebraMap O R (Q.eval r) = (1 + r • C).det := by |
| 99 | rw [← eval_map_apply, hQ, reverse_charpoly, charpolyRev] |
| 100 | change evalRingHom (algebraMap O R r) (1 - (X : R[X]) • (-C).map Polynomial.C).det = _ |
| 101 | rw [RingHom.map_det] |
| 102 | congr 1 |
| 103 | ext i j |
| 104 | simp only [RingHom.mapMatrix_apply, Matrix.map_apply, Matrix.sub_apply, Matrix.one_apply, |
| 105 | Matrix.smul_apply, Matrix.neg_apply, Matrix.add_apply, coe_evalRingHom, eval_sub, |
| 106 | smul_eq_mul, eval_mul, eval_X, eval_C, mul_neg, sub_neg_eq_add] |
| 107 | rw [Algebra.smul_def] |
| 108 | split_ifs <;> simp only [eval_one, eval_zero] |
| 109 | rw [← hw, map_sub, h_eval m, h_eval 0, zero_smul, add_zero, Matrix.det_one, add_sub_cancel] |
| 110 | |
| 111 | /-- Let `ι Y = v • (g - 1)`. For a polynomial `r` over `O`, the characteristic polynomial of `r Y` |
| 112 | at `r (v • (B - 1))` is a multiple of the characteristic polynomial of `g` at `B`. -/ |
| 113 | lemma New.aeval_charpoly_dvd_of_smul_sub_one {O R n k : Type} [CommRing O] [CommRing R] [Fintype n] |
| 114 | [DecidableEq n] [Fintype k] [DecidableEq k] {ι : O →+* R} {v : R} {Y : Matrix n n O} |
| 115 | {g : Matrix n n R} (hY : Y.map ι = v • (g - 1)) (B : Matrix k k R) (r : O[X]) : |
| 116 | aeval B g.charpoly ∣ aeval (aeval (v • (B - 1)) (r.map ι)) ((aeval Y r).charpoly.map ι) := by |
| 117 | -- `charpoly g` divides `(charpoly s(g)).comp s`; evaluate at `B` and read `s(g)` as `ι (r(Y))`. |
| 118 | let s : R[X] := (r.map ι).comp (v • (X - 1)) |
| 119 | have h_dvd : g.charpoly ∣ (aeval g s).charpoly.comp s := charpoly_dvd_charpoly_aeval_comp s |
| 120 | simpa [s, ← hY, ← map_aeval_matrix, charpoly_map, aeval_comp] using aeval_dvd B h_dvd |
| 121 | |
| 122 | /-- For a unitary `γ`, a hermitian `v` and `a` with `a * v * v = v`, the matrix `B = v • (γ - 1)` |
| 123 | satisfies `star B * (1 + a • B) = -B`. -/ |
| 124 | lemma New.star_smul_sub_one_mul_one_add_smul_eq_neg {R n : Type} [CommRing R] [StarRing R] |
| 125 | [Fintype n] [DecidableEq n] {a v : R} (hav : a * v * v = v) (hv_star : star v = v) |
| 126 | (γ : U (1 : Matrix n n R)) : |
| 127 | star (v • (γ.val.val - 1)) * (1 + a • v • (γ.val.val - 1)) = -(v • (γ.val.val - 1)) := by |
| 128 | -- Expand with `γᴴ = γ⁻¹`, using `a * v * v = v` and `star v = v`. |
| 129 | have hgg : γ.val.valᴴ * γ.val.val = 1 := by |
| 130 | rw [← inv_val_eq_conjTranspose, ← Units.val_mul, ← Subgroup.coe_mul, inv_mul_cancel] |
| 131 | rfl |
| 132 | have hvav : v * (a * v) = v := by rw [← mul_assoc, mul_comm v a, hav] |
| 133 | change (v • (γ.val.val - 1))ᴴ * (1 + a • v • (γ.val.val - 1)) = -(v • (γ.val.val - 1)) |
| 134 | rw [conjTranspose_smul, conjTranspose_sub, conjTranspose_one, hv_star, smul_smul, |
| 135 | mul_add, mul_one, smul_mul_smul_comm, hvav, ← smul_add, sub_mul, mul_sub, one_mul, mul_one, |
| 136 | hgg, ← smul_neg] |
| 137 | congr 1 |
| 138 | abel |
| 139 | |
| 140 | /-- The two support conditions of `New.IsMatchingPair` for the indicator functions of a subgroup |
| 141 | `L` of `G`. Let `Nm : G → G` map `L` into itself, and let `γ ∈ L` imply `a ∈ L`. Then the |
| 142 | indicator of `L` takes the same value at `j x` and at `a` whenever `j x = γ = Nm a`, and |
| 143 | `a⁻¹ * δ ∈ L` whenever `Nm δ = γ` and `δ` lies in the support of the indicator of `L`. -/ |
| 144 | lemma indicator_comp_eq_and_inv_mul_mem_of_mem_imp_mem {G A : Type*} [Group G] {L : Subgroup G} |
| 145 | {Nm : G → G} (j : A → G) (h_norm_mem : ∀ {δ : G}, δ ∈ L → Nm δ ∈ L) {γ a : G} |
| 146 | (ha_mem : γ ∈ L → a ∈ L) : |
| 147 | (∀ x : A, j x = γ → Nm a = γ → (indicator L 1 ∘ j) x = indicator L (1 : G → ℂ) a) ∧ |
| 148 | ∀ δ : G, Nm δ = γ → indicator L (1 : G → ℂ) δ ≠ 0 → a⁻¹ * δ ∈ L := by |
| 149 | classical |
| 150 | constructor |
| 151 | · rintro x hjx rfl |
| 152 | have h_iff : Nm a ∈ L ↔ a ∈ L := ⟨ha_mem, h_norm_mem⟩ |
| 153 | simp [hjx, Set.indicator_apply, h_iff] |
| 154 | · rintro δ rfl hδ_supp |
| 155 | have hδ_mem : δ ∈ L := by simpa using hδ_supp |
| 156 | exact mul_mem (inv_mem (ha_mem (h_norm_mem hδ_mem))) hδ_mem |
| 157 | |
| 158 | /-- Roots for one matrix in `New.cocyclesSplit_and_isMatchingPair_of_congruence` |
| 159 | (`ι = algebraMap O R`). Let `O` be profinite and integrally closed in `R`. Let `τ` commute with |
| 160 | `star`, be tame at levels `0` and `m = star m`, fix a `c` with `c - star c` a unit, and satisfy |
| 161 | `ι ∘ τ = σ ∘ ι`. Let `v` be `star`- and `σ`-fixed with `ι m * v = ι u` and `ι u * v = v`. If |
| 162 | `ι Y = v • (g - 1)`, `1 + m • Y` is a unit and `σ` fixes the characteristic polynomial of `g`, then |
| 163 | there are polynomials `z`, `z'` over `O` with the following property at `B' = v • (B - 1)`, for each |
| 164 | root `B` of that polynomial: `1 + m z'` inverts `1 + m z`, and the twisted norm |
| 165 | `T = (1 + m z) ⋯ τ^{p-1}(1 + m z)` has `(1 + m • B') * star T = T` if |
| 166 | `star B' * (1 + m • B') = -B'`. -/ |
| 167 | lemma New.exists_twisted_root_of_smul_sub_one {O R n : Type} [CommRing O] [CommRing R] |
| 168 | [Algebra O R] [StarRing O] {τ : O →+* O} {p : ℕ} {m c u : O} (hO : IsProfiniteRing O) |
| 169 | (hτ_tame : IsTameAtLevel τ p 0) (hc : τ c = c) (h_unit : IsUnit (c - star c)) |
| 170 | (hm_star : star m = m) (hm_tame : IsTameAtLevel τ p m) (hτ : ∀ x : O, τ (star x) = star (τ x)) |
| 171 | [Fintype n] [DecidableEq n] [StarRing R] [StarModule O R] |
| 172 | (h_closed : IsIntegrallyClosedIn O R) {σ : R →+* R} {v : R} |
| 173 | (hιτ : ∀ x : O, algebraMap O R (τ x) = σ (algebraMap O R x)) |
| 174 | (hmv : algebraMap O R m * v = algebraMap O R u) (huv : algebraMap O R u * v = v) |
| 175 | (hv_star : star v = v) (hσv : σ v = v) {Y : Matrix n n O} {g : U (1 : Matrix n n R)} |
| 176 | (hY : Matrix.map Y (algebraMap O R) = v • (g.val.val - 1)) (hY_unit : IsUnit (1 + m • Y)) |
| 177 | (hP : g.val.val.charpoly.map σ = g.val.val.charpoly) : |
| 178 | ∃ z z' : O[X], ∀ {k : Type} [Fintype k] [DecidableEq k] {B : Matrix k k R}, |
| 179 | aeval B g.val.val.charpoly = 0 → |
| 180 | let B' := v • (B - 1) |
| 181 | let T := aeval B' (twistedNorm (.map τ) p (1 + m • z)) |
| 182 | aeval B' ((1 + m • z') * (1 + m • z)) = 1 ∧ |
| 183 | (star B' * (1 + m • B') = -B' → (1 + m • B') * star T = T) := by |
| 184 | set ι : O →+* R := algebraMap O R |
| 185 | have hι : ∀ x : O, ι (star x) = star (ι x) := algebraMap_star_comm |
| 186 | have h_inj : (⇑ι).Injective := h_closed.algebraMap_injective |
| 187 | -- The hypotheses of `exists_isTwistedRoot_of_charpoly_eq` for `Y` can be checked after applying |
| 188 | -- `ι`. |
| 189 | have h_rel : Yᴴ * (1 + m • Y) ^ 1 = (-1) ^ 1 * Y := by |
| 190 | rw [pow_one, pow_one, neg_one_mul] |
| 191 | apply map_injective h_inj |
| 192 | dsimp only |
| 193 | rw [← RingHom.mapMatrix_apply, ← RingHom.mapMatrix_apply, map_mul, map_add, map_one, map_neg] |
| 194 | simp only [RingHom.mapMatrix_apply] |
| 195 | rw [conjTranspose_map _ hι, map_smul' (hf := map_mul ι), hY] |
| 196 | exact star_smul_sub_one_mul_one_add_smul_eq_neg (a := ι m) (by rw [hmv, huv]) hv_star g |
| 197 | obtain ⟨y, z, z', h_roots⟩ := exists_isTwistedRoot_of_charpoly_eq hO hτ_tame hc h_unit hτ hm_star |
| 198 | hm_tame.left rfl |
| 199 | (charpoly_map_eq_self_of_smul_sub_one h_inj hιτ hσv hY hP) le_rfl h_rel hY_unit |
| 200 | refine ⟨z, z', fun {k} _ _ B hB ↦ ?_⟩ |
| 201 | -- `B' = v • (B - 1)` is a root of the characteristic polynomial of `Y`. |
| 202 | have h_root : aeval (v • (B - 1)) Y.charpoly = 0 := by |
| 203 | simpa [ι, hB] using aeval_charpoly_dvd_of_smul_sub_one hY B X |
| 204 | obtain ⟨-, h_inv, h_norm, h_split⟩ := h_roots (B := v • (B - 1)) h_root |
| 205 | refine ⟨h_inv hm_tame, fun h_rel_B ↦ ?_⟩ |
| 206 | -- The exponents in `exists_isTwistedRoot_of_charpoly_eq` are `0` and `1` here. |
| 207 | simpa only [h_norm hm_tame, tsub_self, pow_zero, one_mul, pow_one] using |
| 208 | h_split (by simpa only [pow_one, neg_one_mul] using h_rel_B) |
| 209 | |
| 210 | /-- Determinants for one matrix in `New.exists_isNormRoot_and_mem_of_mem`, where `ι` is |
| 211 | `algebraMap O R` and `m = u * M`. Let `O` be integrally closed in `R`, let `ι Y = v • (g - 1)`, let |
| 212 | `B` be a root of the characteristic polynomial of `g`, and let `(1 + m z') (1 + m z)` be `1` at |
| 213 | `B' = v • (B - 1)`. Then `det ((1 + m z) (B'))` is `1 + ι (M * w)` for some `w` over `O`, with |
| 214 | inverse `1 + ι (M * w')` for some `w'` over `O`. -/ |
| 215 | lemma New.exists_det_one_add_smul_aeval_eq_of_smul_sub_one {O R n k : Type} [CommRing O] |
| 216 | [CommRing R] [Algebra O R] [Fintype n] [DecidableEq n] [Fintype k] [DecidableEq k] |
| 217 | (h_closed : IsIntegrallyClosedIn O R) {u M m : O} (hm_eq : u * M = m) {v : R} |
| 218 | {Y : Matrix n n O} {g : Matrix n n R} (hY : Matrix.map Y (algebraMap O R) = v • (g - 1)) |
| 219 | {B : Matrix k k R} (hB : aeval B g.charpoly = 0) {z z' : O[X]} |
| 220 | (h_prod : aeval (v • (B - 1)) ((1 + m • z') * (1 + m • z)) = 1) : |
| 221 | ∃ w w' : O, (1 + algebraMap O R (M * w)) * (1 + algebraMap O R (M * w')) = 1 ∧ |
| 222 | (1 + m • aeval (v • (B - 1)) z).det = 1 + algebraMap O R (M * w) := by |
| 223 | -- For a polynomial `r` over `O`, the matrix `-r (v • (B - 1))` is killed by the characteristic |
| 224 | -- polynomial of `-r Y`, since `B` is a root of the characteristic polynomial of `g`. |
| 225 | set ι : O →+* R := algebraMap O R |
| 226 | have h_det (r : O[X]) : ∃ w : O, (1 + m • aeval (v • (B - 1)) r).det = 1 + ι (M * w) := by |
| 227 | have h_killed : aeval (-aeval (v • (B - 1)) r) ((aeval Y (-r)).charpoly.map ι) = 0 := by |
| 228 | simpa [ι, hB] using aeval_charpoly_dvd_of_smul_sub_one hY B (-r) |
| 229 | exact exists_det_one_add_smul_eq h_closed (charpoly_monic _) h_killed (Dvd.intro_left u hm_eq) |
| 230 | obtain ⟨w, hw⟩ := h_det z |
| 231 | obtain ⟨w', hw'⟩ := h_det z' |
| 232 | -- Take determinants in `(1 + m z') (1 + m z) = 1` at `v • (B - 1)`. |
| 233 | have h_prod_eval : (1 + m • aeval (v • (B - 1)) z') * (1 + m • aeval (v • (B - 1)) z) = 1 := by |
| 234 | simpa only [map_mul, map_add, map_one, map_smul] using h_prod |
| 235 | have h_inv : (1 + ι (M * w')) * (1 + ι (M * w)) = 1 := by |
| 236 | rw [← hw, ← hw', ← Matrix.det_mul, h_prod_eval, Matrix.det_one] |
| 237 | exact ⟨w, w', mul_eq_one_symm h_inv, hw⟩ |
| 238 | |
| 239 | /-- The root for one characteristic polynomial in |
| 240 | `New.cocyclesSplit_and_isMatchingPair_of_congruence`, in its setting, with `u` and `v` `star`-fixed, |
| 241 | `σ v = v` and `u * m = m`. Suppose `Y s` over `O` has `ι (Y s) = v • (s - 1)` for each `s ∈ L`, and |
| 242 | one `g ∈ L` has `1 + m • Y g` a unit and a `σ`-fixed characteristic polynomial `P`. Then some root |
| 243 | `z` for `P` (`New.IsNormRoot`; among its conditions, its value at each matrix root `B` of `P` has |
| 244 | determinant in `D`) has `γ ∈ L → a ∈ L` for unitary `γ` of characteristic polynomial `P` and |
| 245 | `a * (u • z)(γ)ᴴ = (u • z)(γ)`. -/ |
| 246 | lemma New.exists_isNormRoot_and_mem_of_mem {O R n : Type} [CommRing O] [CommRing R] [Algebra O R] |
| 247 | [StarRing O] {τ : O →+* O} {p : ℕ} {m c : O} (u : O) (hO : IsProfiniteRing O) |
| 248 | (hτ_tame : IsTameAtLevel τ p 0) (hc : τ c = c) (h_unit : IsUnit (c - star c)) |
| 249 | (hm_star : star m = m) (hm_tame : IsTameAtLevel τ p m) (hτ : ∀ x : O, τ (star x) = star (τ x)) |
| 250 | [Fintype n] [DecidableEq n] [StarRing R] [StarModule O R] |
| 251 | (h_closed : IsIntegrallyClosedIn O R) {σ : R →+* R} {v : R} {M : O} |
| 252 | {L : Subgroup (U (1 : Matrix n n R))} {D : Subgroup Rˣ} (hm_eq : u * M = m) |
| 253 | (hιτ : ∀ x : O, algebraMap O R (τ x) = σ (algebraMap O R x)) |
| 254 | (hmv : algebraMap O R m * v = algebraMap O R u) (huv : algebraMap O R u * v = v) |
| 255 | (hL : ∀ g : U (1 : Matrix n n R), |
| 256 | g ∈ L ↔ ∃ Y : Matrix n n O, Matrix.map Y (algebraMap O R) = v • (g.val.val - 1)) |
| 257 | (hD : ∀ (y z : O) (h_inv : (1 + algebraMap O R (M * y)) * (1 + algebraMap O R (M * z)) = 1), |
| 258 | Units.mkOfMulEqOne (1 + algebraMap O R (M * y)) (1 + algebraMap O R (M * z)) h_inv ∈ D) |
| 259 | (hu_star : star (algebraMap O R u) = algebraMap O R u) (hv_star : star v = v) |
| 260 | (hum : algebraMap O R u * algebraMap O R m = algebraMap O R m) (hσv : σ v = v) |
| 261 | (Y : ∀ s : U (1 : Matrix n n R), s ∈ L → Matrix n n O) |
| 262 | (hY : ∀ (s : U (1 : Matrix n n R)) (hs : s ∈ L), |
| 263 | Matrix.map (Y s hs) (algebraMap O R) = v • (s.val.val - 1)) |
| 264 | {g : U (1 : Matrix n n R)} (hg : g ∈ L) (hg_unit : IsUnit (1 + m • Y g hg)) |
| 265 | (hP : g.val.val.charpoly.map σ = g.val.val.charpoly) : |
| 266 | ∃ z : Polynomial R, IsNormRoot n σ p (algebraMap O R u) D g.val.val.charpoly z ∧ |
| 267 | ∀ γ a : U (1 : Matrix n n R), γ.val.val.charpoly = g.val.val.charpoly → |
| 268 | IsRootQuotient γ (algebraMap O R u • z) a.val → γ ∈ L → a ∈ L := by |
| 269 | classical |
| 270 | set ι : O →+* R := algebraMap O R |
| 271 | have hι : ∀ x : O, ι (star x) = star (ι x) := algebraMap_star_comm |
| 272 | -- `q r` is `r` read in the coordinate `v • (X - 1)` |
| 273 | let q : O[X] →+* R[X] := (compRingHom (v • (X - 1))).comp (mapRingHom ι) |
| 274 | obtain ⟨z, z', h_at⟩ := exists_twisted_root_of_smul_sub_one hO hτ_tame hc h_unit hm_star hm_tame |
| 275 | hτ h_closed hιτ hmv huv hv_star hσv (hY g hg) hg_unit hP |
| 276 | have h_self (γ : U (1 : Matrix n n R)) (hγ : γ.val.val.charpoly = g.val.val.charpoly) : |
| 277 | aeval γ.val.val g.val.val.charpoly = 0 := by rw [← hγ, aeval_self_charpoly] |
| 278 | -- The root is `q (1 + m z)`: first the conditions of `IsNormRoot`, then `a ∈ L`. |
| 279 | refine ⟨q (1 + m • z), ⟨?_, fun γ hγ ↦ ⟨fun _ B hB ↦ ?_, ?_⟩⟩, fun γ a hγ ha ↦ ?_⟩ |
| 280 | · simp [q, hum, Polynomial.map_add, smul_smul, sub_mul] |
| 281 | · -- The determinant of the root at `B` is a unit `1 + ι (M * w)` of the kind that `D` contains. |
| 282 | obtain ⟨w, w', h_inv, h_det⟩ : ∃ w w' : O, (1 + ι (M * w)) * (1 + ι (M * w')) = 1 ∧ |
| 283 | (1 + m • aeval (v • (B - 1)) z).det = 1 + ι (M * w) := |
| 284 | exists_det_one_add_smul_aeval_eq_of_smul_sub_one h_closed hm_eq (hY g hg) hB (h_at hB).left |
| 285 | have h_q_eval : aeval B (q (1 + m • z)) = 1 + m • aeval (v • (B - 1)) z := by |
| 286 | simp [q, ι, AlgHom.map_smul_of_tower, aeval_comp, aeval_map_algebraMap] |
| 287 | have h_det_eq : (aeval B (q (1 + m • z))).det = 1 + ι (M * w) := by rw [h_q_eval, h_det] |
| 288 | exact ⟨_, hD _ _ h_inv, h_det_eq.symm⟩ |
| 289 | · -- `B' = v • (γ - 1)` satisfies `star B' * (1 + m • B') = -B'`. |
| 290 | have hB : |
| 291 | star (v • (γ.val.val - 1)) * (1 + m • v • (γ.val.val - 1)) = -(v • (γ.val.val - 1)) := by |
| 292 | simpa only [algebraMap_smul, ι] using |
| 293 | star_smul_sub_one_mul_one_add_smul_eq_neg (a := ι m) (by rw [hmv, huv]) hv_star γ |
| 294 | -- `q` commutes with taking norms, as `σ` fixes `v` |
| 295 | have hq (r : O[X]) : q (r.map τ) = (q r).map σ := by |
| 296 | simp [q, hσv, Polynomial.map_map, show ι.comp τ = σ.comp ι from RingHom.ext hιτ, map_comp] |
| 297 | have hT : aeval γ.val.val (twistedNorm (.map σ) p (q (1 + m • z))) = |
| 298 | aeval (v • (γ.val.val - 1)) (twistedNorm (.map τ) p (1 + m • z)) := by |
| 299 | simpa [q, ι, aeval_comp] using |
| 300 | congrArg (aeval γ.val.val) (map_twistedNorm q.toMonoidHom hq p (1 + m • z)).symm |
| 301 | rw [IsRootQuotient, hT, ← hmv, mul_smul, algebraMap_smul] |
| 302 | exact (h_at (h_self γ hγ)).2 hB |
| 303 | -- If `γ ∈ L`, multiply `a * Zᴴ = Z` on the `u`-part, `Z = (1 + m z) (Y γ)`, by the adjoint of the |
| 304 | -- inverse `1 + m z'`; this shows that `v • (a - 1)` comes from `O`. |
| 305 | intro hγ_mem |
| 306 | have h_inv : aeval (v • (γ.val.val - 1)) ((1 + m • z') * (1 + m • z)) = 1 := |
| 307 | (h_at (h_self γ hγ)).1 |
| 308 | have h_va_eq : v • a.val.val = v • (aeval (v • (γ.val.val - 1)) (1 + m • z) * |
| 309 | (aeval (v • (γ.val.val - 1)) (1 + m • z'))ᴴ) := by |
| 310 | let W : Matrix n n R := (aeval γ.val.val (q (1 + m • z')))ᴴ |
| 311 | have h_mul : v • (a.val.val * (aeval γ.val.val (ι u • q (1 + m • z)))ᴴ) * W = |
| 312 | v • aeval γ.val.val (ι u • q (1 + m • z)) * W := congrArg (fun x ↦ v • x * W) ha |
| 313 | simpa [W, h_inv, huv, hu_star, ι, -algebraMap_smul, mul_comm v, ← map_mul, q, mul_assoc, |
| 314 | -map_add, -Polynomial.map_add, ← conjTranspose_mul, aeval_comp, smul_smul] using h_mul |
| 315 | refine (hL a).mpr ⟨u • (z.aeval (Y γ hγ_mem) + (1 + m • z).aeval (Y γ hγ_mem) * |
| 316 | (z'.aeval (Y γ hγ_mem))ᴴ), ?_⟩ |
| 317 | rw [map_smul' (hf := map_mul ι), ← RingHom.mapMatrix_apply, map_add, map_mul] |
| 318 | simp only [RingHom.mapMatrix_apply] |
| 319 | rw [conjTranspose_map _ hι, map_aeval_matrix, map_aeval_matrix, map_aeval_matrix, |
| 320 | aeval_map_algebraMap, aeval_map_algebraMap, aeval_map_algebraMap, hY, smul_sub v a.val.val 1, |
| 321 | h_va_eq, ← hmv, mul_comm (ι m) v, mul_smul, ← smul_sub] |
| 322 | congr 1 |
| 323 | rw [map_add (aeval _), map_one, map_smul, map_add (aeval _), map_one, map_smul, |
| 324 | conjTranspose_add, conjTranspose_one, conjTranspose_smul, hm_star, mul_add, mul_one, |
| 325 | mul_smul_comm, algebraMap_smul, smul_add, add_assoc, add_sub_cancel_left] |
| 326 | |
| 327 | /-- Let `O` be profinite and integrally closed in `R`. Let `τ`, with `τ ^ p = 1`, be tame on `O` at |
| 328 | the levels `0` and `m = u * M` (`star m = m`), commute with `star`, and fix some `c` with |
| 329 | `c - star c` a unit. `ι = algebraMap O R` carries `τ` to a `σ` that commutes with `star`; |
| 330 | `mapEnd hσ` applies `σ` to each entry of a unitary matrix. Let `L` be the `σ`-stable group of |
| 331 | unitary `g` over `R` with `v • (g - 1)` over `O`, where `m * v = u` and `u * v = v`. Then (a) the |
| 332 | cocycles in `L` split on the support of `u`, and (b) for any map `j : A → U 1`, the indicator of `L` |
| 333 | and its pull-back along `j` form a matching pair (`New.IsMatchingPair`) for every `D` that holds the |
| 334 | units `1 + ι (M * y)`. -/ |
| 335 | lemma New.cocyclesSplit_and_isMatchingPair_of_congruence {O R n : Type} [CommRing O] [CommRing R] |
| 336 | [Algebra O R] [StarRing O] {τ : O →+* O} {p : ℕ} {m c : O} (u : O) (hO : IsProfiniteRing O) |
| 337 | (hτ_tame : IsTameAtLevel τ p 0) (hc : τ c = c) (h_unit : IsUnit (c - star c)) |
| 338 | (hm_star : star m = m) (hm_tame : IsTameAtLevel τ p m) (hτ : ∀ x : O, τ (star x) = star (τ x)) |
| 339 | [Fintype n] [DecidableEq n] [StarRing R] (h_starModule : StarModule O R) |
| 340 | (h_closed : IsIntegrallyClosedIn O R) {σ : R →+* R} (hσ : ∀ (x : R), σ (star x) = star (σ x)) |
| 341 | {v : R} {M : O} {L : Subgroup (U (1 : Matrix n n R))} {D : Subgroup Rˣ} {A : Type*} |
| 342 | {j : A → U (1 : Matrix n n R)} (hm_eq : u * M = m) |
| 343 | (hL_tw : ∀ k ∈ L, mapEnd (n := n) (σ := σ) hσ k ∈ L) |
| 344 | (hιτ : ∀ x : O, algebraMap O R (τ x) = σ (algebraMap O R x)) |
| 345 | (hmv : algebraMap O R m * v = algebraMap O R u) (huv : algebraMap O R u * v = v) |
| 346 | (hL : ∀ g : U (1 : Matrix n n R), |
| 347 | g ∈ L ↔ ∃ Y : Matrix n n O, Matrix.map Y (algebraMap O R) = v • (g.val.val - 1)) |
| 348 | (hD : ∀ (y z : O) (h_inv : (1 + algebraMap O R (M * y)) * (1 + algebraMap O R (M * z)) = 1), |
| 349 | Units.mkOfMulEqOne (1 + algebraMap O R (M * y)) (1 + algebraMap O R (M * z)) h_inv ∈ D) : |
| 350 | -- (a) |
| 351 | CocyclesSplit p (algebraMap O R u) L (mapEnd hσ) ∧ |
| 352 | -- (b) |
| 353 | IsMatchingPair (A := A) hσ p (algebraMap O R u) D j L (indicator L 1 ∘ j) (indicator L 1) := by |
| 354 | classical |
| 355 | -- An element `s ∈ L` has `v • (s - 1) = ι Y` with `Y` over `O`, and `1 + m • Y` is a unitary |
| 356 | -- matrix over `O` that lifts the `u`-part `cutAt s` of `s`. Both claims are transported from `O`: |
| 357 | -- the first is Hilbert 90 at level `m`, the second uses the root that |
| 358 | -- `New.exists_isNormRoot_and_mem_of_mem` gives. |
| 359 | set ι : O →+* R := algebraMap O R |
| 360 | have hι : ∀ x : O, ι (star x) = star (ι x) := algebraMap_star_comm |
| 361 | have h_inj : (⇑ι).Injective := h_closed.algebraMap_injective |
| 362 | -- `ι u` is an idempotent with `ι u * ι m = ι m`. The relations with `ι m` determine `ι u` and |
| 363 | -- `v`, so `star` and `σ`, which fix `ι m`, fix them too. |
| 364 | have hu : ι u * ι u = ι u := by linear_combination (1 - ι u) * hmv + ι m * huv |
| 365 | have hum : ι u * ι m = ι m := by rw [← hm_eq, map_mul, ← mul_assoc, hu] |
| 366 | have h_unique {a b : R} (hmb : ι m * b = a) (hab : a * b = b) (ham : a * ι m = ι m) : |
| 367 | a = ι u ∧ b = v := by |
| 368 | have ha : a = ι u := by linear_combination (ι u - 1) * hmb - b * hum + (1 - a) * hmv + v * ham |
| 369 | exact ⟨ha, by linear_combination (b + v) * ha - hab - b * hmv + v * hmb + huv⟩ |
| 370 | have h_fixed (φ : R →+* R) (hφ : φ (ι m) = ι m) : φ (ι u) = ι u ∧ φ v = v := by |
| 371 | apply h_unique |
| 372 | · rw [← hmv, map_mul φ, hφ] |
| 373 | · rw [← map_mul φ, huv] |
| 374 | · rw [← hφ, ← map_mul φ, hum] |
| 375 | obtain ⟨hu_star, hv_star⟩ : star (ι u) = ι u ∧ star v = v := |
| 376 | h_fixed (starRingEnd R) (by rw [starRingEnd_apply, ← hι, hm_star]) |
| 377 | obtain ⟨hσu, hσv⟩ := h_fixed σ (by rw [← hιτ, hm_tame.apply_eq_self]) |
| 378 | let e : U (1 : Matrix n n O) →* U (1 : Matrix n n R) := map ι hι (one_map_ringHom ι) |
| 379 | choose Y hY using fun s ↦ (hL s).mp |
| 380 | have h_lift (s : U (1 : Matrix n n R)) (hs : s ∈ L) : |
| 381 | ∃ S : U (1 : Matrix n n O), S.val.val = 1 + m • Y s hs ∧ e S = cutAt hu hu_star s := by |
| 382 | refine mem_range_map hι h_inj isUnit_one _ ?_ |
| 383 | simp [hY, hmv, Matrix.map_add, map_smul', smul_smul, cutAt, cutGL] |
| 384 | module |
| 385 | choose S hS hS_cut using h_lift |
| 386 | have h_norm_mem {δ : U (1 : Matrix n n R)} : δ ∈ L → twistedNorm (mapEnd hσ) p δ ∈ L := |
| 387 | twistedNorm_mem (mapEnd hσ) p hL_tw |
| 388 | refine ⟨fun s hs hN ↦ ?_, ?_, ?_⟩ |
| 389 | · -- the lift of `s` has norm `1` too, so it is a coboundary of some `t ≡ 1` mod `m` |
| 390 | -- `e` and `cutAt` commute with the twists, so `e` carries the norm of `S s` to that of `s`. |
| 391 | have h_e_comm (δ : U (1 : Matrix n n O)) : e (mapEnd hτ δ) = mapEnd hσ (e δ) := |
| 392 | Subtype.ext (Units.ext (Matrix.ext fun _ _ ↦ hιτ _)) |
| 393 | have h_cut_comm (δ : U (1 : Matrix n n R)) : |
| 394 | cutAt hu hu_star (mapEnd hσ δ) = mapEnd hσ (cutAt hu hu_star δ) := |
| 395 | Subtype.ext (Units.ext (by |
| 396 | change ι u • δ.val.val.map σ + (1 - ι u) • 1 = (ι u • δ.val.val + (1 - ι u) • 1).map σ |
| 397 | rw [← RingHom.mapMatrix_apply σ (ι u • δ.val.val + (1 - ι u) • 1), map_add, |
| 398 | RingHom.mapMatrix_apply, RingHom.mapMatrix_apply, map_smul' (hf := map_mul σ), |
| 399 | map_smul' (hf := map_mul σ), ← RingHom.mapMatrix_apply σ 1, map_one, map_sub, |
| 400 | map_one, hσu])) |
| 401 | have h_norm : e (twistedNorm (mapEnd hτ) p (S s hs)) = e 1 := by |
| 402 | rw [map_twistedNorm (σ := mapEnd hσ) e h_e_comm, hS_cut, |
| 403 | ← map_twistedNorm (cutAt hu hu_star) h_cut_comm, hN, map_one, map_one] |
| 404 | obtain ⟨t, W, ht : S s hs * mapEnd hτ t = t, hW : t.val.val = 1 + m • W⟩ := |
| 405 | unitary_hilbert90_at_level hO hτ_tame hc h_unit hτ (S s hs) hm_star hm_tame (hS s hs) |
| 406 | (map_injective h_inj (congrArg (fun x : U (1 : Matrix n n R) ↦ x.val.val) h_norm)) |
| 407 | have h_et_mem : e t ∈ L := (hL (e t)).mpr ⟨u • W, by |
| 408 | change (u • W).map ι = v • ((t.val.val).map ι - 1) |
| 409 | rw [map_smul' (hf := map_mul ι), hW, ← RingHom.mapMatrix_apply ι (1 + m • W), map_add, |
| 410 | map_one, RingHom.mapMatrix_apply, map_smul' (hf := map_mul ι), add_sub_cancel_left, |
| 411 | smul_smul, mul_comm v, hmv]⟩ |
| 412 | have h_et_off : (1 - ι u) • (e t).val.val = (1 - ι u) • 1 := by |
| 413 | change (1 - ι u) • (t.val.val).map ι = (1 - ι u) • 1 |
| 414 | rw [hW, ← RingHom.mapMatrix_apply, map_add, map_one, RingHom.mapMatrix_apply, |
| 415 | map_smul' (hf := map_mul ι), smul_add, smul_smul, sub_mul, one_mul, hum, sub_self, |
| 416 | zero_smul, add_zero] |
| 417 | refine ⟨e t, h_et_mem, h_et_off, ?_⟩ |
| 418 | -- On the `u`-part, `t⁻¹ * s * τ t = 1` is `e` applied to `t⁻¹ * S * τ t = 1`. |
| 419 | have h_cut_u : ι u • (cutAt hu hu_star s).val.val = ι u • s.val.val := by |
| 420 | change ι u • (ι u • s.val.val + (1 - ι u) • 1) = ι u • s.val.val |
| 421 | rw [smul_add, smul_smul, smul_smul, hu, mul_sub, mul_one, hu, sub_self, zero_smul, add_zero] |
| 422 | have h_cob : ι u • (e (t⁻¹ * (S s hs * mapEnd hτ t))).val.val = ι u • 1 := by |
| 423 | rw [ht, inv_mul_cancel, map_one] |
| 424 | rfl |
| 425 | rw [map_mul, map_mul, map_inv, hS_cut, h_e_comm, Subgroup.coe_mul, Subgroup.coe_mul, |
| 426 | Units.val_mul, Units.val_mul, ← mul_smul_comm, ← smul_mul_assoc, h_cut_u, |
| 427 | smul_mul_assoc, mul_smul_comm, ← Units.val_mul, ← Units.val_mul, |
| 428 | ← Subgroup.coe_mul, ← Subgroup.coe_mul, ← mul_assoc] at h_cob |
| 429 | exact h_cob |
| 430 | · -- the indicator of `L` is invariant under twisted conjugation by `L` |
| 431 | simp +contextual [mul_mem_cancel_left, mul_mem_cancel_right, hL_tw, indicator] |
| 432 | -- The polynomial is that of some `g`, which lies in `L` by the supports. |
| 433 | rintro _ ⟨g, hg_supp, rfl⟩ hP |
| 434 | have hg : g ∈ L := by |
| 435 | rcases hg_supp with ⟨x, hx_supp, rfl⟩ | ⟨δ, hδ_supp, rfl⟩ |
| 436 | · simpa using hx_supp |
| 437 | · exact h_norm_mem (by simpa using hδ_supp) |
| 438 | obtain ⟨z, hz_root, hz_mem⟩ := exists_isNormRoot_and_mem_of_mem u hO hτ_tame hc h_unit hm_star |
| 439 | hm_tame hτ h_closed hm_eq hιτ hmv huv hL hD hu_star hv_star hum hσv Y hY hg |
| 440 | ⟨(S g hg).val, hS g hg⟩ hP |
| 441 | exact ⟨z, hz_root, fun γ a hγ ha ↦ |
| 442 | indicator_comp_eq_and_inv_mul_mem_of_mem_imp_mem j h_norm_mem (hz_mem γ a hγ ha)⟩ |
| 443 | |
| 444 | end UnitPairs |
| 445 | |
| 446 | /-! |
| 447 | ## Unramified places of a step and levels with matching unit pairs |
| 448 | |
| 449 | `New.placesAbove E' S` is the set of places above `S` and its conjugates, `New.idem A` the adele |
| 450 | that is `1` at the places of `A` and `0` elsewhere, `New.kerCompNorm E' μ` the kernel of `μ ∘ Nm`, |
| 451 | `New.baseChangeGf` the inclusion of the unitary groups, `New.galoisGf σ` the Galois action, and |
| 452 | `New.IsMatchingPairAbove` the matching condition `New.IsMatchingPair` above `S`. |
| 453 | -/ |
| 454 | |
| 455 | section BaseChangeLevel |
| 456 | |
| 457 | open NumberField Matrix Set Valued Module Ideal Subtype |
| 458 | |
| 459 | namespace New |
| 460 | |
| 461 | variable {E E' n : Type} [Field E] [CMType E] [Field E'] [Algebra E E'] |
| 462 | |
| 463 | section |
| 464 | |
| 465 | variable [NumberField E'] (μ : (𝔸f E)ˣ →* ℂˣ) |
| 466 | |
| 467 | /-- The place `u` of `E'` is unramified for the step `E' / E` and the character `μ`: its inertia |
| 468 | group is not all of `Gal(E'/E)`, and `μ` kills the norms of the local units at `u`. -/ |
| 469 | structure IsStepUnramifiedPlace (u : FinPlace E') : Prop where |
| 470 | /-- The inertia group of `u` is not all of `Gal(E'/E)`. -/ |
| 471 | exists_notMem_inertia : ∃ τ : Gal(E'/E), τ ∉ u.asIdeal.inertia Gal(E'/E) |
| 472 | /-- `μ` is trivial on the norms of the local units at `u`. -/ |
| 473 | apply_localNorm_eq_one (x : (LocField u)ˣ) (hx : v x.val = 1) : |
| 474 | μ (locIdele (u.below E) (localNorm E u x)) = 1 |
| 475 | |
| 476 | variable (E') in |
| 477 | /-- The place `w` of `E` is unramified for the step `E' / E` and the character `μ`: so is every |
| 478 | place of `E'` above it. -/ |
| 479 | def IsStepUnramifiedAt (w : FinPlace E) : Prop := |
| 480 | ∀ u : FinPlace E', u.below E = w → IsStepUnramifiedPlace μ u |
| 481 | |
| 482 | end |
| 483 | |
| 484 | variable [CMType E'] [Fintype n] [DecidableEq n] (σ : Gal(E'/E)) (μ : (𝔸f E)ˣ →* ℂˣ) |
| 485 | |
| 486 | /-- The subgroup `L` of the finite adelic unitary group over `E'` is a level at which the |
| 487 | indicator functions match above the set `S` of places of `E` and its conjugates: `L` is open and |
| 488 | stable under `σ`, its cocycles split above `S`, and the indicator function of `L` matches its |
| 489 | pull-back to `E`. -/ |
| 490 | structure IsMatchingLevel (S : Set (FinPlace E)) (L : Subgroup (Gf E' n)) : Prop where |
| 491 | /-- `L` is open. -/ |
| 492 | isOpen : L.IsOpen |
| 493 | /-- `L` is stable under `σ`. -/ |
| 494 | galoisGf_mem_iff (k : Gf E' n) : galoisGf σ k ∈ L ↔ k ∈ L |
| 495 | /-- The cocycles in `L` are coboundaries above `S`. -/ |
| 496 | cocyclesSplit : CocyclesSplit (finrank E E') (idem (placesAbove E' S)) L (galoisGf σ) |
| 497 | /-- The indicator function of `L` and its pull-back to `E` form a matching pair above `S`. -/ |
| 498 | isMatchingPairAbove_indicator : |
| 499 | IsMatchingPairAbove σ μ S L (indicator L 1 ∘ baseChangeGf (E' := E')) (indicator L 1) |
| 500 | |
| 501 | /-- The local levels `K u` over `E'` form a base change level below the subgroup `H` of the finite |
| 502 | adelic unitary group over `E`. -/ |
| 503 | structure IsBaseChangeLevel (H : Subgroup (Gf E n)) |
| 504 | (K : (u : FinPlace E') → Subgroup (GL n (LocField u))) : Prop where |
| 505 | /-- Each `K u` lies in `GL_n(O_u)`. -/ |
| 506 | le_localIntGL (u : FinPlace E') : K u ≤ localIntGL n u |
| 507 | /-- The group cut out by `K` above any set `S` and its conjugates is a matching level. -/ |
| 508 | isMatchingLevel (S : Set (FinPlace E)) : |
| 509 | IsMatchingLevel σ μ S (localLevel n (placesAbove E' S) K) |
| 510 | /-- The elements over `E` that lie in `K u` at every `u` lie in `H`. -/ |
| 511 | comap_le : (localLevel n univ K).comap baseChangeGf ≤ H |
| 512 | /-- `K u = GL_n(O_u)` at the places `u` above an unramified place `w` and its conjugate, when |
| 513 | `H` contains the integral points supported at `w` and its conjugate (`maxCompactAt n w`). -/ |
| 514 | eq_localIntGL (w : FinPlace E) (hw : IsStepUnramifiedAt E' μ w) (hH : maxCompactAt n w ≤ H) |
| 515 | (u : FinPlace E') (hu : u ∈ placesAbove E' {w}) : K u = localIntGL n u |
| 516 | |
| 517 | end New |
| 518 | |
| 519 | namespace New |
| 520 | |
| 521 | variable {E E' n : Type} [Field E] [CMType E] [Field E'] [CMType E'] [Algebra E E'] |
| 522 | [Fintype n] [DecidableEq n] {σ : Gal(E'/E)} (hσ : σ ≠ 1) |
| 523 | {μ : (𝔸f E)ˣ →* ℂˣ} [hμ : IsStep (E := E) E' μ] {f : E →+* E} |
| 524 | |
| 525 | /-- If the conjugate place `star u` is unramified for the step, so is `u`. -/ |
| 526 | lemma IsStepUnramifiedPlace.of_star {u : FinPlace E'} |
| 527 | (h_unram : IsStepUnramifiedPlace μ (star u)) : IsStepUnramifiedPlace μ u := by |
| 528 | constructor |
| 529 | · -- An element outside the inertia group of `star u` is outside that of `u`, since complex |
| 530 | -- conjugation commutes with it. |
| 531 | obtain ⟨τ, hτ⟩ := h_unram.exists_notMem_inertia |
| 532 | refine ⟨τ, fun h_inertia ↦ hτ fun x ↦ ?_⟩ |
| 533 | have h_comm : τ • star x = star (τ • x) := RingOfIntegers.ext (map_star_CM τ.toRingHom _) |
| 534 | have h_mem : τ • star x - star x ∈ u.asIdeal := h_inertia (star x) |
| 535 | simpa [h_comm] using h_mem |
| 536 | · -- For the norm `z` of a local unit `y`, `μ` kills `z * star z`, and `star z` is the norm of a |
| 537 | -- local unit at `star u`, which `μ` kills too. |
| 538 | intro y hy |
| 539 | let z : (𝔸f E)ˣ := Units.map (adeleNorm E E') (locIdele u y) |
| 540 | have h_sign : μ (z * star z) = 1 := |
| 541 | (hμ.apply_norm_eq_one_iff z).2 ⟨1, locIdele u y, by simp [z]⟩ |
| 542 | have h_star : μ (star z) = 1 := by |
| 543 | rw [← units_map_adeleNorm_star, star_locIdele, adeleNorm_locIdele] |
| 544 | exact h_unram.apply_localNorm_eq_one _ (by simpa using hy) |
| 545 | have h_norm : z = locIdele (u.below E) (localNorm E u y) := adeleNorm_locIdele u y |
| 546 | rwa [map_mul, h_star, mul_one, h_norm] at h_sign |
| 547 | |
| 548 | /-- The finite adele that is `1` at the places of `A` and `x` at the others. -/ |
| 549 | noncomputable def adeleOneOn {F : Type} [Field F] [NumberField F] (A : Set (FinPlace F)) |
| 550 | (x : 𝔸f F) : 𝔸f F := |
| 551 | x + idem A * (1 - x) |
| 552 | |
| 553 | /-- The adele `adeleOneOn A x`, which is `1` on `A` and `x` off `A`, is continuous in `x`. -/ |
| 554 | @[fun_prop] |
| 555 | lemma continuous_adeleOneOn {F : Type} [Field F] [NumberField F] (A : Set (FinPlace F)) : |
| 556 | Continuous (adeleOneOn A) := by |
| 557 | exact continuous_id.add (continuous_const.mul (continuous_const.sub continuous_id)) |
| 558 | |
| 559 | /-- If `a * b = 1`, the adeles that are `1` on `A` and `a`, resp. `b`, off `A` are inverse to each |
| 560 | other. -/ |
| 561 | lemma adeleOneOn_mul_adeleOneOn_of_mul_eq_one (A : Set (FinPlace E')) {a b : 𝔸f E'} |
| 562 | (h_mul : a * b = 1) : adeleOneOn A a * adeleOneOn A b = 1 := by |
| 563 | -- `idem A` is idempotent, so the product is `a * b` off `A` and `1` on `A`. |
| 564 | unfold adeleOneOn |
| 565 | linear_combination (1 - idem A) * h_mul + ((1 - a) * (1 - b)) * idem_mul_self A |
| 566 | |
| 567 | /-- Let every place of the set `T` of places of `E` be unramified for the step. Then so is every |
| 568 | place of `E'` above a place of `T` or above the conjugate of one. -/ |
| 569 | lemma isStepUnramifiedPlace_of_mem_placesAbove {T : Set (FinPlace E)} |
| 570 | (hT : ∀ w ∈ T, IsStepUnramifiedAt E' μ w) {u : FinPlace E'} (hu : u ∈ placesAbove E' T) : |
| 571 | IsStepUnramifiedPlace μ u := by |
| 572 | -- Either `u` lies above `T`, or `star u` does. |
| 573 | rcases hu with h_below | h_star_below |
| 574 | · exact hT (u.below E) h_below u rfl |
| 575 | · exact (hT (star (u.below E)) h_star_below (star u) (below_star u)).of_star |
| 576 | |
| 577 | /-- Let `μ` kill the norms of the local units at the places of `A`. For `x` near `0`, a unit idele |
| 578 | congruent to `1` modulo `adeleOneOn A x` lies in `kerCompNorm E' μ`, the kernel of `μ ∘ Nm`. -/ |
| 579 | lemma eventually_mem_kerCompNorm_of_apply_localNorm_eq_one {A : Set (FinPlace E')} |
| 580 | (hA : ∀ u ∈ A, ∀ x : (LocField u)ˣ, v x.val = 1 → |
| 581 | μ (locIdele (u.below E) (localNorm E u x)) = 1) : |
| 582 | ∀ᶠ x : 𝔸f E' in nhds (0 : 𝔸f E'), ∀ y ∈ Ô E', ∀ d ∈ idelesUnitOff ∅, |
| 583 | d.val - adeleOneOn A x * y = 1 → d ∈ kerCompNorm E' μ := by |
| 584 | -- By compactness (the tube lemma) it is enough to see this at `x = 0`. There such an idele is |
| 585 | -- `1` off `A`, and on `A` its components are local units, whose norms `μ` kills. |
| 586 | have h_compact : IsCompact ((Ô E' : Set (𝔸f E')) ×ˢ |
| 587 | ((idelesUnitOff (∅ : Set (FinPlace E')) : Set (𝔸f E')ˣ) \ (kerCompNorm E' μ).carrier)) := |
| 588 | isCompact_Ô.prod (isCompact_idelesUnitOff_empty.diff hμ.isClopen_kerCompNorm.isOpen) |
| 589 | refine (h_compact.eventually_forall_mem |
| 590 | (fun x (p : 𝔸f E' × (𝔸f E')ˣ) ↦ p.snd.val - adeleOneOn A x * p.fst) {1}ᶜ ?_).mono |
| 591 | fun x hx y hy d hd h_eq ↦ by_contra fun h_notMem ↦ hx (y, d) ⟨hy, hd, h_notMem⟩ h_eq |
| 592 | rintro ⟨y, d⟩ ⟨-, hd, h_notMem⟩ |
| 593 | refine isOpen_ne.mem_nhds fun h_eq ↦ |
| 594 | h_notMem (mem_of_locIdele_mem hμ.isClopen_kerCompNorm.isClosed fun u ↦ ?_) |
| 595 | change μ (Units.map (adeleNorm E E') (locIdele u (ideleAt u d))) = 1 |
| 596 | rw [adeleNorm_locIdele] |
| 597 | by_cases hu : u ∈ A |
| 598 | · exact hA u hu _ (mem_idelesUnitOff.1 hd u (notMem_empty u)) |
| 599 | · have hd_one : ideleAt u d = 1 := Units.ext <| by |
| 600 | simpa [adeleOneOn, hu, ideleAt] using congrArg (fun z : 𝔸f E' ↦ z u) h_eq |
| 601 | simp [hd_one] |
| 602 | |
| 603 | /-- Let `A` be a set of unramified places. For `x` near `0`, the norm of a unit idele congruent to |
| 604 | `1` modulo `adeleOneOn A x` is killed by `μ`. -/ |
| 605 | lemma eventually_mem_kerCompNorm {A : Set (FinPlace E')} (hA : ∀ u ∈ A, IsStepUnramifiedPlace μ u) : |
| 606 | ∀ᶠ x : 𝔸f E' in nhds (0 : 𝔸f E'), ∀ y ∈ Ô E', ∀ d ∈ idelesUnitOff ∅, |
| 607 | d.val - adeleOneOn A x * y = 1 → d ∈ kerCompNorm E' μ := |
| 608 | eventually_mem_kerCompNorm_of_apply_localNorm_eq_one fun u hu ↦ (hA u hu).apply_localNorm_eq_one |
| 609 | |
| 610 | /-- Let the open subgroup `H` contain the integral points that are trivial on `S`, and let no place |
| 611 | of `A` lie above `S`. For `x` near `0`, an integral point `g` over `E` whose matrix over `E'` is |
| 612 | congruent to `1` modulo `adeleOneOn A x` lies in `H`. -/ |
| 613 | lemma eventually_mem_of_baseChangeGf_congr {H : Subgroup (Gf E n)} (hH : H.IsOpen) |
| 614 | {S : Set (FinPlace E)} (hS : stdLevel E n ⊓ Gf.trivialOn n S ≤ H) {A : Set (FinPlace E')} |
| 615 | (hA : ∀ u ∈ A, u.below E ∉ S) : |
| 616 | ∀ᶠ x : 𝔸f E' in nhds (0 : 𝔸f E'), |
| 617 | ∀ Y : Matrix n n (𝔸f E'), (∀ i j : n, Y i j ∈ Ô E') → ∀ g ∈ stdLevel E n, |
| 618 | (baseChangeGf g : Gf E' n).val.val - adeleOneOn A x • Y = 1 → g ∈ H := by |
| 619 | -- By compactness (the tube lemma) it is enough to see this at `x = 0`. There such a point is `1` |
| 620 | -- at the places of `S`, since no place above `S` is in `A`, so it lies in `H`. |
| 621 | refine ((isCompact_Ô.matrix.prod (isCompact_stdLevel.diff hH)).eventually_forall_mem |
| 622 | (fun x (p : Matrix n n (𝔸f E') × Gf E n) ↦ |
| 623 | p.snd.val.val.map (finAdeleIncl E E') - adeleOneOn A x • p.fst) {1}ᶜ ?_).mono ?_ |
| 624 | · rintro ⟨Y, g⟩ ⟨-, hg, h_notMem⟩ |
| 625 | refine isOpen_ne.mem_nhds fun h_eq ↦ h_notMem (hS ⟨hg, Gf.mem_trivialOn.2 fun w hw ↦ ?_⟩) |
| 626 | obtain ⟨u, rfl⟩ := FinPlace.comap_surjective (algebraMap E E') w |
| 627 | have huA : u ∉ A := fun hu ↦ hA u hu hw |
| 628 | refine GeneralLinearGroup.ext fun i j ↦ (locMap (algebraMap E E') (w := u) rfl).injective ?_ |
| 629 | have h_entry : (g.val.val.map (finAdeleIncl E E')) i j u = (1 + adeleOneOn A 0 • Y) i j u := by |
| 630 | rw [eq_add_of_sub_eq h_eq] |
| 631 | refine h_entry.trans ?_ |
| 632 | by_cases hij : i = j <;> simp [adeleOneOn, hij, huA] |
| 633 | · intro x hx Y hY g hg h_eq |
| 634 | by_contra h_notMem |
| 635 | exact hx (Y, g) ⟨hY, hg, h_notMem⟩ h_eq |
| 636 | |
| 637 | /-- The elements `g` of `GL_n(O_u)` with `k * (g - 1)` integral at `u`. For `k` the inverse of an |
| 638 | integral adele `m`, this is the principal congruence subgroup of level `m` at `u`. -/ |
| 639 | noncomputable def congruenceLevel {F : Type} [Field F] [NumberField F] (n : Type) [Fintype n] |
| 640 | [DecidableEq n] (k : 𝔸f F) (u : FinPlace F) : |
| 641 | Subgroup (GL n (LocField u)) := |
| 642 | congruenceGL ((v.leSubmodule 1).comap (.mulLeft v.integer (k u))) id |
| 643 | |
| 644 | /-- An element `g` of `GL_n` of the completion at `u` lies in `congruenceLevel n k u` exactly when |
| 645 | it lies in `GL_n(O_u)` and `k * (g - 1)` has integral entries at `u`. -/ |
| 646 | lemma mem_congruenceLevel {k : 𝔸f E'} {u : FinPlace E'} {g : GL n (LocField u)} : |
| 647 | g ∈ congruenceLevel n k u ↔ g ∈ localIntGL n u ∧ ∀ i j : n, k u * (g.val - 1) i j ∈ LocInt u := |
| 648 | .rfl |
| 649 | |
| 650 | /-- Let `k` be the inverse of an integral adele `m`. Then `g` lies in the level given by |
| 651 | `congruenceLevel n k` at the places above `S` and their conjugates exactly when `k * (g - 1)` is |
| 652 | integral at these places: the integrality of `g` itself follows. -/ |
| 653 | lemma mem_localLevel_congruenceLevel {m : Ô E'} {k : 𝔸f E'} (hmk : m * k = 1) |
| 654 | (S : Set (FinPlace E)) (g : Gf E' n) : |
| 655 | g ∈ localLevel n (placesAbove E' S) (congruenceLevel n k) ↔ |
| 656 | ∀ i j : n, idem (placesAbove E' S) * k * (g.val.val - 1) i j ∈ Ô E' := by |
| 657 | -- The congruence makes `g` integral (multiply by `m`), and the entries of `g⁻¹` at `u` are |
| 658 | -- conjugate to those of `g` at `star u`. |
| 659 | simp only [mem_congruenceLevel, mem_localLevel, mul_assoc, idem_mul_mem_Ô, |
| 660 | FiniteAdeleRing.mul_apply, ← atPlace_sub_one_apply, forall_and, mem_intGL] |
| 661 | -- What is left is integrality of `g` and `g⁻¹` and the congruence, at each place above `S`. The |
| 662 | -- congruence implies the rest; it matches the right side up to the order of the quantifiers. |
| 663 | have h_swap : (∀ u ∈ placesAbove E' S, ∀ i j : n, k u * ((g.atPlace u).val - 1) i j ∈ LocInt u) ↔ |
| 664 | ∀ i j : n, ∀ u ∈ placesAbove E' S, v (k u * ((g.atPlace u).val - 1) i j) ≤ 1 := |
| 665 | ⟨fun h i j u hu ↦ h u hu i j, fun h u hu i j ↦ h i j u hu⟩ |
| 666 | refine (and_iff_right_of_imp fun h_cong ↦ ?_).trans h_swap |
| 667 | have h_int (u : FinPlace E') (hu : u ∈ placesAbove E' S) (i j : n) : |
| 668 | (g.atPlace u).val i j ∈ LocInt u := by |
| 669 | have hm_int : (m : 𝔸f E') u ∈ LocInt u := mem_Ô.1 m.prop u |
| 670 | simpa [← mul_assoc, ← FiniteAdeleRing.mul_apply, hmk, sub_eq_add_neg, add_mem_cancel_right, |
| 671 | Matrix.one_apply, ite_mem] using mul_mem hm_int (h_cong u hu i j) |
| 672 | refine ⟨h_int, fun u hu i j ↦ ?_⟩ |
| 673 | have h_int_star : (g.atPlace (star u)).val j i ∈ LocInt (star u) := |
| 674 | h_int (star u) (star_mem_placesAbove.2 hu) j i |
| 675 | rw [g.atPlace_star rfl] at h_int_star |
| 676 | exact (v_locMap_le_one_iff ..).1 h_int_star |
| 677 | |
| 678 | /-- The integral adeles are integrally closed in the finite adeles, as each local ring of integers |
| 679 | is in its field. -/ |
| 680 | lemma isIntegrallyClosedIn_Ô : IsIntegrallyClosedIn (Ô E') (𝔸f E') := by |
| 681 | refine Subring.isIntegrallyClosedIn_iff.mpr fun x hx ↦ mem_Ô.mpr fun u ↦ ?_ |
| 682 | exact (Valuation.integer.integers (v.comap (evalAt u))).mem_of_integral |
| 683 | (hx.map_of_comp_eq (Subring.inclusion fun _ hy ↦ mem_Ô.1 hy u) 1 rfl) |
| 684 | |
| 685 | /-- The ring homomorphism from the integral finite adeles of `E` to those of `F` induced by an |
| 686 | embedding `f : E → F`. -/ |
| 687 | noncomputable def intAdeleMap {F : Type} [Field F] [NumberField F] (f : E →+* F) : Ô E →+* Ô F := |
| 688 | (adeleMap f).restrict (Ô E) (Ô F) fun _ ↦ (adeleMap_mem_Ô f).mpr |
| 689 | |
| 690 | /-- For a ring endomorphism `f` of `E`, the `i`-th iterate of `intAdeleMap f` is the restriction of |
| 691 | `adeleMap f ^ i` to the integral adeles. -/ |
| 692 | @[simp] lemma intAdeleMap_iterate (i : ℕ) (x : Ô E) : |
| 693 | ((intAdeleMap f)^[i] x : 𝔸f E) = (adeleMap f ^ i) x := |
| 694 | Function.Semiconj.iterate_right (f := Subtype.val) (ga := intAdeleMap f) (gb := adeleMap f) |
| 695 | (fun _ ↦ rfl) i x |
| 696 | |
| 697 | omit [CMType E] [CMType E'] in |
| 698 | /-- If `σ` moves the place `u`, then `σ` is not in the inertia group of `u`. -/ |
| 699 | lemma notMem_inertia_of_comap_ne {u : FinPlace E'} (h_moved : u.comap σ ≠ u) : |
| 700 | σ ∉ u.asIdeal.inertia Gal(E'/E) := by |
| 701 | -- If `σ` were trivial modulo `u`, then `x` and `σ • x` would lie in `u` together. |
| 702 | refine fun h_inertia ↦ h_moved ?_ |
| 703 | ext x |
| 704 | have h_diff : RingOfIntegers.mapRingHom (σ : E' →+* E') x - x ∈ u.asIdeal := h_inertia x |
| 705 | simpa using u.asIdeal.add_mem_iff_right (b := x) h_diff |
| 706 | |
| 707 | variable (σ) in |
| 708 | include hμ in |
| 709 | /-- There is an integral adele `c` of `E'` fixed by `σ` such that `c - star c` is a unit. -/ |
| 710 | lemma exists_intAdeleMap_eq_isUnit_sub_star : |
| 711 | ∃ c : Ô E', intAdeleMap σ c = c ∧ IsUnit (c - star c) := by |
| 712 | -- Take the image of an integral adele `z` of `E` with `z - star z` a unit. |
| 713 | obtain ⟨z, hz⟩ : ∃ z : Ô E, IsUnit (z - star z) := exists_isUnit_sub_star_Ô |
| 714 | let c : Ô E' := intAdeleMap (algebraMap E E') z |
| 715 | have hc_sub : c - star c = intAdeleMap (algebraMap E E') (z - star z) := Subtype.ext <| by |
| 716 | change adeleMap (algebraMap E E') z.val - star (adeleMap (algebraMap E E') z.val) = |
| 717 | adeleMap (algebraMap E E') (z.val - star z.val) |
| 718 | rw [map_sub, adeleMap_star] |
| 719 | have hc_fix : intAdeleMap σ c = c := Subtype.ext <| by |
| 720 | change adeleMap (σ : E' →+* E') (adeleMap (algebraMap E E') z.val) = |
| 721 | adeleMap (algebraMap E E') z.val |
| 722 | exact (mem_range_finAdeleIncl_iff (K := E) (L := E')).1 ⟨z.val, rfl⟩ σ |
| 723 | exact ⟨c, hc_fix, hc_sub.symm ▸ hz.map (intAdeleMap (algebraMap E E'))⟩ |
| 724 | |
| 725 | /-- Let `m * k = 1` with `k` fixed by `σ`. Then the level given by `congruenceLevel n k` at the |
| 726 | places above `S` and their conjugates is stable under `σ`. -/ |
| 727 | lemma galoisGf_mem_localLevel_congruenceLevel_iff {m : Ô E'} {k : 𝔸f E'} (hmk : m * k = 1) |
| 728 | (hk_fixed : adeleMap (σ : E' →+* E') k = k) (S : Set (FinPlace E)) (g : Gf E' n) : |
| 729 | galoisGf σ g ∈ localLevel n (placesAbove E' S) (congruenceLevel n k) ↔ |
| 730 | g ∈ localLevel n (placesAbove E' S) (congruenceLevel n k) := by |
| 731 | -- `σ` fixes `idem (placesAbove E' S) * k` and preserves integrality. |
| 732 | have h_apply (i j : n) : |
| 733 | (galoisGf σ g).val.val i j = adeleMap (σ : E' →+* E') (g.val.val i j) := rfl |
| 734 | have h_entry (i j : n) : idem (placesAbove E' S) * k * ((galoisGf σ g).val.val - 1) i j = |
| 735 | adeleMap (σ : E' →+* E') (idem (placesAbove E' S) * k * (g.val.val - 1) i j) := by |
| 736 | simp [h_apply, hk_fixed, Matrix.one_apply, adeleMap_idem_placesAbove] |
| 737 | simp only [mem_localLevel_congruenceLevel hmk, h_entry, adeleMap_mem_Ô] |
| 738 | |
| 739 | /-- Let `m` be an integral adele fixed by `star`, with an inverse `k` fixed by `σ`. Suppose that |
| 740 | `σ` is tame at level `e * m` for every integral `e` that it fixes, and that `μ` kills the norms of |
| 741 | the unit ideles congruent to `1` modulo `m`. Then the principal congruence level of `m` above any |
| 742 | `S` is a matching level. -/ |
| 743 | lemma isMatchingLevel_congruenceLevel {m : Ô E'} {k : 𝔸f E'} (hmk : m * k = 1) |
| 744 | (hm_star : star m = m) (hk_fixed : adeleMap (σ : E' →+* E') k = k) |
| 745 | (h_tame : ∀ e : Ô E', intAdeleMap σ e = e → |
| 746 | IsTameAtLevel (intAdeleMap σ) (finrank E E') (e * m)) |
| 747 | (h_idele : ∀ y ∈ Ô E', ∀ d ∈ idelesUnitOff ∅, |
| 748 | d.val - (m : 𝔸f E') * y = 1 → d ∈ kerCompNorm E' μ) |
| 749 | (S : Set (FinPlace E)) : |
| 750 | IsMatchingLevel σ μ S (localLevel n (placesAbove E' S) (congruenceLevel n k)) := by |
| 751 | -- Apply `cocyclesSplit_and_isMatchingPair_of_congruence` to the ring `Ô E'`, the idempotent `e` |
| 752 | -- of the places above `S` and the level `e * m`. |
| 753 | let L : Subgroup (Gf E' n) := localLevel n (placesAbove E' S) (congruenceLevel n k) |
| 754 | have mem_L_iff_entries (g : Gf E' n) : |
| 755 | g ∈ L ↔ ∀ i j : n, idem (placesAbove E' S) * k * (g.val.val - 1) i j ∈ Ô E' := |
| 756 | mem_localLevel_congruenceLevel hmk S g |
| 757 | have h_stable (g : Gf E' n) : galoisGf σ g ∈ L ↔ g ∈ L := |
| 758 | galoisGf_mem_localLevel_congruenceLevel_iff hmk hk_fixed S g |
| 759 | have h_open : L.IsOpen := by |
| 760 | change IsOpen {g : Gf E' n | g ∈ L} |
| 761 | simp only [mem_L_iff_entries] |
| 762 | exact isOpen_Ô.matrix.preimage_of_continuous |
| 763 | have mem_L_iff_lift (g : Gf E' n) : g ∈ L ↔ ∃ Y : Matrix n n (Ô E'), |
| 764 | Y.map (Ô E').subtype = (idem (placesAbove E' S) * k) • (g.val.val - 1) := by |
| 765 | rw [mem_L_iff_entries g] |
| 766 | refine ⟨fun h_int ↦ ⟨fun i j ↦ ⟨_, h_int i j⟩, rfl⟩, fun ⟨Y, hY⟩ i j ↦ ?_⟩ |
| 767 | exact mem_of_eq_of_mem (congr_fun₂ hY i j).symm (Y i j).prop |
| 768 | -- The idempotent `e` is fixed by `σ` and `star`, and `e * k` inverts `e * m` on the `e`-part. |
| 769 | let e : Ô E' := ⟨idem (placesAbove E' S), idem_mem_Ô _⟩ |
| 770 | have he_fixed : intAdeleMap σ e = e := Subtype.ext adeleMap_idem_placesAbove |
| 771 | have he_star : star e = e := Subtype.ext <| (star_idem _).trans <| |
| 772 | congrArg idem (Set.ext fun _ ↦ by rw [Set.mem_preimage]; exact star_mem_placesAbove) |
| 773 | have hem_star : star (e * m) = e * m := by rw [star_mul', he_star, hm_star] |
| 774 | have hem_mul_ek : (e * m).val * (e * k) = e := by |
| 775 | rw [MulMemClass.coe_mul, mul_mul_mul_comm] |
| 776 | change idem _ * idem _ * (m.val * k) = _ |
| 777 | rw [idem_mul_self, hmk, mul_one] |
| 778 | have he_mul_ek : (e : 𝔸f E') * (e * k) = e * k := by |
| 779 | rw [← mul_assoc] |
| 780 | change idem _ * idem _ * k = _ |
| 781 | rw [idem_mul_self] |
| 782 | -- An idele that, like its inverse, is `1` modulo `m` is a unit idele, so `μ` kills its norm. |
| 783 | have h_mem_ker (y y' : Ô E') (h_inv : (1 + (m * y).val) * (1 + (m * y').val) = 1) : |
| 784 | .mkOfMulEqOne _ _ h_inv ∈ kerCompNorm E' μ := by |
| 785 | have h_unit : Units.mkOfMulEqOne _ _ h_inv ∈ idelesUnitOff (∅ : Set (FinPlace E')) := |
| 786 | idelesUnitOff_empty.ge ((Submonoid.mem_units_iff ..).2 |
| 787 | ⟨(1 + m * y).prop, (1 + m * y').prop⟩) |
| 788 | exact h_idele y y.prop _ h_unit (add_sub_cancel_right _ _) |
| 789 | -- The inputs on `Ô E'`: `σ` is tame at level `0`, and commutes with `star` and with the |
| 790 | -- inclusion into `𝔸f E'`. |
| 791 | have h_tame_zero : IsTameAtLevel (intAdeleMap σ) (finrank E E') (0 : Ô E') := by |
| 792 | have h0 : intAdeleMap (σ : E' →+* E') 0 = 0 := Subtype.ext (map_zero (adeleMap (σ : E' →+* E'))) |
| 793 | simpa only [zero_mul] using h_tame 0 h0 |
| 794 | obtain ⟨c, hc_fixed, hc_unit⟩ := exists_intAdeleMap_eq_isUnit_sub_star σ |
| 795 | have h_star_comm (x : Ô E') : |
| 796 | intAdeleMap (σ : E' →+* E') (star x) = star (intAdeleMap (σ : E' →+* E') x) := |
| 797 | Subtype.ext (adeleMap_star _ x.val) |
| 798 | have h_starModule : StarModule (Ô E') (𝔸f E') := ⟨fun r x ↦ star_mul' r.val x⟩ |
| 799 | have h_algebraMap (x : Ô E') : algebraMap (Ô E') (𝔸f E') (intAdeleMap σ x) = |
| 800 | adeleMap (σ : E' →+* E') (algebraMap (Ô E') (𝔸f E') x) := rfl |
| 801 | obtain ⟨h_split, h_pair⟩ := |
| 802 | cocyclesSplit_and_isMatchingPair_of_congruence (M := m) (v := e * k) e isProfiniteRing_intAdeles |
| 803 | h_tame_zero |
| 804 | hc_fixed hc_unit hem_star (h_tame e he_fixed) h_star_comm h_starModule isIntegrallyClosedIn_Ô |
| 805 | (adeleMap_star σ) rfl (fun g ↦ (h_stable g).2) h_algebraMap hem_mul_ek he_mul_ek |
| 806 | mem_L_iff_lift h_mem_ker |
| 807 | exact |
| 808 | { isOpen := h_open |
| 809 | galoisGf_mem_iff := h_stable |
| 810 | cocyclesSplit := h_split |
| 811 | isMatchingPairAbove_indicator := h_pair } |
| 812 | |
| 813 | /-- At a place `u` of `A` the adele `adeleOneOn A x` is `1`, so the level |
| 814 | `congruenceLevel n (adeleOneOn A x) u` is all of `GL_n(O_u)`. -/ |
| 815 | lemma congruenceLevel_adeleOneOn_eq_localIntGL_of_mem {A : Set (FinPlace E')} (x : 𝔸f E') |
| 816 | {u : FinPlace E'} (hu : u ∈ A) : congruenceLevel n (adeleOneOn A x) u = localIntGL n u := by |
| 817 | ext g |
| 818 | simp +contextual [adeleOneOn, mem_congruenceLevel, mem_intGL, sub_mem, hu, Matrix.one_apply, |
| 819 | ite_mem] |
| 820 | |
| 821 | /-- Let `m * k = 1`, and let `H` contain every integral point `g` over `E` whose matrix over `E'` is |
| 822 | congruent to `1` modulo `m`. Then `H` contains every point over `E` whose base change lies in |
| 823 | `congruenceLevel n k u` at every place `u` of `E'`, as `g - 1 = m • k • (g - 1)`. -/ |
| 824 | lemma comap_localLevel_congruenceLevel_le {H : Subgroup (Gf E n)} {m : Ô E'} {k : 𝔸f E'} |
| 825 | (hmk : m * k = 1) |
| 826 | (h_mem_of_congr : ∀ Y : Matrix n n (𝔸f E'), (∀ i j : n, Y i j ∈ Ô E') → ∀ g ∈ stdLevel E n, |
| 827 | (baseChangeGf g : Gf E' n).val.val - (m : 𝔸f E') • Y = 1 → g ∈ H) : |
| 828 | (localLevel n univ (congruenceLevel n k)).comap baseChangeGf ≤ H := by |
| 829 | intro g hg |
| 830 | have h_at (u : FinPlace E') : (baseChangeGf g : Gf E' n).atPlace u ∈ congruenceLevel n k u := |
| 831 | mem_localLevel.1 hg u (mem_univ u) |
| 832 | have hg_int : g ∈ stdLevel E n := by |
| 833 | rw [← baseChangeGf_mem_stdLevel (E' := E'), mem_stdLevel_iff] |
| 834 | exact fun u ↦ (mem_congruenceLevel.1 (h_at u)).left |
| 835 | let Y : Matrix n n (𝔸f E') := k • ((baseChangeGf g : Gf E' n).val.val - 1) |
| 836 | have hY_int (i j : n) : Y i j ∈ Ô E' := by |
| 837 | refine mem_Ô.2 fun u ↦ ?_ |
| 838 | change k u * ((baseChangeGf g : Gf E' n).val.val - 1) i j u ∈ LocInt u |
| 839 | simpa only [atPlace_sub_one_apply] using (mem_congruenceLevel.1 (h_at u)).right i j |
| 840 | have h_eq : (baseChangeGf g : Gf E' n).val.val - (m : 𝔸f E') • Y = 1 := by |
| 841 | rw [smul_smul, hmk, one_smul, sub_sub_self] |
| 842 | exact h_mem_of_congr Y hY_int g hg_int h_eq |
| 843 | |
| 844 | /-- If the place `u` of `E'` divides the integer `C`, then for every integral adele `e` and every |
| 845 | natural number `N`, the valuation at `u` of `e u * (N * C)` is less than `1`. -/ |
| 846 | private lemma valuation_mul_natCast_mul_lt_one (e : Ô E') (N : ℕ) {C : ℕ} {u : FinPlace E'} |
| 847 | (hCu : (C : 𝓞 E') ∈ u.asIdeal) : |
| 848 | v (e.val u) * (v (N : LocField u) * v (C : LocField u)) < 1 := by |
| 849 | have hC_lt : v (C : LocField u) < 1 := by |
| 850 | have h1 : v ((algebraMap (𝓞 E') (Ô E') (C : 𝓞 E')).val u) < 1 := |
| 851 | reduceAt_eq_zero.1 |
| 852 | ((reduceAt_algebraMap u (C : 𝓞 E')).trans (algebraMap_ResField_eq_zero.2 hCu)) |
| 853 | rw [coe_algebraMap_Ô] at h1 |
| 854 | change v (evalAt u (algebraMap E' (𝔸f E') ((C : 𝓞 E') : E'))) < 1 at h1 |
| 855 | rwa [RingOfIntegers.coe_eq_algebraMap, map_natCast, map_natCast, map_natCast] at h1 |
| 856 | have hN_le : v (N : LocField u) ≤ 1 := by |
| 857 | have h1 : v (evalAt u ((N : Ô E') : 𝔸f E')) ≤ 1 := mem_Ô.1 (N : Ô E').prop u |
| 858 | rwa [SubringClass.coe_natCast, map_natCast] at h1 |
| 859 | calc v (e.val u) * (v (N : LocField u) * v (C : LocField u)) |
| 860 | _ ≤ 1 * (1 * v (C : LocField u)) := mul_le_mul' (mem_Ô.1 e.prop u) (mul_le_mul' hN_le le_rfl) |
| 861 | _ < 1 := by rwa [one_mul, one_mul] |
| 862 | |
| 863 | include hσ hμ |
| 864 | |
| 865 | /-- For a step `E' / E` and `σ ≠ 1` there is an integer `C ≠ 0` with the following property. Let |
| 866 | `m` be an integral adele of `E'` fixed by `σ` whose reduction vanishes at every place `u` of `E'` |
| 867 | that divides `C` and has all of `Gal(E'/E)` as inertia group (a totally ramified place). Then `σ` |
| 868 | acts tamely on the integral adeles at level `m` (`IsTameAtLevel`). -/ |
| 869 | lemma exists_isTameAtLevel_intAdeleMap : |
| 870 | ∃ C : ℕ, C ≠ 0 ∧ ∀ m : Ô E', intAdeleMap σ m = m → |
| 871 | (∀ u : FinPlace E', (C : 𝓞 E') ∈ u.asIdeal → |
| 872 | (∀ g : Gal(E'/E), g ∈ u.asIdeal.inertia Gal(E'/E)) → reduceAt u m = 0) → |
| 873 | IsTameAtLevel (intAdeleMap σ) (finrank E E') m := by |
| 874 | -- `C` is the absolute norm of the ideal of `σ • x - x`, for an integer `x` moved by `σ`. The main |
| 875 | -- point is the last clause of `IsTameAtLevel`: a prime `P` modulo which `σ ^ i` is trivial |
| 876 | -- contains `m`. |
| 877 | obtain ⟨e, he⟩ : ∃ e : 𝓞 E', Algebra.trace E E' e = 1 := hμ.exists_trace_eq_one |
| 878 | have h_pow : Function.Bijective fun j : Fin (finrank E E') ↦ σ ^ j.val := |
| 879 | bijective_pow_of_ne_one_of_prime_finrank hσ |
| 880 | obtain ⟨x, hx⟩ : ∃ x : 𝓞 E', σ • x ≠ x := |
| 881 | not_forall.1 ((IsGaloisGroup.faithful (𝓞 E) (B := 𝓞 E')).eq_of_smul_eq_smul.mt hσ) |
| 882 | have hC : ((span {σ • x - x}).absNorm : 𝓞 E') ≠ 0 := by |
| 883 | simpa [absNorm_eq_zero_iff, sub_eq_zero] using hx |
| 884 | refine ⟨(span {σ • x - x}).absNorm, mod_cast hC, fun m hm h_red ↦ ⟨hm, ?_, ?_, finrank_pos, ?_⟩⟩ |
| 885 | · -- The powers of `σ` exhaust the Galois group, so the sum is the trace of `e`, which is `1`. |
| 886 | refine ⟨algebraMap (𝓞 E') (Ô E') e, 0, Subtype.ext ?_⟩ |
| 887 | have h_trace : ∑ τ : Gal(E'/E), τ (e : E') = 1 := by |
| 888 | rw [← trace_eq_sum_automorphisms, he, map_one] |
| 889 | simpa [← h_pow.sum_comp, adeleMap_gal_pow, Finset.sum_range, sub_eq_zero] using |
| 890 | congrArg (algebraMap E' (𝔸f E')) h_trace |
| 891 | · -- `σ ^ finrank E E' = 1` on the finite adeles. |
| 892 | ext y |
| 893 | simp [adeleMap_pow_finrank_eq_one] |
| 894 | -- `σ ^ i` generates the Galois group and acts trivially modulo the prime `u` of `𝓞 E'` under `P`. |
| 895 | rintro i ⟨hi_pos : 0 < i, hi_lt : i < finrank E E'⟩ P _ hP |
| 896 | have hi_ne : σ ^ i ≠ 1 := by |
| 897 | simpa [hi_pos.ne'] using h_pow.injective.ne (a₁ := ⟨i, hi_lt⟩) (a₂ := ⟨0, finrank_pos⟩) |
| 898 | have hi_mem : σ ^ i ∈ (P.under (𝓞 E')).inertia Gal(E'/E) := by |
| 899 | intro y |
| 900 | -- The diagonal embedding into the integral adeles commutes with the Galois action. |
| 901 | have h_map : algebraMap (𝓞 E') (Ô E') ((σ ^ i) • y) = |
| 902 | (intAdeleMap σ ^ i) (algebraMap (𝓞 E') (Ô E') y) := by |
| 903 | apply Subtype.ext |
| 904 | rw [RingHom.coe_pow, intAdeleMap_iterate, adeleMap_gal_pow, coe_algebraMap_Ô, |
| 905 | coe_algebraMap_Ô, adeleMap_algebraMap] |
| 906 | rfl |
| 907 | apply mem_comap.2 |
| 908 | simpa only [map_sub, h_map] using hP (algebraMap (𝓞 E') (Ô E') y) |
| 909 | have h_inertia : ∀ g : Gal(E'/E), g ∈ (P.under (𝓞 E')).inertia Gal(E'/E) := |
| 910 | (bijective_pow_of_ne_one_of_prime_finrank hi_ne).surjective.forall.2 fun j ↦ pow_mem hi_mem j |
| 911 | -- So `u` contains `σ • x - x` and its norm `C`; in particular `u` is a place. |
| 912 | have hC_mem : ((span {σ • x - x}).absNorm : 𝓞 E') ∈ P.under (𝓞 E') := |
| 913 | (span_singleton_le_iff_mem _).2 (h_inertia σ x) (absNorm_mem _) |
| 914 | let u : FinPlace E' := ⟨P.under (𝓞 E'), inferInstance, fun h_bot ↦ hC (h_bot.le hC_mem)⟩ |
| 915 | have hm_red : m ∈ RingHom.ker (reduceAt u) := h_red u hC_mem h_inertia |
| 916 | -- The kernel of reduction at `u` contains `C ≠ 0`, so it is generated by its contraction `u` to |
| 917 | -- `𝓞 E'` (`map_under_Ô`), and `u` lies in `P`. |
| 918 | have h_ker (a : 𝓞 E') : |
| 919 | algebraMap (𝓞 E') (Ô E') a ∈ RingHom.ker (reduceAt u) ↔ a ∈ u.asIdeal := by |
| 920 | rw [RingHom.mem_ker, reduceAt_algebraMap, algebraMap_ResField_eq_zero] |
| 921 | rw [← map_under_Ô hC (I := RingHom.ker (reduceAt u)) ((h_ker _).2 hC_mem)] at hm_red |
| 922 | exact map_le_of_le_comap (fun a ha ↦ (h_ker a).1 ha) hm_red |
| 923 | |
| 924 | /-- Let `E'/E` be a step with character `μ` (`IsStep`): `E` contains a primitive 5040th root of |
| 925 | unity, and `E'` is a CM field Galois over `E` of prime degree. Let `σ ≠ 1` in `Gal(E'/E)` and let |
| 926 | `H` be an open subgroup of the finite adelic unitary group over `E`. Then some family `K` of |
| 927 | subgroups `K u` of `GL n` over the completions `E'_u` at the finite places `u` is a base change |
| 928 | level below `H` (`IsBaseChangeLevel σ μ H K`). -/ |
| 929 | lemma exists_isBaseChangeLevel {H : Subgroup (Gf E n)} (hH : H.IsOpen) : |
| 930 | ∃ K : (u : FinPlace E') → Subgroup (GL n (LocField u)), IsBaseChangeLevel σ μ H K := by |
| 931 | -- Call `w` good if it is unramified and `w`, `star w` avoid the finite set `S₀` below. Let `A` |
| 932 | -- be the places of `E'` above the good places and their conjugates, and `m` the integral adele |
| 933 | -- that is `1` on `A` and a sufficiently divisible integer `N * C` off `A`. Take for `K u` the |
| 934 | -- principal congruence subgroup of level `m`. |
| 935 | obtain ⟨C, hC, h_tame⟩ := exists_isTameAtLevel_intAdeleMap hσ |
| 936 | -- `S₀` avoids the places at which `H` is maximal (`hS₀_good`), and `H` contains the integral |
| 937 | -- points that are trivial on `S₀` (`hS₀_le`). |
| 938 | obtain ⟨S₀, hS₀_good, hS₀_le⟩ := exists_inf_trivialOn_le hH |
| 939 | let A : Set (FinPlace E') := placesAbove E' {w | IsStepUnramifiedAt E' μ w ∧ w ∉ conjClosure S₀} |
| 940 | have hA_unram (u : FinPlace E') (hu : u ∈ A) : IsStepUnramifiedPlace μ u := |
| 941 | isStepUnramifiedPlace_of_mem_placesAbove (by exact fun w hw ↦ hw.left) hu |
| 942 | have hA_off (u : FinPlace E') (hu : u ∈ A) : u.below E ∉ (S₀ : Set (FinPlace E)) := by |
| 943 | rcases hu with ⟨-, h_notMem⟩ | ⟨-, h_notMem⟩ |
| 944 | · exact fun hS₀ ↦ h_notMem (.inl hS₀) |
| 945 | · exact fun hS₀ ↦ h_notMem (.inr (by simpa using hS₀)) |
| 946 | -- Both congruence conditions hold at `x = N * C` for a suitable `N ≠ 0`. |
| 947 | obtain ⟨N, hN, h_small⟩ := mem_nhds_zero_finAdele_iff.1 |
| 948 | ((eventually_mem_kerCompNorm hA_unram).and |
| 949 | (eventually_mem_of_baseChangeGf_congr hH hS₀_le hA_off)) |
| 950 | obtain ⟨h_idele, h_group⟩ := h_small C (by simp) |
| 951 | let m : Ô E' := N * C + ⟨idem A, idem_mem_Ô A⟩ * (1 - N * C) |
| 952 | have hm : adeleOneOn A (N * C) = m := by simp [adeleOneOn, m] |
| 953 | rw [hm] at h_idele h_group |
| 954 | -- `k` is the inverse of `m` in the adeles. |
| 955 | let k : 𝔸f E' := adeleOneOn A (algebraMap E' (𝔸f E') (N * C)⁻¹) |
| 956 | have hmk : m * k = 1 := by |
| 957 | rw [← hm] |
| 958 | refine adeleOneOn_mul_adeleOneOn_of_mul_eq_one A ?_ |
| 959 | have h_ne : (N * C : E') ≠ 0 := by positivity |
| 960 | simpa only [map_mul, map_natCast, map_one] using |
| 961 | congrArg (algebraMap E' (𝔸f E')) (mul_inv_cancel₀ h_ne) |
| 962 | have hm_star : star m = m := Subtype.ext <| by |
| 963 | change star (m : 𝔸f E') = (m : 𝔸f E') |
| 964 | rw [← hm, adeleOneOn, star_add, star_mul', star_mul', star_sub, star_one, star_mul', |
| 965 | star_natCast, star_natCast, star_idem] |
| 966 | have hA_star : star ⁻¹' A = A := |
| 967 | Set.ext fun _ ↦ by rw [Set.mem_preimage]; exact star_mem_placesAbove |
| 968 | rw [hA_star] |
| 969 | have hk_fixed : adeleMap (σ : E' →+* E') k = k := by |
| 970 | dsimp only [k, adeleOneOn] |
| 971 | rw [map_add, map_mul, map_sub, map_one, adeleMap_idem_placesAbove, |
| 972 | adeleMap_algebraMap, map_inv₀, map_mul, map_natCast, map_natCast] |
| 973 | have hm_fixed : intAdeleMap σ m = m := Subtype.ext <| by |
| 974 | change adeleMap (σ : E' →+* E') (m : 𝔸f E') = (m : 𝔸f E') |
| 975 | rw [← hm, adeleOneOn, map_add, map_mul, map_mul, map_sub, map_one, map_mul, map_natCast, |
| 976 | map_natCast, adeleMap_idem_placesAbove] |
| 977 | -- `σ` is tame at `e * m` for every fixed `e`: a totally ramified place is off `A`, so `m = N * C` |
| 978 | -- there, which vanishes modulo a place dividing `C`. |
| 979 | have h_tame_m (e : Ô E') (he_fixed : intAdeleMap σ e = e) : |
| 980 | IsTameAtLevel (intAdeleMap σ) (finrank E E') (e * m) := by |
| 981 | have hem_fixed : intAdeleMap σ (e * m) = e * m := Subtype.ext <| by |
| 982 | change adeleMap (σ : E' →+* E') (e.val * m.val) = e.val * m.val |
| 983 | rw [map_mul, show adeleMap (σ : E' →+* E') e.val = e.val from congrArg Subtype.val he_fixed, |
| 984 | show adeleMap (σ : E' →+* E') m.val = m.val from congrArg Subtype.val hm_fixed] |
| 985 | refine h_tame (e * m) hem_fixed fun u hCu h_inertia ↦ ?_ |
| 986 | have huA : u ∉ A := fun hu ↦ |
| 987 | (hA_unram u hu).exists_notMem_inertia.elim fun τ hτ ↦ hτ (h_inertia τ) |
| 988 | rw [reduceAt_eq_zero, MulMemClass.coe_mul, FiniteAdeleRing.mul_apply, map_mul] |
| 989 | have hm_u : m.val u = (N : LocField u) * (C : LocField u) := by |
| 990 | rw [← hm, adeleOneOn] |
| 991 | change evalAt u ((N : 𝔸f E') * C) + idem A u * evalAt u (1 - (N : 𝔸f E') * C) = _ |
| 992 | rw [idem_of_notMem huA, zero_mul, add_zero, map_mul, map_natCast, map_natCast] |
| 993 | rw [hm_u, map_mul] |
| 994 | exact valuation_mul_natCast_mul_lt_one e N hCu |
| 995 | refine ⟨congruenceLevel n k, |
| 996 | { le_localIntGL := fun u g hg ↦ (mem_congruenceLevel.1 hg).left |
| 997 | isMatchingLevel := isMatchingLevel_congruenceLevel hmk hm_star hk_fixed h_tame_m h_idele |
| 998 | comap_le := comap_localLevel_congruenceLevel_le hmk h_group |
| 999 | eq_localIntGL := fun w h_unram hH_max u hu ↦ ?_ }⟩ |
| 1000 | -- Such a place `w` is good, so above it `k u = 1` and the level is all of `GL_n(O_u)`. |
| 1001 | have hw_good : {w} ⊆ {w | IsStepUnramifiedAt E' μ w ∧ w ∉ conjClosure S₀} := |
| 1002 | singleton_subset_iff.2 ⟨h_unram, not_or.2 (hS₀_good w hH_max)⟩ |
| 1003 | have huA : u ∈ A := hu.imp (fun h ↦ hw_good h) fun h ↦ hw_good h |
| 1004 | exact congruenceLevel_adeleOneOn_eq_localIntGL_of_mem _ huA |
| 1005 | |
| 1006 | end New |
| 1007 | |
| 1008 | end BaseChangeLevel |