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.CharP.Pi |
| 4 | import Mathlib.Algebra.Order.Star.Int |
| 5 | import TauCeti.Topology.Algebra.Group.Units |
| 6 | import TauCeti.Topology.Instances.Matrix |
| 7 | public import Lib.Weil.DualPair.WeilAction |
| 8 | public import Lib.Adelic.Witt.WittTheorem |
| 9 | import Lib.Adelic.QuotientMeasure.UnfoldingInStages |
| 10 | import Lib.Adelic.Reduction.DefiniteClassSums |
| 11 | import Lib.Adelic.Unitary.RationalPoints |
| 12 | import Lib.General.Measure.IntegralOperators |
| 13 | |
| 14 | /-! |
| 15 | # Integrals over the Bessel subgroup and the orbits surviving unipotent twists |
| 16 | |
| 17 | A hermitian space `V` is graded by `Y`, which presents it as `X` plus a string of `s` vectors, and |
| 18 | `B` is its Bessel (Fourier–Jacobi) subgroup. For a second space `V'` graded by `Y'` with a string of |
| 19 | length `s - 1`, the file determines which terms of a Fourier expansion over rational maps |
| 20 | `w : V → V'` survive the unipotent twists. Each such `w` can be moved to a map of type |
| 21 | `New.Grading.AgreesWithStringMap`, and if that map also survives with degrees `Y'.gradeOf`, then |
| 22 | that map minus `Y.stringMap Y'` has degree `≥ 0`. |
| 23 | |
| 24 | ## Main definitions and results |
| 25 | |
| 26 | * `New.Grading.isCocompact_ratBessel`: the adelic group `B` is compact modulo its rational points. |
| 27 | * `New.Grading.besselMeasure`: the measure that integrates over `B` modulo its rational points. |
| 28 | * `New.Grading.integral_besselMeasure_eq_of_mean`: such an integral is a fixed multiple of an |
| 29 | integral over `U(X)` modulo its rational points, after averaging over the row of the unipotent |
| 30 | part. |
| 31 | * `New.Grading.Survives`: no unipotent twist kills the term at `w`. |
| 32 | * `New.Grading.exists_agreesWithStringMap`: a rational `w` that is not killed can be moved by a |
| 33 | rational unitary element of `V'` to a map of type `New.Grading.AgreesWithStringMap`; |
| 34 | `New.Grading.agreesWithStringMap_mul_iff`: that element is unique up to `Y'.besselGroup`. |
| 35 | * `New.Grading.hasDegreeGe_of_survives`: a map of type `New.Grading.AgreesWithStringMap` is killed |
| 36 | unless `w - Y.stringMap Y'` has degree `≥ 0`. |
| 37 | |
| 38 | Notions from other files: |
| 39 | * `New.Space`: a hermitian space with a point, given by a matrix J over E and x in GL_n(𝔸) with xᴴJx |
| 40 | equal to the diagonal matrix of its signs at the infinite places and 1 at the finite places. |
| 41 | * `New.eichlerMap`: `eichlerMap J x u ς` is v ↦ v + h(u, v)x − h(x, v)(u + ςx), h the form of J. |
| 42 | * `New.Space.homBicharacter`: the phase `ψ ((j / 2) tr (y† x))` of two adelic maps `x`, `y`. |
| 43 | |
| 44 | ## Relation to the literature |
| 45 | |
| 46 | Known; see `Lib.Weil.Periods.Unfolding` and `Lib.Adelic.Reduction.FiniteVolume` for sources. |
| 47 | -/ |
| 48 | |
| 49 | @[expose] public section |
| 50 | |
| 51 | /-! |
| 52 | ## The Bessel subgroup, Eichler maps and integrals over [B] |
| 53 | |
| 54 | `Y : New.Grading V N X s` presents the hermitian space `V` as `X` plus a string of `s` vectors, with |
| 55 | Gram matrix `gradedGram` built from a nonzero scalar `N : E`, graded by `New.Grading.gradeOf` (0 on |
| 56 | `X`, `s - 1 - 2 i` on the string). `New.Grading.unipotent` is the unipotent group that raises |
| 57 | grades, `New.Grading.inclX` embeds `U(X)`, and `New.Grading.besselGroup` is the Bessel |
| 58 | (Fourier–Jacobi) subgroup `B` that contains both. `Y.genericConst` is a nonzero scalar of `E` |
| 59 | carried by `Y`; with `c` for this scalar, the factors of `Y.shift` are `c`, `-N c` and `-N c²`. |
| 60 | |
| 61 | `G E ε` is the adelic group containing the isometries of `V`; `U(X)` is `G E (1 : X → ℤˣ)`, the |
| 62 | group of the definite space `stdSpace E X`. `New.Space.ratCoordMatrix` is the matrix `x g x⁻¹` of |
| 63 | `g` in rational coordinates. |
| 64 | |
| 65 | `Subgroup.quotMeasure` is the measure that integrates invariant functions over the quotient by a |
| 66 | subgroup (Haar measure times a cutoff). `New.IsContPeriodic` says that a function is continuous and |
| 67 | periodic under a subgroup of translations, and `New.quotMean` is its mean over the quotient. |
| 68 | -/ |
| 69 | |
| 70 | namespace New.Grading |
| 71 | |
| 72 | open Space Matrix MeasureTheory Measure Subgroup Fintype |
| 73 | |
| 74 | variable {E ι X : Type} [Field E] [CMType E] [Fintype ι] [DecidableEq ι] [Fintype X] [DecidableEq X] |
| 75 | {s : ℕ} {ε : ι → ℤˣ} {N : E} {V : Space E ι ε} (Y : Grading V N X s) |
| 76 | |
| 77 | /-- A matrix over `E` can be defined by downward recursion on a level `w : ι → ℤ`. Let `n - 1` |
| 78 | strictly lower the level (its entry `(i, l)` vanishes unless `w i < w l`), and let `q : 𝔸 E → E` |
| 79 | be any map. Then some `Z` is the identity on and below the diagonal blocks of `w`, and each entry |
| 80 | of `Z` above them is `q` of the same entry of `(n - 1) * Z`. -/ |
| 81 | private lemma exists_matrix_eq_ite_of_sub_one_lowers (w : ι → ℤ) (q : 𝔸 E → E) |
| 82 | {n : Matrix ι ι (𝔸 E)} (hn : ∀ i l : ι, ¬w i < w l → (n - 1) i l = 0) : |
| 83 | ∃ Z : Matrix ι ι E, ∀ i k : ι, |
| 84 | Z i k = if w k ≤ w i then (1 : Matrix ι ι E) i k else q (((n - 1) * Z.map toAdele) i k) := by |
| 85 | -- Row `i` of `Z` is computed from the rows `l` with `w i < w l`. This relation is well founded |
| 86 | -- as `ι` is finite: use the preorder pulled back along `w`. |
| 87 | have wf : WellFounded (fun l i : ι ↦ w i < w l) := by |
| 88 | let := Preorder.lift w |
| 89 | exact wellFounded_gt |
| 90 | let step (k i : ι) (Z : ∀ l : ι, w i < w l → E) : E := |
| 91 | if w k ≤ w i then (1 : Matrix ι ι E) i k |
| 92 | else q (∑ l : ι, (n - 1) i l * if h : w i < w l then toAdele (Z l h) else 0) |
| 93 | let Z : Matrix ι ι E := fun i k ↦ wf.fix (step k) i |
| 94 | refine ⟨Z, fun i k ↦ ?_⟩ |
| 95 | -- Only the rows `l` with `w i < w l` enter the sum, since `(n - 1) i l = 0` for the others. |
| 96 | have h_sum : (∑ l : ι, (n - 1) i l * if h : w i < w l then toAdele (Z l k) else 0) = |
| 97 | ((n - 1) * Z.map toAdele) i k := by |
| 98 | rw [Matrix.mul_apply] |
| 99 | refine Finset.sum_congr rfl fun l _ ↦ ?_ |
| 100 | by_cases h : w i < w l |
| 101 | · rw [dite_eq_left h, Matrix.map_apply] |
| 102 | · rw [dite_eq_right h, hn i l h, zero_mul, zero_mul] |
| 103 | rw [← h_sum] |
| 104 | exact wf.fix_eq (step k) i |
| 105 | |
| 106 | /-- A rational unitriangular matrix moves `n` to bounded entries. Let `q a` be a rational shift of |
| 107 | each adele `a` into `A` (`toAdele (q a) + a ∈ A`), and let `n - 1` strictly lower the level `w`. |
| 108 | Then some rational `r`, unitriangular for `w`, makes every entry of `n * r` equal to `0`, `1` or an |
| 109 | element of `A`. -/ |
| 110 | private lemma exists_unitriangular_mul_map_mem_matrix (w : ι → ℤ) {A : Set (𝔸 E)} {q : 𝔸 E → E} |
| 111 | (hq : ∀ a : 𝔸 E, toAdele (q a) + a ∈ A) (n : Matrix ι ι (𝔸 E)) |
| 112 | (hn : ∀ i l : ι, ¬w i < w l → (n - 1) i l = 0) : |
| 113 | ∃ r ∈ unitriangular w E, |
| 114 | n * (r : Matrix ι ι E).map toAdele ∈ (insert 0 (insert 1 A)).matrix := by |
| 115 | -- `Z` is the identity on and below the diagonal blocks, and above them each entry of `Z` is the |
| 116 | -- rational shift of the entry of `(n - 1) * Z`; so `n * Z = Z + (n - 1) * Z` has entries in `A` |
| 117 | -- above the diagonal blocks, and those of `1` on and below them. |
| 118 | obtain ⟨Z, hZ⟩ := exists_matrix_eq_ite_of_sub_one_lowers w q hn |
| 119 | have Z_tri (i k : ι) (h : w k ≤ w i) : Z i k = (1 : Matrix ι ι E) i k := |
| 120 | (hZ i k).trans (ite_eq_left h) |
| 121 | have Z_det : IsUnit Z.det := by |
| 122 | rw [det_eq_one_of_unitriangular Z_tri] |
| 123 | exact isUnit_one |
| 124 | obtain ⟨r, rfl⟩ : IsUnit Z := (isUnit_iff_isUnit_det Z).mpr Z_det |
| 125 | refine ⟨r, mem_agreeWithOneOn.mpr Z_tri, fun i k ↦ ?_⟩ |
| 126 | have h_entry_eq : (n * (r : Matrix ι ι E).map toAdele) i k = |
| 127 | toAdele ((r : Matrix ι ι E) i k) + ((n - 1) * (r : Matrix ι ι E).map toAdele) i k := by |
| 128 | simp [sub_mul] |
| 129 | rw [h_entry_eq, hZ i k] |
| 130 | split_ifs with h |
| 131 | · -- On and below the diagonal blocks `(n - 1) * r` vanishes, and `n * r` has the entries of `1`. |
| 132 | have h_sub_one_mul_eq_zero : ((n - 1) * (r : Matrix ι ι E).map toAdele) i k = 0 := by |
| 133 | simp only [Matrix.mul_apply, Matrix.map_apply] |
| 134 | refine Finset.sum_eq_zero fun l _ ↦ ?_ |
| 135 | by_cases hl : w i < w l |
| 136 | · simp [Z_tri l k (h.trans hl.le), Matrix.one_apply_ne (show l ≠ k by lia)] |
| 137 | · simp [hn i l hl] |
| 138 | simp [h_sub_one_mul_eq_zero, apply_ite, Matrix.one_apply] |
| 139 | · exact Set.mem_insert_of_mem _ (Set.mem_insert_of_mem _ (hq _)) |
| 140 | |
| 141 | open scoped Pointwise in |
| 142 | /-- The rational points are cocompact in the adelic Bessel subgroup B of Y: there is a compact C ⊆ B |
| 143 | such that every g ∈ B has a rational γ ∈ B with γg ∈ C. -/ |
| 144 | lemma isCocompact_ratBessel : (Y.ratBessel.subgroupOf Y.besselGroup).IsCocompact := by |
| 145 | -- Reduce first the image of `g` in `U(X)`, which is compact modulo rational points, and then the |
| 146 | -- unipotent part, whose entries are moved into a compact set by a rational unitriangular matrix. |
| 147 | -- Adding the rational `q a` moves an adele `a` into the compact set `A`. |
| 148 | obtain ⟨A, hA, rational_shift⟩ := |
| 149 | IsCovolOneLattice.exists_compact_cover_of_range (ratAdeles E) rfl |
| 150 | choose q hq using rational_shift |
| 151 | -- `U(X)` is definite: the rational point `δ a` moves `a` into the compact set `D`. |
| 152 | obtain ⟨D, hD, definite_cover⟩ : ∃ D : Set (G E (1 : X → ℤˣ)), IsCompact D ∧ |
| 153 | ∀ a : G E (1 : X → ℤˣ), ∃ γ ∈ (stdSpace E X).Γ, γ * a ∈ D := |
| 154 | (stdSpace E X).isCocompact_of_definite |
| 155 | choose δ hδ δ_mem using definite_cover |
| 156 | -- The unipotent part raises grades, so it strictly lowers the level `w = -grade`. |
| 157 | let w (i : ι) : ℤ := -Y.gradeOf i |
| 158 | -- If `m⁻¹` in rational coordinates times a rational unitriangular matrix has entries in |
| 159 | -- `A ∪ {0, 1}`, a rational unitriangular isometry `β` moves `m` into the compact set `K`. |
| 160 | obtain ⟨K, hK, exists_unitriangular_mul_mem_K⟩ : ∃ K : Set (G E ε), IsCompact K ∧ |
| 161 | ∀ (m : G E ε) (r : unitriangular w E), |
| 162 | V.ratCoordMatrix m⁻¹ * ((r : GL ι E) : Matrix ι ι E).map toAdele ∈ |
| 163 | (insert 0 (insert 1 A)).matrix → |
| 164 | ∃ β : U V.J, V.ratEmbed β * m ∈ K ∧ (β : GL ι E) ∈ unitriangular w E := |
| 165 | V.exists_isCompact_of_bounded_frame ((hA.insert 1).insert 0).matrix (unitriangular w E) |
| 166 | -- `p` is the projection to `U(X)`: `r * (Y.inclX (p r))⁻¹` is unipotent and `p ∘ Y.inclX = id`. |
| 167 | obtain ⟨p, -, p_unipotent, p_section, -⟩ := Y.exists_besselGroup_proj |
| 168 | refine ⟨Subtype.val ⁻¹' (K * Y.inclX '' D), |
| 169 | (hK.mul (hD.image_of_continuous Y.inclX)).preimage_val, |
| 170 | fun g ↦ ?_⟩ |
| 171 | -- The rational point `γ` moves the `U(X)` part of `g` into `D`, and a rational unitriangular |
| 172 | -- `β` moves the unipotent part `m` of `γ * g` into `K`. |
| 173 | let γ : Y.besselGroup := ⟨Y.inclX (δ (p g)), Y.inclX_mem_besselGroup (δ (p g))⟩ |
| 174 | have γ_rat : (γ : G E ε) ∈ Y.ratBessel := Y.inclX_mem_ratBessel (hδ (p g)) |
| 175 | let m : G E ε := ↑(γ * g) * (Y.inclX (p (γ * g)))⁻¹ |
| 176 | have m_unipotent : m ∈ Y.unipotent := p_unipotent (γ * g) |
| 177 | have m_inv_raises : ∀ i l : ι, ¬w i < w l → (V.ratCoordMatrix m⁻¹ - 1) i l = 0 := by |
| 178 | intro i l h_not_lt |
| 179 | have h_grade : Y.gradeOf i < Y.gradeOf l + 1 := by |
| 180 | have : -Y.gradeOf l ≤ -Y.gradeOf i := not_lt.mp h_not_lt |
| 181 | omega |
| 182 | exact Y.mem_unipotent.mp (inv_mem m_unipotent) i l h_grade |
| 183 | obtain ⟨r, hr, r_mem⟩ := exists_unitriangular_mul_map_mem_matrix w hq _ m_inv_raises |
| 184 | obtain ⟨β, β_mem, β_uni⟩ := exists_unitriangular_mul_mem_K m ⟨r, hr⟩ r_mem |
| 185 | -- `β` agrees with `1` wherever the grade does not rise, so it lies in the Bessel group. |
| 186 | have β_bessel : V.ratEmbed β ∈ Y.besselGroup := by |
| 187 | have h_matrix : |
| 188 | V.ratCoordMatrix (V.ratEmbed β) = ((β : GL ι E) : Matrix ι ι E).map toAdele := by |
| 189 | simp [ratEmbed, U.map, ratCoordMatrix] |
| 190 | rw [mem_besselGroup_iff] |
| 191 | intro i k h_grade_le _ |
| 192 | have β_ik : ((β : GL ι E) : Matrix ι ι E) i k = (1 : Matrix ι ι E) i k := |
| 193 | mem_agreeWithOneOn.mp β_uni i k (neg_le_neg h_grade_le) |
| 194 | rw [h_matrix, Matrix.map_apply, β_ik] |
| 195 | simp [Matrix.one_apply] |
| 196 | have β_rat : V.ratEmbed β ∈ Y.ratBessel := Subgroup.mem_inf.mpr ⟨⟨β, rfl⟩, β_bessel⟩ |
| 197 | let βB : Y.besselGroup := ⟨V.ratEmbed β, β_bessel⟩ |
| 198 | have βγ_rat : βB * γ ∈ Y.ratBessel.subgroupOf Y.besselGroup := |
| 199 | Subgroup.mem_subgroupOf.mpr (Y.ratBessel.mul_mem β_rat γ_rat) |
| 200 | -- `β * γ * g` is the moved unipotent part `β * m` times `Y.inclX (δ (p g) * p g)`. |
| 201 | have h_factor : ((βB * γ * g : Y.besselGroup) : G E ε) = |
| 202 | V.ratEmbed β * m * Y.inclX (δ (p g) * p g) := by |
| 203 | simp [βB, m, γ, p_section, mul_assoc] |
| 204 | refine ⟨βB * γ, βγ_rat, ?_⟩ |
| 205 | rw [Set.mem_preimage, h_factor] |
| 206 | exact Set.mul_mem_mul β_mem (Set.mem_image_of_mem Y.inclX (δ_mem (p g))) |
| 207 | |
| 208 | /-- Let `x` be supported in grades above `max 0 k` and `y` in grade `-k`. For every `ς`, the |
| 209 | Eichler map of `x`, `y` and `ς` for the Gram matrix of `V` over the adeles, minus `1`, raises |
| 210 | grades by at least `1`. -/ |
| 211 | private lemma hasDegreeGe_eichlerMap_sub_one (x y : ι → 𝔸 E) (k : ℤ) |
| 212 | (hx : ∀ p : ι, Y.gradeOf p ≤ 0 ⊔ k → x p = 0) |
| 213 | (hy : ∀ q : ι, Y.gradeOf q ≠ -k → y q = 0) (ς : 𝔸 E) : |
| 214 | HasDegreeGe Y.gradeOf Y.gradeOf 1 (eichlerMap (V.J.map toAdele) x y ς - 1) := by |
| 215 | -- `u - 1 = x (y* J) - (y + ς x) (x* J)`. Its entry `(i, l)` needs `x i ≠ 0` and |
| 216 | -- `y (σ l) ≠ 0`, or `(y + ς x) i ≠ 0` and `x (σ l) ≠ 0`; either forces `grade i > grade l`. |
| 217 | have h_sub : eichlerMap (V.J.map toAdele) x y ς - 1 = |
| 218 | vecMulVec x (star y ᵥ* V.J.map toAdele) - |
| 219 | vecMulVec (y + ς • x) (star x ᵥ* V.J.map toAdele) := by |
| 220 | rw [eichlerMap] |
| 221 | abel |
| 222 | rw [h_sub, HasDegreeGe] |
| 223 | intro i l h_grade |
| 224 | have dual_grade : Y.gradeOf (Y.stringReversal l) = -Y.gradeOf l := Y.gradeOf_stringReversal l |
| 225 | have first_term : x i * (star y ᵥ* V.J.map toAdele) l = 0 := by |
| 226 | by_cases hi : Y.gradeOf i ≤ 0 ⊔ k |
| 227 | · rw [hx i hi, zero_mul] |
| 228 | · rw [Y.vecMul_J_apply, Pi.star_apply, hy _ (by omega), star_zero, zero_mul, mul_zero] |
| 229 | have second_term : (y + ς • x) i * (star x ᵥ* V.J.map toAdele) l = 0 := by |
| 230 | by_cases hl : Y.gradeOf (Y.stringReversal l) ≤ 0 ⊔ k |
| 231 | · rw [Y.vecMul_J_apply, Pi.star_apply, hx _ hl, star_zero, zero_mul, mul_zero] |
| 232 | · rw [Pi.add_apply, Pi.smul_apply, hy i (by omega), hx i (by omega), smul_zero, add_zero, |
| 233 | zero_mul] |
| 234 | rw [Matrix.sub_apply, vecMulVec_apply, vecMulVec_apply, first_term, second_term, sub_zero] |
| 235 | |
| 236 | /-- Let `J` be the Gram matrix of `V` mapped to the adeles, and `h(v, w) = vᴴ J w` its form. Let |
| 237 | `x` be supported in grades above `max 0 k` (hypothesis `hx`) and `y` in grade `-k` (hypothesis |
| 238 | `hy`). Then the Eichler map of `x`, `y` and `h(y, y) / 2` is the matrix, in rational coordinates, |
| 239 | of an element of the unipotent group `Y.unipotent`. -/ |
| 240 | lemma exists_ratCoordMatrix_eq_eichlerMap (x y : ι → 𝔸 E) (k : ℤ) |
| 241 | (hx : ∀ p : ι, Y.gradeOf p ≤ 0 ⊔ k → x p = 0) |
| 242 | (hy : ∀ q : ι, Y.gradeOf q ≠ -k → y q = 0) : |
| 243 | let J : Matrix ι ι (𝔸 E) := V.J.map toAdele |
| 244 | ∃ u ∈ Y.unipotent, V.ratCoordMatrix u = eichlerMap J x y (toAdele 2⁻¹ * star y ⬝ᵥ J *ᵥ y) := by |
| 245 | intro J |
| 246 | have herm : Jᴴ = J := V.isHermitian_J.map _ fun a ↦ (star_toAdele a).symm |
| 247 | -- `J` pairs the grades `a` and `-a`: entry `a` of `z* J` is `z̄` at the dual index `σ a`, of |
| 248 | -- grade `-grade a`, times an entry of the Gram matrix. |
| 249 | have h_vecMul (z : ι → 𝔸 E) (a : ι) : (star z ᵥ* J) a = |
| 250 | star z (Y.stringReversal a) * gradedGram Y.indexEquiv N (Y.stringReversal a) a := |
| 251 | Y.vecMul_J_apply (star z) a |
| 252 | -- A vector `z` that vanishes at the duals of the grades above `max 0 k` (where `x` lives) is |
| 253 | -- orthogonal to `x`. This applies to `x` itself, of positive grades, and to `y`, of grade `-k`. |
| 254 | have orth_x (z : ι → 𝔸 E) (hz : ∀ a : ι, ¬Y.gradeOf a ≤ 0 ⊔ k → z (Y.stringReversal a) = 0) : |
| 255 | star z ⬝ᵥ J *ᵥ x = 0 := by |
| 256 | rw [dotProduct_mulVec, dotProduct] |
| 257 | refine Finset.sum_eq_zero fun a _ ↦ ?_ |
| 258 | by_cases ha : Y.gradeOf a ≤ 0 ⊔ k |
| 259 | · rw [hx a ha, mul_zero] |
| 260 | · rw [h_vecMul, Pi.star_apply, hz a ha, star_zero, zero_mul, zero_mul] |
| 261 | have h_iso : star x ⬝ᵥ J *ᵥ x = 0 := |
| 262 | orth_x x fun a ha ↦ hx _ (by rw [gradeOf_stringReversal]; omega) |
| 263 | have h_orth : star y ⬝ᵥ J *ᵥ x = 0 := |
| 264 | orth_x y fun a ha ↦ hy _ (by rw [gradeOf_stringReversal]; omega) |
| 265 | -- The form is hermitian, so `h(y, y)` is fixed by `star` and is the trace of its half. |
| 266 | have half : toAdele 2⁻¹ * star y ⬝ᵥ J *ᵥ y + star (toAdele 2⁻¹ * star y ⬝ᵥ J *ᵥ y) = |
| 267 | star y ⬝ᵥ J *ᵥ y := by |
| 268 | norm_num [star_mul', IsHermitian.star_dotProduct_mulVec_comm herm y y, star_toAdele, ← add_mul, |
| 269 | ← map_add] |
| 270 | obtain ⟨u, hu⟩ : ∃ u : G E ε, |
| 271 | V.ratCoordMatrix u = eichlerMap J x y (toAdele 2⁻¹ * star y ⬝ᵥ J *ᵥ y) := |
| 272 | V.toRatCoords.surjective.exists.mp (New.exists_unitary_eq_eichlerMap herm h_iso h_orth half) |
| 273 | refine ⟨u, ?_, hu⟩ |
| 274 | rw [Y.mem_unipotent, hu] |
| 275 | exact Y.hasDegreeGe_eichlerMap_sub_one x y k hx hy _ |
| 276 | |
| 277 | /-- The measure on the Bessel (Fourier–Jacobi) subgroup B of Y that computes integrals over the |
| 278 | quotient of B by its rational points: Haar measure times a chosen cutoff. -/ |
| 279 | noncomputable abbrev besselMeasure : Measure Y.besselGroup := |
| 280 | (Y.ratBessel.subgroupOf Y.besselGroup).quotMeasure haar |
| 281 | |
| 282 | /-- The measure `New.Grading.besselMeasure` is finite, since the rational points are cocompact in |
| 283 | `B`. -/ |
| 284 | instance isFiniteMeasure_besselMeasure : IsFiniteMeasure Y.besselMeasure := |
| 285 | isFiniteMeasure_quotMeasure_of_cocompact _ Y.isCocompact_ratBessel |
| 286 | |
| 287 | /-- The left Haar measure of the adelic Bessel group `B` is right invariant, that is, `B` is |
| 288 | unimodular, since its rational points have finite covolume. -/ |
| 289 | instance isMulRightInvariant_haar_besselGroup : IsMulRightInvariant (G := Y.besselGroup) haar := |
| 290 | isMulRightInvariant_of_finite_covolume Y.isFiniteMeasure_besselMeasure |
| 291 | |
| 292 | /-- The row of `n` over which the integral over the Bessel group is averaged: at `(j, x)` it is |
| 293 | `Y.genericConst` times the entry of `n - 1`, in rational coordinates, in the row of the grade-1 |
| 294 | index `v j` and the column of the basis vector `x` of `X`. -/ |
| 295 | private noncomputable def besselRow {q : Type*} (v : q ↪ {l : ι // Y.gradeOf l = 1}) (n : G E ε) |
| 296 | (p : q × X) : 𝔸 E := |
| 297 | ↑Y.genericConst * (V.ratCoordMatrix n - 1) (v p.fst) (Y.indexEquiv (.inl p.snd)) |
| 298 | |
| 299 | omit [Fintype X] in |
| 300 | /-- On the unipotent group the row adds: the row of `n * m` is the row of `n` plus that of `m`. |
| 301 | The cross term `(n - 1) (m - 1)` raises grades by at least `2`, while the row has entries from |
| 302 | grade `0` to grade `1`. -/ |
| 303 | private lemma besselRow_mul_of_mem_unipotent {q : Type*} (v : q ↪ {l : ι // Y.gradeOf l = 1}) |
| 304 | {n m : G E ε} (hn : n ∈ Y.unipotent) (hm : m ∈ Y.unipotent) : |
| 305 | Y.besselRow v (n * m) = Y.besselRow v n + Y.besselRow v m := by |
| 306 | funext p |
| 307 | have h := Y.degreePart_ratCoordMatrix_mul (by decide : (0 : ℤ) < 1) |
| 308 | (Y.mem_unipotent.mp hn) (Y.mem_unipotent.mp hm) |
| 309 | have h_ne : (v p.1 : ι) ≠ Y.indexEquiv (.inl p.2) := |
| 310 | ne_of_apply_ne Y.gradeOf (by simp [(v p.1).property]) |
| 311 | simpa [besselRow, degreePart_apply, (v p.1).property, Matrix.one_apply_ne h_ne, mul_add] |
| 312 | using congrArg (fun A : Matrix ι ι (𝔸 E) ↦ |
| 313 | (Y.genericConst : 𝔸 E) * A (v p.1) (Y.indexEquiv (.inl p.2))) h |
| 314 | |
| 315 | /-- The Eichler map of `x`, the indicator of the grade-1 indices, and of `y`, which on each basis |
| 316 | vector `x'` of `X` is `Y.genericConst⁻¹` times the sum of the conjugates `b̄ (j, x')` and vanishes |
| 317 | on the string, has row `b`, whatever its last argument `ς`. -/ |
| 318 | private lemma besselRow_eq_of_ratCoordMatrix_eq_eichlerMap {q : Type*} [Fintype q] |
| 319 | (v : q ↪ {l : ι // Y.gradeOf l = 1}) (b : q × X → 𝔸 E) (ς : 𝔸 E) {u : G E ε} |
| 320 | (hu : V.ratCoordMatrix u = eichlerMap (V.J.map toAdele) (Pi.single 1 1 ∘ Y.gradeOf) |
| 321 | (fun l : ι ↦ ∑ k : q × X, |
| 322 | (if l = Y.indexEquiv (.inl k.snd) then ↑(Y.genericConst : E)⁻¹ else 0) * star (b k)) ς) : |
| 323 | Y.besselRow v u = b := by |
| 324 | funext ⟨j, x'⟩ |
| 325 | -- There is at most one index of grade `1`, as the grades `s - 1 - 2 i` of the string differ. |
| 326 | have string_grade_inj (a₁ : Fin s) (h₁ : (s : ℤ) - 1 - 2 * (a₁ : ℕ) = 1) (a₂ : Fin s) |
| 327 | (h₂ : (s : ℤ) - 1 - 2 * (a₂ : ℕ) = 1) : a₁ = a₂ := Fin.ext (by omega) |
| 328 | have grade_one_subsingleton : Subsingleton {l : ι // Y.gradeOf l = 1} := by |
| 329 | constructor |
| 330 | simpa [reindex_equiv Y.indexEquiv] using string_grade_inj |
| 331 | have q_subsingleton : Subsingleton q := v.injective.subsingleton |
| 332 | set x : ι → 𝔸 E := Pi.single 1 1 ∘ Y.gradeOf |
| 333 | set y : ι → 𝔸 E := fun l ↦ ∑ k : q × X, |
| 334 | (if l = Y.indexEquiv (.inl k.snd) then ↑(Y.genericConst : E)⁻¹ else 0) * star (b k) |
| 335 | -- The row at `(j, x')` is `Y.genericConst` times |
| 336 | -- `x (v j) (ȳ J) x' - (y + ς x) (v j) (x̄ J) x'`, where: |
| 337 | have h_x : x (v j) = 1 := by simp [x, (v j).property] |
| 338 | have h_xJ : (star x ᵥ* V.J.map toAdele) (Y.indexEquiv (.inl x')) = 0 := by |
| 339 | simp [x, Y.vecMul_J_apply, stringReversal] |
| 340 | have h_yJ : (star y ᵥ* V.J.map toAdele) (Y.indexEquiv (.inl x')) = ↑(Y.genericConst : E)⁻¹ * b |
| 341 | (j, x') := by |
| 342 | simp [y, Y.vecMul_J_apply, stringReversal, gradedGram, Y.genericConst.property, sum_prod_type, |
| 343 | sum_subsingleton _ j] |
| 344 | simp [besselRow, hu, eichlerMap, vecMulVec_apply, h_x, h_xJ, h_yJ, ← mul_assoc, ← map_mul, |
| 345 | Y.genericConst.property] |
| 346 | |
| 347 | /-- Eichler maps translate the row. There is a continuous family `u b` of elements of the unipotent |
| 348 | group, indexed by the row vectors `b`, such that the row of `n * u b` is `b` plus the row of `n` |
| 349 | for every unipotent `n`; `u b` is the Eichler map of |
| 350 | `New.Grading.besselRow_eq_of_ratCoordMatrix_eq_eichlerMap`. -/ |
| 351 | private lemma exists_continuous_unipotent_besselRow_mul {q : Type*} [Fintype q] |
| 352 | (v : q ↪ {l : ι // Y.gradeOf l = 1}) : |
| 353 | ∃ u : (q × X → 𝔸 E) → G E ε, Continuous u ∧ (∀ b : q × X → 𝔸 E, u b ∈ Y.unipotent) ∧ |
| 354 | ∀ n : G E ε, n ∈ Y.unipotent → ∀ b : q × X → 𝔸 E, |
| 355 | Y.besselRow v (n * u b) = b + Y.besselRow v n := by |
| 356 | -- `x` is the indicator of grade `1`, and `y b` lives on `X`, in grade `0`. |
| 357 | let J : Matrix ι ι (𝔸 E) := V.J.map toAdele |
| 358 | let x : ι → 𝔸 E := Pi.single 1 1 ∘ Y.gradeOf |
| 359 | let y (b : q × X → 𝔸 E) (l : ι) : 𝔸 E := ∑ k : q × X, |
| 360 | (if l = Y.indexEquiv (.inl k.snd) then ↑(Y.genericConst : E)⁻¹ else 0) * star (b k) |
| 361 | have x_supp (p : ι) (hp : Y.gradeOf p ≤ 0 ⊔ 0) : x p = 0 := |
| 362 | Pi.single_eq_of_ne (by omega : Y.gradeOf p ≠ 1) 1 |
| 363 | have y_supp (b : q × X → 𝔸 E) (l : ι) (hl : Y.gradeOf l ≠ -0) : y b l = 0 := by |
| 364 | refine Finset.sum_eq_zero fun k _ ↦ ?_ |
| 365 | rw [ite_eq_right (ne_of_apply_ne Y.gradeOf (by rwa [gradeOf_inl])), zero_mul] |
| 366 | have exists_u (b : q × X → 𝔸 E) : ∃ u ∈ Y.unipotent, |
| 367 | V.ratCoordMatrix u = eichlerMap J x (y b) (toAdele 2⁻¹ * star (y b) ⬝ᵥ J *ᵥ y b) := |
| 368 | Y.exists_ratCoordMatrix_eq_eichlerMap x (y b) 0 x_supp (y_supp b) |
| 369 | choose u u_mem u_mat using exists_u |
| 370 | have u_cont : Continuous u := |
| 371 | V.isEmbedding_ratCoordMatrix.continuous_iff.mpr |
| 372 | ((continuous_congr u_mat).mpr (by fun_prop [eichlerMap])) |
| 373 | refine ⟨u, u_cont, u_mem, fun n hn b ↦ ?_⟩ |
| 374 | have h_add : Y.besselRow v (n * u b) = Y.besselRow v n + Y.besselRow v (u b) := |
| 375 | Y.besselRow_mul_of_mem_unipotent v hn (u_mem b) |
| 376 | have row_u : Y.besselRow v (u b) = b := |
| 377 | Y.besselRow_eq_of_ratCoordMatrix_eq_eichlerMap v b _ (u_mat b) |
| 378 | rw [h_add, row_u, add_comm] |
| 379 | |
| 380 | /-- Haar measure on the preimage `S` of the rational points of `U(X)` under a homomorphism `pr` |
| 381 | from the Bessel group is right invariant, when `S` is closed and `pr` keeps rational points |
| 382 | rational: the rational points of the Bessel group then lie in `S` and are cocompact in it. -/ |
| 383 | private lemma isMulRightInvariant_haar_comap_Gamma {pr : Y.besselGroup →* G E (1 : X → ℤˣ)} |
| 384 | [S_closed : IsClosed ((stdSpace E X).Γ.comap pr).carrier] |
| 385 | (pr_rat : ∀ r : Y.besselGroup, (r : G E ε) ∈ Y.ratBessel → pr r ∈ (stdSpace E X).Γ) : |
| 386 | (haar : Measure ((stdSpace E X).Γ.comap pr)).IsMulRightInvariant := by |
| 387 | obtain ⟨C, hC, cover⟩ : ∃ C : Set Y.besselGroup, IsCompact C ∧ |
| 388 | ∀ g : Y.besselGroup, ∃ γ ∈ Y.ratBessel.subgroupOf Y.besselGroup, γ * g ∈ C := |
| 389 | Y.isCocompact_ratBessel |
| 390 | refine isMulRightInvariant_of_finite_covolume |
| 391 | (isFiniteMeasure_quotMeasure_of_cocompact haar |
| 392 | (Γ := (Y.ratBessel.subgroupOf Y.besselGroup).subgroupOf ((stdSpace E X).Γ.comap pr)) |
| 393 | ⟨_, hC.preimage_val S_closed, fun g ↦ ?_⟩) |
| 394 | -- A rational `γ` with `γ * g ∈ C` lies in `S`, since `pr γ` is rational. |
| 395 | obtain ⟨γ, γ_rat, hγ⟩ := cover g |
| 396 | exact ⟨⟨γ, pr_rat γ γ_rat⟩, γ_rat, hγ⟩ |
| 397 | |
| 398 | omit [DecidableEq X] in |
| 399 | /-- A continuous function `F` on the adelic vectors that is periodic under the rational vectors |
| 400 | differs from its mean by a function of integral `0` modulo the rational vectors, also after a |
| 401 | translation by any `c`. -/ |
| 402 | private lemma integral_add_sub_quotMean_eq_zero {q : Type*} [Fintype q] {F : (q × X → 𝔸 E) → ℂ} |
| 403 | (hF : IsContPeriodic (ratVectors E (q × X)) F) (c : q × X → 𝔸 E) : |
| 404 | ∫ b : q × X → 𝔸 E, F (b + c) - quotMean (ratVectors E (q × X)) F |
| 405 | ∂(ratVectors E (q × X)).quotMeasure = 0 := by |
| 406 | -- The translate of `F` by `c` is periodic with the same mean. |
| 407 | have periodic : IsContPeriodic (ratVectors E (q × X)) (fun b ↦ F (b + c)) := |
| 408 | hF.imp (by fun_prop) (by simp +contextual [add_assoc]) |
| 409 | rw [← quotMean_translate hF, ← average_quotMeasure_eq_quotMean _ volume periodic, |
| 410 | integral_sub_average] |
| 411 | |
| 412 | /-- Integration over `B = Y.besselGroup` modulo its rational points reduces to `U(X)`. Let `v` |
| 413 | embed `q` into the basis indices of grade `1` (there is at most one, so `q` has at most one |
| 414 | element), and let `row n` be the adelic vector with entry `Y.genericConst` times `(n - 1) (v j, x)` |
| 415 | at `(j, x)`, for `n` in rational coordinates and `x` a basis vector of `X`. There is one constant |
| 416 | `κ` such that `∫ φ = κ * ∫ M` for all `φ`, `f`, `M` with |
| 417 | (a) `φ : B → ℂ` continuous and left invariant under the rational points `Y.ratBessel` of `B`; |
| 418 | (b) `φ (n * a) = f a (row n)` for `n` unipotent and `a` in `U(X)`; |
| 419 | (c) each `f a` continuous and periodic under the rational vectors, with mean `M a` over the |
| 420 | adelic vectors modulo the rational ones; |
| 421 | (d) `M` continuous and left invariant under the rational points of `U(X)`. -/ |
| 422 | lemma integral_besselMeasure_eq_of_mean {q : Type*} [Fintype q] |
| 423 | (v : q ↪ {l : ι // Y.gradeOf l = 1}) : |
| 424 | let row (n : G E ε) (p : q × X) : 𝔸 E := |
| 425 | ↑Y.genericConst * (V.ratCoordMatrix n - 1) (v p.fst) (Y.indexEquiv (.inl p.snd)) |
| 426 | ∃ κ : ℂ, ∀ {φ : Y.besselGroup → ℂ} {f : G E (1 : X → ℤˣ) → (q × X → 𝔸 E) → ℂ} |
| 427 | {M : G E (1 : X → ℤˣ) → ℂ}, |
| 428 | (φ_inv : (Y.ratBessel.subgroupOf Y.besselGroup).FixesLeft φ) → (φ_cont : Continuous φ) → |
| 429 | (φ_eq : ∀ (n : G E ε) (hn : n ∈ Y.unipotent) (a : G E (1 : X → ℤˣ)), |
| 430 | φ (⟨n, Y.unipotent_le_besselGroup hn⟩ * ⟨Y.inclX a, Y.inclX_mem_besselGroup a⟩) = |
| 431 | f a (row n)) → |
| 432 | (f_mean : ∀ a : G E (1 : X → ℤˣ), IsContPeriodic (ratVectors E (q × X)) (f a) ∧ |
| 433 | quotMean (ratVectors E (q × X)) (f a) = M a) → |
| 434 | (M_cont : Continuous M) → (M_inv : (stdSpace E X).Γ.FixesLeft M) → |
| 435 | ∫ r : Y.besselGroup, φ r ∂Y.besselMeasure = |
| 436 | κ * ∫ a : G E (1 : X → ℤˣ), M a ∂(stdSpace E X).quotMeasure := by |
| 437 | -- Let `pr : Y.besselGroup → U(X)` be the projection. Averaging `φ - M ∘ pr` over the Eichler maps |
| 438 | -- `u b` gives 0, so its integral for `Y.besselMeasure` vanishes; and `M ∘ pr` integrates to a |
| 439 | -- multiple of `∫ M`. |
| 440 | intro row |
| 441 | obtain ⟨pr, pr_cont, unip_part, pr_section, mem_unip, pr_rat⟩ := |
| 442 | Y.exists_besselGroup_proj |
| 443 | obtain ⟨u, u_cont, u_mem, row_mul⟩ := |
| 444 | Y.exists_continuous_unipotent_besselRow_mul v |
| 445 | let S : Subgroup Y.besselGroup := (stdSpace E X).Γ.comap pr |
| 446 | have S_closed : IsClosed S.carrier := isClosed_of_discreteTopology.preimage pr_cont |
| 447 | have unimodular : (haar : Measure S).IsMulRightInvariant := |
| 448 | Y.isMulRightInvariant_haar_comap_Gamma pr_rat |
| 449 | -- `∫ M ∘ pr = κ • ∫ M`, so it remains to see `∫ φ = ∫ M ∘ pr`. |
| 450 | obtain ⟨κ, push⟩ := |
| 451 | exists_integral_comp_quotMeasure_eq_smul (V := ℂ) (Γ := (stdSpace E X).Γ) |
| 452 | (Y.ratBessel.subgroupOf Y.besselGroup) volume haar |
| 453 | pr_cont (fun a ↦ ⟨⟨Y.inclX a, Y.inclX_mem_besselGroup a⟩, pr_section a⟩) pr_rat |
| 454 | refine ⟨κ, fun {φ f M} φ_inv φ_cont φ_eq f_mean M_cont M_inv ↦ |
| 455 | .trans ?_ (push M M_cont.measurable M_inv)⟩ |
| 456 | have M_comp_pr_inv : (Y.ratBessel.subgroupOf Y.besselGroup).FixesLeft (fun r ↦ M (pr r)) := by |
| 457 | intro γ hγ r |
| 458 | change M (pr (γ * r)) = M (pr r) |
| 459 | rw [map_mul, M_inv _ (pr_rat γ hγ)] |
| 460 | rw [← sub_eq_zero, ← integral_sub (integrable_of_isCocompact Y.isCocompact_ratBessel φ_cont φ_inv) |
| 461 | (integrable_of_isCocompact Y.isCocompact_ratBessel (by fun_prop) M_comp_pr_inv)] |
| 462 | -- At `r`, average over the elements `j r b = u b * (r * (Y.inclX (pr r))⁻¹)⁻¹` of `S`. Right |
| 463 | -- translation keeps the Haar measure of `S` (factor 1), while the average is 0 (factor 0); as the |
| 464 | -- factors differ, the integral vanishes (`integral_quotMeasure_eq_zero_of_mean`). |
| 465 | let j₀ (r : Y.besselGroup) (b : q × X → 𝔸 E) : Y.besselGroup := |
| 466 | ⟨u b, Y.unipotent_le_besselGroup (u_mem b)⟩ * ⟨_, Y.unipotent_le_besselGroup (unip_part r)⟩⁻¹ |
| 467 | have pr_j₀ (r : Y.besselGroup) (b : q × X → 𝔸 E) : pr (j₀ r b) = 1 := by |
| 468 | have pr_u : pr ⟨u b, Y.unipotent_le_besselGroup (u_mem b)⟩ = 1 := (mem_unip _).mp (u_mem b) |
| 469 | have pr_unip : pr ⟨_, Y.unipotent_le_besselGroup (unip_part r)⟩ = 1 := |
| 470 | (mem_unip _).mp (unip_part r) |
| 471 | simp only [j₀, map_mul, map_inv, pr_u, pr_unip, inv_one, mul_one] |
| 472 | have j_mem (r : Y.besselGroup) (b : q × X → 𝔸 E) : j₀ r b ∈ S := |
| 473 | pr.ker_le_comap _ (MonoidHom.mem_ker.2 (pr_j₀ r b)) |
| 474 | let j (r : Y.besselGroup) (b : q × X → 𝔸 E) : S := ⟨j₀ r b, j_mem r b⟩ |
| 475 | have diff_inv : (Y.ratBessel.subgroupOf Y.besselGroup).FixesLeft (fun r ↦ φ r - M (pr r)) := |
| 476 | fun γ hγ r ↦ congrArg₂ HSub.hSub (φ_inv γ hγ r) (M_comp_pr_inv γ hγ r) |
| 477 | have translate_one (r : Y.besselGroup) (b : q × X → 𝔸 E) : |
| 478 | (haar : Measure S).map (· * j r b) = (1 : NNReal) • haar := by |
| 479 | rw [one_smul] |
| 480 | exact unimodular.map_mul_right_eq_self (j r b) |
| 481 | have j_meas (r : Y.besselGroup) : Measurable (j r) := by fun_prop |
| 482 | refine integral_quotMeasure_eq_zero_of_mean _ diff_inv (by fun_prop) |
| 483 | (fun γ hγ ↦ mem_comap.mpr (pr_rat γ hγ)) (ratVectors E (q × X)).quotMeasure j j_meas 1 |
| 484 | translate_one zero_ne_one fun g r ↦ ?_ |
| 485 | -- Write `g = Y.inclX (pr g) * n` with `pr g` rational and `n` unipotent. |
| 486 | let n : G E ε := (Y.inclX (pr g))⁻¹ * g |
| 487 | have n_mem : n ∈ Y.unipotent := by simpa [n] using inv_mem (unip_part g⁻¹) |
| 488 | -- Here `g * (j r b * r) = Y.inclX (pr g) * (n * u b * Y.inclX (pr r))`. |
| 489 | have value (b : q × X → 𝔸 E) : φ (g * (j r b * r)) = f (pr r) (b + row n) := by |
| 490 | have h_factor : (g : Y.besselGroup) * (j r b * r) = |
| 491 | ⟨Y.inclX (pr g), Y.inclX_mem_besselGroup (pr g)⟩ * |
| 492 | (⟨n * u b, Y.unipotent_le_besselGroup (mul_mem n_mem (u_mem b))⟩ * |
| 493 | ⟨Y.inclX (pr r), Y.inclX_mem_besselGroup (pr r)⟩) := by |
| 494 | ext1 |
| 495 | simp [j, j₀, n, mul_assoc] |
| 496 | rw [h_factor, φ_inv ⟨Y.inclX (pr g), Y.inclX_mem_besselGroup (pr g)⟩ |
| 497 | (Y.inclX_mem_ratBessel g.property), |
| 498 | φ_eq _ (mul_mem n_mem (u_mem b))] |
| 499 | exact congrArg (f (pr r)) (row_mul n n_mem b) |
| 500 | have pr_value (b : q × X → 𝔸 E) : M (pr (g * (j r b * r))) = M (pr r) := by |
| 501 | simp only [map_mul, j, pr_j₀, one_mul, M_inv _ g.property] |
| 502 | suffices ∫ b, f (pr r) (b + row n) - M (pr r) ∂(ratVectors E (q × X)).quotMeasure = 0 by |
| 503 | simpa only [coe_mul, mul_assoc, value, pr_value, zero_smul, zero_mul] |
| 504 | obtain ⟨f_periodic, f_quotMean⟩ := f_mean (pr r) |
| 505 | rw [← f_quotMean] |
| 506 | exact integral_add_sub_quotMean_eq_zero f_periodic (row n) |
| 507 | |
| 508 | end New.Grading |
| 509 | |
| 510 | /-! |
| 511 | ## Rational maps surviving unipotent twists |
| 512 | |
| 513 | `New.Grading.gradeOf` is the weight of a basis vector and `New.Grading.stringReversal` the dual |
| 514 | index. `New.HasDegreeGe w' w d x` says that `x` raises weights by at least `d`. |
| 515 | `New.Space.formAdjoint` is the adjoint `†`. `New.Grading.stringMap` is the standard map `T` of |
| 516 | degree `-1`. `New.Grading.AgreesWithStringMap` is agreement with `T` in negative degree on the |
| 517 | vectors of positive weight. |
| 518 | -/ |
| 519 | |
| 520 | section SurvivingOrbit |
| 521 | |
| 522 | namespace New.Grading |
| 523 | |
| 524 | open Matrix WeilData Finset Space Finite |
| 525 | |
| 526 | variable {E ι ι' X X' : Type} [Field E] [CMType E] [Fintype ι] [DecidableEq ι] [Fintype ι'] |
| 527 | [DecidableEq ι'] [Fintype X] [DecidableEq X] [Fintype X'] [DecidableEq X'] |
| 528 | {s : ℕ} {ε : ι → ℤˣ} {ε' : ι' → ℤˣ} {N : E} {V : Space E ι ε} {V' : Space E ι' ε'} |
| 529 | (Y : Grading V N X s) (Y' : Grading V' N X' (s - 1)) [WeilData E] |
| 530 | |
| 531 | /-- The term at the rational map `w` survives the unipotent twists, for target weights `D`. Let `T` |
| 532 | be `Y.stringMap Y'`, and take any `u` in `Y.unipotent` such that `u - 1` has degree at least `2` and |
| 533 | `w (u - 1)` has degree at least `1` (weights `D` on the target), with `u` written in rational |
| 534 | coordinates. Then `New.Space.homBicharacter` takes the same value at `(T u, T)` and at |
| 535 | `(w u, w)`. -/ |
| 536 | abbrev Survives (D : ι' → ℤ) (w : Matrix ι' ι (𝔸 E)) : Prop := |
| 537 | ∀ u ∈ Y.unipotent, |
| 538 | HasDegreeGe Y.gradeOf Y.gradeOf 2 (V.ratCoordMatrix u - 1) ∧ |
| 539 | HasDegreeGe D Y.gradeOf 1 (w * (V.ratCoordMatrix u - 1)) → |
| 540 | V.homBicharacter V' (Y.stringMap Y' * V.ratCoordMatrix u) (Y.stringMap Y') = |
| 541 | V.homBicharacter V' (w * V.ratCoordMatrix u) w |
| 542 | |
| 543 | omit [Fintype X'] in |
| 544 | /-- Let `T` be `Y.stringMap Y'`, the rational map V → V' that kills `X` and the last string vector |
| 545 | and sends each other string vector to a multiple of the string vector of `V'` with the same number. |
| 546 | Suppose that `w` survives the unipotent twists for target weights `D` (`New.Grading.Survives`: |
| 547 | `homBicharacter` agrees at (T u, T) and (w u, w) for the relevant u in `Y.unipotent`). Then `T† T v` |
| 548 | and `w† w v` (with † the form adjoint) have the same coordinate `k`, provided that `v p = 0` unless |
| 549 | the weight of `p` is at least `1` and at least that of `k` plus `2` (`hv`); `(w v) p = 0` unless |
| 550 | `D p` is nonnegative and above the weight of `k` (`hwv`); and the entry of `w` in row `p` and the |
| 551 | column dual to `k` vanishes, or `v q = 0`, whenever `D p` plus the weight of `q` is at most `0` |
| 552 | (`hw_col`). -/ |
| 553 | lemma formAdjoint_mul_self_mulVec_apply_eq_of_survives {w : Matrix ι' ι (𝔸 E)} {D : ι' → ℤ} |
| 554 | (survives : Y.Survives Y' D w) (v : ι → 𝔸 E) (k : ι) |
| 555 | (hv : ∀ p : ι, Y.gradeOf p < 1 ⊔ (2 + Y.gradeOf k) → v p = 0) |
| 556 | (hwv : ∀ p : ι', D p ≤ Y.gradeOf k ⊔ -1 → (w *ᵥ v) p = 0) |
| 557 | (hw_col : ∀ (p : ι') (q : ι), D p + Y.gradeOf q ≤ 0 → w p (Y.stringReversal k) = 0 ∨ v q = 0) : |
| 558 | ((V.formAdjoint V' (Y.stringMap Y') * Y.stringMap Y') *ᵥ v) k = |
| 559 | ((V.formAdjoint V' w * w) *ᵥ v) k := by |
| 560 | -- Test with the Eichler map `u` of `v` and a multiple `x` of the basis vector dual to `k`: the |
| 561 | -- phases of `u` at `Y.stringMap Y'` and at `w` agree, and `stdAddChar` is nondegenerate. |
| 562 | refine sub_eq_zero.mp (eq_zero_of_forall_stdAddChar_eq_one fun t ↦ ?_) |
| 563 | let x : ι → 𝔸 E := |
| 564 | Pi.single (Y.stringReversal k) (star (↑(j⁻¹ * V.J⁻¹ k (Y.stringReversal k)) * t)) |
| 565 | have v_supp (p : ι) (hp : Y.gradeOf p ≤ 0 ⊔ Y.gradeOf k) : v p = 0 := hv p (by omega) |
| 566 | have x_supp (q : ι) (hq : Y.gradeOf q ≠ -Y.gradeOf k) : x q = 0 := |
| 567 | Pi.single_eq_of_ne (ne_of_apply_ne Y.gradeOf (by rwa [gradeOf_stringReversal])) _ |
| 568 | obtain ⟨u, u_mem, u_mat⟩ : ∃ u ∈ Y.unipotent, V.ratCoordMatrix u = |
| 569 | eichlerMap (V.J.map toAdele) v x (toAdele 2⁻¹ * star x ⬝ᵥ V.J.map toAdele *ᵥ x) := |
| 570 | Y.exists_ratCoordMatrix_eq_eichlerMap v x (Y.gradeOf k) v_supp x_supp |
| 571 | -- `stdAddChar a` depends only on `a + star a` (`stdAddChar_inv_two_mul_add_star`); compare these |
| 572 | -- sums. |
| 573 | have phase (y : Matrix ι' ι (𝔸 E)) : |
| 574 | V.homBicharacter V' (y * V.ratCoordMatrix u) y = |
| 575 | stdAddChar E (toAdele j * star x ⬝ᵥ (yᴴ * V'.J.map toAdele * y) *ᵥ v) := by |
| 576 | suffices h_sum : toAdele ((j : E) / 2) * (V.formAdjoint V' y * (y * V.ratCoordMatrix u)).trace + |
| 577 | star (toAdele ((j : E) / 2) * (V.formAdjoint V' y * (y * V.ratCoordMatrix u)).trace) = |
| 578 | toAdele (j : E) * star x ⬝ᵥ (yᴴ * V'.J.map toAdele * y) *ᵥ v + |
| 579 | star (toAdele (j : E) * star x ⬝ᵥ (yᴴ * V'.J.map toAdele * y) *ᵥ v) by |
| 580 | rw [homBicharacter_eq, ← stdAddChar_inv_two_mul_add_star, |
| 581 | ← stdAddChar_inv_two_mul_add_star (toAdele j * star x ⬝ᵥ (yᴴ * V'.J.map toAdele * y) *ᵥ v)] |
| 582 | exact congrArg (fun z ↦ (stdAddChar E (toAdele 2⁻¹ * z) : ℂ)) h_sum |
| 583 | have h_half : toAdele ((j : E) / 2) + toAdele ((j : E) / 2) = toAdele (j : E) := by |
| 584 | rw [← map_add, add_halves] |
| 585 | simp [u_mat, formAdjoint, ← dotProduct_mulVec, dotProduct_comm _ (_ ᵥ* _), ← Matrix.mul_assoc, |
| 586 | mul_eq_one_symm V.map_J_inv_mul_map_J, (isHermitian_J _).eq, ← trace_conjTranspose, |
| 587 | conjTranspose_nonsing_inv, trace_mul_comm _ (map _ _), Matrix.mulVec_add, Matrix.mulVec_smul, |
| 588 | Matrix.mul_add, eichlerMap, mul_sub, mul_vecMulVec, neg_div, ← h_half, |
| 589 | (V.isHermitian_J.map toAdele fun a ↦ (star_toAdele a).symm).star_dotProduct_mulVec_comm, |
| 590 | (isHermitian_conjTranspose_mul_mul y (V'.isHermitian_J.map toAdele fun a ↦ |
| 591 | (star_toAdele a).symm)).star_dotProduct_mulVec_comm] |
| 592 | -- The trace terms and the terms in `star x ⬝ᵥ J *ᵥ x` cancel; the pairings of `x` with `v` |
| 593 | -- add up. |
| 594 | ring |
| 595 | have u_deg : |
| 596 | HasDegreeGe Y.gradeOf Y.gradeOf 2 (V.ratCoordMatrix u - 1) ∧ |
| 597 | HasDegreeGe D Y.gradeOf 1 (w * (V.ratCoordMatrix u - 1)) := by |
| 598 | -- The entries are terms in `v`, `x` and `w *ᵥ v` at weights that `hv`, `hwv` and `hw_col` |
| 599 | -- exclude. |
| 600 | simp [u_mat, Y.vecMul_J_apply, vecMulVec_apply, x, -single_vecMul, Pi.single_apply, |
| 601 | Matrix.one_apply, sub_eq_zero, Matrix.mulVec_add, Matrix.mulVec_smul, Matrix.mul_sub, |
| 602 | Matrix.mul_add, HasDegreeGe, eichlerMap, mul_vecMulVec, mulVec_neg] |
| 603 | -- The `x` terms need `σ a = σ k`, so `a` has the weight of `k`; the `star v` terms need |
| 604 | -- `v (σ a) ≠ 0`, so `a` has weight at most `-max 1 (2 + weight k)`. |
| 605 | have h_dual {a : ι} (h : Y.stringReversal a = Y.stringReversal k) : |
| 606 | Y.gradeOf a = Y.gradeOf k := by |
| 607 | simpa [gradeOf_stringReversal] using congrArg Y.gradeOf h |
| 608 | have h_va {a : ι} (h : v (Y.stringReversal a) ≠ 0) : |
| 609 | max 1 (2 + Y.gradeOf k) ≤ -Y.gradeOf a := by |
| 610 | have := mt (hv _) h |
| 611 | rw [gradeOf_stringReversal] at this |
| 612 | omega |
| 613 | have h_rev {b : ι} (h : Y.gradeOf b ≠ -Y.gradeOf k) : b ≠ Y.stringReversal k := by |
| 614 | rintro rfl |
| 615 | exact h (gradeOf_stringReversal _ _) |
| 616 | refine ⟨fun b a hba ↦ ?_, fun b a hba ↦ ?_⟩ |
| 617 | · rcases eq_or_ne (v (Y.stringReversal a)) 0 with hva | hva |
| 618 | · simp only [hva, star_zero, zero_mul, mul_zero, sub_zero, add_eq_left, ite_eq_right_iff] |
| 619 | exact fun h ↦ by rw [hv b (by have := h_dual h; omega), zero_mul] |
| 620 | · have ha := h_va hva |
| 621 | simp [h_rev (b := b) (by omega), hv b (by omega)] |
| 622 | · rcases eq_or_ne (v (Y.stringReversal a)) 0 with hva | hva |
| 623 | · simp only [hva, star_zero, zero_mul, mul_zero, sub_zero, add_eq_left, ite_eq_right_iff] |
| 624 | exact fun h ↦ by rw [hwv b (by have := h_dual h; omega), zero_mul] |
| 625 | · have ha := h_va hva |
| 626 | have hwbk := (hw_col b _ (by rw [gradeOf_stringReversal]; omega)).resolve_right hva |
| 627 | simp [hwv b (by omega), hwbk] |
| 628 | have h_phase : V.homBicharacter V' (Y.stringMap Y' * V.ratCoordMatrix u) (Y.stringMap Y') = |
| 629 | V.homBicharacter V' (w * V.ratCoordMatrix u) w := |
| 630 | survives u u_mem u_deg |
| 631 | rw [phase, phase] at h_phase |
| 632 | simpa [x, AddChar.map_sub_eq_div, div_eq_one, Circle.ext_iff, ← mul_assoc, ← map_mul, |
| 633 | formAdjoint, Y.J_inv_eq_gradedGram, map_gradedGram_mul_apply, mulVec_apply_eq_sum, mul_sum, |
| 634 | mul_comm t (toAdele _), j_ne_zero, Matrix.mul_assoc, mul_sub] using h_phase |
| 635 | |
| 636 | omit [WeilData E] [Fintype X] in |
| 637 | /-- Let `k` be an index of `Y'` whose weight is at least `0` if `k` is on the string and at least |
| 638 | `1` otherwise; as the weight off the string is `0`, `k` is on the string. Write `T` for |
| 639 | `Y.stringMap Y'`. There is an index `a` of `Y` with (a) weight one more than `k`; (b) `T k a` a |
| 640 | unit; (c) for every `w` of type `AgreesWithStringMap` and every row `m` that vanishes in weights |
| 641 | above that of `k`, the product of `m` with column `a` of `w` is `m k * T k a`. -/ |
| 642 | lemma exists_gradeOf_succ_isUnit_stringMap (k : ι') |
| 643 | (hk : (if (Y'.indexEquiv.symm k).isRight then 0 else 1) ≤ Y'.gradeOf k) : |
| 644 | ∃ a : ι, |
| 645 | Y.gradeOf a = Y'.gradeOf k + 1 ∧ |
| 646 | IsUnit (Y.stringMap Y' k a) ∧ |
| 647 | ∀ {w : Matrix ι' ι (𝔸 E)}, Y.AgreesWithStringMap Y' w → ∀ m : ι' → 𝔸 E, |
| 648 | (∀ l : ι', Y'.gradeOf l ≤ Y'.gradeOf k ∨ m l = 0) → |
| 649 | m ⬝ᵥ (fun l : ι' ↦ w l a) = m k * Y.stringMap Y' k a := by |
| 650 | -- `k` lies on the string: off it the weight is `0` and the hypothesis asks for weight `≥ 1`. |
| 651 | obtain ⟨x' | k', rfl⟩ := Y'.indexEquiv.surjective k |
| 652 | · simp at hk |
| 653 | -- Take for `a` the index at the same position of the longer string. |
| 654 | refine ⟨Y.indexEquiv (.inr ⟨k', by omega⟩), ?_, ?_, ?_⟩ |
| 655 | · simp |
| 656 | omega |
| 657 | · simp [stringMap] at hk ⊢ |
| 658 | grind [Y.N_ne_zero_and_star_eq] |
| 659 | · -- Up to the weight of `k`, column `a` of `w` is that of `stringMap`, whose only entry is in |
| 660 | -- row `k`. |
| 661 | intro w hw m hm |
| 662 | simp [reindex_equiv Y.indexEquiv, reindex_equiv Y'.indexEquiv, stringMap, dotProduct] |
| 663 | at hk hw hm ⊢ |
| 664 | grind [sum_eq_single k', sum_eq_zero] |
| 665 | |
| 666 | omit [WeilData E] in |
| 667 | /-- Let `w` be of type `New.Grading.AgreesWithStringMap` and let `γ` lie in `Y.besselGroup`. Then |
| 668 | `δ w γ` is again of type `AgreesWithStringMap` exactly when `δ` lies in `Y'.besselGroup`. Here `δ` |
| 669 | and `γ` are taken in rational coordinates. -/ |
| 670 | lemma agreesWithStringMap_mul_iff {w : Matrix ι' ι (𝔸 E)} {γ : G E ε} (hγ : γ ∈ Y.besselGroup) |
| 671 | (hw : Y.AgreesWithStringMap Y' w) (δ : G E ε') : |
| 672 | Y.AgreesWithStringMap Y' (V'.ratCoordMatrix δ * (w * V.ratCoordMatrix γ)) ↔ δ ∈ |
| 673 | Y'.besselGroup := by |
| 674 | -- Write `δ * (w * γ) - stringMap = δ * (w - stringMap) * γ + (δ * stringMap * γ - stringMap)`, |
| 675 | -- with `δ` and `γ` of degree `≥ 0`; the last term has degree `≥ 0` by |
| 676 | -- `hasDegreeGe_zero_mul_stringMap_mul_sub`. |
| 677 | have of_mem {δ : G E ε'} (hδ : δ ∈ Y'.besselGroup) : |
| 678 | Y.AgreesWithStringMap Y' (V'.ratCoordMatrix δ * (w * V.ratCoordMatrix γ)) := by |
| 679 | intro b a ha hba |
| 680 | -- With target weights truncated below at zero, agreement says that |
| 681 | -- `w - T` has nonnegative degree. |
| 682 | let d (b : ι') := max 0 (Y'.gradeOf b) |
| 683 | have hw0 : HasDegreeGe d Y.gradeOf 0 (w - Y.stringMap Y') := by |
| 684 | simpa [HasDegreeGe, d, max_lt_iff, and_imp, sub_eq_zero, AgreesWithStringMap] using hw |
| 685 | have hδ0 : HasDegreeGe d d 0 (V'.ratCoordMatrix δ) := |
| 686 | fun b c h ↦ Y'.hasDegreeGe_zero_of_mem_besselGroup hδ b c (by dsimp [d] at h; omega) |
| 687 | have hprod := hδ0.mul (hw0.mul (Y.hasDegreeGe_zero_of_mem_besselGroup hγ) (le_refl 0)) |
| 688 | (le_refl 0) b a (by dsimp [d]; omega) |
| 689 | have hT := sub_eq_zero.mp (Y.hasDegreeGe_zero_mul_stringMap_mul_sub hγ hδ b a (by omega)) |
| 690 | simpa [Matrix.mul_sub, Matrix.sub_mul, Matrix.sub_apply, sub_eq_zero, hT] using hprod |
| 691 | have agrees : Y.AgreesWithStringMap Y' (w * V.ratCoordMatrix γ) := by |
| 692 | simpa using of_mem (one_mem _) |
| 693 | refine ⟨fun hδ ↦ Y'.mem_besselGroup_iff_sub_one.mpr fun b ↦ ?_, of_mem⟩ |
| 694 | -- Show that the entry `(b, k)` of `δ - 1` vanishes, by downward induction on the weight of `k`. |
| 695 | refine int_weight_induction (fun l : ι' ↦ -Y'.gradeOf l) fun k ih hk hbk ↦ ?_ |
| 696 | obtain ⟨a, ha, unit, col⟩ := Y.exists_gradeOf_succ_isUnit_stringMap Y' k hk |
| 697 | have hk0 : 0 ≤ Y'.gradeOf k := by split at hk <;> omega |
| 698 | -- By `ih`, row `b` of `δ - 1` vanishes in the weights above that of `k`. |
| 699 | have h_row : ∀ l : ι', Y'.gradeOf l ≤ Y'.gradeOf k ∨ (V'.ratCoordMatrix δ - 1) b l = 0 := by |
| 700 | intro l |
| 701 | rcases le_or_gt (Y'.gradeOf l) (Y'.gradeOf k) with hl | hl |
| 702 | · exact Or.inl hl |
| 703 | · exact Or.inr (ih l (neg_lt_neg hl) (by split <;> omega) (hbk.trans hl.le)) |
| 704 | -- The entry `(b, a)` of `(δ - 1) * (w * γ)` is this entry times a unit (`col`, using `ih`), and |
| 705 | -- it vanishes because `δ * (w * γ)` and `w * γ` both agree with `stringMap` there. |
| 706 | rw [← unit.mul_left_eq_zero, ← col agrees _ h_row, ← Matrix.mul_apply', Matrix.sub_mul] |
| 707 | change (V'.ratCoordMatrix δ * (w * V.ratCoordMatrix γ) - |
| 708 | (1 : Matrix ι' ι' (𝔸 E)) * (w * V.ratCoordMatrix γ)) b a = 0 |
| 709 | have ha_pos : 0 < Y.gradeOf a := by omega |
| 710 | have hba : Y'.gradeOf b < Y.gradeOf a := by omega |
| 711 | simp only [Matrix.sub_apply, Matrix.one_mul, hδ b a ha_pos hba, agrees b a ha_pos hba, sub_self] |
| 712 | |
| 713 | omit [Fintype X'] in |
| 714 | private lemma formAdjoint_mul_self_entry_eq_of_survives {w : Matrix ι' ι (𝔸 E)} {D : ι' → ℤ} |
| 715 | (survives : Y.Survives Y' D w) (i k : ι) (hi : 1 ⊔ (2 + Y.gradeOf k) ≤ Y.gradeOf i) |
| 716 | (hcol : ∀ p, D p ≤ Y.gradeOf k ⊔ -1 → w p i = 0) |
| 717 | (hdual : ∀ p, D p + Y.gradeOf i ≤ 0 → w p (Y.stringReversal k) = 0) : |
| 718 | (V.formAdjoint V' (Y.stringMap Y') * Y.stringMap Y') k i = (V.formAdjoint V' w * w) k i := by |
| 719 | have h := Y.formAdjoint_mul_self_mulVec_apply_eq_of_survives Y' survives (Pi.single i 1) k |
| 720 | (fun p hp ↦ by |
| 721 | apply Pi.single_eq_of_ne |
| 722 | rintro rfl |
| 723 | exact (not_lt_of_ge hi) hp) |
| 724 | (fun p hp ↦ by simpa only [mulVec_single_one, Matrix.col_apply] using hcol p hp) |
| 725 | (fun p q hp ↦ by |
| 726 | by_cases hq : q = i |
| 727 | · subst q |
| 728 | exact Or.inl (hdual p hp) |
| 729 | · exact Or.inr (Pi.single_eq_of_ne hq _)) |
| 730 | simpa only [mulVec_single_one, Matrix.col_apply] using h |
| 731 | |
| 732 | omit [WeilData E] in |
| 733 | /-- Let `y` vanish at every entry `(p, j)` with `p` of grade below that of `b` and below |
| 734 | `gradeOf j - 1`, where `b` has grade below `a`. Then the entry `(σ a, l)` of the adjoint of `y` |
| 735 | vanishes unless `l` has grade at most that of `σ' b`, where `σ`, `σ'` are the dual indices |
| 736 | `stringReversal`. -/ |
| 737 | private lemma gradeOf_le_or_formAdjoint_eq_zero {y : Matrix ι' ι (𝔸 E)} (a : ι) (b : ι') |
| 738 | (hab : Y'.gradeOf b < Y.gradeOf a) |
| 739 | (hy : ∀ p j, Y'.gradeOf p < Y'.gradeOf b → Y'.gradeOf p < Y.gradeOf j - 1 → y p j = 0) |
| 740 | (l : ι') : |
| 741 | Y'.gradeOf l ≤ Y'.gradeOf (Y'.stringReversal b) ∨ |
| 742 | V.formAdjoint V' y (Y.stringReversal a) l = 0 := by |
| 743 | by_cases hl : Y'.gradeOf l ≤ Y'.gradeOf (Y'.stringReversal b) |
| 744 | · exact Or.inl hl |
| 745 | · right |
| 746 | rw [gradeOf_stringReversal] at hl |
| 747 | rw [Y.formAdjoint_apply Y', hy (Y'.stringReversal l) |
| 748 | (Y.stringReversal (Y.stringReversal a)) (by simp only [gradeOf_stringReversal]; omega) |
| 749 | (by simp only [gradeOf_stringReversal]; omega)] |
| 750 | simp |
| 751 | |
| 752 | /-- Let `T = Y.stringMap Y'` be the map that kills `X` and the last string vector of `V` and sends |
| 753 | each other string vector to a multiple of the same-numbered string vector of `V'`. Suppose `w` |
| 754 | agrees with `T` at every entry `(b, a)` where `a` has positive grade and `b` has grade below that |
| 755 | of `a`. Suppose also that `w` survives the unipotent twists with target weights `Y'.gradeOf` |
| 756 | (`New.Grading.Survives`): for every `u` in `Y.unipotent` with `u - 1` of degree at least `2` and |
| 757 | `w (u - 1)` of degree at least `1`, `New.Space.homBicharacter` takes the same value at `(T u, T)` |
| 758 | and at `(w u, w)`. Then `w - T` has degree at least `0`, i.e. its `(b, a)` entry vanishes whenever |
| 759 | the grade of `b` (`Y'.gradeOf`) is less than the grade of `a` (`Y.gradeOf`). -/ |
| 760 | lemma hasDegreeGe_of_survives {w : Matrix ι' ι (𝔸 E)} (hw : Y.AgreesWithStringMap Y' w) |
| 761 | (survives : Y.Survives Y' Y'.gradeOf w) : |
| 762 | HasDegreeGe Y'.gradeOf Y.gradeOf 0 (w - Y.stringMap Y') := by |
| 763 | -- Every entry `(b, a)` of negative degree of `w - stringMap` vanishes, by induction on the weight |
| 764 | -- of `b`. |
| 765 | refine int_weight_induction Y'.gradeOf fun b ih a hab ↦ ?_ |
| 766 | rw [Matrix.sub_apply, sub_eq_zero] |
| 767 | -- Suppose that the entry `(b, a)` of `w` differs from that of `stringMap`. |
| 768 | by_cases h_eq : w b a = Y.stringMap Y' b a |
| 769 | · exact h_eq |
| 770 | -- By `hw` a bad entry has `gradeOf b < gradeOf a ≤ 0`, so the index dual to `b` has positive |
| 771 | -- weight. |
| 772 | have ha : Y.gradeOf a ≤ 0 := |
| 773 | le_of_not_gt fun h ↦ h_eq (hw b a h (by omega)) |
| 774 | have h_rev_pos : (if (Y'.indexEquiv.symm (Y'.stringReversal b)).isRight then 0 else 1) ≤ |
| 775 | Y'.gradeOf (Y'.stringReversal b) := by |
| 776 | rw [gradeOf_stringReversal] |
| 777 | split <;> omega |
| 778 | obtain ⟨i, hi, unit, col⟩ := |
| 779 | Y.exists_gradeOf_succ_isUnit_stringMap Y' (Y'.stringReversal b) h_rev_pos |
| 780 | rw [gradeOf_stringReversal] at hi |
| 781 | -- Below row `b`, induction transfers the degree bound of the string map to `w`. |
| 782 | have low (p : ι') (j : ι) (hp : Y'.gradeOf p < Y'.gradeOf b) |
| 783 | (hj : Y'.gradeOf p < Y.gradeOf j - 1) : w p j = 0 := by |
| 784 | have he := ih p hp j (by omega) |
| 785 | rw [Matrix.sub_apply, sub_eq_zero] at he |
| 786 | exact he.trans (Y.hasDegreeGe_neg_one_stringMap p j (by omega)) |
| 787 | -- On the basis vector `i`, the coordinate dual to `a` of `w† w` is this entry of `w†` times a |
| 788 | -- unit (`col`, using `ih`); likewise for `stringMap`. |
| 789 | have adj_eq : |
| 790 | V.formAdjoint V' (Y.stringMap Y') (Y.stringReversal a) (Y'.stringReversal b) = |
| 791 | V.formAdjoint V' w (Y.stringReversal a) (Y'.stringReversal b) := by |
| 792 | have h_entry := Y.formAdjoint_mul_self_entry_eq_of_survives Y' survives i (Y.stringReversal a) |
| 793 | (by rw [gradeOf_stringReversal]; omega) (fun p hp ↦ by |
| 794 | rw [gradeOf_stringReversal] at hp |
| 795 | rw [hw p i (by omega) (by omega)] |
| 796 | exact Y.hasDegreeGe_neg_one_stringMap p i (by omega)) (fun p hp ↦ by |
| 797 | apply low p _ (by omega) |
| 798 | simp only [gradeOf_stringReversal] |
| 799 | omega) |
| 800 | have rowT := gradeOf_le_or_formAdjoint_eq_zero Y Y' (y := Y.stringMap Y') a b |
| 801 | (by omega) fun p j _ hj ↦ Y.hasDegreeGe_neg_one_stringMap p j (by omega) |
| 802 | simp only [Matrix.mul_apply'] at h_entry |
| 803 | rw [col (w := Y.stringMap Y') (fun _ _ _ _ ↦ rfl) _ rowT, |
| 804 | col hw _ (gradeOf_le_or_formAdjoint_eq_zero Y Y' a b (by omega) low)] at h_entry |
| 805 | exact unit.mul_left_inj.mp h_entry |
| 806 | -- By `formAdjoint_apply` this entry of the adjoint determines the entry `(b, a)`. |
| 807 | rw [← V.formAdjoint_formAdjoint _ w, Y'.formAdjoint_apply Y, ← adj_eq, ← formAdjoint_apply, |
| 808 | formAdjoint_formAdjoint] |
| 809 | |
| 810 | /-- Let the map `x` over `E` survive the unipotent twists (target weights `0`). Then `x` is |
| 811 | injective on the span of the basis vectors of positive weight: its restriction to them has a left |
| 812 | inverse. -/ |
| 813 | private lemma hasLeftInv_submatrix_of_survives {x : Matrix ι' ι E} |
| 814 | (hx : Y.Survives Y' 0 (x.map toAdele)) : |
| 815 | HasLeftInv (k := univ.filter fun a : ι ↦ 0 < Y.gradeOf a) (x.submatrix id (↑)) := by |
| 816 | set A : Finset ι := univ.filter fun a : ι ↦ 0 < Y.gradeOf a with hA |
| 817 | -- A kernel vector `u` vanishes, by induction on the weight of the coordinate. |
| 818 | refine .of_ker_le_bot fun u hu ↦ funext (int_weight_induction (fun a : A ↦ Y.gradeOf a) ?_) |
| 819 | -- Indices of positive weight lie on the string; let `a` be the last one there with `u a ≠ 0`. |
| 820 | suffices h : ∀ (b : Fin s) (hb : 2 * ((b : ℕ) : ℤ) < (s : ℤ) - 1), |
| 821 | (∀ (b' : Fin s) (hb' : 2 * ((b' : ℕ) : ℤ) < (s : ℤ) - 1), b < b' → |
| 822 | u ⟨Y.indexEquiv (.inr b'), _⟩ = 0) → u ⟨Y.indexEquiv (.inr b), _⟩ = 0 by |
| 823 | simpa [A, reindex_equiv Y.indexEquiv] using h |
| 824 | by_contra! ⟨a, a_pos, ih, u_ne⟩ |
| 825 | -- `v` is `u` extended by zero, as an adelic vector. |
| 826 | let v : ι → 𝔸 E := toAdele ∘ Finsupp.indicator A (u ⟨·, ·⟩) |
| 827 | have v_ker : x.map toAdele *ᵥ v = 0 := by |
| 828 | simpa [v, A, funext_iff, mulVec_apply_eq_sum, ← map_mul, ← map_sum, sum_dite] using hu |
| 829 | -- At the next index `k`, the shift `T† T` agrees on `v` with `x† x`, which kills `v`; but |
| 830 | -- `(Y.shift *ᵥ v) k` is a nonzero multiple of `u a`. |
| 831 | let k : ι := Y.indexEquiv (.inr ⟨a + 1, by omega⟩) |
| 832 | have shift_eq : |
| 833 | (Y.shift *ᵥ v) k = ((V.formAdjoint V' (x.map toAdele) * x.map toAdele) *ᵥ v) k := by |
| 834 | -- The three conditions of `formAdjoint_mul_self_mulVec_apply_eq_of_survives`: `v` lives in the |
| 835 | -- weights at or above that of `a`. |
| 836 | obtain ⟨hv, hwv, hw_col⟩ : (∀ p : ι, Y.gradeOf p < 1 ⊔ (2 + Y.gradeOf k) → v p = 0) ∧ |
| 837 | (∀ p : ι', (0 : ι' → ℤ) p ≤ Y.gradeOf k ⊔ -1 → (x.map toAdele *ᵥ v) p = 0) ∧ |
| 838 | ∀ (p : ι') (q : ι), (0 : ι' → ℤ) p + Y.gradeOf q ≤ 0 → |
| 839 | x.map toAdele p (Y.stringReversal k) = 0 ∨ v q = 0 := by |
| 840 | rw [v_ker] |
| 841 | simp [v, k, A, reindex_equiv Y.indexEquiv] |
| 842 | exact ⟨fun b hb hb' ↦ ih b hb' (Fin.lt_def.mpr (by omega)), |
| 843 | fun p b hb ↦ Or.inr fun h ↦ absurd h (by omega)⟩ |
| 844 | obtain ⟨h_shift, -⟩ : V.formAdjoint V' (Y.stringMap Y') * Y.stringMap Y' = Y.shift ∧ |
| 845 | (Y'.genericConst = Y.genericConst → Y.stringMap Y' * V.formAdjoint V' (Y.stringMap Y') = |
| 846 | Y'.shift) := |
| 847 | Y.formAdjoint_stringMap_mul_stringMap (Y' := Y') |
| 848 | rw [← h_shift, Y.formAdjoint_mul_self_mulVec_apply_eq_of_survives Y' hx v k hv hwv hw_col] |
| 849 | rw [← mulVec_mulVec, v_ker, mulVec_zero] at shift_eq |
| 850 | simp [shift, v, k, A, mulVec_apply_eq_sum, reindex_equiv Y.indexEquiv, -mul_dite, ← map_mul, |
| 851 | ← map_sum, Fin.val_inj, a_pos] at shift_eq |
| 852 | -- The factor `c`, `-N c` or `-N c²` of the shift, with `c = Y.genericConst`, is nonzero, and so |
| 853 | -- is `u a`. |
| 854 | split_ifs at shift_eq <;> simp [Y.N_ne_zero_and_star_eq.1, Y.genericConst.prop.1, |
| 855 | u_ne] at shift_eq |
| 856 | |
| 857 | /-- Let `w` be a rational map `V → V'`, meaning an adelic matrix coming from a matrix over `E`, that |
| 858 | survives the unipotent twists with target weights `0` (`New.Grading.Survives`). That is, for every |
| 859 | `u` in `Y.unipotent` with `u - 1` of degree at least `2` and `w (u - 1)` of degree at least `1`, |
| 860 | `New.Space.homBicharacter` takes the same value at `(T u, T)` and at `(w u, w)`. Here |
| 861 | `T = Y.stringMap Y'` is the rational map that kills `X` and the last string vector of `V` and sends |
| 862 | each other string vector to a multiple of the same-numbered string vector of `V'`. Then some |
| 863 | rational unitary `δ` of `V'` makes `δ w` (in rational coordinates) agree with `T` at every entry |
| 864 | `(b, a)` where `a` has positive grade and `b` has grade below that of `a` |
| 865 | (`New.Grading.AgreesWithStringMap`). -/ |
| 866 | lemma exists_agreesWithStringMap (w : Matrix ι' ι (𝔸 E)) (hw : w ∈ ratMatrices E ι' ι) |
| 867 | (survives : Y.Survives Y' 0 w) : |
| 868 | ∃ δ ∈ V'.Γ, Y.AgreesWithStringMap Y' (V'.ratCoordMatrix δ * w) := by |
| 869 | -- On the basis vectors of positive weight, `w` and `stringMap` are injective and have the same |
| 870 | -- Gram matrix; Witt's theorem moves one to the other. |
| 871 | obtain ⟨w, rfl⟩ := hw |
| 872 | let A : Finset ι := univ.filter fun a : ι ↦ 0 < Y.gradeOf a |
| 873 | obtain ⟨T₀, hT₀⟩ : ∃ T₀ : Matrix ι' ι E, T₀.map toAdele = Y.stringMap Y' := ⟨_, rfl⟩ |
| 874 | let incl : A → ι := (↑) |
| 875 | -- The Gram matrix of `w` is `V.J * (w† w)`, so `formAdjoint_mul_self_mulVec_apply_eq_of_survives` |
| 876 | -- compares the entries. |
| 877 | have h_gram : (w.submatrix id incl)ᴴ * V'.J * w.submatrix id incl = |
| 878 | (T₀.submatrix id incl)ᴴ * V'.J * T₀.submatrix id incl := by |
| 879 | refine ext fun k i ↦ toAdele.injective ?_ |
| 880 | have gram_adj (y : Matrix ι' ι (𝔸 E)) : |
| 881 | yᴴ * V'.J.map toAdele * y = V.J.map toAdele * (V.formAdjoint V' y * y) := by |
| 882 | simp [formAdjoint, ← Matrix.mul_assoc, mul_eq_one_symm V.map_J_inv_mul_map_J] |
| 883 | have h_gram_entry : ((Y.stringMap Y')ᴴ * V'.J.map toAdele * Y.stringMap Y') k i = |
| 884 | ((w.map toAdele)ᴴ * V'.J.map toAdele * w.map toAdele) k i := by |
| 885 | rw [gram_adj, gram_adj] |
| 886 | -- Both basis vectors have positive weight and the target weights are zero. |
| 887 | have hi : 0 < Y.gradeOf i := (mem_filter.mp i.property).2 |
| 888 | have hk : 0 < Y.gradeOf k := (mem_filter.mp k.property).2 |
| 889 | have h_adj := Y.formAdjoint_mul_self_entry_eq_of_survives Y' survives (i : ι) |
| 890 | (Y.stringReversal k) (by rw [gradeOf_stringReversal]; omega) |
| 891 | (fun p hp ↦ by rw [Pi.zero_apply, gradeOf_stringReversal] at hp; omega) |
| 892 | (fun _ hp ↦ ((not_le_of_gt hi) (by simpa only [Pi.zero_apply, zero_add] using hp)).elim) |
| 893 | -- Row `k` of `V.J * M` is a multiple of the row of `M` dual to `k`. |
| 894 | simpa [Y.gram_eq, map_gradedGram_mul_apply] using |
| 895 | congrArg (fun z ↦ V.J.map toAdele k (Y.stringReversal k) * z) h_adj |
| 896 | simpa [← hT₀, Matrix.mul_apply, incl] using h_gram_entry.symm |
| 897 | -- `T₀` survives trivially, as the two phases are the same. |
| 898 | have hT₀_survives : Y.Survives Y' 0 (T₀.map toAdele) := fun u _ _ ↦ by rw [hT₀] |
| 899 | obtain ⟨g, hg⟩ : ∃ g : U V'.J, |
| 900 | (g : Matrix ι' ι' E) * w.submatrix id incl = T₀.submatrix id incl := |
| 901 | V'.witt (Y.hasLeftInv_submatrix_of_survives Y' survives) |
| 902 | (Y.hasLeftInv_submatrix_of_survives Y' hT₀_survives) h_gram |
| 903 | refine ⟨V'.ratEmbed g, ⟨g, rfl⟩, fun b a a_pos _ ↦ ?_⟩ |
| 904 | have ha_mem : a ∈ A := by simpa [A] using a_pos |
| 905 | have h_entry : toAdele (((g : Matrix ι' ι' E) * w.submatrix id incl) b ⟨a, ha_mem⟩) = |
| 906 | toAdele (T₀.submatrix id incl b ⟨a, ha_mem⟩) := by rw [hg] |
| 907 | simpa [Matrix.mul_apply, ratCoordMatrix, ratEmbed, ← hT₀, incl, U.map] using h_entry |
| 908 | |
| 909 | end New.Grading |
| 910 | |
| 911 | end SurvivingOrbit |