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

| 1 | module |
| 2 | |
| 3 | import Mathlib.Algebra.Order.Star.Int |
| 4 | public import Lib.Adelic.Adeles.StrongApproximation |
| 5 | public import Lib.Adelic.Unitary.ComponentsAndBlockSums |
| 6 | public import Lib.DiscreteSeries.FlenstedJensen.Defs |
| 7 | public import Lib.General.Measure.IdempotentKernel |
| 8 | import Lib.Adelic.Unitary.RationalPoints |
| 9 | import Lib.Adelic.Unitary.WeakApproximation |
| 10 | import Lib.DiscreteSeries.FlenstedJensen.PsiKTypes |
| 11 | import Lib.DiscreteSeries.Rigidity.KernelFixes |
| 12 | |
| 13 | /-! |
| 14 | # Graded hermitian spaces X ⊕ J_s, Bessel subgroups, the map T, and c_λ in a frame |
| 15 | |
| 16 | A hermitian space `V = X ⊕ J_s` is presented (`New.Grading`) as a space `X` with an orthonormal |
| 17 | basis plus a string of `s` vectors with antidiagonal Gram matrix, whose entries are 1 except `-N` |
| 18 | for the middle vector (`N = N̄ ≠ 0`). The weight, also called grade, is `0` on `X` and `s - 1 - 2i` |
| 19 | on the `i`-th string vector. The grading defines three objects in `U(V)(𝔸)`: the unipotent subgroup |
| 20 | `New.Grading.unipotent`, which raises weights; the embedding `New.Grading.inclX` of `U(X)`; and the |
| 21 | Bessel subgroup `New.Grading.besselGroup`. These are described by matrix entries in rational |
| 22 | coordinates. For a second graded space `V' = X' ⊕ J_(s-1)` the map `T : V → V'` |
| 23 | (`New.Grading.stringMap`) is studied, and separately the matrix coefficient c_λ of a discrete series |
| 24 | is transported to `U(J)` through a frame. |
| 25 | |
| 26 | ## Main definitions and results |
| 27 | |
| 28 | * `New.Grading`: a presentation of `V` in this form, with a constant `genericConst` for the generic |
| 29 | character. |
| 30 | * `New.Grading.stringMap`: the map between two graded spaces that kills `X` and sends each string |
| 31 | vector to a multiple of the string vector with the same number (to `0` if there is none). It has |
| 32 | degree at least `-1` when `s' = s - 1`. `New.Grading.AgreesWithStringMap` is partial agreement |
| 33 | with it. |
| 34 | * `New.Grading.besselProj`, `New.Grading.exists_besselGroup_proj`, |
| 35 | `New.Grading.exists_unipotent_mul_inclX`: taking the X-block is a homomorphism from |
| 36 | `New.Grading.besselGroup` onto U(X) with kernel `New.Grading.unipotent`, split by |
| 37 | `New.Grading.inclX`. |
| 38 | * `New.isIdempotentKernel_dsCoeffInFrame`: for λ with a large gap, the formal degree times |
| 39 | `New.HCParam.dsCoeffInFrame l` is an idempotent kernel on `U J` (Schur orthogonality). |
| 40 | * `New.Grading.hasDegreeGe_zero_mul_stringMap_mul_sub`: the Bessel subgroups |
| 41 | `New.Grading.besselGroup` of both spaces fix `T` modulo degree at least `0`. |
| 42 | * `New.Grading.formAdjoint_stringMap_mul_stringMap_eq_shift`, |
| 43 | `New.Grading.stringMap_mul_formAdjoint_stringMap_eq_shift`: `T† T` is the shift |
| 44 | `New.Grading.shift` of `V`, and `T T†` is that of `V'` when the two constants agree; |
| 45 | `New.Grading.formAdjoint_stringMap_mul_stringMap` states both. |
| 46 | |
| 47 | Notions from other files: |
| 48 | * `New.Space`: a hermitian space with a point: a matrix J over E and an x in GL_n(𝔸) such that xᴴJx |
| 49 | is diag(ε) at the infinite places and 1 at the finite places. `V.Γ` is the group of g whose matrix |
| 50 | in rational coordinates has entries in E; `New.stdSpace E X` is the definite space on X with point |
| 51 | 1. |
| 52 | * `New.𝔸`: the adele ring of the CM field E, as the product of ℂ^f (one copy of ℂ for each infinite |
| 53 | place) and the finite adeles. |
| 54 | * `New.G`: the adelic unitary group G = G_∞ × G_f of the form diag(ε) at the infinite places and 1 |
| 55 | at the finite places; `g.adeleMatrix` is the adelic matrix of g. |
| 56 | * `New.IsHermitianInvolution J`: the complex matrix J satisfies J* = J and J² = 1. |
| 57 | * `New.HCParam.HasLargeGap`, `New.HCParam.formalDegree`: for l = 2λ and signs ε on n indices, the |
| 58 | condition that λ has gap 500n³+A for a natural number A, and the reciprocal of the integral of |
| 59 | |c_λ|² over U(diag ε) for the compact dual measure. |
| 60 | |
| 61 | ## Relation to the literature |
| 62 | |
| 63 | Known; see `Lib.Weil.Periods.Unfolding` and `Lib.DiscreteSeries.CuspKernel` for sources. |
| 64 | |
| 65 | Part of a known construction: adelic points of unitary groups in rational coordinates. See |
| 66 | `Lib.Adelic.Unitary.WeakApproximation`. |
| 67 | -/ |
| 68 | |
| 69 | @[expose] public section |
| 70 | |
| 71 | noncomputable section |
| 72 | |
| 73 | /-! |
| 74 | ## Gradings X ⊕ J_s of a hermitian space and their subgroups |
| 75 | |
| 76 | All matrix conditions are in rational coordinates (`New.Space.ratCoordMatrix`). |
| 77 | -/ |
| 78 | |
| 79 | section Grading |
| 80 | |
| 81 | open Matrix |
| 82 | |
| 83 | namespace New |
| 84 | |
| 85 | variable {R X X' ι ι' : Type*} {s s' : ℕ} [CommRing R] |
| 86 | {E : Type*} [Field E] [CMType E] [Fintype ι] [DecidableEq ι] [Fintype X] [DecidableEq X] |
| 87 | (e' : X' ⊕ Fin s' ≃ ι') (e : X ⊕ Fin s ≃ ι) {ε : ι → ℤˣ} {N : E} (V : Space E ι ε) |
| 88 | |
| 89 | omit [CommRing R] in |
| 90 | /-- The block diagonal matrix with block A from X to X' and block B from string to string, |
| 91 | reindexed along e and e'. -/ |
| 92 | abbrev gradedBlocks [Zero R] (A : Matrix X' X R) (B : Matrix (Fin s') (Fin s) R) : Matrix ι' ι R := |
| 93 | (fromBlocks (α := R) A 0 0 B).submatrix e'.symm e.symm |
| 94 | |
| 95 | /-- The Gram matrix of X plus a string of length s: identity on X; string vectors a, b with |
| 96 | a + b = s − 1 pair to 1, or to −N if a = b. -/ |
| 97 | def gradedGram (N : R) : Matrix ι ι R := |
| 98 | gradedBlocks e e 1 (of fun a b : Fin s ↦ if a = b.rev then (if a = b then -N else 1) else 0) |
| 99 | |
| 100 | /-- A presentation of `V` as `X ⊕ J_s`: an indexing of the basis by `X` and a string of `s` vectors |
| 101 | for which the Gram matrix is `New.gradedGram`, with `N = N̄ ≠ 0`. It also carries a constant |
| 102 | `c = genericConst`, with `c = c̄ ≠ 0` in `E`, for the generic character. Certain multiples of the |
| 103 | string vectors, defined in `Lib.Weil.Periods.StringPowers`, are the vectors `𝔢 ^ i`, which pair to |
| 104 | `-N` for opposite grades. -/ |
| 105 | structure Grading (N : E) (X : Type _) [DecidableEq X] (s : ℕ) where |
| 106 | /-- The splitting of the basis of `V` into `X`, of grade 0, and a string of `s` vectors. -/ |
| 107 | indexEquiv : X ⊕ Fin s ≃ ι |
| 108 | /-- The Gram matrix is 1 on `X`; vector i of the string pairs only with vector s - 1 - i, to 1, |
| 109 | but to -N if it is the middle vector. -/ |
| 110 | gram_eq : V.J = gradedGram indexEquiv N |
| 111 | /-- `N` is nonzero and fixed by complex conjugation. -/ |
| 112 | N_ne_zero_and_star_eq : N ≠ 0 ∧ star N = N |
| 113 | /-- The constant of the generic character, nonzero and fixed by complex conjugation. -/ |
| 114 | genericConst : {genericConst : E // genericConst ≠ 0 ∧ star genericConst = genericConst} |
| 115 | |
| 116 | namespace Grading |
| 117 | |
| 118 | variable {V} (Y : Grading V N X s) |
| 119 | |
| 120 | /-- The grade of a basis index of X plus a string of length s: 0 on X, and s − 1 − 2i on the |
| 121 | i-th string vector. -/ |
| 122 | @[local simp] |
| 123 | def gradeOf (i : ι) : ℤ := |
| 124 | (Y.indexEquiv.symm i).elim (0 : X → ℤ) fun a : Fin s ↦ s - 1 - 2 * (a : ℕ) |
| 125 | |
| 126 | omit [Fintype X] in |
| 127 | /-- The grade of an index coming from `X` is `0`. -/ |
| 128 | @[simp] |
| 129 | lemma gradeOf_inl (a : X) : Y.gradeOf (Y.indexEquiv (Sum.inl a)) = 0 := by simp |
| 130 | |
| 131 | omit [Fintype X] in |
| 132 | /-- For a grading `Y` of `V`, which indexes the basis of `V` by `X` together with a string of `s` |
| 133 | vectors, the `a`-th string vector (the basis index `Y.indexEquiv (Sum.inr a)`) has grade |
| 134 | `s - 1 - 2 * a`. -/ |
| 135 | @[simp] |
| 136 | lemma gradeOf_inr (a : Fin s) : Y.gradeOf (Y.indexEquiv (Sum.inr a)) = s - 1 - 2 * a := by simp |
| 137 | |
| 138 | /-- The unipotent subgroup of the g in G whose matrix in rational coordinates, minus 1, strictly |
| 139 | raises grades. -/ |
| 140 | def unipotent : Subgroup (G E ε) := |
| 141 | (unitriangular (fun i ↦ -Y.gradeOf i) (𝔸 E)).comap V.ratCoordMatrix.toHomUnits |
| 142 | |
| 143 | /-- The homomorphism from the adelic unitary group of the standard definite space on X to that |
| 144 | of V, acting on X and fixing the string vectors. -/ |
| 145 | def inclX : G E (1 : X → ℤˣ) →* G E ε := |
| 146 | ((U.reindex Y.indexEquiv (by |
| 147 | -- The Gram matrix in the adeles is block diagonal with the standard form on X; the block of |
| 148 | -- the string is given explicitly. |
| 149 | rw [Y.gram_eq, gradedGram, gradedBlocks, ← submatrix_map] |
| 150 | aesop (add simp fromBlocks_map))).trans V.toRatCoords.symm).toMonoidHom.comp |
| 151 | ((U.sum (J' := (of fun a b : Fin s ↦ |
| 152 | if a = b.rev then (if a = b then -N else 1) else 0).map toAdele) rfl).comp |
| 153 | ((G.toUnitary (s := 1)).toMonoidHom.prod 1)) |
| 154 | |
| 155 | /-- In rational coordinates, `Y.inclX h` is block diagonal: the matrix of `h` on `X` and the |
| 156 | identity on the string. -/ |
| 157 | lemma ratCoordMatrix_inclX (h : G E 1) : |
| 158 | V.ratCoordMatrix (Y.inclX h) = gradedBlocks Y.indexEquiv Y.indexEquiv h.adeleMatrix 1 := by |
| 159 | simp [Space.ratCoordMatrix, inclX, U.reindex, U.sum, blockGL, G.toUnitary, G.adeleMatrix] |
| 160 | |
| 161 | /-- The Bessel (Fourier–Jacobi) subgroup: the `g` whose matrix in rational coordinates sends each |
| 162 | string vector of weight `≥ 0` to itself plus a combination of string vectors of higher weight. |
| 163 | In the column `k` of such a vector, the entries in the rows `i` of weight at most that of `k` are |
| 164 | those of the identity matrix. -/ |
| 165 | def besselGroup : Subgroup (G E ε) := |
| 166 | Subgroup.comap V.ratCoordMatrix.toHomUnits <| agreeWithOneOn |
| 167 | (fun i k : ι ↦ (Y.indexEquiv.symm k).isRight ∧ 0 ≤ Y.gradeOf k ∧ Y.gradeOf i ≤ Y.gradeOf k) |
| 168 | (𝔸 E) <| by |
| 169 | -- Given a prescribed entry `(i, j)` and any `k`, one of `(i, k)` and `(k, j)` is prescribed: |
| 170 | -- `(k, j)` if the weight of `k` is at most that of `j`, and `(i, k)` otherwise. |
| 171 | intro i k j ⟨hj_string, hj_nonneg, hij⟩ |
| 172 | obtain hkj | hjk := le_or_gt (Y.gradeOf k) (Y.gradeOf j) |
| 173 | · exact .inr ⟨hj_string, hj_nonneg, hkj⟩ |
| 174 | · refine .inl ⟨?_, hj_nonneg.trans hjk.le, hij.trans hjk.le⟩ |
| 175 | -- The weight of `k` is positive, while the vectors of `X` have weight `0`. |
| 176 | have hk_pos : 0 < Y.gradeOf k := hj_nonneg.trans_lt hjk |
| 177 | cases hk : Y.indexEquiv.symm k <;> simp_all |
| 178 | |
| 179 | omit [Fintype X] in |
| 180 | /-- An element `g` lies in the Bessel subgroup if and only if its matrix in rational coordinates |
| 181 | agrees with the identity at every entry (i, k) with k a string index of grade ≥ 0 and grade(i) at |
| 182 | most grade(k). -/ |
| 183 | lemma mem_besselGroup {g : G E ε} : |
| 184 | g ∈ Y.besselGroup ↔ |
| 185 | ∀ i k : ι, (Y.indexEquiv.symm k).isRight → 0 ≤ Y.gradeOf k → Y.gradeOf i ≤ Y.gradeOf k → |
| 186 | V.ratCoordMatrix g i k = (1 : Matrix ι ι (𝔸 E)) i k := by |
| 187 | -- `gradeOf` is a local simp lemma, which would unfold the grades on one side only. |
| 188 | simp [besselGroup, -gradeOf] |
| 189 | |
| 190 | /-- The rational points of U(V) that lie in the Bessel (Fourier–Jacobi) subgroup of the grading |
| 191 | Y. -/ |
| 192 | abbrev ratBessel : Subgroup (G E ε) := V.Γ ⊓ Y.besselGroup |
| 193 | |
| 194 | end Grading |
| 195 | |
| 196 | end New |
| 197 | |
| 198 | end Grading |
| 199 | |
| 200 | /-! |
| 201 | ## Degrees of matrices and entrywise membership in the subgroups |
| 202 | |
| 203 | * `New.HasDegreeGe`: a matrix raises weights by at least `d`; degrees add (`New.HasDegreeGe.mul`). |
| 204 | -/ |
| 205 | |
| 206 | namespace New |
| 207 | |
| 208 | open Matrix Space |
| 209 | |
| 210 | variable {E : Type*} [Field E] [CMType E] {ι X : Type _} [Fintype ι] [DecidableEq ι] [Fintype X] |
| 211 | [DecidableEq X] {s : ℕ} {ε : ι → ℤˣ} {N : E} {V : Space E ι ε} (Y : Grading V N X s) |
| 212 | {ι' : Type*} [Fintype ι'] |
| 213 | |
| 214 | /-! ### Degrees and rational coordinates -/ |
| 215 | |
| 216 | /-- The matrix x raises weights by at least d: x_{ba} = 0 whenever w'(b) < w(a) + d. -/ |
| 217 | def HasDegreeGe {R ι ι' : Type*} [Zero R] (w' : ι' → ℤ) (w : ι → ℤ) (d : ℤ) |
| 218 | (x : Matrix ι' ι R) : Prop := |
| 219 | ∀ (b : ι') (a : ι), w' b < w a + d → x b a = 0 |
| 220 | |
| 221 | /-- Mapping each entry by a zero-preserving map preserves the lower bound on degree. -/ |
| 222 | lemma HasDegreeGe.map {R R' ι ι' F : Type*} [Zero R] [Zero R'] [FunLike F R R'] |
| 223 | [ZeroHomClass F R R'] {w' : ι' → ℤ} {w : ι → ℤ} {d : ℤ} {A : Matrix ι' ι R} |
| 224 | (hA : HasDegreeGe w' w d A) (f : F) : HasDegreeGe w' w d (A.map f) := |
| 225 | fun b a h ↦ by simp [hA b a h] |
| 226 | |
| 227 | /-- Degree bounds add: if `x` has degree at least `d` and `y` has degree at least `d'`, then |
| 228 | `x * y` has degree at least `e` for every `e ≤ d + d'`. -/ |
| 229 | lemma HasDegreeGe.mul {R ι κ : Type*} [NonUnitalNonAssocSemiring R] |
| 230 | {w'' : κ → ℤ} {w' : ι' → ℤ} {w : ι → ℤ} |
| 231 | {d d' : ℤ} {y : Matrix ι' ι R} {x : Matrix κ ι' R} (hx : HasDegreeGe w'' w' d x) |
| 232 | (hy : HasDegreeGe w' w d' y) {e : ℤ} (he : e ≤ d + d') : |
| 233 | HasDegreeGe w'' w e (x * y) := by |
| 234 | refine fun c a hca ↦ Finset.sum_eq_zero fun b _ ↦ ?_ |
| 235 | -- In each term `x c b * y b a` of the entry, one of the two factors vanishes. |
| 236 | obtain hcb | hcb := lt_or_ge (w'' c) (w' b + d) |
| 237 | · simp [hx c b hcb] |
| 238 | · simp [hy b a (by lia)] |
| 239 | |
| 240 | /-- The map `V.ratCoordMatrix`, sending `g` to its matrix in rational coordinates, is a topological |
| 241 | embedding. -/ |
| 242 | @[fun_prop] |
| 243 | lemma Space.isEmbedding_ratCoordMatrix : Topology.IsEmbedding V.ratCoordMatrix := by |
| 244 | -- The map is `G.adeleMatrix` followed by conjugation with the point `V.x`. |
| 245 | change Topology.IsEmbedding ((ConjAct.toConjAct V.x • ·) ∘ fun g : G E ε ↦ g.adeleMatrix) |
| 246 | exact (isHomeomorph_smul _).isEmbedding.comp G.isClosedEmbedding_adeleMatrix.toIsEmbedding |
| 247 | |
| 248 | /-- An adelic point lies in the group `V.Γ` of rational points if and only if all entries of its |
| 249 | matrix in rational coordinates come from `E` under the diagonal embedding `New.toAdele`. -/ |
| 250 | lemma Space.mem_Gamma_iff_ratCoordMatrix {g : G E ε} : |
| 251 | g ∈ V.Γ ↔ ∀ i k : ι, V.ratCoordMatrix g i k ∈ toAdele.range := |
| 252 | mem_Gamma_iff_range _ |
| 253 | |
| 254 | /-- For the standard space on `X`, the matrix of `g` in rational coordinates is `g.adeleMatrix`. -/ |
| 255 | @[simp] |
| 256 | lemma ratCoordMatrix_stdSpace (g : G E (1 : X → ℤˣ)) : |
| 257 | (stdSpace E X).ratCoordMatrix g = g.adeleMatrix := by |
| 258 | -- The point of the standard space is the identity. |
| 259 | change (1 : Matrix X X (𝔸 E)) * g.adeleMatrix * 1 = g.adeleMatrix |
| 260 | rw [one_mul, mul_one] |
| 261 | |
| 262 | namespace Grading |
| 263 | |
| 264 | /-! ### The unipotent and Bessel subgroups -/ |
| 265 | |
| 266 | omit [Fintype X] in |
| 267 | /-- For a grading `Y` presenting the hermitian space `V` over the CM field `E` as `X ⊕ J_s`, an |
| 268 | element `g` of the adelic unitary group of `V` lies in `Y.unipotent` iff its matrix in rational |
| 269 | coordinates minus 1 raises grades by at least 1. That is, its (b, a) entry vanishes whenever |
| 270 | `Y.gradeOf b < Y.gradeOf a + 1`, where the grade is 0 on `X` and s − 1 − 2i on the i-th string |
| 271 | vector. -/ |
| 272 | @[simp] |
| 273 | lemma mem_unipotent {g : G E ε} : |
| 274 | g ∈ Y.unipotent ↔ HasDegreeGe Y.gradeOf Y.gradeOf 1 (V.ratCoordMatrix g - 1) := by |
| 275 | simp [unipotent, HasDegreeGe, sub_eq_zero] |
| 276 | |
| 277 | omit [Fintype X] in |
| 278 | /-- For a string of odd length all grades are even, so an element of the unipotent group, whose |
| 279 | matrix minus 1 raises grades, raises them by at least 2. -/ |
| 280 | lemma hasDegreeGe_two_of_odd {g : G E ε} (hs : Odd s) (hg : g ∈ Y.unipotent) : |
| 281 | HasDegreeGe Y.gradeOf Y.gradeOf 2 (V.ratCoordMatrix g - 1) := by |
| 282 | have h_even (i : ι) : Even (Y.gradeOf i) := by |
| 283 | obtain ⟨x | a, rfl⟩ := Y.indexEquiv.surjective i <;> simp [hs, parity_simps] |
| 284 | exact fun i k hik ↦ Y.mem_unipotent.1 hg i k (by grind [h_even i, h_even k]) |
| 285 | |
| 286 | omit [Fintype X] in |
| 287 | /-- Membership in the Bessel subgroup, by the vanishing of entries of `g - 1`. The vectors of `X` |
| 288 | have weight `0`, so the first condition selects the string vectors of weight `≥ 0`. -/ |
| 289 | @[local simp] lemma mem_besselGroup_iff_sub_one {g : G E ε} : |
| 290 | g ∈ Y.besselGroup ↔ |
| 291 | ∀ i k : ι, (if (Y.indexEquiv.symm k).isRight then 0 else 1) ≤ Y.gradeOf k → |
| 292 | Y.gradeOf i ≤ Y.gradeOf k → (V.ratCoordMatrix g - 1) i k = 0 := by |
| 293 | simp [Y.mem_besselGroup, reindex_equiv Y.indexEquiv, sub_eq_zero] |
| 294 | |
| 295 | /-- Let `Y` present the hermitian space `V` over the CM field `E` as `X ⊕ J_s`. For every element |
| 296 | `a` of the adelic unitary group of the standard definite space on `X`, its image under `Y.inclX` |
| 297 | (acting on `X` and fixing the string vectors) lies in the Bessel (Fourier–Jacobi) subgroup |
| 298 | `Y.besselGroup` of the adelic unitary group of `V`. -/ |
| 299 | lemma inclX_mem_besselGroup (a : G E 1) : Y.inclX a ∈ Y.besselGroup := by |
| 300 | simp [reindex_equiv Y.indexEquiv, ratCoordMatrix_inclX, Matrix.one_apply] |
| 301 | |
| 302 | omit [Fintype X] in |
| 303 | /-- For a grading `Y` presenting the hermitian space `V` over the CM field `E` as `X ⊕ J_s`, the |
| 304 | unipotent subgroup `Y.unipotent` is contained in the Bessel (Fourier–Jacobi) subgroup |
| 305 | `Y.besselGroup`. Here `Y.unipotent` consists of the `g` whose matrix in rational coordinates minus 1 |
| 306 | strictly raises grades. -/ |
| 307 | lemma unipotent_le_besselGroup : Y.unipotent ≤ Y.besselGroup := fun _ hg ↦ |
| 308 | Y.mem_besselGroup_iff_sub_one.2 fun i k _ h_le ↦ Y.mem_unipotent.1 hg i k (by lia) |
| 309 | |
| 310 | /-- The Bessel group `Y.besselGroup` is closed. -/ |
| 311 | instance isClosed_besselGroup : IsClosed (Y.besselGroup : Set (G E ε)) := by |
| 312 | -- Membership prescribes certain entries of `V.ratCoordMatrix g`; an entry is continuous in `g`, |
| 313 | -- so it keeps its value on the closure. |
| 314 | refine isClosed_of_closure_subset fun g hg i k hik ↦ closure_singleton.le ?_ |
| 315 | exact map_mem_closure (f := (V.ratCoordMatrix · i k)) (by fun_prop) hg fun γ hγ ↦ hγ i k hik |
| 316 | |
| 317 | /-- The homomorphism `Y.inclX` is continuous. -/ |
| 318 | @[fun_prop] |
| 319 | lemma continuous_inclX : Continuous Y.inclX := by |
| 320 | refine V.isEmbedding_ratCoordMatrix.continuous_iff.2 ?_ |
| 321 | simp only [Function.comp_def, ratCoordMatrix_inclX] |
| 322 | fun_prop |
| 323 | |
| 324 | /-- The embedding `Y.inclX` sends the rational points of the standard definite space on `X` to |
| 325 | rational points in the Bessel subgroup. -/ |
| 326 | lemma inclX_mem_ratBessel {a : G E (1 : X → ℤˣ)} (ha : a ∈ (stdSpace E X).Γ) : |
| 327 | Y.inclX a ∈ Y.ratBessel := by |
| 328 | refine ⟨mem_Gamma_iff_ratCoordMatrix.2 fun i k ↦ ?_, Y.inclX_mem_besselGroup a⟩ |
| 329 | -- The entries are those of `a` on the `X`-block, and `0` or `1` elsewhere. |
| 330 | rw [ratCoordMatrix_inclX] |
| 331 | obtain ⟨x | b, rfl⟩ := Y.indexEquiv.surjective i <;> |
| 332 | obtain ⟨y | c, rfl⟩ := Y.indexEquiv.surjective k |
| 333 | · simpa using mem_Gamma_iff_ratCoordMatrix.1 ha x y |
| 334 | all_goals simp [Matrix.one_apply, apply_ite] |
| 335 | |
| 336 | end Grading |
| 337 | |
| 338 | end New |
| 339 | |
| 340 | /-! |
| 341 | ## The map T, the shift and the string reversal |
| 342 | |
| 343 | * `New.Grading.stringReversal`: the involution of the indices that fixes `X` and reverses the |
| 344 | string. |
| 345 | -/ |
| 346 | |
| 347 | namespace New.Grading |
| 348 | |
| 349 | variable {E ι ι' X X' : Type} [DecidableEq X] [DecidableEq X'] [Field E] [CMType E] [Fintype ι] |
| 350 | [DecidableEq ι] [Fintype ι'] [DecidableEq ι'] {s s' : ℕ} {ε : ι → ℤˣ} {ε' : ι' → ℤˣ} {N : E} |
| 351 | {V : Space E ι ε} {V' : Space E ι' ε'} (Y : Grading V N X s) (Y' : Grading V' N X' s') |
| 352 | (d : ι' → ℤ) |
| 353 | |
| 354 | /-- The involution of the basis indices of V that fixes the indices of X and exchanges the |
| 355 | string vectors i and s − 1 − i. -/ |
| 356 | def stringReversal (i : ι) : ι := Y.indexEquiv ((Y.indexEquiv.symm i).map id Fin.rev) |
| 357 | |
| 358 | /-- The rational map `V → V'` that kills `X` and sends the string vector `a` to `t a` times the |
| 359 | string vector of `V'` with the same number (to `0` if there is none). For `s` odd, `t a` is |
| 360 | `1`, `-N c`, `c` when the weight of `a` is positive, zero, negative. For `s` even, `t a` is |
| 361 | `c`, `1` when the weight is positive, negative. It has degree at least `-1` when `s' = s - 1`. |
| 362 | For `s' = s - 1` and equal constants `c` it sends each `𝔢 ^ i` (`New.Grading.stringPower`) to |
| 363 | `𝔢 ^ i`, which is `0` in `V'` for `i = s - 1` (`New.Grading.stringMap_mulVec_stringPower`). -/ |
| 364 | def stringMap : Matrix ι' ι (𝔸 E) := |
| 365 | -- The weight of `a` is positive iff `2 * a + 1 < s`, and zero iff `2 * a + 1 = s`. |
| 366 | (gradedBlocks Y'.indexEquiv Y.indexEquiv 0 <| Matrix.of fun (b : Fin s') (a : Fin s) ↦ |
| 367 | if (b : ℕ) = a then |
| 368 | (if Odd s ↔ 2 * a + 1 < s then 1 else ↑Y.genericConst) * (if 2 * a + 1 = s then -N else 1) |
| 369 | else 0).map toAdele |
| 370 | |
| 371 | /-- The condition that the matrix w agrees with T (`New.Grading.stringMap`) at all entries (b, a) |
| 372 | where a has positive grade and b has grade below that of a. -/ |
| 373 | abbrev AgreesWithStringMap (w : Matrix ι' ι (𝔸 E)) : Prop := |
| 374 | ∀ (b : ι') (a : ι), 0 < Y.gradeOf a → Y'.gradeOf b < Y.gradeOf a → w b a = Y.stringMap Y' b a |
| 375 | |
| 376 | /-- For weights d on the target basis and an index pair (b, a), the integer d(b) minus the grade |
| 377 | of a in Y: the amount by which the entry (b, a) of a map raises grades. -/ |
| 378 | abbrev mapDegree (r : ι' × ι) : ℤ := d r.1 - Y.gradeOf r.2 |
| 379 | |
| 380 | /-- For weights d on the target indices, the additive group of rational matrices |
| 381 | (`ratMatrices E ι' ι`, adelic matrices with entries from E) whose entry (b, a) vanishes whenever |
| 382 | d(b) is less than the grade of a. -/ |
| 383 | def nonnegMaps : AddSubgroup (ratMatrices E ι' ι) where |
| 384 | carrier := {w : ratMatrices E ι' ι | HasDegreeGe d Y.gradeOf 0 (w : Matrix ι' ι (𝔸 E))} |
| 385 | add_mem' := by simp_all [HasDegreeGe] |
| 386 | zero_mem' := by simp [HasDegreeGe] |
| 387 | neg_mem' := by simp_all [HasDegreeGe] |
| 388 | |
| 389 | /-- Multiplication by `𝔢`: the rational map `V → V` that kills `X` and the last string vector and |
| 390 | sends the string vector `b` to a multiple of the vector `b + 1`. The factor is `-N c` if `b` has |
| 391 | weight `0`, `-N c²` if `b` has weight `1`, and `c` otherwise. It sends `𝔢 ^ i` to `𝔢 ^ (i + 1)`. -/ |
| 392 | def shift : Matrix ι ι (𝔸 E) := |
| 393 | -- For `a = b + 1`: `b` has weight zero iff `2 * b + 1 = s`, and weight one iff `2 * a = s`. |
| 394 | (gradedBlocks Y.indexEquiv Y.indexEquiv 0 <| Matrix.of fun a b : Fin s ↦ |
| 395 | if (a : ℕ) = b + 1 then |
| 396 | Y.genericConst * (if 2 * b + 1 = s then -N else if 2 * a = s then -N * Y.genericConst else 1) |
| 397 | else 0).map toAdele |
| 398 | |
| 399 | end New.Grading |
| 400 | |
| 401 | /-! |
| 402 | ## Adjoints in graded coordinates and the projection to U(X) |
| 403 | |
| 404 | Matrix computations in a space presented as X plus a string (`New.Grading`). |
| 405 | |
| 406 | * `New.Grading.formAdjoint_apply`: the entries of the adjoint `New.Space.formAdjoint` of an adelic |
| 407 | matrix. |
| 408 | -/ |
| 409 | |
| 410 | namespace New |
| 411 | |
| 412 | open Matrix Fintype Space |
| 413 | |
| 414 | variable {E ι ι' X X' : Type} [Field E] [CMType E] [Fintype ι] [DecidableEq ι] [Fintype ι'] |
| 415 | [DecidableEq ι'] [Fintype X] [DecidableEq X] [Fintype X'] [DecidableEq X'] {s s' : ℕ} {ε : ι → ℤˣ} |
| 416 | {ε' : ι' → ℤˣ} {N : E} (V : Space E ι ε) (V' : Space E ι' ε') |
| 417 | |
| 418 | /-- The adjoint J⁻¹yᴴJ' of an adelic map y from the space with Gram matrix J to the space with |
| 419 | Gram matrix J'. -/ |
| 420 | noncomputable def Space.formAdjoint (y : Matrix ι' ι (𝔸 E)) : Matrix ι ι' (𝔸 E) := |
| 421 | V.J⁻¹.map toAdele * yᴴ * V'.J.map toAdele |
| 422 | |
| 423 | /-- Taking the adjoint `formAdjoint` from `V'` to `V` of the adjoint from `V` to `V'` returns |
| 424 | `x`. -/ |
| 425 | lemma Space.formAdjoint_formAdjoint (x : Matrix ι' ι (𝔸 E)) : |
| 426 | V'.formAdjoint V (V.formAdjoint V' x) = x := by |
| 427 | simp [conjTranspose_nonsing_inv, conjTranspose_J, ← Matrix.mul_assoc, x.mul_assoc, formAdjoint, |
| 428 | map_J_inv_mul_map_J] |
| 429 | |
| 430 | /-- The adjoint of `g y` is the adjoint of `y` times `g⁻¹`, because `g` preserves the form. -/ |
| 431 | lemma Space.formAdjoint_ratCoordMatrix_mul (g : G E ε) (y : Matrix ι ι' (𝔸 E)) : |
| 432 | V'.formAdjoint V (V.ratCoordMatrix g * y) = V'.formAdjoint V y * V.ratCoordMatrix g⁻¹ := by |
| 433 | simp [ratCoordMatrix, ← U.form_mul_inv_eq, formAdjoint, Matrix.mul_assoc] |
| 434 | |
| 435 | variable {V : Space E ι ε} {V' : Space E ι' ε'} (Y : Grading V N X s) (Y' : Grading V' N X' s') |
| 436 | |
| 437 | namespace Grading |
| 438 | |
| 439 | omit [Fintype X] in |
| 440 | /-- The grade of the dual index `Y.stringReversal i` is the negative of the grade of `i`. -/ |
| 441 | @[simp] |
| 442 | lemma gradeOf_stringReversal : ∀ i : ι, Y.gradeOf (Y.stringReversal i) = -Y.gradeOf i := by |
| 443 | simp +arith [reindex_equiv Y.indexEquiv, stringReversal] |
| 444 | |
| 445 | /-- For the graded Gram matrix `Gr` over `E` with any constant `M`, a ring homomorphism |
| 446 | `f : E →+* R` and a matrix `A` over `R`, the entry (i, p) of f(Gr) times `A` is |
| 447 | f(Gr(i, σi)) · A(σi, p), where σ is the dual index `New.Grading.stringReversal`. -/ |
| 448 | lemma map_gradedGram_mul_apply {R κ : Type} {M : E} [Semiring R] (f : E →+* R) (A : Matrix ι κ R) : |
| 449 | ∀ (i : ι) (p : κ), ((gradedGram Y.indexEquiv M).map f * A) i p = |
| 450 | f (gradedGram Y.indexEquiv M i (Y.stringReversal i)) * A (Y.stringReversal i) p := by |
| 451 | simp [gradedGram, Matrix.mul_apply, reindex_equiv Y.indexEquiv, apply_ite f, ← Fin.rev_eq_iff, |
| 452 | stringReversal, Matrix.one_apply] |
| 453 | |
| 454 | /-- Row `i` of a graded Gram matrix vanishes outside the column of the dual index |
| 455 | `Y.stringReversal i`. -/ |
| 456 | lemma gradedGram_apply_eq_zero (M : E) {i k : ι} |
| 457 | (hik : Y.stringReversal i ≠ k) : gradedGram Y.indexEquiv M i k = 0 := by |
| 458 | simpa [hik] using Y.map_gradedGram_mul_apply (M := M) (RingHom.id E) 1 i k |
| 459 | |
| 460 | /-- The entry a of the row vector y J is y(σa) J(σa, a), with σ the dual index |
| 461 | `New.Grading.stringReversal`. -/ |
| 462 | lemma vecMul_J_apply (y : ι → 𝔸 E) : |
| 463 | ∀ a : ι, (y ᵥ* V.J.map toAdele) a = |
| 464 | y (Y.stringReversal a) * gradedGram Y.indexEquiv N (Y.stringReversal a) a := by |
| 465 | -- Column `a` of the Gram matrix has its only nonzero entry at the dual index. |
| 466 | simp [Y.gram_eq, gradedGram, vecMul_apply_eq_sum, reindex_equiv Y.indexEquiv, apply_ite toAdele, |
| 467 | stringReversal, Matrix.one_apply] |
| 468 | |
| 469 | /-- The inverse of the Gram matrix `V.J` is the graded Gram matrix with `N⁻¹` in place of `N`. -/ |
| 470 | lemma J_inv_eq_gradedGram : V.J⁻¹ = gradedGram Y.indexEquiv N⁻¹ := by |
| 471 | rw [Y.gram_eq] |
| 472 | refine inv_eq_left_inv ?_ |
| 473 | -- Blockwise: on the string both matrices are antidiagonal, with middle product (-N⁻¹) * (-N). |
| 474 | simp [gradedGram, ← ext_iff, Matrix.mul_apply, reindex_equiv Y.indexEquiv, Matrix.one_apply] |
| 475 | grind [Y.N_ne_zero_and_star_eq] |
| 476 | |
| 477 | /-- The entry (a, b) of the adjoint J⁻¹ yᴴ J' is the conjugate of the entry of y at the dual indices |
| 478 | (σ'b, σa), times the entries J⁻¹(a, σa) and J'(σ'b, b). Here σ and σ' are the dual indices |
| 479 | `New.Grading.stringReversal` of `Y` and `Y'`. Both presentations have the same N. -/ |
| 480 | lemma formAdjoint_apply (y : Matrix ι' ι (𝔸 E)) (a : ι) (b : ι') : |
| 481 | V.formAdjoint V' y a b = |
| 482 | gradedGram Y.indexEquiv N⁻¹ a (Y.stringReversal a) * |
| 483 | star (y (Y'.stringReversal b) (Y.stringReversal a)) * |
| 484 | gradedGram Y'.indexEquiv N (Y'.stringReversal b) b := by |
| 485 | -- The entry is that of the row `a` of `J⁻¹ yᴴ` times `J'`. |
| 486 | change ((V.J⁻¹.map toAdele * yᴴ) a ᵥ* V'.J.map toAdele) b = _ |
| 487 | simp [Y'.vecMul_J_apply, Y.J_inv_eq_gradedGram, map_gradedGram_mul_apply] |
| 488 | |
| 489 | /-! ### The Bessel subgroup and its projection to U(X) -/ |
| 490 | |
| 491 | /-- g lies in `New.Grading.besselGroup` if and only if its matrix agrees with the identity at every |
| 492 | entry (i, k) such that weight(i) ≤ weight(k) and i or k is an index of the string. -/ |
| 493 | lemma mem_besselGroup_iff {g : G E ε} : |
| 494 | g ∈ Y.besselGroup ↔ |
| 495 | ∀ i k : ι, Y.gradeOf i ≤ Y.gradeOf k → |
| 496 | (Y.indexEquiv.symm i).isRight ∨ (Y.indexEquiv.symm k).isRight → |
| 497 | V.ratCoordMatrix g i k = (1 : Matrix ι ι (𝔸 E)) i k := by |
| 498 | refine ⟨fun hg i k hle h_string ↦ ?_, |
| 499 | fun h_one ↦ by simp_all [mem_besselGroup_iff_sub_one, reindex_equiv Y.indexEquiv]⟩ |
| 500 | -- `mem_besselGroup_iff_sub_one` gives the entries `(i, k)` with `k` on the string and of weight |
| 501 | -- `≥ 0`. For the others `i` is on the string and of weight `≤ 0`; they come from `g⁻¹`, since the |
| 502 | -- adjoint of `g⁻¹ - 1` is `g - 1` and duality negates the weights. |
| 503 | have adj : V.formAdjoint V (V.ratCoordMatrix g⁻¹ - 1) = V.ratCoordMatrix g - 1 := by |
| 504 | -- apply `(g⁻¹ y)† = y† g` to y = 1, and subtract 1† = 1 |
| 505 | simpa [formAdjoint, mul_sub, sub_mul, map_J_inv_mul_map_J] using |
| 506 | V.formAdjoint_ratCoordMatrix_mul V g⁻¹ 1 |
| 507 | have of_dual : |
| 508 | (V.ratCoordMatrix g⁻¹ - 1) (Y.stringReversal k) (Y.stringReversal i) = 0 → |
| 509 | (V.ratCoordMatrix g - 1) i k = 0 := |
| 510 | fun h_dual ↦ by rw [← adj, Y.formAdjoint_apply Y, h_dual, star_zero, mul_zero, zero_mul] |
| 511 | have direct : (if (Y.indexEquiv.symm k).isRight then 0 else 1) ≤ Y.gradeOf k → |
| 512 | Y.gradeOf i ≤ Y.gradeOf k → (V.ratCoordMatrix g - 1) i k = 0 := |
| 513 | Y.mem_besselGroup_iff_sub_one.1 hg i k |
| 514 | have dual : (if (Y.indexEquiv.symm (Y.stringReversal i)).isRight then 0 else 1) ≤ |
| 515 | Y.gradeOf (Y.stringReversal i) → |
| 516 | Y.gradeOf (Y.stringReversal k) ≤ Y.gradeOf (Y.stringReversal i) → |
| 517 | (V.ratCoordMatrix g⁻¹ - 1) (Y.stringReversal k) (Y.stringReversal i) = 0 := |
| 518 | Y.mem_besselGroup_iff_sub_one.1 (inv_mem hg) (Y.stringReversal k) (Y.stringReversal i) |
| 519 | suffices (V.ratCoordMatrix g - 1) i k = 0 by simpa [sub_eq_zero] |
| 520 | grind [stringReversal, gradeOf_stringReversal] |
| 521 | |
| 522 | /-- The matrix of an element of `New.Grading.besselGroup` in rational coordinates does not lower |
| 523 | weights: its entry (i, k) is zero when weight(i) < weight(k). -/ |
| 524 | lemma hasDegreeGe_zero_of_mem_besselGroup {g : G E ε} (hg : g ∈ Y.besselGroup) : |
| 525 | HasDegreeGe Y.gradeOf Y.gradeOf 0 (V.ratCoordMatrix g) := by |
| 526 | intro i k hlt |
| 527 | -- Indices of `X` have weight `0`, so they cannot both occur. |
| 528 | have h_string : (Y.indexEquiv.symm i).isRight ∨ (Y.indexEquiv.symm k).isRight := by |
| 529 | cases hi : Y.indexEquiv.symm i <;> cases hk : Y.indexEquiv.symm k <;> simp_all [gradeOf] |
| 530 | rw [Y.mem_besselGroup_iff.1 hg i k (by omega) h_string, Matrix.one_apply_ne (by grind)] |
| 531 | |
| 532 | omit [Fintype X] in |
| 533 | /-- The X-block of the Gram matrix of `V` over the adeles is the standard form of the definite |
| 534 | space on X. -/ |
| 535 | lemma submatrix_inl_map_J : |
| 536 | (V.J.map toAdele).submatrix (Y.indexEquiv ∘ Sum.inl) (Y.indexEquiv ∘ Sum.inl) = |
| 537 | stdForm E (1 : X → ℤˣ) := by |
| 538 | simp [← ext_iff, Y.gram_eq, gradedGram, Matrix.one_apply] |
| 539 | |
| 540 | private lemma ratCoordMatrix_inr_inl_eq_zero {g : G E ε} (hg : g ∈ Y.besselGroup) |
| 541 | (a : Fin s) (x : X) (ha : Y.gradeOf (Y.indexEquiv (Sum.inr a)) ≤ 0) : |
| 542 | V.ratCoordMatrix g (Y.indexEquiv (Sum.inr a)) (Y.indexEquiv (Sum.inl x)) = 0 := by |
| 543 | rw [Y.mem_besselGroup_iff.1 hg _ _ (by rwa [gradeOf_inl]) (by simp), |
| 544 | Matrix.one_apply_ne (by simp)] |
| 545 | |
| 546 | /-- For g in `New.Grading.besselGroup`, the X-block B of its matrix in rational coordinates |
| 547 | satisfies Bᴴ S B = S, where S is the standard form of the definite space on X. -/ |
| 548 | lemma submatrix_inl_ratCoordMatrix_unitary {g : G E ε} (hg : g ∈ Y.besselGroup) : |
| 549 | ((V.ratCoordMatrix g).submatrix (Y.indexEquiv ∘ Sum.inl) (Y.indexEquiv ∘ Sum.inl))ᴴ * |
| 550 | stdForm E (1 : X → ℤˣ) * |
| 551 | (V.ratCoordMatrix g).submatrix (Y.indexEquiv ∘ Sum.inl) (Y.indexEquiv ∘ Sum.inl) = |
| 552 | stdForm E (1 : X → ℤˣ) := by |
| 553 | have h_zero (a : Fin s) (x : X) (ha : s ≤ 2 * a.val + 1) : |
| 554 | V.ratCoordMatrix g (Y.indexEquiv (Sum.inr a)) (Y.indexEquiv (Sum.inl x)) = 0 := by |
| 555 | exact ratCoordMatrix_inr_inl_eq_zero Y hg a x (by simp; omega) |
| 556 | calc |
| 557 | _ = ((V.ratCoordMatrix g)ᴴ * V.J.map toAdele * V.ratCoordMatrix g).submatrix |
| 558 | (Y.indexEquiv ∘ Sum.inl) (Y.indexEquiv ∘ Sum.inl) := by |
| 559 | -- The string contributes nothing, since dual string indices have opposite weights and g has |
| 560 | -- no entry from X to a string index of weight ≤ 0. |
| 561 | simp [← ext_iff, Matrix.mul_apply, reindex_equiv Y.indexEquiv, Y.gram_eq, gradedGram, |
| 562 | Matrix.one_apply] |
| 563 | grind -funext [star_zero, sum_eq_zero] |
| 564 | _ = _ := by |
| 565 | rw [show (V.ratCoordMatrix g)ᴴ * V.J.map toAdele * V.ratCoordMatrix g = V.J.map toAdele from |
| 566 | mem_unitaryGroupOf_iff.1 (V.toRatCoords g).property, Y.submatrix_inl_map_J] |
| 567 | |
| 568 | /-- On `New.Grading.besselGroup`, the X-block of the matrix in rational coordinates is |
| 569 | multiplicative. -/ |
| 570 | lemma submatrix_inl_ratCoordMatrix_mul {g h : G E ε} (hg : g ∈ Y.besselGroup) |
| 571 | (hh : h ∈ Y.besselGroup) : |
| 572 | (V.ratCoordMatrix (g * h)).submatrix (Y.indexEquiv ∘ Sum.inl) (Y.indexEquiv ∘ Sum.inl) = |
| 573 | (V.ratCoordMatrix g).submatrix (Y.indexEquiv ∘ Sum.inl) (Y.indexEquiv ∘ Sum.inl) * |
| 574 | (V.ratCoordMatrix h).submatrix (Y.indexEquiv ∘ Sum.inl) (Y.indexEquiv ∘ Sum.inl) := by |
| 575 | -- The string contributes nothing: an entry of `h` from `X` to a string vector needs its weight |
| 576 | -- `> 0`, and an entry of `g` from it back to `X` needs its weight `< 0`. |
| 577 | have h_string (x y : X) (a : Fin s) : |
| 578 | V.ratCoordMatrix g (Y.indexEquiv (Sum.inl x)) (Y.indexEquiv (Sum.inr a)) * |
| 579 | V.ratCoordMatrix h (Y.indexEquiv (Sum.inr a)) (Y.indexEquiv (Sum.inl y)) = 0 := by |
| 580 | obtain h_nonneg | h_nonpos := le_total 0 (Y.gradeOf (Y.indexEquiv (Sum.inr a))) |
| 581 | · rw [Y.mem_besselGroup_iff.1 hg _ _ (by rwa [gradeOf_inl]) (by simp), |
| 582 | Matrix.one_apply_ne (by simp), zero_mul] |
| 583 | · rw [ratCoordMatrix_inr_inl_eq_zero Y hh a y h_nonpos, mul_zero] |
| 584 | exact Matrix.ext fun x y ↦ by simp [Matrix.mul_apply, reindex_equiv Y.indexEquiv, h_string] |
| 585 | |
| 586 | /-- The projection from `New.Grading.besselGroup` to the adelic unitary group of the standard |
| 587 | definite space on X: it takes an element to the X-block of its matrix in rational coordinates. -/ |
| 588 | def besselProj : Y.besselGroup →* G E (1 : X → ℤˣ) := |
| 589 | .mk' |
| 590 | (fun r : Y.besselGroup ↦ G.toUnitary.symm <| U.of (by simp) |
| 591 | ((V.ratCoordMatrix r).submatrix (Y.indexEquiv ∘ Sum.inl) (Y.indexEquiv ∘ Sum.inl)) |
| 592 | (Y.submatrix_inl_ratCoordMatrix_unitary r.property)) |
| 593 | fun a b ↦ (stdSpace E X).isEmbedding_ratCoordMatrix.injective <| by |
| 594 | simpa [G.adeleMatrix] using Y.submatrix_inl_ratCoordMatrix_mul a.property b.property |
| 595 | |
| 596 | /-- The matrix of `Y.besselProj r` is the X-block of the matrix of `r` in rational coordinates. -/ |
| 597 | lemma adeleMatrix_besselProj (r : Y.besselGroup) : |
| 598 | (Y.besselProj r).adeleMatrix = |
| 599 | (V.ratCoordMatrix r).submatrix (Y.indexEquiv ∘ Sum.inl) (Y.indexEquiv ∘ Sum.inl) := by |
| 600 | simp [besselProj, G.adeleMatrix] |
| 601 | |
| 602 | @[fun_prop] |
| 603 | lemma continuous_besselProj : Continuous Y.besselProj := by |
| 604 | simp only [G.continuous_iff, Function.comp_def, adeleMatrix_besselProj] |
| 605 | fun_prop |
| 606 | |
| 607 | lemma besselProj_inclX (a : G E (1 : X → ℤˣ)) : |
| 608 | Y.besselProj ⟨Y.inclX a, Y.inclX_mem_besselGroup a⟩ = a := |
| 609 | (stdSpace E X).isEmbedding_ratCoordMatrix.injective <| by |
| 610 | simp [adeleMatrix_besselProj, ← ext_iff, ratCoordMatrix_inclX] |
| 611 | |
| 612 | /-- An element of the Bessel group lies in the unipotent group if and only if its projection to U(X) |
| 613 | is trivial. -/ |
| 614 | lemma mem_unipotent_iff_besselProj_eq_one (r : Y.besselGroup) : |
| 615 | (r : G E ε) ∈ Y.unipotent ↔ Y.besselProj r = 1 := by |
| 616 | -- Off the `X`-block, the conditions for the unipotent and the Bessel group are the same. |
| 617 | have hr := Y.mem_besselGroup_iff.1 r.property |
| 618 | rw [← (stdSpace E X).isEmbedding_ratCoordMatrix.injective.eq_iff] |
| 619 | simp_all [adeleMatrix_besselProj, ← ext_iff, reindex_equiv Y.indexEquiv, HasDegreeGe, |
| 620 | Matrix.one_apply, |
| 621 | sub_eq_zero] |
| 622 | |
| 623 | /-- An element `r` of the Bessel group agrees with the embedding of its projection to U(X) up to a |
| 624 | unipotent factor on the left. -/ |
| 625 | lemma mul_inv_inclX_besselProj_mem_unipotent (r : Y.besselGroup) : |
| 626 | (r : G E ε) * (Y.inclX (Y.besselProj r))⁻¹ ∈ Y.unipotent := by |
| 627 | let a : Y.besselGroup := ⟨Y.inclX (Y.besselProj r), Y.inclX_mem_besselGroup _⟩ |
| 628 | exact (Y.mem_unipotent_iff_besselProj_eq_one (r * a⁻¹)).2 <| by simp [a, besselProj_inclX] |
| 629 | |
| 630 | /-- If an element of the Bessel group lies in `V.Γ`, its projection lies in `Γ` of the standard |
| 631 | space. -/ |
| 632 | lemma besselProj_mem_Gamma {r : Y.besselGroup} (hr : (r : G E ε) ∈ V.Γ) : |
| 633 | Y.besselProj r ∈ (stdSpace E X).Γ := by |
| 634 | rw [mem_Gamma_iff_ratCoordMatrix] at hr ⊢ |
| 635 | exact fun x y ↦ by |
| 636 | simpa [adeleMatrix_besselProj] using hr (Y.indexEquiv (Sum.inl x)) (Y.indexEquiv (Sum.inl y)) |
| 637 | |
| 638 | /-- There is a continuous homomorphism p from `New.Grading.besselGroup` to the adelic unitary group |
| 639 | of the standard definite space on X such that (a) r · `New.Grading.inclX`(p r)⁻¹ lies in |
| 640 | `New.Grading.unipotent`, (b) p ∘ `New.Grading.inclX` is the identity, (c) the kernel of p is |
| 641 | `New.Grading.unipotent`, (d) p maps rational points to rational points. The projection |
| 642 | `New.Grading.besselProj` is such a p. -/ |
| 643 | lemma exists_besselGroup_proj : |
| 644 | ∃ p : Y.besselGroup →* G E (1 : X → ℤˣ), Continuous p ∧ |
| 645 | (∀ r : Y.besselGroup, (r : G E ε) * (Y.inclX (p r))⁻¹ ∈ Y.unipotent) ∧ |
| 646 | (∀ a : G E (1 : X → ℤˣ), p ⟨Y.inclX a, Y.inclX_mem_besselGroup a⟩ = a) ∧ |
| 647 | (∀ r : Y.besselGroup, (r : G E ε) ∈ Y.unipotent ↔ p r = 1) ∧ |
| 648 | ∀ r : Y.besselGroup, (r : G E ε) ∈ Y.ratBessel → p r ∈ (stdSpace E X).Γ := |
| 649 | ⟨Y.besselProj, Y.continuous_besselProj, Y.mul_inv_inclX_besselProj_mem_unipotent, |
| 650 | Y.besselProj_inclX, Y.mem_unipotent_iff_besselProj_eq_one, |
| 651 | fun _ hr ↦ Y.besselProj_mem_Gamma (Subgroup.mem_inf.1 hr).1⟩ |
| 652 | |
| 653 | /-- Every element of the Bessel group `New.Grading.besselGroup` is a product na with n in the |
| 654 | unipotent group and a in U(X). -/ |
| 655 | lemma exists_unipotent_mul_inclX {g : G E ε} (hg : g ∈ Y.besselGroup) : |
| 656 | ∃ n ∈ Y.unipotent, ∃ a : G E (1 : X → ℤˣ), g = n * Y.inclX a := |
| 657 | ⟨_, Y.mul_inv_inclX_besselProj_mem_unipotent ⟨g, hg⟩, Y.besselProj ⟨g, hg⟩, |
| 658 | (inv_mul_cancel_right g _).symm⟩ |
| 659 | |
| 660 | end Grading |
| 661 | |
| 662 | end New |
| 663 | |
| 664 | /-! |
| 665 | ## Rational coordinates of finite adelic points; finite Bessel subgroups |
| 666 | |
| 667 | Points of the adelic group of a space `V = (J, x)` are matrices preserving |
| 668 | the standard form of signs `ε`; |
| 669 | `V.ratCoordMatrix g = x g x⁻¹` is the matrix in rational coordinates, and `New.Space.xFin` the |
| 670 | finite part of `x`. |
| 671 | |
| 672 | * `New.Grading.besselFin`, `New.Grading.inclXFin`: for `V` presented as `X` plus a string |
| 673 | (`New.Grading`), the finite parts of the Bessel subgroup `New.Grading.besselGroup` and of the |
| 674 | embedding `New.Grading.inclX` of `U(X)`. |
| 675 | -/ |
| 676 | |
| 677 | section FiniteBesselGroup |
| 678 | |
| 679 | open Matrix RingHom New Space |
| 680 | |
| 681 | variable {E X ι : Type} [Field E] [CMType E] [Fintype ι] [DecidableEq ι] [Fintype X] [DecidableEq X] |
| 682 | {ε : ι → ℤˣ} {s : ℕ} {N : E} {V : Space E ι ε} (Y : Grading V N X s) |
| 683 | |
| 684 | namespace New.Space |
| 685 | |
| 686 | /-- For g in G_f, the matrix x_f g x_f⁻¹ of g in rational coordinates. -/ |
| 687 | def ratCoordMatrixFin (g : Gf E ι) : Matrix ι ι (𝔸f E) := V.xFin.val * g * V.xFin⁻¹ |
| 688 | |
| 689 | /-- The matrix of `g` in rational coordinates is `V.x * g.adeleMatrix * V.x⁻¹`. -/ |
| 690 | lemma ratCoordMatrix_eq (g : G E ε) : V.ratCoordMatrix g = V.x * g.adeleMatrix * V.x⁻¹ := rfl |
| 691 | |
| 692 | /-- The finite part of the matrix of g in rational coordinates is the matrix of the finite component |
| 693 | of g in rational coordinates. -/ |
| 694 | lemma ratCoordMatrixFin_snd (g : G E ε) : |
| 695 | V.ratCoordMatrixFin g.2 = |
| 696 | (V.ratCoordMatrix g).map (snd (NumberField.InfinitePlace E → ℂ) (𝔸f E)) := by |
| 697 | simp_rw [ratCoordMatrix_eq, Matrix.map_mul] |
| 698 | rfl |
| 699 | |
| 700 | /-- For g in G_f, the matrix of (1, g) in rational coordinates is the identity at the infinite |
| 701 | places and `V.ratCoordMatrixFin g` at the finite places. -/ |
| 702 | lemma ratCoordMatrix_inr (g : Gf E ι) (a b : ι) : |
| 703 | V.ratCoordMatrix (1, g) a b = |
| 704 | ((1 : Matrix ι ι (NumberField.InfinitePlace E → ℂ)) a b, V.ratCoordMatrixFin g a b) := by |
| 705 | -- The finite part is `ratCoordMatrixFin_snd`; the infinite part is that of `V.x * V.x⁻¹ = 1`. |
| 706 | have h_inf : ((V.x.val * V.x⁻¹.val) a b).1 = ((1 : Matrix ι ι (𝔸 E)) a b).1 := by rw [V.x.mul_inv] |
| 707 | refine Prod.ext ?_ (by simp [ratCoordMatrixFin_snd (1, g)]) |
| 708 | simpa [ratCoordMatrix_eq, Matrix.mul_apply, Prod.fst_sum, funext_iff, apply_ite, |
| 709 | Matrix.one_apply] using h_inf |
| 710 | |
| 711 | /-- The finite part x_f of the point of a space (J, x) satisfies x_fᴴ J x_f = 1 over the finite |
| 712 | adeles, to which J is mapped entrywise. This is the finite part of `V.gram_point`. -/ |
| 713 | lemma gram_xFin : V.xFin.valᴴ * V.J.map ((↑) : E → 𝔸f E) * V.xFin.val = 1 := by |
| 714 | -- `using!` identifies the map E → 𝔸_f with the finite component of `toAdele`. |
| 715 | simpa [stdForm, -coe_snd] using! |
| 716 | congr_arg (Matrix.map · (snd (NumberField.InfinitePlace E → ℂ) (𝔸f E))) V.gram_point |
| 717 | |
| 718 | end Space |
| 719 | |
| 720 | namespace Grading |
| 721 | |
| 722 | omit [Fintype X] in |
| 723 | /-- A finite adelic point embedded as `(1, g)` lies in the unipotent subgroup exactly when |
| 724 | its finite rational-coordinate matrix minus the identity raises grades by at least one. -/ |
| 725 | lemma mem_unipotent_one_snd_iff {g : Gf E ι} : |
| 726 | ((1, g) : G E ε) ∈ Y.unipotent ↔ |
| 727 | HasDegreeGe Y.gradeOf Y.gradeOf 1 (V.ratCoordMatrixFin g - 1) := by |
| 728 | rw [Y.mem_unipotent] |
| 729 | -- The matrix of `(1, g)` is `1` at the infinite places and `ratCoordMatrixFin g` |
| 730 | -- at the finite places. |
| 731 | simp [HasDegreeGe, V.ratCoordMatrix_inr, Prod.ext_iff, Matrix.one_apply, |
| 732 | apply_ite Prod.fst, apply_ite Prod.snd] |
| 733 | |
| 734 | /-- The finite points `g` such that `(1, g)` lies in the Bessel subgroup `Y.besselGroup`. -/ |
| 735 | def besselFin : Subgroup (Gf E ι) := Y.besselGroup.comap (MonoidHom.inr (GInf E ε) (Gf E ι)) |
| 736 | |
| 737 | /-- The embedding of the finite points of `U(X)` in those of `U(V)`: the finite component of |
| 738 | `Y.inclX (1, h)`. -/ |
| 739 | def inclXFin : Gf E X →* Gf E ι := |
| 740 | (MonoidHom.snd (GInf E ε) (Gf E ι)).comp (Y.inclX.comp (MonoidHom.inr (GInf E 1) (Gf E X))) |
| 741 | |
| 742 | /-- In rational coordinates the matrix of `inclXFin h` is `h` on `X` and the identity on the |
| 743 | string. -/ |
| 744 | lemma ratCoordMatrixFin_inclXFin (h : Gf E X) : |
| 745 | V.ratCoordMatrixFin (Y.inclXFin h) = gradedBlocks Y.indexEquiv Y.indexEquiv h 1 := |
| 746 | ext (by simp [reindex_equiv Y.indexEquiv, apply_ite, inclXFin, ratCoordMatrixFin_snd, |
| 747 | ratCoordMatrix_inclX, Matrix.one_apply]) |
| 748 | |
| 749 | /-- The homomorphism `Y.inclX` sends `(1, h)` to `(1, Y.inclXFin h)`. -/ |
| 750 | lemma inclX_inr (h : Gf E X) : Y.inclX (1, h) = (1, Y.inclXFin h) := by |
| 751 | -- Compare the matrices in rational coordinates, block by block along `Y.indexEquiv`. |
| 752 | refine V.isEmbedding_ratCoordMatrix.injective (ext ?_) |
| 753 | simp [reindex_equiv Y.indexEquiv, ratCoordMatrix_inclX, inclXFin, ratCoordMatrix_inr, |
| 754 | Matrix.one_apply, ratCoordMatrixFin_snd] |
| 755 | aesop |
| 756 | |
| 757 | omit [Fintype X] in |
| 758 | /-- The finite component of an element of the Bessel group lies in `Y.besselFin`. -/ |
| 759 | lemma snd_mem_besselFin {g : G E ε} (hg : g ∈ Y.besselGroup) : g.2 ∈ Y.besselFin := by |
| 760 | -- The matrix of `(1, g.2)` is the identity at infinity and the finite part of that of `g`. |
| 761 | refine Y.mem_besselGroup.2 fun i k h_string h_nonneg hik ↦ ?_ |
| 762 | rw [MonoidHom.inr_apply, ratCoordMatrix_inr, ratCoordMatrixFin_snd, map_apply, |
| 763 | Y.mem_besselGroup.1 hg i k h_string h_nonneg hik] |
| 764 | obtain rfl | h_eq := eq_or_ne i k <;> simp [*] |
| 765 | |
| 766 | /-- The finite Bessel subgroup is closed. -/ |
| 767 | instance : IsClosed (Y.besselFin : Set (Gf E ι)) := |
| 768 | Y.isClosed_besselGroup.preimage_of_continuous (f := fun g ↦ (1, g)) |
| 769 | |
| 770 | end Grading |
| 771 | |
| 772 | end New |
| 773 | |
| 774 | end FiniteBesselGroup |
| 775 | |
| 776 | /-! |
| 777 | ## c_λ on U(J) through a frame |
| 778 | |
| 779 | The matrix coefficient c_λ = `New.HCParam.dsCoeff` (`l = 2λ`) of a discrete series is defined on |
| 780 | the unitary group `New.USign ε` of the diagonal form with signs `ε`. Let `J` be a hermitian |
| 781 | involution and `p` a frame (`New.DiscreteSeries.SignFrame J ε`), that is, an invertible matrix with |
| 782 | `pᴴ J p = diag ε`. |
| 783 | -/ |
| 784 | |
| 785 | namespace New |
| 786 | |
| 787 | open DiscreteSeries Matrix MeasureTheory |
| 788 | |
| 789 | variable {n : Type _} [Fintype n] [DecidableEq n] |
| 790 | |
| 791 | /-- A frame for the complex matrix J with signs ε: an invertible matrix p (the field `matrix`) with |
| 792 | pᴴJp = diag(ε). -/ |
| 793 | class DiscreteSeries.SignFrame (J : outParam (Matrix n n ℂ)) (ε : outParam (n → ℤˣ)) where |
| 794 | /-- The invertible matrix p of the frame. -/ |
| 795 | matrix : GL n ℂ |
| 796 | /-- The matrix p satisfies pᴴJp = diag(ε). -/ |
| 797 | gram_eq : matrix.valᴴ * J * matrix.val = signMatrix ε |
| 798 | |
| 799 | variable {ε : n → ℤˣ} {A : ℕ} {J : Matrix n n ℂ} |
| 800 | {l : HCParam (n := n) ε} [p : SignFrame J ε] [IsHermitianInvolution J] |
| 801 | |
| 802 | /-- The isomorphism of topological groups U(J) → U(diag ε), g ↦ p⁻¹gp, for the frame p of |
| 803 | `New.DiscreteSeries.SignFrame J ε`, so that pᴴJp = diag(ε). -/ |
| 804 | def DiscreteSeries.frameEquiv : U J ≃ₜ* USign ε := |
| 805 | ContinuousMulEquiv.mk (U.conj p.matrix p.gram_eq).symm |
| 806 | (continuous_induced_rng.2 ((continuous_const.mul continuous_subtypeVal).mul continuous_const)) |
| 807 | (continuous_induced_rng.2 ((continuous_const.mul continuous_subtypeVal).mul continuous_const)) |
| 808 | |
| 809 | /-- The function g ↦ c_λ(p⁻¹gp) on U(J), for l = 2λ and the frame p of |
| 810 | `New.DiscreteSeries.SignFrame J ε`, so that pᴴJp = diag(ε). -/ |
| 811 | def HCParam.dsCoeffInFrame (l : HCParam ε) (g : U J) : ℂ := l.dsCoeff (frameEquiv g) |
| 812 | |
| 813 | omit [IsHermitianInvolution J] in |
| 814 | @[fun_prop] |
| 815 | theorem continuous_dsCoeffInFrame : Continuous l.dsCoeffInFrame := by |
| 816 | fun_prop [HCParam.dsCoeffInFrame] |
| 817 | |
| 818 | /-- The isomorphism g ↦ P⁻¹gP from U(J) to U(diag ε), for the matrix P of a frame, carries the |
| 819 | measure `New.haarU` of U(J), which is the `volume` there, to that of U(diag ε). -/ |
| 820 | lemma DiscreteSeries.measurePreserving_frameEquiv : MeasurePreserving (frameEquiv (p := p)) := |
| 821 | -- the bijection is g ↦ p⁻¹ g p by definition, and it scales the form by 1 |
| 822 | measurePreserving_haarU p.matrix⁻¹ p.matrix 1 _ (by simp [p.gram_eq]) (fun _ ↦ rfl) |
| 823 | |
| 824 | /-- The integral over U(J) of f(p⁻¹gp), for the frame p, is the integral of f over U(diag ε). -/ |
| 825 | theorem DiscreteSeries.integral_comp_frameEquiv {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 826 | (f : USign ε → E) : ∫ g : U J, f (frameEquiv g) = ∫ g : USign ε, f g := |
| 827 | measurePreserving_frameEquiv.integral_comp frameEquiv.measurableEmbedding _ |
| 828 | |
| 829 | /-- If l = 2λ is a parameter with gap 500n³+A, J is a hermitian involution and pᴴJp = diag(ε), the |
| 830 | function deg_λ c_λ (formal degree times coefficient), carried to U(J) by the frame p, is an |
| 831 | idempotent kernel on U(J): continuous, integrable, self-adjoint, nonzero at 1 and reproducing |
| 832 | under convolution. -/ |
| 833 | theorem isIdempotentKernel_dsCoeffInFrame [Nonempty n] (hl_gap : l.HasLargeGap A) : |
| 834 | IsIdempotentKernel fun g : U J ↦ l.formalDegree * l.dsCoeffInFrame g := by |
| 835 | -- The kernel of `-l` is `l.formalDegree * l.dsCoeff`, the complex conjugate of that of `l`; carry |
| 836 | -- it over to `U J` along the measure preserving isomorphism `frameEquiv`. |
| 837 | have h_kernel : IsIdempotentKernel (-l).dsKernel := |
| 838 | HCParam.HasLargeGap.isIdempotentKernel_dsKernel hl_gap.neg |
| 839 | have h_pullback : IsIdempotentKernel fun g : U J ↦ (-l).dsKernel (frameEquiv g) := |
| 840 | { continuous := by fun_prop |
| 841 | integrable := measurePreserving_frameEquiv.integrable_comp_of_integrable h_kernel.integrable |
| 842 | apply_inv g := by simp [← h_kernel.apply_inv] |
| 843 | apply_one_ne_zero := by simp [h_kernel.apply_one_ne_zero] |
| 844 | convolution_eq x y := by simp [← h_kernel.convolution_eq, ← integral_comp_frameEquiv] } |
| 845 | simpa [dsKernel, HCParam.formalDegree, HCParam.dsCoeffInFrame] using h_pullback |
| 846 | |
| 847 | end New |
| 848 | |
| 849 | /-! ## Degree parts, the degree of T, invariance under the Bessel subgroups, and T†T -/ |
| 850 | |
| 851 | namespace New.Grading |
| 852 | |
| 853 | variable {E ι ι' X X' : Type} [Field E] [CMType E] [Fintype ι] [DecidableEq ι] [Fintype ι'] |
| 854 | [DecidableEq ι'] [Fintype X] [DecidableEq X] [Fintype X'] [DecidableEq X'] |
| 855 | {s : ℕ} {ε : ι → ℤˣ} {ε' : ι' → ℤˣ} {N : E} {V : Space E ι ε} {V' : Space E ι' ε'} |
| 856 | (Y : Grading V N X s) {Y' : Grading V' N X' (s - 1)} |
| 857 | |
| 858 | open Matrix |
| 859 | |
| 860 | /-- The part of degree `d` of a matrix on the basis of `V`: it keeps the entries `(b, a)` with |
| 861 | `gradeOf b = gradeOf a + d` and replaces the others by `0`. -/ |
| 862 | def degreePart (d : ℤ) : Matrix ι ι (𝔸 E) →+ Matrix ι ι (𝔸 E) where |
| 863 | toFun A := of fun b a ↦ if Y.gradeOf b = Y.gradeOf a + d then A b a else 0 |
| 864 | map_zero' := Matrix.ext fun b a ↦ by simp |
| 865 | map_add' A B := Matrix.ext fun b a ↦ by |
| 866 | by_cases h : Y.gradeOf b = Y.gradeOf a + d <;> simp [h] |
| 867 | |
| 868 | omit [Fintype X] in |
| 869 | lemma degreePart_apply (d : ℤ) (A : Matrix ι ι (𝔸 E)) (b a : ι) : |
| 870 | Y.degreePart d A b a = if Y.gradeOf b = Y.gradeOf a + d then A b a else 0 := rfl |
| 871 | |
| 872 | omit [Fintype X] in |
| 873 | /-- A matrix that raises grades by at least `d'` has no part of degree `d < d'`. -/ |
| 874 | lemma degreePart_eq_zero {d d' : ℤ} {A : Matrix ι ι (𝔸 E)} |
| 875 | (hA : HasDegreeGe Y.gradeOf Y.gradeOf d' A) (hd : d < d') : Y.degreePart d A = 0 := by |
| 876 | refine Matrix.ext fun b a ↦ ?_ |
| 877 | rw [degreePart_apply, Matrix.zero_apply, ite_eq_right_iff] |
| 878 | exact fun h_grade ↦ hA b a (by omega) |
| 879 | |
| 880 | omit [Fintype X] in |
| 881 | lemma degreePart_one {d : ℤ} (hd : d ≠ 0) : Y.degreePart d 1 = 0 := by |
| 882 | refine Matrix.ext fun b a ↦ ?_ |
| 883 | rw [degreePart_apply, Matrix.zero_apply, ite_eq_right_iff] |
| 884 | exact fun h_grade ↦ one_apply_ne (by rintro rfl; omega) |
| 885 | |
| 886 | omit [Fintype X] in |
| 887 | /-- If the matrices of `u` and `u'` in rational coordinates differ from `1` by terms raising |
| 888 | grades by at least `d > 0`, their degree-`d` parts add under multiplication. |
| 889 | The cross term raises grades by at least `d + d`. -/ |
| 890 | lemma degreePart_ratCoordMatrix_mul {d : ℤ} (hd : 0 < d) {u u' : G E ε} |
| 891 | (hu : HasDegreeGe Y.gradeOf Y.gradeOf d (V.ratCoordMatrix u - 1)) |
| 892 | (hu' : HasDegreeGe Y.gradeOf Y.gradeOf d (V.ratCoordMatrix u' - 1)) : |
| 893 | Y.degreePart d (V.ratCoordMatrix (u * u')) = |
| 894 | Y.degreePart d (V.ratCoordMatrix u) + Y.degreePart d (V.ratCoordMatrix u') := by |
| 895 | have h_high : HasDegreeGe Y.gradeOf Y.gradeOf (d + d) |
| 896 | ((V.ratCoordMatrix u - 1) * (V.ratCoordMatrix u' - 1)) := hu.mul hu' le_rfl |
| 897 | have h_expand : V.ratCoordMatrix (u * u') = |
| 898 | (V.ratCoordMatrix u - 1) * (V.ratCoordMatrix u' - 1) + |
| 899 | (V.ratCoordMatrix u + V.ratCoordMatrix u') - 1 := by |
| 900 | rw [map_mul] |
| 901 | noncomm_ring |
| 902 | rw [h_expand, map_sub, map_add, map_add, Y.degreePart_eq_zero h_high (by omega), |
| 903 | Y.degreePart_one hd.ne', zero_add, sub_zero] |
| 904 | |
| 905 | omit [Fintype X] [Fintype X'] in |
| 906 | /-- For s' = s − 1, the map T = `New.Grading.stringMap` lowers weights by at most 1. -/ |
| 907 | lemma hasDegreeGe_neg_one_stringMap : HasDegreeGe Y'.gradeOf Y.gradeOf (-1) (Y.stringMap Y') := by |
| 908 | -- The only entries of T are between string vectors with the same number a, of weights |
| 909 | -- s - 1 - 2 a and s - 2 - 2 a. |
| 910 | simp [reindex_equiv Y.indexEquiv, reindex_equiv Y'.indexEquiv, HasDegreeGe, stringMap] |
| 911 | lia |
| 912 | |
| 913 | /-- Let s' = s − 1. For g in `New.Grading.besselGroup` of Y and δ in that of Y', the map δTg − T has |
| 914 | degree at least 0, where T = `New.Grading.stringMap` and δ, g are read in rational coordinates. -/ |
| 915 | lemma hasDegreeGe_zero_mul_stringMap_mul_sub {g : G E ε} {δ : G E ε'} |
| 916 | (hg : g ∈ Y.besselGroup) (hδ : δ ∈ Y'.besselGroup) : |
| 917 | HasDegreeGe Y'.gradeOf Y.gradeOf 0 |
| 918 | (V'.ratCoordMatrix δ * (Y.stringMap Y' * V.ratCoordMatrix g) - Y.stringMap Y') := by |
| 919 | -- δTg - T = (δ - 1)Tg + T(g - 1). Here T lowers weights by at most 1 and links only the strings, |
| 920 | -- and a string entry of δ - 1 or g - 1 raises weights by at least 1. |
| 921 | set T : Matrix ι' ι (𝔸 E) := Y.stringMap Y' |
| 922 | have hT : HasDegreeGe Y'.gradeOf Y.gradeOf (-1) T := Y.hasDegreeGe_neg_one_stringMap |
| 923 | have hT_string (b : ι') (a : ι) (h_ne : T b a ≠ 0) : |
| 924 | (Y'.indexEquiv.symm b).isRight ∧ (Y.indexEquiv.symm a).isRight := by |
| 925 | obtain ⟨x | b, rfl⟩ := Y'.indexEquiv.surjective b <;> |
| 926 | obtain ⟨y | a, rfl⟩ := Y.indexEquiv.surjective a <;> simp_all [T, stringMap] |
| 927 | have h_left : HasDegreeGe Y'.gradeOf Y.gradeOf 0 ((V'.ratCoordMatrix δ - 1) * T) := by |
| 928 | refine fun b a hlt ↦ Finset.sum_eq_zero fun y _ ↦ by_contra fun h_ne ↦ ?_ |
| 929 | have hy : Y'.gradeOf b ≤ Y'.gradeOf y := by grind [HasDegreeGe] |
| 930 | simp_all [Y'.mem_besselGroup_iff.1 hδ b y hy |
| 931 | (.inr (hT_string y a (right_ne_zero_of_mul h_ne)).1)] |
| 932 | have h_right : HasDegreeGe Y'.gradeOf Y.gradeOf 0 (T * (V.ratCoordMatrix g - 1)) := by |
| 933 | refine fun b a hlt ↦ Finset.sum_eq_zero fun z _ ↦ by_contra fun h_ne ↦ ?_ |
| 934 | have hz : Y.gradeOf z ≤ Y.gradeOf a := by grind [HasDegreeGe] |
| 935 | simp_all [Y.mem_besselGroup_iff.1 hg z a hz (.inl (hT_string b z (left_ne_zero_of_mul h_ne)).2)] |
| 936 | have h_split : V'.ratCoordMatrix δ * (T * V.ratCoordMatrix g) - T = |
| 937 | (V'.ratCoordMatrix δ - 1) * T * V.ratCoordMatrix g + T * (V.ratCoordMatrix g - 1) := by |
| 938 | simp [Matrix.sub_mul, Matrix.mul_sub, Matrix.mul_assoc] |
| 939 | intro b a hlt |
| 940 | rw [h_split, Matrix.add_apply, h_right b a hlt, |
| 941 | h_left.mul (Y.hasDegreeGe_zero_of_mem_besselGroup hg) (zero_add 0).ge b a hlt, add_zero] |
| 942 | |
| 943 | /-- Let `s' = s - 1` and `T = Y.stringMap Y'`. The adjoint `T†` of `T` for the two forms kills `X'` |
| 944 | and sends the string vector `b` of `Y'` to a multiple of the string vector `a = b + 1` of `Y`. For |
| 945 | `s` odd the factor is `c` or `1` when the weight of `a` is nonnegative or negative. For `s` even |
| 946 | it is `1`, `-N c`, `c` when the weight of `a` is positive, `-1`, less than `-1`. -/ |
| 947 | lemma formAdjoint_stringMap : |
| 948 | V.formAdjoint V' (Y.stringMap Y') = |
| 949 | (gradedBlocks Y.indexEquiv Y'.indexEquiv 0 |
| 950 | (Matrix.of fun (a : Fin s) (b : Fin (s - 1)) ↦ |
| 951 | if a.val = b + 1 then |
| 952 | (if Odd s ↔ s < 2 * a + 1 then 1 else (Y.genericConst : E)) * |
| 953 | (if 2 * a = s then -N else 1) |
| 954 | else 0)).map toAdele := by |
| 955 | -- The entry `(a, b)` is the entry of `T` at the dual indices `s - 2 - b` and `s - 1 - a`, times |
| 956 | -- an entry of `J⁻¹` and one of `J'`; conjugation fixes `N` and `c`. |
| 957 | obtain ⟨hN_ne, hN_star⟩ := Y.N_ne_zero_and_star_eq |
| 958 | have hc_star : star (Y.genericConst : E) = Y.genericConst := Y.genericConst.property.2 |
| 959 | ext i k : 1 |
| 960 | simp only [Y.formAdjoint_apply Y', stringMap, Matrix.map_apply, star_toAdele, ← map_mul] |
| 961 | -- It remains to compare the rational entries; only those between two string vectors are nonzero. |
| 962 | refine congrArg toAdele ?_ |
| 963 | obtain ⟨x | a, rfl⟩ := Y.indexEquiv.surjective i <;> |
| 964 | obtain ⟨y | b, rfl⟩ := Y'.indexEquiv.surjective k <;> |
| 965 | simp [stringReversal, gradedGram, apply_ite star, hN_star, hc_star] |
| 966 | grind |
| 967 | |
| 968 | /-- Let `T = Y.stringMap Y'`, where `Y'` has a string of length `s - 1`. `T` is the rational map |
| 969 | `V → V'` that kills `X` and sends each string vector of `Y` to a multiple of the one of `Y'` with |
| 970 | the same number (`0` if none). Let `T†` be its adjoint for the two forms. Then `T† T` is `Y.shift`, |
| 971 | the map that kills `X` and the last string vector and moves each other string vector of `Y` to a |
| 972 | multiple of the next one. -/ |
| 973 | lemma formAdjoint_stringMap_mul_stringMap_eq_shift : |
| 974 | V.formAdjoint V' (Y.stringMap Y') * Y.stringMap Y' = Y.shift := by |
| 975 | -- `T` keeps the number of a string vector and `T†` raises it by one; the factors multiply. |
| 976 | rw [formAdjoint_stringMap, stringMap, shift, ← Matrix.map_mul, Matrix.submatrix_mul_equiv, |
| 977 | Matrix.fromBlocks_multiply] |
| 978 | simp only [Matrix.zero_mul, Matrix.mul_zero, add_zero, zero_add] |
| 979 | congr 3 |
| 980 | ext a b |
| 981 | by_cases hb : b.val < s - 1 |
| 982 | · rw [Matrix.mul_apply, Fintype.sum_eq_single ⟨b, hb⟩ (by simp +contextual [Fin.ext_iff])] |
| 983 | by_cases hab : a.val = b + 1 <;> simp [hab] |
| 984 | grind |
| 985 | · simp [Matrix.mul_apply, show ∀ k : Fin (s - 1), k.val ≠ b by omega, |
| 986 | show a.val ≠ b + 1 by omega] |
| 987 | |
| 988 | /-- Let `s' = s - 1`, `T = Y.stringMap Y'` and let `T†` be its adjoint for the two forms. If `Y` and |
| 989 | `Y'` have the same constant of the generic character, `Y'.genericConst = Y.genericConst`, then |
| 990 | `T T†` is the shift `Y'.shift` of `Y'`. -/ |
| 991 | lemma stringMap_mul_formAdjoint_stringMap_eq_shift (hc : Y'.genericConst = Y.genericConst) : |
| 992 | Y.stringMap Y' * V.formAdjoint V' (Y.stringMap Y') = Y'.shift := by |
| 993 | -- `T†` raises the number of a string vector by one and `T` keeps it; the factors multiply. |
| 994 | rw [formAdjoint_stringMap, stringMap, shift, hc, ← Matrix.map_mul, Matrix.submatrix_mul_equiv, |
| 995 | Matrix.fromBlocks_multiply] |
| 996 | simp only [Matrix.zero_mul, Matrix.mul_zero, add_zero, zero_add] |
| 997 | congr 3 |
| 998 | ext a b |
| 999 | rw [Matrix.mul_apply, |
| 1000 | Fintype.sum_eq_single ⟨b + 1, by omega⟩ (by simp +contextual [Fin.ext_iff])] |
| 1001 | by_cases hab : a.val = b + 1 <;> simp [hab] |
| 1002 | grind [a.isLt, b.isLt] |
| 1003 | |
| 1004 | /-- Let `Y` present `V` as `X ⊕ J_s` and `Y'` present `V'` as `X' ⊕ J_{s-1}` with the same `N`, each |
| 1005 | carrying a constant `c = c̄ ≠ 0`. Let `T = Y.stringMap Y'` be the map `V → V'` that kills `X` and |
| 1006 | sends the string vector `a` to `t a` times the string vector of `Y'` with the same number (to `0` if |
| 1007 | there is none), where `t a` depends on the parity of `s`, the weight of `a`, `c` and `N`, and let |
| 1008 | `T†` be its adjoint for the two hermitian forms. (a) `T† T` is `Y.shift`, the map that kills `X` and |
| 1009 | the last string vector and sends each string vector `b` to `-N c`, `-N c²` or `c` times the vector |
| 1010 | `b + 1`, according as `b` has weight `0`, `1` or another weight; (b) if |
| 1011 | `Y'.genericConst = Y.genericConst`, then `T T†` is the shift `Y'.shift` of `Y'`. -/ |
| 1012 | lemma formAdjoint_stringMap_mul_stringMap : |
| 1013 | V.formAdjoint V' (Y.stringMap Y') * Y.stringMap Y' = Y.shift ∧ |
| 1014 | (Y'.genericConst = Y.genericConst → Y.stringMap Y' * V.formAdjoint V' (Y.stringMap Y') = |
| 1015 | Y'.shift) := |
| 1016 | ⟨Y.formAdjoint_stringMap_mul_stringMap_eq_shift, Y.stringMap_mul_formAdjoint_stringMap_eq_shift⟩ |
| 1017 | |
| 1018 | end New.Grading |
| 1019 | |
| 1020 | end |