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.Ring.IsFormallyReal |
| 4 | import Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Unitary |
| 5 | import Mathlib.Analysis.Matrix.HermitianFunctionalCalculus |
| 6 | import Mathlib.Topology.Algebra.Group.Units |
| 7 | public import Lib.Shimura.HeckeTower.HeckeData |
| 8 | import Lib.Adelic.Reduction.FiniteVolume |
| 9 | import Lib.General.LinearAlgebra.PartnerAlgebra |
| 10 | import Lib.Shimura.Transfer.MarkedPairs |
| 11 | |
| 12 | /-! |
| 13 | # Trace formula for algebraic forms, finiteness of signed frame classes, the definite side |
| 14 | |
| 15 | This file gives a trace formula for a Hecke operator on a finite-dimensional space of algebraic |
| 16 | forms, computed from class representatives with weights. It also shows that only finitely many |
| 17 | double cosets GL_n(E) x (GU ∩ V), with V an open subgroup, contain a signed frame. These results |
| 18 | serve the definite side of the comparison of traces. There the trace of a regular Hecke element on |
| 19 | forms supported on definite frames is written as a sum over orbits of triples. |
| 20 | |
| 21 | ## Main definitions and results |
| 22 | |
| 23 | * `New.trace_eq_weighted_sum`: the trace of the twisted Hecke operator `T` on a finite-dimensional |
| 24 | space of algebraic forms, from representatives `r i` with weights `w i`. |
| 25 | * `New.Variety.finite_isSignedFrame_classes`: for an open subgroup V, only finitely many double |
| 26 | cosets GL_n(E) x (GU ∩ V) contain a signed frame. |
| 27 | * `New.Variety.definiteForms`: the forms with values in a representation `ξ` of `GL n E` that |
| 28 | are left `GL n E`-equivariant, vanish off the definite frames and are right invariant under the |
| 29 | level. |
| 30 | * `New.Variety.definiteForms.rep`: the action of the Hecke algebra `New.Variety.heckeAlgebra` on it. |
| 31 | * `New.Variety.finite_definiteForms`, `New.Variety.finite_support_countTerm_definite`, |
| 32 | `New.Variety.trace_definiteForms_eq_finsum_countTerm`: finite dimension, finite support and the |
| 33 | trace formula. |
| 34 | |
| 35 | Notions from other files: |
| 36 | * `New.levelSpace π K`: The vectors fixed by the subgroup `K` under the representation `π`; here |
| 37 | `π` is `New.rightRegular`, the action of `G` on functions `G → W` by right translation. |
| 38 | * `New.Variety.GU`: The unitary similitudes: the `g ∈ GL_n(𝔸f E)` with `c • gᴴ g = ε • 1` for some |
| 39 | rational `c > 0` and unit `ε` of `Ẑ`, that is, the frames of the forms `c • 1`. |
| 40 | * `New.Variety.levelGU`: the principal level K(𝔑), the similitudes in `GL_n(Ô E)` that are congruent |
| 41 | to `1` modulo `𝔑`. |
| 42 | * `New.Variety.IsRegularHecke`: a(x⁻¹y⁻¹xK) ≠ 0 forces the characteristic polynomial of `y` to |
| 43 | be separable. |
| 44 | * `New.Variety.IsNeat`: The level 𝔑 is neat: 𝔑 ≠ 0 and, whenever `x` is a signed frame with `ℓ` for |
| 45 | some form (`New.Variety.IsSignedFrame`), every y in GL_n(E) with x⁻¹yx in `levelGU n 𝔑` that fixes |
| 46 | ℓ under `New.Variety.ratConj` equals 1. |
| 47 | |
| 48 | ## Relation to the literature |
| 49 | |
| 50 | Known; see `Lib.Shimura.TraceFormula.MarkedDefiniteSums` and |
| 51 | `Lib.Shimura.Uniformisation.AppellHumbert` for sources. |
| 52 | -/ |
| 53 | |
| 54 | @[expose] public section |
| 55 | |
| 56 | noncomputable section |
| 57 | |
| 58 | /-! |
| 59 | ## Trace of a Hecke operator from weighted class representatives |
| 60 | |
| 61 | The identity of a space `M` of equivariant forms is written as a weighted sum of maps that factor |
| 62 | through `W` by evaluation at representatives `r i`; the trace then moves over to `W`. |
| 63 | -/ |
| 64 | |
| 65 | section TraceFormula |
| 66 | |
| 67 | open Function LinearMap New Finset Variety |
| 68 | |
| 69 | /-- Let `S g` be finite sets of elements of `Γ` with `γ ∈ S g ↔ g⁻¹ * (e γ * r) ∈ K`, empty for |
| 70 | `g ∈ D`. Then for every `v ∈ W` the function `g ↦ ∑ γ ∈ S g, ρ γ v` is equivariant along `e` |
| 71 | (it lies in `ρ.coindV e`), vanishes on `D` and is right `K`-invariant. -/ |
| 72 | private lemma New.pi_sum_apply_mem_coindV_inf_levelSpace {A G Γ W : Type*} [Field A] [Group G] |
| 73 | [Group Γ] [AddCommGroup W] [Module A W] {e : Γ →* G} {ρ : Representation A Γ W} |
| 74 | {K : Subgroup G} {D : Set G} (r : G) (S : G → Finset Γ) |
| 75 | (h_mem_S : ∀ (g : G) (γ : Γ), γ ∈ S g ↔ g⁻¹ * (e γ * r) ∈ K) (h_empty : ∀ g ∈ D, S g = ∅) |
| 76 | (v : W) : |
| 77 | LinearMap.pi (fun g : G ↦ ∑ γ ∈ S g, ρ γ) v ∈ |
| 78 | ρ.coindV e ⊓ Submodule.pi D ⊥ ⊓ levelSpace (rightRegular A G W) K := by |
| 79 | -- equivariance: multiplication by `γ⁻¹` matches `S (e γ * g)` with `S g` |
| 80 | have equivariant (γ : Γ) (g : G) : ∑ δ ∈ S (e γ * g), ρ δ v = ∑ δ ∈ S g, ρ γ (ρ δ v) := |
| 81 | Finset.sum_equiv (.mulLeft γ⁻¹) |
| 82 | (fun δ ↦ by |
| 83 | change δ ∈ S (e γ * g) ↔ γ⁻¹ * δ ∈ S g |
| 84 | rw [h_mem_S, h_mem_S, map_mul, map_inv, mul_inv_rev, mul_assoc, mul_assoc]) |
| 85 | (fun δ _ ↦ by |
| 86 | change ρ δ v = ρ γ (ρ (γ⁻¹ * δ) v) |
| 87 | rw [← mul_apply_eq_comp, ← map_mul, mul_inv_cancel_left]) |
| 88 | have invariant (k : K) (g : G) : S (g * k) = S g := by |
| 89 | ext γ |
| 90 | rw [h_mem_S, h_mem_S, mul_inv_rev, mul_assoc, mul_mem_cancel_left (inv_mem k.property)] |
| 91 | refine ⟨⟨fun γ g ↦ ?_, fun g hg ↦ ?_⟩, fun k ↦ funext fun g ↦ ?_⟩ |
| 92 | · rw [LinearMap.pi_apply, LinearMap.pi_apply, LinearMap.sum_apply, LinearMap.sum_apply, map_sum, |
| 93 | equivariant γ g] |
| 94 | · change (LinearMap.pi fun g ↦ ∑ γ ∈ S g, ρ γ) v g = 0 |
| 95 | rw [LinearMap.pi_apply, h_empty g hg, Finset.sum_empty, LinearMap.zero_apply] |
| 96 | · rw [rightRegular_apply_apply, MonoidHom.one_apply, one_smul, LinearMap.pi_apply, |
| 97 | LinearMap.pi_apply, invariant] |
| 98 | |
| 99 | /-- The trace of one term of the trace formula `New.trace_eq_weighted_sum`. Let `J : W → M` be |
| 100 | linear with `ι (J v) g = ∑ γ ∈ S g, ρ γ v`, where `γ ∈ S g ↔ g⁻¹ * (e γ * r) ∈ K`; let `σ` be an |
| 101 | automorphism of `G` preserving `K`, and let `T` send `F` to the right translate of `s ∘ F ∘ σ⁻¹` by |
| 102 | the group ring element `a`. Then the trace of `T ∘ J ∘ (F ↦ F r) ∘ ι` on `M` is `∑ᶠ γ, cosetFn K a |
| 103 | (r⁻¹ * σ (e γ) * σ r) * trace (s * ρ γ)`. Here `cosetFn K a x` is the sum of the coefficients `a g` |
| 104 | over the `g` with `g K = x K`. -/ |
| 105 | private lemma New.trace_mul_comp_proj_comp_eq_finsum_cosetFn {A G Γ W M : Type*} [Field A] |
| 106 | [Group G] [Group Γ] [AddCommGroup W] [Module A W] [Module.Finite A W] [AddCommGroup M] |
| 107 | [Module A M] [Module.Finite A M] {e : Γ →* G} {ρ : Representation A Γ W} {K : Subgroup G} |
| 108 | (ι : M →ₗ[A] G → W) (r : G) (S : G → Finset Γ) |
| 109 | (h_mem_S : ∀ (g : G) (γ : Γ), γ ∈ S g ↔ g⁻¹ * (e γ * r) ∈ K) |
| 110 | (σ : G ≃* G) (hσ : K.comap (σ : G →* G) = K) |
| 111 | {s : Module.End A W} {a : MonoidAlgebra A G} {T : Module.End A M} |
| 112 | (hT : ∀ ψ : M, |
| 113 | ι (T ψ) = (rightRegular A G W).asAlgebraHom a fun g : G ↦ s (ι ψ (σ.symm g))) |
| 114 | (J : W →ₗ[A] M) (ι_J : ∀ (v : W) (g : G), ι (J v) g = ∑ γ ∈ S g, ρ γ v) : |
| 115 | trace A M (T * J ∘ₗ proj r ∘ₗ ι) = |
| 116 | ∑ᶠ γ : Γ, cosetFn K a (r⁻¹ * σ (e γ) * σ r) * trace A W (s * ρ γ) := by |
| 117 | classical |
| 118 | -- Moved over to `W`, the map is `v ↦ ι (T (J v)) r`, which `hT` computes. |
| 119 | let S' (g : G) : Finset Γ := S (σ.symm (r * g)) |
| 120 | have on_W : |
| 121 | (proj r ∘ₗ ι) ∘ₗ T ∘ₗ J = ∑ g ∈ a.coeff.support, ∑ γ ∈ S' g, a.coeff g • (s * ρ γ) := by |
| 122 | ext v |
| 123 | simp only [LinearMap.comp_apply, proj_apply, hT, asAlgebraHom_eq_sum_support, |
| 124 | LinearMap.sum_apply, LinearMap.smul_apply, Pi.smul_apply, rightRegular_apply_apply, |
| 125 | ι_J, map_sum, mul_apply_eq_comp, smul_sum, S'] |
| 126 | -- `γ` occurs in `S' g` exactly for the `g` of one coset, as `σ` preserves `K`. |
| 127 | have mem_S' (γ : Γ) (g : G) : γ ∈ S' g ↔ (g : G ⧸ K) = (r⁻¹ * σ (e γ) * σ r : G) := by |
| 128 | rw [h_mem_S, ← hσ, Subgroup.mem_comap, hσ, map_mul, map_inv] |
| 129 | change (σ (σ.symm (r * g)))⁻¹ * σ (e γ * r) ∈ K ↔ _ |
| 130 | rw [σ.apply_symm_apply, map_mul, QuotientGroup.eq, mul_inv_rev, mul_assoc, mul_assoc, |
| 131 | ← mul_assoc r⁻¹] |
| 132 | have h_coset (q : G ⧸ K) : |
| 133 | cosetFn K a q = ∑ g ∈ a.coeff.support, if (g : G ⧸ K) = q then a.coeff g else 0 := by |
| 134 | simp [cosetFn, asAlgebraHom_eq_sum_support, Finsupp.single_apply] |
| 135 | calc |
| 136 | trace A M ((T ∘ₗ J) ∘ₗ proj r ∘ₗ ι) = trace A W ((proj r ∘ₗ ι) ∘ₗ T ∘ₗ J) := |
| 137 | trace_comp_comm' _ _ |
| 138 | _ = ∑ x ∈ a.coeff.support.sigma S', a.coeff x.fst * trace A W (s * ρ x.snd) := by |
| 139 | rw [on_W, map_sum, sum_sigma] |
| 140 | refine sum_congr rfl fun g _ ↦ ?_ |
| 141 | rw [map_sum] |
| 142 | exact sum_congr rfl fun γ _ ↦ by rw [map_smul, smul_eq_mul] |
| 143 | _ = ∑ᶠ γ : Γ, cosetFn K a (r⁻¹ * σ (e γ) * σ r) * trace A W (s * ρ γ) := by |
| 144 | -- group the pairs `(g, γ)` by `γ` |
| 145 | rw [← finsum_sum_filter fun x ↦ x.snd] |
| 146 | refine finsum_congr fun γ ↦ ?_ |
| 147 | rw [sum_filter, sum_sigma, h_coset, sum_mul] |
| 148 | refine sum_congr rfl fun g _ ↦ ?_ |
| 149 | rw [Finset.sum_ite_eq'] |
| 150 | simp only [mem_S', ite_mul, zero_mul] |
| 151 | |
| 152 | /-- Let `ι` identify `M` with the `F : G → W` with `F (e γ * g) = ρ γ (F g)`, zero on `D` and right |
| 153 | `K`-invariant, let `γ ∈ S i g` exactly when `g⁻¹ * (e γ * r i) ∈ K`, let `S i g` be empty for `g` |
| 154 | in `D`, and let `∑ i, w i * #(S i g) = 1` for `g` off `D`. Then the functions |
| 155 | `g ↦ ∑ γ ∈ S i g, ρ γ v` lie in the range of `ι`, giving linear maps `J i : W → M`, and the maps |
| 156 | `ψ ↦ J i (ι ψ (r i))`, weighted by `w i`, add up to the identity of `M`. -/ |
| 157 | private lemma New.exists_sum_smul_comp_eq_self {A G Γ W M I : Type*} [Field A] [Group G] |
| 158 | [Group Γ] [AddCommGroup W] [Module A W] [AddCommGroup M] [Module A M] [Fintype I] |
| 159 | {e : Γ →* G} {ρ : Representation A Γ W} {K : Subgroup G} {D : Set G} |
| 160 | (ι : M →ₗ[A] G → W) (hι_injective : Injective ι) |
| 161 | (hι_range : ι.range = ρ.coindV e ⊓ Submodule.pi D ⊥ ⊓ levelSpace (rightRegular A G W) K) |
| 162 | (r : I → G) (w : I → A) (S : I → G → Finset Γ) |
| 163 | (h_mem_S : ∀ (i : I) (g : G) (γ : Γ), γ ∈ S i g ↔ g⁻¹ * (e γ * r i) ∈ K) |
| 164 | (h_empty : ∀ g ∈ D, ∀ i : I, S i g = ∅) |
| 165 | (h_count : ∀ g ∉ D, ∑ i : I, w i * #(S i g) = 1) : |
| 166 | ∃ J : I → W →ₗ[A] M, (∀ (i : I) (v : W) (g : G), ι (J i v) g = ∑ γ ∈ S i g, ρ γ v) ∧ |
| 167 | ∀ ψ : M, ∑ i, w i • J i (ι ψ (r i)) = ψ := by |
| 168 | classical |
| 169 | have mem_range (i : I) (v : W) : pi (fun g ↦ ∑ γ ∈ S i g, ρ γ) v ∈ ι.range := |
| 170 | hι_range.ge (pi_sum_apply_mem_coindV_inf_levelSpace (r i) (S i) (h_mem_S i) |
| 171 | (fun g hg ↦ h_empty g hg i) v) |
| 172 | let J (i : I) : W →ₗ[A] M := |
| 173 | codRestrictOfInjective (pi fun g ↦ ∑ γ ∈ S i g, ρ γ) ι hι_injective (mem_range i) |
| 174 | have ι_J (i : I) (v : W) (g : G) : ι (J i v) g = ∑ γ ∈ S i g, ρ γ v := by simp [J] |
| 175 | refine ⟨J, ι_J, fun ψ ↦ ?_⟩ |
| 176 | refine hι_injective (funext fun g ↦ ?_) |
| 177 | obtain ⟨⟨equivariant, vanishes⟩, invariant⟩ := hι_range.le (mem_range_self ι ψ) |
| 178 | -- Each `γ ∈ S i g` contributes `ρ γ (ι ψ (r i)) = ι ψ (e γ * r i) = ι ψ g`. |
| 179 | have h_rho_apply_eq (i : I) (γ : Γ) (hγ : γ ∈ S i g) : ρ γ (ι ψ (r i)) = ι ψ g := by |
| 180 | rw [← equivariant] |
| 181 | -- right invariance under `k = g⁻¹ * (e γ * r i)`, evaluated at `g` |
| 182 | have h_inv := congrFun (invariant ⟨g⁻¹ * (e γ * r i), (h_mem_S i g γ).mp hγ⟩) g |
| 183 | rwa [rightRegular_apply_apply, Pi.smul_apply, MonoidHom.one_apply, one_smul, |
| 184 | mul_inv_cancel_left] at h_inv |
| 185 | calc |
| 186 | ι (∑ i, w i • J i (ι ψ (r i))) g = (∑ i, w i * #(S i g)) • ι ψ g := by |
| 187 | rw [map_sum, Finset.sum_apply, sum_smul] |
| 188 | refine Finset.sum_congr rfl fun i _ ↦ ?_ |
| 189 | rw [map_smul, Pi.smul_apply, ι_J, Finset.sum_congr rfl fun γ hγ ↦ h_rho_apply_eq i γ hγ, |
| 190 | Finset.sum_const, ← Nat.cast_smul_eq_nsmul A, smul_smul] |
| 191 | _ = ι ψ g := by |
| 192 | by_cases hg : g ∈ D |
| 193 | · rw [show ι ψ g = 0 from vanishes g hg, smul_zero] |
| 194 | · rw [h_count g hg, one_smul] |
| 195 | |
| 196 | /-- Let `ι` identify `M` with the `F : G → W` with `F (e γ * g) = ρ γ (F g)`, zero on `D` and right |
| 197 | `K`-invariant; `T` sends `F` to the right translate of `s ∘ F ∘ σ⁻¹` by `a`, and `σ` preserves `K`. |
| 198 | For points `r i` of `G` and weights `w i` such that `S i g = {γ | e γ * r i ∈ g K}` is empty on `D` |
| 199 | and `∑ i, w i * #(S i g) = 1` off `D`, `M` is finite-dimensional and `tr T` is the sum over `i` of |
| 200 | `w i * ∑ᶠ γ, cosetFn K a ((r i)⁻¹ * σ (e γ) * σ (r i)) * tr (s * ρ γ)`; `cosetFn` = `∑ a_g [gK]`. -/ |
| 201 | lemma New.trace_eq_weighted_sum {A G Γ W M I : Type*} [Field A] [Group G] [Group Γ] |
| 202 | [AddCommGroup W] [Module A W] [Module.Finite A W] [AddCommGroup M] [Module A M] [Fintype I] |
| 203 | {e : Γ →* G} {ρ : Representation A Γ W} {K : Subgroup G} {D : Set G} |
| 204 | (ι : M →ₗ[A] G → W) (hι_injective : Injective ι) |
| 205 | (hι_range : ι.range = ρ.coindV e ⊓ Submodule.pi D ⊥ ⊓ levelSpace (rightRegular A G W) K) |
| 206 | (r : I → G) (w : I → A) (S : I → G → Finset Γ) |
| 207 | (h_mem_S : ∀ (i : I) (g : G) (γ : Γ), γ ∈ S i g ↔ g⁻¹ * (e γ * r i) ∈ K) |
| 208 | (h_empty : ∀ g ∈ D, ∀ i : I, S i g = ∅) |
| 209 | (h_count : ∀ g ∉ D, ∑ i : I, w i * #(S i g) = 1) |
| 210 | (σ : G ≃* G) (hσ : K.comap (σ : G →* G) = K) |
| 211 | {s : Module.End A W} {a : MonoidAlgebra A G} {T : Module.End A M} |
| 212 | (hT : ∀ ψ : M, |
| 213 | ι (T ψ) = (rightRegular A G W).asAlgebraHom a fun g : G ↦ s (ι ψ (σ.symm g))) : |
| 214 | Module.Finite A M ∧ |
| 215 | trace A M T = |
| 216 | ∑ i : I, w i * |
| 217 | ∑ᶠ γ : Γ, cosetFn K a ((r i)⁻¹ * σ (e γ) * σ (r i)) * trace A W (s * ρ γ) := by |
| 218 | classical |
| 219 | -- For `v : W` the function `g ↦ ∑ γ ∈ S i g, ρ γ v` lies in `M`; call it `J i v`. The maps |
| 220 | -- `ψ ↦ J i (ι ψ (r i))`, weighted by `w i`, add up to the identity of `M`. So `M` is a quotient |
| 221 | -- of `I → W`, and the trace of `T` is a weighted sum of traces that can be moved over to `W`. |
| 222 | obtain ⟨J, ι_J, sum_J⟩ := exists_sum_smul_comp_eq_self ι hι_injective hι_range r w S h_mem_S |
| 223 | h_empty h_count |
| 224 | have h_finite : Module.Finite A M := |
| 225 | .of_surjective (lsum A (fun _ : I ↦ W) A J) fun ψ ↦ |
| 226 | ⟨fun i ↦ w i • ι ψ (r i), by |
| 227 | simpa only [lsum_apply, LinearMap.sum_apply, LinearMap.comp_apply, proj_apply, map_smul] |
| 228 | using sum_J ψ⟩ |
| 229 | have T_eq : T = ∑ i, w i • (T * J i ∘ₗ proj (r i) ∘ₗ ι) := by |
| 230 | ext ψ |
| 231 | rw [LinearMap.sum_apply] |
| 232 | simpa only [LinearMap.smul_apply, mul_apply_eq_comp, LinearMap.comp_apply, proj_apply, |
| 233 | map_sum, map_smul] using congrArg T (sum_J ψ).symm |
| 234 | have trace_T : trace A M T = ∑ i, w i * trace A M (T * J i ∘ₗ proj (r i) ∘ₗ ι) := by |
| 235 | conv_lhs => rw [T_eq] |
| 236 | rw [map_sum] |
| 237 | exact Finset.sum_congr rfl fun i _ ↦ by rw [map_smul, smul_eq_mul] |
| 238 | refine ⟨h_finite, trace_T.trans (sum_congr rfl fun i _ ↦ ?_)⟩ |
| 239 | rw [trace_mul_comp_proj_comp_eq_finsum_cosetFn ι (r i) (S i) (h_mem_S i) σ hσ hT (J i) (ι_J i)] |
| 240 | |
| 241 | end TraceFormula |
| 242 | |
| 243 | /-! |
| 244 | ## Finiteness of double cosets carrying signed frames |
| 245 | |
| 246 | An element `x` is a frame for a rational matrix β (`New.Variety.IsFrameFor`) if xᴴ β x is a unit of |
| 247 | Ẑ times the identity. `New.Variety.IsSignedFrame x ℓ` asks for such a β that is positive definite at |
| 248 | all infinite places other than the base place v₀ given by `CMBase E`, and such that β ℓ is positive |
| 249 | definite at v₀. |
| 250 | -/ |
| 251 | |
| 252 | section FiniteClasses |
| 253 | |
| 254 | open Matrix ComplexOrder QuotientGroup Units DoubleCoset Set New.Core |
| 255 | |
| 256 | /-- An invertible self-adjoint complex matrix `B` is congruent to a unitary one: for |
| 257 | `a = √|B⁻¹|`, built by the continuous functional calculus, the matrix `aᴴ B a` is unitary. -/ |
| 258 | lemma New.Variety.exists_star_mul_mul_mem_unitary {n : Type*} [Fintype n] [DecidableEq n] |
| 259 | (B : GL n ℂ) (hB : IsSelfAdjoint B.val) : |
| 260 | ∃ a : GL n ℂ, (star a * B * a).val ∈ unitary (Matrix n n ℂ) := by |
| 261 | -- The spectrum of `B` is finite, real and misses `0`, so every function on it is continuous, and |
| 262 | -- `aᴴ B a` is the function `x / |x| = ±1` of `B`. |
| 263 | have h_root_ne_zero : ∀ x ∈ spectrum ℝ B.val, √|x⁻¹| ≠ 0 := fun x hx ↦ |
| 264 | Real.sqrt_ne_zero'.mpr (abs_pos.mpr (inv_ne_zero fun h ↦ zero_notMem_spectrum ℝ B (h ▸ hx))) |
| 265 | have h_sq_one : ∀ x ∈ spectrum ℝ B.val, |
| 266 | star (√|x⁻¹| * x * √|x⁻¹|) * (√|x⁻¹| * x * √|x⁻¹|) = 1 := fun x hx ↦ by |
| 267 | have hx0 : x ≠ 0 := fun h ↦ zero_notMem_spectrum ℝ B (h ▸ hx) |
| 268 | rw [star_trivial, mul_right_comm _ x, Real.mul_self_sqrt (abs_nonneg _), ← sq, mul_pow, |
| 269 | sq_abs, inv_pow, inv_mul_cancel₀ (pow_ne_zero 2 hx0)] |
| 270 | let a : GL n ℂ := cfcUnits (fun x : ℝ ↦ √|x⁻¹|) B h_root_ne_zero |
| 271 | -- `a` is self-adjoint, so `aᴴ B a` is the function `√|x⁻¹| * x * √|x⁻¹|` of `B`. |
| 272 | have h_conj_eq : (star a * B * a).val = cfc (fun x : ℝ ↦ √|x⁻¹| * x * √|x⁻¹|) B.val := by |
| 273 | simp [a, star_trivial, cfc_mul, cfc_id', ← cfc_star, finite_real_spectrum.continuousOn, hB] |
| 274 | exact ⟨a, by rwa [h_conj_eq, cfc_unitary_iff _ B.val]⟩ |
| 275 | |
| 276 | /-- There is a compact set `B` of adelic matrices such that every frame `x` for an invertible |
| 277 | rational form `J` (that is, `xᴴ J x` is a unit of `Ẑ` times `1`) can be completed by archimedean |
| 278 | components `a` to an adelic matrix `g = (a, x)` whose Gram matrix `gᴴ J g` lies in `B`. -/ |
| 279 | private lemma New.Variety.exists_isCompact_gram_mkAdelicGL_mem (E n : Type) [Field E] [CMBase E] |
| 280 | [Fintype n] [DecidableEq n] : |
| 281 | ∃ B : Set (GL n (𝔸 E)), IsCompact B ∧ |
| 282 | ∀ (J : GL n E) (x : GL n (𝔸f E)), IsFrameFor J.val x → |
| 283 | ∃ a : NumberField.InfinitePlace E → GL n ℂ, |
| 284 | star (mkAdelicGL (a, x)) * .map toAdele J * mkAdelicGL (a, x) ∈ B := by |
| 285 | -- `B` consists of the `g` such that `g` and `g⁻¹` have entries that are integral and of norm at |
| 286 | -- most `1` at infinity. |
| 287 | let box : Set (Matrix n n (𝔸 E)) := |
| 288 | (Metric.closedBall (0 : NumberField.InfinitePlace E → ℂ) 1 ×ˢ (Ô E : Set (𝔸f E))).matrix |
| 289 | have h_box : IsCompact box := isCompact_closedBall_prod_integral.matrix |
| 290 | refine ⟨embedProduct (Matrix n n (𝔸 E)) ⁻¹' (box ×ˢ (MulOpposite.op '' box)), |
| 291 | isClosedEmbedding_embedProduct.isCompact_preimage |
| 292 | (h_box.prod (h_box.image_of_continuous MulOpposite.op)), fun J x h_frame ↦ ?_⟩ |
| 293 | -- Choose `a` making `J` unitary. The Gram matrix is then unitary at infinity and a unit scalar |
| 294 | -- at the finite places. |
| 295 | have h_unitary (w : NumberField.InfinitePlace E) : |
| 296 | ∃ a : GL n ℂ, star a.val * J.val.map (Φ w) * a.val ∈ unitary (Matrix n n ℂ) := by |
| 297 | simpa using exists_star_mul_mul_mem_unitary (.map (Φ w) J) h_frame.isHermitian_map |
| 298 | choose a ha using h_unitary |
| 299 | obtain ⟨ν, hν⟩ : ∃ ν : (Ô ℚ)ˣ, |
| 300 | x.valᴴ * J.val.map (algebraMap E (𝔸f E)) * x.val = finAdeleIncl ℚ E ν • 1 := h_frame |
| 301 | let u : NumberField.InfinitePlace E → GL n ℂ := fun w ↦ Unitary.toUnits ⟨_, ha w⟩ |
| 302 | let s (d : (Ô ℚ)ˣ) : GL n (𝔸f E) := |
| 303 | d.map ((finAdeleIncl ℚ E).domRestrict (Ô ℚ)).toMonoidHom • (1 : GL n (𝔸f E)) |
| 304 | let g₀ : GL n (𝔸 E) := mkAdelicGL (u, s ν) |
| 305 | have h_gram : star (mkAdelicGL (a, x)) * .map toAdele J * mkAdelicGL (a, x) = g₀ := by |
| 306 | refine ext (matrix_ext_𝔸 (fun w ↦ ?_) ?_) |
| 307 | · push_cast [Matrix.map_mul] |
| 308 | rfl |
| 309 | · push_cast [Matrix.map_mul] |
| 310 | exact hν |
| 311 | use a |
| 312 | rw [h_gram] |
| 313 | have h_mem_box (v : NumberField.InfinitePlace E → GL n ℂ) |
| 314 | (hv : ∀ w, (v w).val ∈ unitary (Matrix n n ℂ)) (d : (Ô ℚ)ˣ) : |
| 315 | (mkAdelicGL (v, s d)).val ∈ box := by |
| 316 | intro i j |
| 317 | refine ⟨?_, ?_⟩ |
| 318 | · rw [mem_closedBall_zero_iff, pi_norm_le_iff_of_nonneg zero_le_one] |
| 319 | intro w |
| 320 | exact entry_norm_bound_of_unitary (hv w) i j |
| 321 | · change (s d).val i j ∈ Ô E |
| 322 | dsimp only [s] |
| 323 | rw [Units.val_smul, Units.val_one, Matrix.smul_apply, Matrix.one_apply] |
| 324 | split_ifs |
| 325 | · rw [Units.smul_def, smul_eq_mul, mul_one] |
| 326 | exact (adeleMap_mem_Ô (algebraMap ℚ E)).mpr d.val.prop |
| 327 | · rw [smul_zero] |
| 328 | exact zero_mem (Ô E) |
| 329 | have hs_inv : (s ν)⁻¹ = s ν⁻¹ := by |
| 330 | refine (eq_inv_of_mul_eq_one_left (Units.ext ?_)).symm |
| 331 | dsimp only [s] |
| 332 | rw [Units.val_mul, Units.val_smul, Units.val_smul, Units.val_one, Units.smul_def, |
| 333 | Units.smul_def, smul_mul_smul_comm, ← Units.val_mul, ← map_mul, inv_mul_cancel, map_one, |
| 334 | Units.val_one, one_smul, mul_one] |
| 335 | have h_inv : g₀⁻¹ = mkAdelicGL (u⁻¹, s ν⁻¹) := by |
| 336 | rw [← map_inv, Prod.inv_mk, hs_inv] |
| 337 | refine ⟨h_mem_box u ha ν, _, ?_, congrArg (fun g ↦ MulOpposite.op g.val) h_inv.symm⟩ |
| 338 | refine h_mem_box u⁻¹ (fun w ↦ ?_) ν⁻¹ |
| 339 | rw [Pi.inv_apply] |
| 340 | dsimp only [u] |
| 341 | rw [← map_inv] |
| 342 | exact (⟨_, ha w⟩⁻¹ : unitary (Matrix n n ℂ)).property |
| 343 | |
| 344 | /-- If `r` and `y` are frames for the same rational form `β` and lie in one coset of `V`, then |
| 345 | `r` and `Y y`, for `Y` in `GL_n(E)`, lie in one double coset `GL_n(E) r (GU E n ⊓ V)`. -/ |
| 346 | private lemma New.Variety.doubleCoset_mk_eq_of_isFrameFor {E n : Type} [Field E] [CMBase E] |
| 347 | [Fintype n] [DecidableEq n] {V : Subgroup (GL n (𝔸f E))} {β : Matrix n n E} |
| 348 | {r y : GL n (𝔸f E)} (hr : IsFrameFor β r) (hy : IsFrameFor β y) |
| 349 | (h_coset : (r : GL n (𝔸f E) ⧸ V) = (y : GL n (𝔸f E) ⧸ V)) (Y : GL n E) : |
| 350 | DoubleCoset.mk toFinGL.range (GU E n ⊓ V) r = |
| 351 | DoubleCoset.mk toFinGL.range (GU E n ⊓ V) (toFinGL Y * y) := by |
| 352 | have h_GU : r⁻¹ * y ∈ GU E n := ⟨1, one_pos, hr.mul_iff.mp (by simpa using hy)⟩ |
| 353 | have h_V : r⁻¹ * y ∈ V := QuotientGroup.eq.mp h_coset |
| 354 | exact (DoubleCoset.eq ..).mpr ⟨toFinGL Y, ⟨Y, rfl⟩, r⁻¹ * y, ⟨h_GU, h_V⟩, by simp [mul_assoc]⟩ |
| 355 | |
| 356 | /-- Let `V` be an open subgroup of `GL_n(𝔸f E)`. The elements `x` that are signed frames for some |
| 357 | complex matrix `ℓ` (`New.Variety.IsSignedFrame`: `x` is a frame for some form `β` over `E` with |
| 358 | positivity conditions) lie in finitely many double cosets `GL_n(E) x (GU E n ⊓ V)`. Here `GU E n` is |
| 359 | the unitary similitudes `g` with `gᴴ g` a scalar finite idele of `ℚ`, and `GL_n(E)` acts on the left |
| 360 | through its diagonal embedding `toFinGL`. -/ |
| 361 | lemma New.Variety.finite_isSignedFrame_classes {E n : Type} [Field E] [CMBase E] [Fintype n] |
| 362 | [DecidableEq n] {V : Subgroup (GL n (𝔸f E))} (hV : V.IsOpen) : |
| 363 | (DoubleCoset.mk toFinGL.range (GU E n ⊓ V) '' |
| 364 | {x : GL n (𝔸f E) | ∃ ℓ : Matrix n n ℂ, IsSignedFrame x ℓ}).Finite := by |
| 365 | -- Mahler's criterion moves a frame by a rational matrix so that its form lies in a finite set |
| 366 | -- `F`, and the frame lies in a compact set, which meets finitely many cosets of `V`. Two frames |
| 367 | -- for one form in one coset of `V` differ by an element of `GU E n ⊓ V`. `rep β q` is a frame |
| 368 | -- for `β` in the coset `q`, if there is one. |
| 369 | let rep (β : Matrix n n E) (q : GL n (𝔸f E) ⧸ V) : GL n (𝔸f E) := |
| 370 | Classical.epsilon fun x : GL n (𝔸f E) ↦ IsFrameFor β x ∧ (x : GL n (𝔸f E) ⧸ V) = q |
| 371 | obtain ⟨B, hB, h_gram_mem⟩ := exists_isCompact_gram_mkAdelicGL_mem E n |
| 372 | obtain ⟨F, C, Cf, hF, -, hCf, h_mahler⟩ := exists_isBoundedDualBasis hB |
| 373 | refine (hF.image2 (fun β q ↦ ⟦rep β q⟧) (finite_quotient_image_of_isCompact hV hCf)).subset ?_ |
| 374 | -- `x` is a signed frame for the rational form `J₀` |
| 375 | rintro _ ⟨x, ⟨_ℓ, J₀, h_frame, h_sig⟩, rfl⟩ |
| 376 | -- The form `J₀` is positive definite at a place `v ≠ v₀`, so it is an invertible matrix `J`. |
| 377 | obtain ⟨v, hv⟩ : ∃ v : NumberField.InfinitePlace E, v ≠ v₀ := exists_ne v₀ |
| 378 | have h_pos : (J₀.map (Φ v)).PosDef := by simpa [hv] using h_sig v |
| 379 | obtain ⟨J, rfl⟩ : IsUnit J₀ := isUnit_of_mapMatrix _ h_pos.isUnit |
| 380 | -- Mahler's criterion applies to the adelic frame `g = (a, x)`, whose Gram matrix lies in `B`. |
| 381 | obtain ⟨a, ha⟩ := h_gram_mem J x h_frame |
| 382 | let g : GL n (𝔸 E) := mkAdelicGL (a, x) |
| 383 | obtain ⟨Z, s, hZ⟩ : ∃ (Z : GL n E) (s : Finset n), IsBoundedDualBasis F C Cf J g Z s := |
| 384 | h_mahler J g ha |
| 385 | -- As `Zᴴ J Z` is positive definite at `v`, no vector of `Z` is isotropic, so `s = ∅`. |
| 386 | have h_conj : ((Z.val.map (Φ v))ᴴ * J.val.map (Φ v) * Z.val.map (Φ v)).PosDef := |
| 387 | (Z.map (Φ v)).isUnit.posDef_star_left_conjugate_iff.mpr h_pos |
| 388 | obtain rfl : s = ∅ := by |
| 389 | refine Finset.eq_empty_of_forall_notMem fun i hi ↦ (h_conj.diag_pos (i := i)).ne' ?_ |
| 390 | have h0 := congrArg (Φ v) (hZ.isotropic i hi i hi) |
| 391 | rw [map_zero] at h0 |
| 392 | have h_mat : (Z.valᴴ * J.val * Z.val).map (Φ v) = |
| 393 | (Z.val.map (Φ v))ᴴ * J.val.map (Φ v) * Z.val.map (Φ v) := by |
| 394 | rw [← RingHom.mapMatrix_apply, map_mul, map_mul, RingHom.mapMatrix_apply, |
| 395 | RingHom.mapMatrix_apply, RingHom.mapMatrix_apply, |
| 396 | conjTranspose_map _ (map_star_complex (Φ v))] |
| 397 | exact (congr_fun₂ h_mat i i).symm.trans h0 |
| 398 | -- With the dual basis `Y`, `y = Y⁻¹ x` lies in `Cf` and is a frame for the form `β ∈ F`, and so |
| 399 | -- is the representative `r = rep β y` of its coset. |
| 400 | let Y : GL n E := formDual J Z |
| 401 | let β : Matrix n n E := Y.valᴴ * J.val * Y.val |
| 402 | let y : GL n (𝔸f E) := toFinGL Y⁻¹ * x |
| 403 | have hβ_mem : β ∈ F := by simpa [formDualOff, projectionOff] using hZ.gram_mem |
| 404 | have h_finite_part : finitePartGL (Y⁻¹.map toAdele * g) = y := by |
| 405 | dsimp only [finitePartGL] |
| 406 | rw [map_mul] |
| 407 | exact congrArg₂ (· * ·) (Units.ext (Matrix.ext fun _ _ ↦ rfl)) |
| 408 | (Units.ext (Matrix.ext fun _ _ ↦ rfl)) |
| 409 | have hy_mem : y ∈ Cf := by |
| 410 | rw [← h_finite_part] |
| 411 | exact hZ.finitePart_mem |
| 412 | have hy : IsFrameFor β y := (IsFrameFor.conj_iff y Y).mpr (by simpa [y] using h_frame) |
| 413 | obtain ⟨hr, hr_coset⟩ : |
| 414 | IsFrameFor β (rep β y) ∧ (rep β y : GL n (𝔸f E) ⧸ V) = (y : GL n (𝔸f E) ⧸ V) := |
| 415 | Classical.epsilon_spec (p := fun x ↦ IsFrameFor β x ∧ (x : GL n (𝔸f E) ⧸ V) = y) ⟨y, hy, rfl⟩ |
| 416 | -- `x = Y y`, so `x` and `r` lie in one double coset. |
| 417 | refine ⟨β, hβ_mem, y, ⟨y, hy_mem, rfl⟩, ?_⟩ |
| 418 | have hx : x = toFinGL Y * y := by simp [y] |
| 419 | rw [hx] |
| 420 | exact doubleCoset_mk_eq_of_isFrameFor hr hy hr_coset Y |
| 421 | |
| 422 | end FiniteClasses |
| 423 | |
| 424 | /-! |
| 425 | ## Definite forms, their Hecke action and their trace |
| 426 | |
| 427 | Conventions: `New.Variety.IsSignedFrame x 1` says that `x` is a frame for a rational form that is |
| 428 | positive definite at every infinite place (a definite frame). |
| 429 | -/ |
| 430 | |
| 431 | section DefiniteTrace |
| 432 | |
| 433 | open Set DoubleCoset Quotient Submodule |
| 434 | |
| 435 | open scoped NumberField |
| 436 | |
| 437 | namespace New.Variety |
| 438 | |
| 439 | variable {E : Type} [Field E] [CMBase E] {n : Type} [Fintype n] [DecidableEq n] (𝔑 : 𝓞 E) {W : Type} |
| 440 | [AddCommGroup W] [Module ℂ W] (ξ : Representation ℂ (GL n E) W) |
| 441 | |
| 442 | /-- Forms on the definite frames: the functions `φ` from `GL n` of the finite adeles to `W` |
| 443 | such that `φ (y x) = ξ y (φ x)` for `y` in `GL n E`; `φ x = 0` unless |
| 444 | `New.Variety.IsSignedFrame x 1` holds, that is, unless `x` is a frame for a totally positive |
| 445 | definite rational form (the submodule `pi S ⊥` asks for vanishing on `S`); and `φ (x k) = φ x` |
| 446 | for `k` in the principal level `levelGU n 𝔑`. -/ |
| 447 | abbrev definiteForms : Submodule ℂ (GL n (𝔸f E) → W) := |
| 448 | -- left equivariance under `GL n E` |
| 449 | ξ.coindV toFinGL ⊓ |
| 450 | -- vanishing at every `x` that is not a definite frame |
| 451 | Submodule.pi {x : GL n (𝔸f E) | ¬IsSignedFrame x 1} ⊥ ⊓ |
| 452 | -- right invariance under the level |
| 453 | levelSpace (rightRegular ℂ (GL n (𝔸f E)) W) (levelGU n 𝔑) |
| 454 | |
| 455 | /-- The action of the Hecke algebra of level `𝔑` on definite forms by right translation. Its |
| 456 | elements `a` are supported on `GUPlus E n`, and their coset function is left |
| 457 | `levelGU n 𝔑`-invariant. -/ |
| 458 | def definiteForms.rep : Representation ℂ (heckeAlgebra n ℂ 𝔑) (definiteForms 𝔑 ξ) := |
| 459 | Representation.subrepresentation |
| 460 | ((rightRegular ℂ (GL n (𝔸f E)) W).asAlgebraHom.comp (heckeAlgebra n ℂ 𝔑).val).toMonoidHom |
| 461 | (definiteForms 𝔑 ξ) fun a φ hφ ↦ by |
| 462 | -- `a` is supported on `GUPlus E n` (`ha_span`) and its coset function is left |
| 463 | -- `K`-invariant (`ha_fixed`). |
| 464 | obtain ⟨ha_span, ha_fixed⟩ := a.prop |
| 465 | obtain ⟨hφ_equivariant_support, hφ_level⟩ := hφ |
| 466 | change (rightRegular ℂ (GL n (𝔸f E)) W).asAlgebraHom a.val φ ∈ definiteForms 𝔑 ξ |
| 467 | refine ⟨?_, ?_⟩ |
| 468 | · -- Equivariance and support are preserved by each right translation by an element of |
| 469 | -- `GUPlus`, hence by their linear combinations. |
| 470 | refine (comap ((rightRegular ℂ (GL n (𝔸f E)) W).asAlgebraHom.toLinearMap.flip φ) |
| 471 | (ξ.coindV toFinGL ⊓ Submodule.pi {x : GL n (𝔸f E) | ¬IsSignedFrame x 1} ⊥)).span_le.mpr |
| 472 | ?_ ha_span |
| 473 | rintro _ ⟨g, hg, rfl⟩ |
| 474 | have h_act (x : GL n (𝔸f E)) : |
| 475 | ((rightRegular ℂ (GL n (𝔸f E)) W).asAlgebraHom.toLinearMap.flip φ) |
| 476 | (MonoidAlgebra.of ℂ _ g) x = φ (x * g) := by |
| 477 | change (rightRegular ℂ (GL n (𝔸f E)) W).asAlgebraHom (MonoidAlgebra.single g 1) φ x = _ |
| 478 | rw [Representation.asAlgebraHom_single_one] |
| 479 | rfl |
| 480 | refine ⟨fun γ x ↦ ?_, fun x hx ↦ ?_⟩ |
| 481 | · rw [h_act, h_act, mul_assoc] |
| 482 | exact hφ_equivariant_support.1 γ (x * g) |
| 483 | · rw [h_act] |
| 484 | have h_not : ¬IsSignedFrame (x * g) 1 := by |
| 485 | rw [isSignedFrame_mul_iff (x := x) (ℓ := 1) 1 hg.1, map_one, one_mul, ratConj, map_one, |
| 486 | map_one, one_smul] |
| 487 | exact hx |
| 488 | exact hφ_equivariant_support.2 (x * g) h_not |
| 489 | · have h_lev := ha_fixed hφ_level |
| 490 | rwa [MonoidHom.comp_id] at h_lev |
| 491 | |
| 492 | variable (n) in |
| 493 | /-- The definite classes: the double cosets `GL n E \ GL n (𝔸f E) / K`, with `K = levelGU n 𝔑`, |
| 494 | whose chosen representative is a definite frame. -/ |
| 495 | abbrev DefiniteClass : Type := |
| 496 | {c : DoubleCosets toFinGL.range (levelGU n 𝔑) // IsSignedFrame c.out 1} |
| 497 | |
| 498 | end New.Variety |
| 499 | |
| 500 | namespace New.Variety |
| 501 | |
| 502 | variable {E : Type} [Field E] [CMBase E] {n : Type} [Fintype n] [DecidableEq n] {𝔑 : 𝓞 E} {W : Type} |
| 503 | [AddCommGroup W] [Module ℂ W] (ξ : Representation ℂ (GL n E) W) |
| 504 | |
| 505 | private lemma mem_GU_of_mem_levelGU {k : GL n (𝔸f E)} (hk : k ∈ levelGU n 𝔑) : k ∈ GU E n := |
| 506 | levelGU_le_GU hk |
| 507 | |
| 508 | /-- At a neat level `𝔑` there are only finitely many definite classes. -/ |
| 509 | lemma finite_definiteClass (hN : IsNeat n 𝔑) : Finite (DefiniteClass n 𝔑) := by |
| 510 | -- The definite classes are among the classes of signed frames, which are finitely many. |
| 511 | have h_classes_finite : (DoubleCoset.mk toFinGL.range (levelGU n 𝔑) '' |
| 512 | {x : GL n (𝔸f E) | ∃ ℓ : Matrix n n ℂ, IsSignedFrame x ℓ}).Finite := |
| 513 | finite_isSignedFrame_classes (isOpen_congruenceGL_span hN.ne_zero) |
| 514 | have h_fin : {c : DoubleCosets toFinGL.range (levelGU n 𝔑) | IsSignedFrame c.out 1}.Finite := |
| 515 | h_classes_finite.subset fun c hc ↦ ⟨c.out, ⟨1, hc⟩, c.out_eq⟩ |
| 516 | have := h_fin.to_subtype |
| 517 | exact Finite.of_equiv _ (Equiv.subtypeEquivRight fun _ ↦ Set.mem_ofPred_eq.to_iff) |
| 518 | |
| 519 | namespace DefiniteClass |
| 520 | |
| 521 | /-- The chosen representative `x_j` of the definite class `j`. -/ |
| 522 | def frame (j : DefiniteClass n 𝔑) : GL n (𝔸f E) := j.val.out |
| 523 | |
| 524 | /-- The representative of a definite class is a definite frame. -/ |
| 525 | lemma isSignedFrame_frame (j : DefiniteClass n 𝔑) : IsSignedFrame j.frame 1 := j.property |
| 526 | |
| 527 | /-- The coset `y x_j K`. -/ |
| 528 | def coset (j : DefiniteClass n 𝔑) (y : GL n E) : GL n (𝔸f E) ⧸ levelGU n 𝔑 := |
| 529 | QuotientGroup.mk (toFinGL y * j.frame) |
| 530 | |
| 531 | /-- The coset `y x_j K` is `g K` if and only if `g⁻¹ y x_j` lies in `K = levelGU n 𝔑`. -/ |
| 532 | lemma coset_eq_mk_iff {j : DefiniteClass n 𝔑} {y : GL n E} {g : GL n (𝔸f E)} : |
| 533 | j.coset y = QuotientGroup.mk g ↔ g⁻¹ * (toFinGL y * j.frame) ∈ levelGU n 𝔑 := |
| 534 | eq_comm.trans QuotientGroup.eq |
| 535 | |
| 536 | /-- At a neat level the coset `y x_j K` determines the class `j` and the rational matrix `y`. -/ |
| 537 | lemma eq_and_eq_of_coset_eq (hN : IsNeat n 𝔑) {i j : DefiniteClass n 𝔑} {y z : GL n E} |
| 538 | (h_coset : i.coset y = j.coset z) : i = j ∧ y = z := by |
| 539 | have h_mem : i.frame⁻¹ * toFinGL (y⁻¹ * z) * j.frame ∈ levelGU n 𝔑 := by |
| 540 | have h := QuotientGroup.eq.mp h_coset |
| 541 | rwa [mul_inv_rev, ← map_inv, mul_assoc, ← mul_assoc (toFinGL y⁻¹), ← map_mul, |
| 542 | ← mul_assoc] at h |
| 543 | -- By neatness only `1` fixes the coset of a definite frame. |
| 544 | have h_free (γ : GL n E) (hγ : j.frame⁻¹ * toFinGL γ * j.frame ∈ levelGU n 𝔑) : γ = 1 := |
| 545 | hN.eq_one_of_mem_levelGU j.isSignedFrame_frame hγ (by rw [ratConj, smul_one]) |
| 546 | obtain ⟨h_class, h_one⟩ : i.val = j.val ∧ y⁻¹ * z = 1 := |
| 547 | eq_and_eq_one_of_doubleCoset_rep out_eq h_free (y⁻¹ * z) h_mem |
| 548 | exact ⟨Subtype.ext h_class, inv_mul_eq_one.mp h_one⟩ |
| 549 | |
| 550 | /-- The definite frames are the elements of the cosets `y x_j K`. -/ |
| 551 | lemma isSignedFrame_one_iff (g : GL n (𝔸f E)) : |
| 552 | IsSignedFrame g 1 ↔ |
| 553 | ∃ (j : DefiniteClass n 𝔑) (y : GL n E), j.coset y = QuotientGroup.mk g := by |
| 554 | refine ⟨fun hg ↦ ?_, ?_⟩ |
| 555 | · obtain ⟨c, y, k, rfl⟩ := exists_eq_map_mul_rep_mul toFinGL (levelGU n 𝔑) out_eq g |
| 556 | -- Here `g = y x k` with `x = c.out`; moving it by `y⁻¹` and `k⁻¹` gives `x`. |
| 557 | have hc : IsSignedFrame c.out 1 := by |
| 558 | simpa only [ratConj, smul_one, map_inv, mul_assoc, mul_inv_cancel, mul_one, |
| 559 | inv_mul_cancel_left] using hg.mul y⁻¹ (inv_mem (mem_GU_of_mem_levelGU k.prop)) |
| 560 | exact ⟨⟨c, hc⟩, y, (QuotientGroup.mk_mul_of_mem _ k.prop).symm⟩ |
| 561 | · rintro ⟨j, y, h_coset⟩ |
| 562 | -- `g = y x_j k⁻¹` with `k = g⁻¹ y x_j` in the level. |
| 563 | have h_mem : g⁻¹ * (toFinGL y * j.frame) ∈ levelGU n 𝔑 := coset_eq_mk_iff.mp h_coset |
| 564 | simpa only [ratConj, smul_one, mul_inv_rev, inv_inv, mul_assoc, mul_inv_cancel_left] using |
| 565 | j.isSignedFrame_frame.mul y (inv_mem (mem_GU_of_mem_levelGU h_mem)) |
| 566 | |
| 567 | /-- The orbit under `GL n E` of the marked triple `(x_j K, y⁻¹, μ)`. A triple is a coset of |
| 568 | `levelGU n 𝔑`, an element of `GL n E` and an index in `n`; `γ` sends `(x K, z, μ)` to |
| 569 | `(γ x K, γ z γ⁻¹, μ)`. -/ |
| 570 | def orbit : DefiniteClass n 𝔑 × GL n E × n → |
| 571 | MulAction.orbitRel.Quotient (GL n E) (MarkedTriple (levelGU n 𝔑) n) := |
| 572 | fun (j, y, μ) ↦ ⟦(QuotientGroup.mk j.frame, y⁻¹, μ)⟧ |
| 573 | |
| 574 | /-- At a neat level distinct triples `(j, y, μ)` give distinct orbits `orbit (j, y, μ)`. -/ |
| 575 | lemma orbit_injective (hN : IsNeat n 𝔑) : (orbit (n := n) (𝔑 := 𝔑)).Injective := by |
| 576 | rintro ⟨i, y, μ⟩ ⟨j, z, ν⟩ h_orbit |
| 577 | -- `hγ` says `γ • (x_j K, z⁻¹, ν) = (x_i K, y⁻¹, μ)`. |
| 578 | obtain ⟨γ, hγ⟩ := Quotient.exact h_orbit |
| 579 | -- `γ` moves `x_j K` to `x_i K`, so `i = j` and `γ = 1`. |
| 580 | have h_coset : j.coset γ = i.coset 1 := (congrArg Prod.fst hγ).trans (by simp [coset]) |
| 581 | obtain ⟨rfl, rfl⟩ := eq_and_eq_of_coset_eq hN h_coset |
| 582 | have h_marks : (1 * z⁻¹ * 1⁻¹, ν) = (y⁻¹, μ) := congrArg Prod.snd hγ |
| 583 | obtain ⟨rfl, rfl⟩ : z = y ∧ ν = μ := by simpa using h_marks |
| 584 | rfl |
| 585 | |
| 586 | variable (a : heckeAlgebra n ℂ 𝔑) (w : Polynomial E → n → ℂ) |
| 587 | |
| 588 | /-- The definite term of the orbit of `(x_j K, y⁻¹, μ)`: the coefficient of `a` at `x_j⁻¹ y x_j K` |
| 589 | times the weight `w` at the characteristic polynomial of `y⁻¹` and `μ`. -/ |
| 590 | lemma countTerm_orbit (j : DefiniteClass n 𝔑) (y : GL n E) (μ : n) : |
| 591 | countTerm False a w (orbit (j, y, μ)) = |
| 592 | heckeCosetFn a (j.frame⁻¹ * toFinGL y * j.frame) * w (y⁻¹).val.charpoly μ := by |
| 593 | simp [orbit, countTerm_mk, eigenReflection, j.isSignedFrame_frame, mul_assoc] |
| 594 | |
| 595 | /-- An orbit with a nonzero definite term is the orbit of some `(x_j K, y⁻¹, μ)`. -/ |
| 596 | lemma support_countTerm_subset_range_orbit : (countTerm False a w).support ⊆ range orbit := by |
| 597 | rintro ⟨⟨x⟩, y, μ⟩ (h_ne : countTerm False a w ⟦(QuotientGroup.mk x, y, μ)⟧ ≠ 0) |
| 598 | have hx : IsSignedFrame x 1 := by |
| 599 | by_contra hx |
| 600 | simp [countTerm_mk, eigenReflection, hx] at h_ne |
| 601 | -- If `x K = γ x_j K`, then `γ⁻¹` moves the triple to one with first entry `x_j K`. |
| 602 | obtain ⟨j, γ, h_coset⟩ := (isSignedFrame_one_iff (𝔑 := 𝔑) x).mp hx |
| 603 | have h_mem : (toFinGL γ⁻¹ * x)⁻¹ * j.frame ∈ levelGU n 𝔑 := by |
| 604 | simpa [mul_assoc] using coset_eq_mk_iff.mp h_coset |
| 605 | exact ⟨(j, (γ⁻¹ * y * γ)⁻¹, μ), sound ⟨γ⁻¹, Prod.ext (QuotientGroup.eq.mpr h_mem) rfl⟩⟩ |
| 606 | |
| 607 | end DefiniteClass |
| 608 | |
| 609 | open DefiniteClass |
| 610 | |
| 611 | /-- At a neat level only finitely many orbits of triples have a nonzero definite term |
| 612 | `countTerm False a w` (the flag `False` selects the orbits whose frame is definite). -/ |
| 613 | lemma finite_support_countTerm_definite (hN : IsNeat n 𝔑) (a : heckeAlgebra n ℂ 𝔑) |
| 614 | (w : Polynomial E → n → ℂ) : (countTerm False a w).support.Finite := by |
| 615 | have h_finite_classes : Finite (DefiniteClass n 𝔑) := finite_definiteClass hN |
| 616 | -- For each `j` the cosets `x_j⁻¹ y x_j K` are distinct, so only finitely many of them lie in the |
| 617 | -- finite support of `heckeCosetFn a`. |
| 618 | have h_fibre (j : DefiniteClass n 𝔑) : |
| 619 | {y : GL n E | heckeCosetFn a (j.frame⁻¹ * toFinGL y * j.frame) ≠ 0}.Finite := by |
| 620 | refine (heckeCosetFn a).hasFiniteSupport.preimage fun y _ z _ hyz ↦ ?_ |
| 621 | have h_coset : j.coset y = j.coset z := QuotientGroup.eq.mpr <| by |
| 622 | have h_mem := QuotientGroup.eq.mp hyz |
| 623 | rwa [mul_inv_rev, mul_inv_rev, inv_inv, mul_assoc, mul_assoc (toFinGL y)⁻¹, |
| 624 | mul_assoc j.frame⁻¹, mul_inv_cancel_left, ← mul_assoc, ← mul_inv_rev] at h_mem |
| 625 | exact (eq_and_eq_of_coset_eq hN h_coset).right |
| 626 | have h_triples : (orbit ⁻¹' (countTerm False a w).support).Finite := by |
| 627 | refine (finite_iUnion fun j ↦ ((h_fibre j).prod finite_univ).image (Prod.mk j)).subset ?_ |
| 628 | rintro ⟨j, y, μ⟩ h_ne |
| 629 | rw [mem_preimage, Function.mem_support, countTerm_orbit] at h_ne |
| 630 | exact mem_iUnion.mpr ⟨j, (y, μ), ⟨left_ne_zero_of_mul h_ne, mem_univ μ⟩, rfl⟩ |
| 631 | exact finite_of_finite_preimage h_triples (support_countTerm_subset_range_orbit a w) |
| 632 | |
| 633 | /-- Let the level `𝔑` be neat. A definite frame `g` lies in exactly one coset `y x_j K`, where |
| 634 | `x_j = j.frame` is the frame of the definite class `j` and `K = levelGU n 𝔑`: if `S j` is the |
| 635 | finite set of the `y : GL n E` with `j.coset y = g K`, for each definite class `j`, then the |
| 636 | cardinalities of the sets `S j` add up to `1`. -/ |
| 637 | private lemma sum_card_eq_one_of_isSignedFrame [Fintype (DefiniteClass n 𝔑)] (hN : IsNeat n 𝔑) |
| 638 | {g : GL n (𝔸f E)} (hg : IsSignedFrame g 1) {S : DefiniteClass n 𝔑 → Finset (GL n E)} |
| 639 | (hS : ∀ (j : DefiniteClass n 𝔑) (y : GL n E), y ∈ S j ↔ j.coset y = QuotientGroup.mk g) : |
| 640 | ∑ j : DefiniteClass n 𝔑, (1 : ℂ) * (S j).card = 1 := by |
| 641 | classical |
| 642 | obtain ⟨i, y, h_coset⟩ := (isSignedFrame_one_iff (𝔑 := 𝔑) g).mp hg |
| 643 | have h_mem (j : DefiniteClass n 𝔑) (z : GL n E) : z ∈ S j ↔ j = i ∧ z = y := by |
| 644 | rw [hS, ← h_coset] |
| 645 | exact ⟨eq_and_eq_of_coset_eq hN, fun ⟨hj, hz⟩ ↦ by rw [hj, hz]⟩ |
| 646 | have h_S (j : DefiniteClass n 𝔑) : S j = if j = i then {y} else ∅ := by |
| 647 | ext z |
| 648 | rw [h_mem] |
| 649 | split_ifs with hj |
| 650 | · simp only [Finset.mem_singleton, hj, true_and] |
| 651 | · simp only [Finset.notMem_empty, iff_false, not_and] |
| 652 | exact fun h _ ↦ hj h |
| 653 | simp only [h_S, apply_ite Finset.card, Finset.card_singleton, Finset.card_empty, one_mul, |
| 654 | apply_ite Nat.cast, Nat.cast_one, Nat.cast_zero, Finset.sum_ite_eq', Finset.mem_univ, |
| 655 | ↓reduceIte] |
| 656 | |
| 657 | variable [Module.Finite ℂ W] |
| 658 | |
| 659 | /-- Let `ξ` be a representation of `GL_n(E)` on a finite-dimensional complex space `W`, and let the |
| 660 | level `𝔑` be neat (`hN`). The definite forms are the functions `φ : GL_n(𝔸f E) → W` with |
| 661 | `φ(yx) = ξ(y) φ(x)` for `y ∈ GL_n(E)`, which vanish off definite frames and are right-invariant |
| 662 | under `K = levelGU n 𝔑`. This space is finite-dimensional, and the trace on it of a Hecke element |
| 663 | `a` acting by right translation equals `∑_j ∑_{y ∈ GL_n(E)} f_a(x_j⁻¹ y x_j) · tr ξ(y)`. In this sum |
| 664 | `j` runs over the definite classes in `GL_n(E) \ GL_n(𝔸f E) / K` with chosen representatives |
| 665 | `x_j = j.frame`, and `f_a = heckeCosetFn a` is the function `∑ a_g 1_{gK}` for `a = ∑ a_g [g]`. -/ |
| 666 | lemma finite_definiteForms_and_trace_eq_finsum_definiteClass (hN : IsNeat n 𝔑) |
| 667 | (a : heckeAlgebra n ℂ 𝔑) : |
| 668 | Module.Finite ℂ (definiteForms 𝔑 ξ) ∧ |
| 669 | (definiteForms.rep 𝔑 ξ a).trace ℂ (definiteForms 𝔑 ξ) = |
| 670 | ∑ᶠ (j : DefiniteClass n 𝔑) (y : GL n E), |
| 671 | heckeCosetFn a (j.frame⁻¹ * toFinGL y * j.frame) * (ξ y).trace ℂ W := by |
| 672 | classical |
| 673 | -- This is `trace_eq_weighted_sum` with all weights equal to `1`: a definite frame `g` lies in |
| 674 | -- exactly one coset `y x_j K`, and any other `g` lies in none. |
| 675 | have h_finite_classes : Finite (DefiniteClass n 𝔑) := finite_definiteClass hN |
| 676 | let h_fintype_classes : Fintype (DefiniteClass n 𝔑) := .ofFinite _ |
| 677 | have h_finite (j : DefiniteClass n 𝔑) (g : GL n (𝔸f E)) : |
| 678 | {y : GL n E | j.coset y = QuotientGroup.mk g}.Finite := |
| 679 | Set.Subsingleton.finite fun y hy z hz ↦ (eq_and_eq_of_coset_eq hN (hy.trans hz.symm)).right |
| 680 | let S (j : DefiniteClass n 𝔑) (g : GL n (𝔸f E)) : Finset (GL n E) := (h_finite j g).toFinset |
| 681 | have h_mem_S (j : DefiniteClass n 𝔑) (g : GL n (𝔸f E)) (y : GL n E) : |
| 682 | y ∈ S j g ↔ g⁻¹ * (toFinGL y * j.frame) ∈ levelGU n 𝔑 := |
| 683 | (Set.Finite.mem_toFinset _).trans coset_eq_mk_iff |
| 684 | have h_S_eq_empty (g : GL n (𝔸f E)) (hg : ¬IsSignedFrame g 1) (j : DefiniteClass n 𝔑) : |
| 685 | S j g = ∅ := |
| 686 | Finset.eq_empty_of_forall_notMem fun y hy ↦ |
| 687 | hg ((isSignedFrame_one_iff g).mpr ⟨j, y, (Set.Finite.mem_toFinset _).mp hy⟩) |
| 688 | -- The representatives are the frames `x_j`; the twists `σ` and `s` are identities. |
| 689 | let σ : GL n (𝔸f E) ≃* GL n (𝔸f E) := 1 |
| 690 | have h_weighted : Module.Finite ℂ (definiteForms 𝔑 ξ) ∧ |
| 691 | (definiteForms.rep 𝔑 ξ a).trace ℂ (definiteForms 𝔑 ξ) = |
| 692 | ∑ j : DefiniteClass n 𝔑, 1 * ∑ᶠ y : GL n E, cosetFn (levelGU n 𝔑) a.val |
| 693 | (j.frame⁻¹ * σ (toFinGL y) * σ j.frame) * (1 * ξ y).trace ℂ W := |
| 694 | trace_eq_weighted_sum (definiteForms 𝔑 ξ).subtype (subtype_injective _) (range_subtype _) |
| 695 | frame (fun _ ↦ 1) S h_mem_S h_S_eq_empty |
| 696 | (fun g hg ↦ sum_card_eq_one_of_isSignedFrame hN (not_not.mp hg) |
| 697 | (S := fun j ↦ S j g) fun j y ↦ Set.Finite.mem_toFinset _) σ rfl |
| 698 | fun _ ↦ rfl |
| 699 | rw [finsum_eq_sum_of_fintype] |
| 700 | exact ⟨h_weighted.1, h_weighted.2.trans (Finset.sum_congr rfl fun j _ ↦ by |
| 701 | rw [one_mul] |
| 702 | exact finsum_congr fun y ↦ by rw [one_mul]; rfl)⟩ |
| 703 | |
| 704 | /-- At a neat level the space of definite forms with values in `ξ` is finite-dimensional. -/ |
| 705 | lemma finite_definiteForms (hN : IsNeat n 𝔑) : Module.Finite ℂ (definiteForms 𝔑 ξ) := |
| 706 | (finite_definiteForms_and_trace_eq_finsum_definiteClass ξ hN 1).left |
| 707 | |
| 708 | /-- At a neat level the trace of a Hecke element `a` on the definite forms is the sum, over the |
| 709 | definite classes `j` and the rational matrices `y`, of `heckeCosetFn a` (the function `∑ a_g [gK]` |
| 710 | of `a` on cosets) at `x_j⁻¹ y x_j`, where `x_j = j.frame` is the frame of `j`, times `tr (ξ y)`. -/ |
| 711 | lemma trace_definiteForms_eq_finsum_definiteClass (hN : IsNeat n 𝔑) (a : heckeAlgebra n ℂ 𝔑) : |
| 712 | (definiteForms.rep 𝔑 ξ a).trace ℂ (definiteForms 𝔑 ξ) = |
| 713 | ∑ᶠ (j : DefiniteClass n 𝔑) (y : GL n E), |
| 714 | heckeCosetFn a (j.frame⁻¹ * toFinGL y * j.frame) * (ξ y).trace ℂ W := |
| 715 | (finite_definiteForms_and_trace_eq_finsum_definiteClass ξ hN a).right |
| 716 | |
| 717 | /-- The trace formula on the definite side. Let `W` be finite-dimensional, `𝔑` neat and `a` a |
| 718 | regular Hecke element. Suppose `tr ξ(y⁻¹) = ∑ i, w P i` whenever the characteristic polynomial `P` |
| 719 | of `y` is separable. Then the trace of `a` on definite forms is the sum, over all orbits of triples, |
| 720 | of the definite terms `countTerm False a w` (the flag `False` selects definite frames). On the orbit |
| 721 | of `(x_j K, y⁻¹, μ)` this term is `heckeCosetFn a (x_j⁻¹ y x_j) * w (y⁻¹).charpoly μ` |
| 722 | (`countTerm_orbit`). -/ |
| 723 | lemma trace_definiteForms_eq_finsum_countTerm (hN : IsNeat n 𝔑) {a : heckeAlgebra n ℂ 𝔑} |
| 724 | {w : Polynomial E → n → ℂ} (ha : IsRegularHecke a) |
| 725 | (hw : ∀ y : GL n E, y.val.charpoly.Separable → |
| 726 | (ξ y⁻¹).trace ℂ W = ∑ i : n, w y.val.charpoly i) : |
| 727 | (definiteForms.rep 𝔑 ξ a).trace ℂ (definiteForms 𝔑 ξ) = |
| 728 | ∑ᶠ c : MulAction.orbitRel.Quotient (GL n E) (MarkedTriple (levelGU n 𝔑) n), |
| 729 | countTerm False a w c := by |
| 730 | -- Only the orbits of the triples `(x_j K, y⁻¹, μ)` count, and these orbits are distinct. |
| 731 | have h_orbits : ∑ᶠ c, countTerm False a w c = |
| 732 | ∑ᶠ (j : DefiniteClass n 𝔑) (y : GL n E) (μ : n), countTerm False a w (orbit (j, y, μ)) := by |
| 733 | rw [← finsum_curry₃ (fun p ↦ countTerm False a w (orbit p)) |
| 734 | ((finite_support_countTerm_definite hN a w).preimage (orbit_injective hN).injOn), |
| 735 | ← finsum_mem_range (orbit_injective hN), finsum_mem_def, |
| 736 | indicator_eq_self.mpr (support_countTerm_subset_range_orbit a w)] |
| 737 | -- Either the coefficient of `a` vanishes, or `y` is regular and `hw` applies. |
| 738 | have h_term (j : DefiniteClass n 𝔑) (y : GL n E) : |
| 739 | heckeCosetFn a (j.frame⁻¹ * toFinGL y * j.frame) * (ξ y).trace ℂ W = |
| 740 | ∑ᶠ μ : n, countTerm False a w (orbit (j, y, μ)) := by |
| 741 | rw [finsum_eq_sum_of_fintype] |
| 742 | have h_sum : ∑ μ : n, countTerm False a w (orbit (j, y, μ)) = |
| 743 | heckeCosetFn a (j.frame⁻¹ * toFinGL y * j.frame) * ∑ μ : n, w (y⁻¹).val.charpoly μ := by |
| 744 | rw [Finset.mul_sum] |
| 745 | exact Finset.sum_congr rfl fun μ _ ↦ countTerm_orbit a w j y μ |
| 746 | rw [h_sum] |
| 747 | by_cases h_coeff : heckeCosetFn a (j.frame⁻¹ * toFinGL y * j.frame) = 0 |
| 748 | · rw [h_coeff, zero_mul, zero_mul] |
| 749 | · have h_separable : (y⁻¹).val.charpoly.Separable := |
| 750 | ha (x := j.frame) (by simpa only [invAutInFrame, inv_inv] using h_coeff) |
| 751 | rw [← hw y⁻¹ h_separable, inv_inv] |
| 752 | rw [trace_definiteForms_eq_finsum_definiteClass ξ hN a, h_orbits] |
| 753 | simp_rw [h_term] |
| 754 | |
| 755 | end New.Variety |
| 756 | |
| 757 | end DefiniteTrace |
| 758 | |
| 759 | end |