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

| 1 | module |
| 2 | |
| 3 | public import Mathlib.Data.Matrix.ColumnRowPartitioned |
| 4 | public import Mathlib.Algebra.MvPolynomial.Comap -- shake: keep (`open ... hiding comap`) |
| 5 | public import Mathlib.RingTheory.MvPolynomial.Basic -- shake: keep |
| 6 | public import Lib.General.Algebra.BlockFittingBound |
| 7 | |
| 8 | /-! |
| 9 | # Modules of functions, Fitting ideals and trace ideals for Ribet's method |
| 10 | |
| 11 | This file bounds Fitting ideals of modules `R^s / N` over `R = O[X j]`, `O` a discrete valuation |
| 12 | ring, through modules of functions, and states the conditions on traces and on common Ribet |
| 13 | elements. Each index `j : J` carries two pairs `τ j`, `τ' j` and `φ j`, `φ' j` of elements of `G`. |
| 14 | In the application `τ' j` is the inverse of the conjugate of `τ j`, so that `c (τ j) - c (τ' j)` |
| 15 | is the value at `τ j` of the sum of a cocycle `c` and its conjugate, an even class; likewise for |
| 16 | `φ`. The file also gives the linear algebra for several characters and for the main summand. |
| 17 | |
| 18 | ## Main definitions and results |
| 19 | |
| 20 | * `New.Selmer.HasTriangleCost`, `New.Selmer.exists_mul_prod_X_mem_fittingIdeal`: if the module of |
| 21 | functions `New.Selmer.formsMod` attached to `N ⊆ R^s`, `R = O[X j]`, satisfies a triangular |
| 22 | condition along a finite set `I` of indices and a bound on lengths, then the Fitting ideal of |
| 23 | `R^s / N` contains `∏ j ∈ I, X j` times a polynomial whose constant coefficient has bounded |
| 24 | valuation. |
| 25 | * `New.Selmer.IsTraceIdeal`: an algebra `S` of families of polynomials in variables `X j` holds the |
| 26 | characteristic polynomials, and an `S`-submodule `𝒥` holds the traces of given relations. |
| 27 | |
| 28 | Notions from other files: |
| 29 | * `New.Selmer.fittingIdeal N`: the ideal of `R` generated by the determinants of square matrices |
| 30 | with all rows in `N ⊆ R^ι`, the zeroth Fitting ideal of `R^ι / N`. |
| 31 | * `New.Selmer.formsMod Φ z N p`: the functions `g ↦ Ψ (z g)` on `G`, where `Ψ : O^n → O / p` runs |
| 32 | over the `O`-linear maps that vanish on `Φ⁻¹ N`. |
| 33 | * `New.Selmer.ribetCocyclesIn u ρ B`: the cocycles `G → B^d` for `ρ` that obey the linear relations |
| 34 | among the families `(u x g - 1)_x`. |
| 35 | -/ |
| 36 | |
| 37 | @[expose] public section |
| 38 | |
| 39 | namespace New.Selmer |
| 40 | |
| 41 | open Submodule Finset IsDiscreteValuationRing fittingIdeal MvPolynomial |
| 42 | |
| 43 | variable {O G J n : Type} [CommRing O] [DVR O] [LinearOrder J] [Fintype n] |
| 44 | {s : Finset G} {Φ : (n → O) →ₗ[O] s → MvPolynomial J O} |
| 45 | |
| 46 | /-- There is a set `L ⊆ G` with two properties, where `Z₀` denotes the functions of `Z` that vanish |
| 47 | on `L`. (a) Let `j ∈ I` and `c ∈ Z₀`. If `c (τ i) = c (τ' i)` for all `i < j`, and |
| 48 | `c (φ i) = c (φ' i)` for those `i < j` in `I`, then `C • c (τ j) = C • c (τ' j)`. (b) Let `S ≤ Z₀` |
| 49 | be a submodule whose members vanish at all `τ j` and `τ' j` and have `c (φ j) = c (φ' j)` for |
| 50 | `j ∈ I`. Then the length of `Z / Z₀` plus the length of `S` modulo its `C`-torsion is at most |
| 51 | `b`. Here `relLength S T` is the length of `S / (S ⊓ T)`. -/ |
| 52 | def HasTriangleCost {B : Type*} [AddCommGroup B] [Module O B] (Z : Submodule O (G → B)) |
| 53 | (τ τ' φ φ' : J → G) (I : Finset J) (C : O) (b : ℕ∞) : Prop := |
| 54 | ∃ L : Set G, |
| 55 | -- (a) the triangle along `I` |
| 56 | (∀ j ∈ I, ∀ c ∈ Z ⊓ Submodule.pi L ⊥, |
| 57 | (∀ i < j, c (τ i) = c (τ' i) ∧ (i ∈ I → c (φ i) = c (φ' i))) → |
| 58 | C • c (τ j) = C • c (τ' j)) ∧ |
| 59 | -- (b) the cost |
| 60 | ∀ S ≤ Z ⊓ Submodule.pi L ⊥, |
| 61 | (∀ c ∈ S, (∀ j : J, c (τ j) = 0 ∧ c (τ' j) = 0) ∧ ∀ j ∈ I, c (φ j) = c (φ' j)) → |
| 62 | relLength Z (Submodule.pi L ⊥) + relLength S (torsionBy O (G → B) C) ≤ b |
| 63 | |
| 64 | omit [LinearOrder J] in |
| 65 | /-- Let `R` be the polynomial ring over `O` in the variables `X j` and `Φ : O^n → R^s`. Suppose |
| 66 | `p ≠ 0`, `Φ (p • O^n) ⊆ T`, and that modulo `T` the basis vector of `R^s` at each `g ∈ s` is |
| 67 | `Φ (z g)`. Let `T₀` be `T` plus all vectors of polynomials without constant term. Then the Fitting |
| 68 | ideal of `R^s / T` contains an element whose constant coefficient has valuation at most |
| 69 | `#s * addVal O C` plus the length, modulo `C`-torsion, of the module `formsMod Φ z T₀ p` of the |
| 70 | functions `Ψ ∘ z` for linear `Ψ : O^n → O / p` vanishing on `Φ⁻¹ T₀`. -/ |
| 71 | lemma exists_mem_fittingIdeal_addVal_constantCoeff_le [DecidableEq G] [Finite J] {z : G → n → O} |
| 72 | {T : Submodule (MvPolynomial J O) (s → MvPolynomial J O)} {p : O} (C : O) (hp : p ≠ 0) |
| 73 | (hT_smul_p : ∀ v : n → O, Φ (p • v) ∈ T) |
| 74 | (h_basis : ∀ g : s, Φ (z g) - Pi.single g (1 : MvPolynomial J O) ∈ T) : |
| 75 | ∃ d ∈ fittingIdeal T, addVal O (constantCoeff d) ≤ |
| 76 | relLength (formsMod Φ z (T ⊔ RingHom.ker (constantCoeff : MvPolynomial J O →+* O) • ⊤) p) |
| 77 | (torsionBy O (G → Unit → QuotSpan p) C) + #s * addVal O C := by |
| 78 | -- `K` adds to `T₀` the relations that make the forms `C`-torsion, at the cost `f`; it holds the |
| 79 | -- rows of `C • 1`. So `f * C ^ #s` lies in `fittingIdeal T` up to a polynomial `r` without |
| 80 | -- constant term. |
| 81 | set T₀ : Submodule (MvPolynomial J O) (s → MvPolynomial J O) := |
| 82 | T ⊔ RingHom.ker (constantCoeff : MvPolynomial J O →+* O) • ⊤ |
| 83 | have hTT₀ : T ≤ T₀ := le_sup_left |
| 84 | obtain ⟨f, K, hT₀K, hf, hC, hFittK⟩ : ∃ f : O, ∃ K ≥ T₀, |
| 85 | addVal O f ≤ relLength (formsMod Φ z T₀ p) (torsionBy O (G → Unit → QuotSpan p) C) ∧ |
| 86 | (∀ ⦃w : n → O⦄, (∀ Ψ : (n → O) →ₗ[O] Unit → QuotSpan p, |
| 87 | Ψ ∘ z ∈ torsionBy O (G → Unit → QuotSpan p) C → Ψ w = 0) → Φ w ∈ K) ∧ |
| 88 | ∀ d ∈ fittingIdeal K, f • d ∈ fittingIdeal T₀ := |
| 89 | fittingIdeal.exists_addVal_le_relLength z hp (fun w ↦ hTT₀ (hT_smul_p w)) _ |
| 90 | have h_rows (g : s) : (C • (1 : Matrix s s (MvPolynomial J O))) g ∈ K := by |
| 91 | have hCg : Φ (C • z g) ∈ K := hC fun Ψ hΨ ↦ by simpa using congrFun hΨ g |
| 92 | have h_row : (C • (1 : Matrix s s (MvPolynomial J O))) g = |
| 93 | Φ (C • z g) - C • (Φ (z g) - Pi.single g 1) := by |
| 94 | ext1 g' |
| 95 | simp [smul_sub, Matrix.one_apply, Pi.single_apply, eq_comm] |
| 96 | rw [h_row] |
| 97 | exact sub_mem hCg (smul_of_tower_mem K C (hT₀K (hTT₀ (h_basis g)))) |
| 98 | have h_det : Matrix.det (C • (1 : Matrix s s (MvPolynomial J O))) ∈ fittingIdeal K := |
| 99 | subset_span ⟨C • 1, h_rows, rfl⟩ |
| 100 | obtain ⟨d, hd, r, hr, hdr⟩ : |
| 101 | ∃ d ∈ fittingIdeal T, ∃ r : MvPolynomial J O, constantCoeff r = 0 ∧ |
| 102 | d + r = f • Matrix.det (C • (1 : Matrix s s (MvPolynomial J O))) := |
| 103 | mem_sup.1 (fittingIdeal.sup_smul_top_le (hFittK _ h_det)) |
| 104 | have hd_coeff : constantCoeff d = f * C ^ #s := by simp [eq_sub_of_add_eq hdr, hr] |
| 105 | refine ⟨d, hd, ?_⟩ |
| 106 | grw [hd_coeff, addVal_mul, addVal_pow, hf, nsmul_eq_mul] |
| 107 | |
| 108 | /-- Let `Φ : O^n → R^s` with `R = O[X j]`, `p ≠ 0`, `Φ (p • O^n) ⊆ T`, and put `y g = Φ (z g)`. |
| 109 | Suppose that `y (τ i) - y (τ' i) = X i • (y (φ i) - y (φ' i))` modulo `T` for all `i`, and that |
| 110 | `X i • (y (φ i) - y (φ' i))` lies in `T` for `i < j`. Suppose that every linear `Ψ : O^n → O / p` |
| 111 | that vanishes on `Φ⁻¹ T` and has `Ψ (z (τ i)) = Ψ (z (τ' i))` for `i < j` has |
| 112 | `C • Ψ (z (τ j)) = C • Ψ (z (τ' j))`. Then `C X j • (y (φ j) - y (φ' j))` lies in `T`. -/ |
| 113 | lemma smul_X_smul_mem_of_forall_form {z : G → n → O} |
| 114 | {T : Submodule (MvPolynomial J O) (s → MvPolynomial J O)} {p C : O} {τ τ' φ φ' : J → G} {j : J} |
| 115 | (hp : p ≠ 0) (hT_smul_p : ∀ v : n → O, Φ (p • v) ∈ T) |
| 116 | (h_tie : ∀ i : J, Φ (z (τ i) - z (τ' i)) - X (R := O) i • Φ (z (φ i) - z (φ' i)) ∈ T) |
| 117 | (h_lt : ∀ i < j, X (R := O) i • Φ (z (φ i) - z (φ' i)) ∈ T) |
| 118 | (h_form : ∀ Ψ : (n → O) →ₗ[O] Unit → QuotSpan p, (∀ ⦃v : n → O⦄, Φ v ∈ T → Ψ v = 0) → |
| 119 | (∀ i < j, Ψ (z (τ i)) = Ψ (z (τ' i))) → C • Ψ (z (τ j)) = C • Ψ (z (τ' j))) : |
| 120 | (C • X (R := O) j) • Φ (z (φ j) - z (φ' j)) ∈ T := by |
| 121 | have h_rel : Φ (C • (z (τ j) - z (τ' j))) ∈ T := by |
| 122 | -- By duality it is enough that every form `Ψ` kills the vector. |
| 123 | refine mem_of_forall_form_eq_zero hp hT_smul_p fun Ψ hΨ ↦ ?_ |
| 124 | have hΨ_τ (i : J) (hij : i < j) : Ψ (z (τ i)) = Ψ (z (τ' i)) := by |
| 125 | rw [← sub_eq_zero, ← map_sub] |
| 126 | exact hΨ ((sub_mem_iff_left T (h_lt i hij)).1 (h_tie i)) |
| 127 | rw [map_smul, map_sub, smul_sub, h_form Ψ hΨ hΨ_τ, sub_self] |
| 128 | simpa [smul_sub] using sub_mem h_rel (smul_of_tower_mem T C (h_tie j)) |
| 129 | |
| 130 | /-- Let `O` be a discrete valuation ring, `R = MvPolynomial J O` the polynomial ring in variables |
| 131 | `X j`, `Φ : O^n → R^s`, and put `y g = Φ (z g)` and `v j = Φ (z (φ j) - z (φ' j))`. Let `N ≤ K` |
| 132 | be submodules of `R^s` and `p ≠ 0` in `O` with `Φ (p • O^n) ⊆ N`. Suppose that modulo `N`, |
| 133 | `y (τ j) = X j • y (φ j)` and `y (τ' j) = X j • y (φ' j)` for every `j`, and every `i` below a |
| 134 | member of `I` lies in `I` or has `X i • R^s ⊆ N`. Let `Z = formsMod Φ z N p` be the module of the |
| 135 | functions `Ψ ∘ z` on `G` for linear `Ψ : O^n → O / p` vanishing on `Φ⁻¹ N`, and let `Z₀` be its |
| 136 | part vanishing on `A ⊆ G`. Suppose every enlargement `K' ≥ K` has its forms `formsMod Φ z K' p` |
| 137 | in `Z₀`, and `Z₀` satisfies the triangle condition for `I` with `C : O`: for `j ∈ I` and `c ∈ Z₀`, |
| 138 | if `c (τ i) = c (τ' i)` for all `i < j` and `c (φ i) = c (φ' i)` for those `i < j` in `I`, then |
| 139 | `C • c (τ j) = C • c (τ' j)`. Then adding the vectors `v j`, `j ∈ I`, to `K` gives a submodule |
| 140 | `T ≥ K` whose Fitting ideal times `∏ j ∈ I, C • X j` lies in that of `K`. -/ |
| 141 | private lemma exists_ge_mul_prod_X_mem_fittingIdeal [DecidableEq G] {z : G → n → O} |
| 142 | {N K : Submodule (MvPolynomial J O) (s → MvPolynomial J O)} {p : O} {τ τ' φ φ' : J → G} |
| 143 | {C : O} {I : Finset J} {A : Set G} (hp : p ≠ 0) (hNK : N ≤ K) |
| 144 | (h_tri : ∀ j ∈ I, ∀ c ∈ formsMod Φ z N p ⊓ .pi A ⊥, |
| 145 | (∀ i < j, c (τ i) = c (τ' i) ∧ (i ∈ I → c (φ i) = c (φ' i))) → |
| 146 | C • c (τ j) = C • c (τ' j)) |
| 147 | (hN_smul_p : ∀ w : n → O, Φ (p • w) ∈ N) |
| 148 | (hτ : ∀ j : J, Φ (z (τ j)) - X (R := O) j • Φ (z (φ j)) ∈ N) |
| 149 | (hτ' : ∀ j : J, Φ (z (τ' j)) - X (R := O) j • Φ (z (φ' j)) ∈ N) |
| 150 | (hI : ∀ j ∈ I, ∀ i < j, i ∈ I ∨ ∀ u : s → MvPolynomial J O, X (R := O) i • u ∈ N) |
| 151 | (sol_le : ∀ {K' : Submodule (MvPolynomial J O) (s → MvPolynomial J O)}, |
| 152 | K ≤ K' → formsMod Φ z K' p ≤ formsMod Φ z N p ⊓ .pi A ⊥) : |
| 153 | ∃ T ≥ K, ↑I ⊆ (fun j ↦ Φ (z (φ j) - z (φ' j))) ⁻¹' T ∧ |
| 154 | ∀ d ∈ fittingIdeal T, d * ∏ j ∈ I, C • X j ∈ fittingIdeal K := by |
| 155 | let v : J → s → MvPolynomial J O := fun j ↦ Φ (z (φ j) - z (φ' j)) |
| 156 | have h_diff (i : J) : Φ (z (τ i) - z (τ' i)) - X (R := O) i • v i ∈ K := by |
| 157 | simpa [v, smul_sub, sub_sub_sub_comm] using hNK (sub_mem (hτ i) (hτ' i)) |
| 158 | have h_step (j : J) (hj : j ∈ I) (T : Submodule (MvPolynomial J O) (s → MvPolynomial J O)) |
| 159 | (hKT : K ≤ T) (hvT : ↑I ∩ Set.Iio j ⊆ v ⁻¹' T) : (C • X (R := O) j) • v j ∈ T := by |
| 160 | have h_lt (i : J) (hij : i < j) : X (R := O) i • v i ∈ T := by |
| 161 | rcases hI j hj i hij with hi | hX |
| 162 | · exact T.smul_mem (X i) (hvT ⟨hi, hij⟩) |
| 163 | · exact hKT (hNK (hX (v i))) |
| 164 | refine smul_X_smul_mem_of_forall_form hp (fun w ↦ hKT (hNK (hN_smul_p w))) |
| 165 | (fun i ↦ hKT (h_diff i)) |
| 166 | h_lt fun Ψ hΨ hΨ_τ ↦ ?_ |
| 167 | exact h_tri j hj (Ψ ∘ z) (sol_le hKT (mem_formsMod.2 ⟨Ψ, hΨ, rfl⟩)) fun i hij ↦ |
| 168 | ⟨hΨ_τ i hij, fun hi ↦ Ψ.sub_mem_ker_iff.1 (hΨ (hvT ⟨hi, hij⟩))⟩ |
| 169 | exact fittingIdeal.exists_ge_mul_prod_mem (fun j ↦ C • X j) h_step |
| 170 | |
| 171 | /-- Let `O` be a discrete valuation ring, `R` the polynomial ring over `O` in the variables `X j`, |
| 172 | let `Φ : O^n → R^s` and put `y g = Φ (z g)`. Suppose `p ≠ 0` and `Φ (p • O^n) ⊆ N`. Suppose that |
| 173 | modulo `N`, the basis vector of `R^s` at each `g ∈ s` is `y g`, and `y (τ j) = X j • y (φ j)` and |
| 174 | `y (τ' j) = X j • y (φ' j)` for every `j`. Suppose that every `i` below a member of `I` lies in `I` |
| 175 | or has `X i • R^s ⊆ N`. Let `Z = formsMod Φ z N p` be the module of the functions `Ψ ∘ z` on `G`, |
| 176 | for linear `Ψ : O^n → O / p` vanishing on `Φ⁻¹ N`, and suppose `HasTriangleCost` for `Z`: there is a |
| 177 | set `A ⊆ G` with two properties, where `Z₀` is the part of `Z` that vanishes on `A`. (a) For `j ∈ I` |
| 178 | and `c ∈ Z₀`, if `c (τ i) = c (τ' i)` for all `i < j` and `c (φ i) = c (φ' i)` for those `i < j` in |
| 179 | `I`, then `C • c (τ j) = C • c (τ' j)`. (b) The length of `Z / Z₀` plus the length of `Z₁` modulo |
| 180 | its `C`-torsion is at most `b`, for every submodule `Z₁ ≤ Z₀` whose members `c` vanish at all `τ j`, |
| 181 | `τ' j` and have `c (φ j) = c (φ' j)` for `j ∈ I`. Then the Fitting ideal of `R^s / N` contains |
| 182 | `F * ∏ j ∈ I, X j` for some polynomial `F` whose constant coefficient has valuation at most |
| 183 | `b + (#I + #s) * addVal O C`. -/ |
| 184 | lemma exists_mul_prod_X_mem_fittingIdeal [DecidableEq G] [Finite J] {z : G → n → O} |
| 185 | {N : Submodule (MvPolynomial J O) (s → MvPolynomial J O)} {p : O} {τ τ' φ φ' : J → G} |
| 186 | {C : O} {I : Finset J} {b : ℕ∞} (hp : p ≠ 0) |
| 187 | (h_cost : HasTriangleCost (formsMod Φ z N p) τ τ' φ φ' I C b) |
| 188 | (hN_smul_p : ∀ v : n → O, Φ (p • v) ∈ N) |
| 189 | (h_basis : ∀ g : s, Φ (z g) - Pi.single g (1 : MvPolynomial J O) ∈ N) |
| 190 | (hτ : ∀ j : J, Φ (z (τ j)) - X (R := O) j • Φ (z (φ j)) ∈ N) |
| 191 | (hτ' : ∀ j : J, Φ (z (τ' j)) - X (R := O) j • Φ (z (φ' j)) ∈ N) |
| 192 | (hI : ∀ j ∈ I, ∀ i < j, i ∈ I ∨ ∀ v : s → MvPolynomial J O, X (R := O) i • v ∈ N) : |
| 193 | ∃ F : MvPolynomial J O, |
| 194 | addVal O (constantCoeff F) ≤ b + (#I + #s) * addVal O C ∧ |
| 195 | F * ∏ j ∈ I, X j ∈ fittingIdeal N := by |
| 196 | -- Enlarge `N` in three stages and follow the Fitting ideal back. The first, to `K`, costs a |
| 197 | -- length (`fittingIdeal.exists_addVal_le_relLength`). The second, to `T`, is a triangle |
| 198 | -- (`fittingIdeal.exists_ge_mul_prod_mem`). In the third, what remains is read at `X j = 0` |
| 199 | -- (`exists_mem_fittingIdeal_addVal_constantCoeff_le`). |
| 200 | obtain ⟨A, h_tri, h_len⟩ := h_cost |
| 201 | -- First stage: `K` adds the relations that make the forms vanish on `A`, at the cost `e`. |
| 202 | obtain ⟨e, K, hNK, he, hA, hFittK⟩ : ∃ e : O, ∃ K ≥ N, |
| 203 | addVal O e ≤ relLength (formsMod Φ z N p) (.pi A ⊥) ∧ |
| 204 | (∀ ⦃w : n → O⦄, (∀ Ψ : (n → O) →ₗ[O] Unit → QuotSpan p, Ψ ∘ z ∈ Submodule.pi A ⊥ → Ψ w = 0) → |
| 205 | Φ w ∈ K) ∧ |
| 206 | ∀ d ∈ fittingIdeal K, e • d ∈ fittingIdeal N := |
| 207 | fittingIdeal.exists_addVal_le_relLength z hp hN_smul_p (.pi A ⊥) |
| 208 | have sol_le {K' : Submodule (MvPolynomial J O) (s → MvPolynomial J O)} (hK' : K ≤ K') : |
| 209 | formsMod Φ z K' p ≤ formsMod Φ z N p ⊓ .pi A ⊥ := by |
| 210 | refine le_inf (formsMod_anti z (hNK.trans hK')) fun f hf g hg ↦ ?_ |
| 211 | obtain ⟨Ψ, hΨ, rfl⟩ := mem_formsMod.1 hf |
| 212 | exact hΨ (hK' (hA fun _ h ↦ h g hg)) |
| 213 | -- Second stage: `T` adds the vectors `v j`, for `j ∈ I` in increasing order. |
| 214 | let v : J → s → MvPolynomial J O := fun j ↦ Φ (z (φ j) - z (φ' j)) |
| 215 | obtain ⟨T, hKT, hvT, hFittT⟩ : |
| 216 | ∃ T ≥ K, ↑I ⊆ v ⁻¹' T ∧ ∀ d ∈ fittingIdeal T, d * ∏ j ∈ I, C • X j ∈ fittingIdeal K := |
| 217 | exists_ge_mul_prod_X_mem_fittingIdeal hp hNK h_tri hN_smul_p hτ hτ' hI sol_le |
| 218 | -- Third stage: `T₀` adds the vectors of polynomials without constant term. |
| 219 | let T₀ : Submodule (MvPolynomial J O) (s → MvPolynomial J O) := |
| 220 | T ⊔ RingHom.ker (constantCoeff : MvPolynomial J O →+* O) • ⊤ |
| 221 | obtain ⟨d, hd, hd_val⟩ : ∃ d ∈ fittingIdeal T, addVal O (constantCoeff d) ≤ |
| 222 | relLength (formsMod Φ z T₀ p) (torsionBy O (G → Unit → QuotSpan p) C) + #s * addVal O C := |
| 223 | exists_mem_fittingIdeal_addVal_constantCoeff_le C hp (fun w ↦ hKT (hNK (hN_smul_p w))) |
| 224 | fun g ↦ hKT (hNK (h_basis g)) |
| 225 | have h_lengths : relLength (formsMod Φ z N p) (.pi A ⊥) + |
| 226 | relLength (formsMod Φ z T₀ p) (torsionBy O (G → Unit → QuotSpan p) C) ≤ b := by |
| 227 | refine h_len _ (sol_le (le_sup_of_le_left hKT)) fun c hc ↦ ?_ |
| 228 | obtain ⟨Ψ, hΨ, rfl⟩ := mem_formsMod.1 hc |
| 229 | -- A vector that is `X j • y'` modulo `N` lies in `T₀`. |
| 230 | have h_mem {j : J} {y y' : s → MvPolynomial J O} (hy : y - X (R := O) j • y' ∈ N) : |
| 231 | y ∈ T₀ := by |
| 232 | rw [← sub_add_cancel y (X (R := O) j • y')] |
| 233 | exact add_mem_sup (hKT (hNK hy)) (smul_mem_smul (by simp) mem_top) |
| 234 | exact ⟨fun j ↦ ⟨hΨ (h_mem (hτ j)), hΨ (h_mem (hτ' j))⟩, |
| 235 | fun j hj ↦ Ψ.sub_mem_ker_iff.1 (hΨ (mem_sup_left (hvT hj)))⟩ |
| 236 | refine ⟨(e * C ^ #I) • d, ?_, ?_⟩ |
| 237 | · calc addVal O (constantCoeff ((e * C ^ #I) • d)) |
| 238 | _ = addVal O e + addVal O (constantCoeff d) + #I * addVal O C := by |
| 239 | simp [add_right_comm] |
| 240 | _ ≤ b + (#I + #s) * addVal O C := by |
| 241 | grw [he, hd_val, ← add_assoc, h_lengths, add_assoc, add_mul, add_comm (#s * addVal O C)] |
| 242 | · -- From `fittingIdeal T` back to `fittingIdeal K` costs `∏ j ∈ I, C • X j`, and back to |
| 243 | -- `fittingIdeal N` costs `e`. |
| 244 | simpa [prod_smul, mul_smul] using hFittK _ (hFittT d hd) |
| 245 | |
| 246 | end New.Selmer |
| 247 | |
| 248 | section RibetFirstOrder |
| 249 | |
| 250 | namespace New.Selmer |
| 251 | |
| 252 | open IsDiscreteValuationRing Matrix Module Submodule Polynomial MonoidAlgebra Finset Sum |
| 253 | CompleteLattice |
| 254 | open Finsupp (linearCombination) |
| 255 | open MvPolynomial hiding X C aeval eval funext comap ext |
| 256 | |
| 257 | section Definitions |
| 258 | |
| 259 | variable {O L Y G J σ W : Type} [CommRing O] [CommRing L] [Algebra O L] [Fintype σ] [DecidableEq σ] |
| 260 | {S : Subalgebra O (Y → MvPolynomial J L)} |
| 261 | |
| 262 | /-- Elements of `S` and `𝒥` are families, indexed by `x : Y`, of polynomials over `L` in the |
| 263 | variables `X j`. The algebra `S` contains the variables and the coefficients of the characteristic |
| 264 | polynomials of `u`. The `S`-module `𝒥` contains `p` times the traces of the `u x g` and, for each |
| 265 | relation that ties `τ i` to `φ i`, the traces of its products with the `u x g` on the right. -/ |
| 266 | structure IsTraceIdeal (𝒥 : Submodule S (Y → MvPolynomial J L)) {A : Type*} {K : Sort*} |
| 267 | [CommRing A] [Algebra O A] [Algebra A L] (u : Y → G → Matrix σ σ A) (p : O) (τ φ : K → G) |
| 268 | (k : K → J) (ε : J → O[X]) : Prop where |
| 269 | /-- The algebra `S` contains the constant families `X j`. -/ |
| 270 | X_mem (j : J) : (fun _ : Y ↦ MvPolynomial.X j) ∈ S |
| 271 | /-- The algebra `S` contains the coefficients of the characteristic polynomials of the `u x g`, |
| 272 | as families of constants. -/ |
| 273 | charpoly_coeff_mem (g : G) (n : ℕ) : |
| 274 | (fun x : Y ↦ MvPolynomial.C (algebraMap A L ((u x g).charpoly.coeff n))) ∈ S |
| 275 | /-- The `S`-module `𝒥` contains `p` times the trace of `u x g`. -/ |
| 276 | smul_trace_mem (g : G) : |
| 277 | (fun x : Y ↦ MvPolynomial.C (algebraMap A L (p • (u x g).trace))) ∈ 𝒥 |
| 278 | /-- The `S`-module `𝒥` contains the trace of |
| 279 | `(τ i - 1 - X (k i) * (φ i - 1) * ε (k i) (φ i)) * g` under `u x`. -/ |
| 280 | trace_relation_mem (g : G) (i : K) : |
| 281 | (fun x : Y ↦ |
| 282 | MvPolynomial.C (algebraMap A L ((u x (τ i) - 1) * u x g).trace) - |
| 283 | MvPolynomial.X (k i) * |
| 284 | MvPolynomial.C |
| 285 | (algebraMap A L (((X - 1) * ε (k i)).aeval (u x (φ i)) * u x g).trace)) ∈ 𝒥 |
| 286 | |
| 287 | variable [Group G] (u : Y → G →* Matrix σ σ O) (𝒥 : Submodule S (Y → MvPolynomial J L)) |
| 288 | |
| 289 | /-- The cocycles `c : G → B ^ r` for `ρ` that obey the linear relations among the families |
| 290 | `(u x g - 1)_x` (`ribetCocyclesIn u ρ B`) and vanish on the set `T` and at `γ`. -/ |
| 291 | noncomputable def ribetCocyclesVanishingOn {r : Type} [Fintype r] [DecidableEq r] |
| 292 | (ρ : G →* Matrix r r O) (B : Type) [AddCommGroup B] [Module O B] (T : Set G) (γ : G) : |
| 293 | Submodule O (G → r → B) := |
| 294 | ribetCocyclesIn u ρ B ⊓ Submodule.pi T ⊥ ⊓ (LinearMap.proj γ).ker |
| 295 | |
| 296 | /-- Membership in `ribetCocyclesVanishingOn`, clause by clause: `c` lies in |
| 297 | `ribetCocyclesVanishingOn u ρ B T γ` iff `c` lies in `ribetCocyclesIn u ρ B`, `c g = 0` for all |
| 298 | `g ∈ T`, and `c γ = 0`. -/ |
| 299 | lemma mem_ribetCocyclesVanishingOn {r : Type} [Fintype r] [DecidableEq r] {ρ : G →* Matrix r r O} |
| 300 | {B : Type} [AddCommGroup B] [Module O B] {T : Set G} {γ : G} {c : G → r → B} : |
| 301 | c ∈ ribetCocyclesVanishingOn u ρ B T γ ↔ |
| 302 | c ∈ ribetCocyclesIn u ρ B ∧ (∀ g ∈ T, c g = 0) ∧ c γ = 0 := |
| 303 | by simp only [ribetCocyclesVanishingOn, Submodule.mem_inf, Submodule.mem_pi, Pi.bot_apply, |
| 304 | Submodule.mem_bot, LinearMap.mem_ker, LinearMap.proj_apply, and_assoc] |
| 305 | |
| 306 | /-- A character `χ` as a representation by `1 × 1` matrices. -/ |
| 307 | noncomputable abbrev rankOneRep (χ : G →* O) : G →* Matrix Unit Unit O := |
| 308 | (scalar Unit).toMonoidHom.comp χ |
| 309 | |
| 310 | /-- The function `c : G → O / p` is a cocycle for the character `χ` that obeys the linear relations |
| 311 | among the families `(u x g - 1)_x` and vanishes at the `δ v`; if `c γ = 0`, then every `χ g - 1` |
| 312 | kills `c a`. -/ |
| 313 | def IsCharacterCocycle (χ : G →* O) (δ : W → G) (γ a : G) {p : O} (c : G → Unit → QuotSpan p) : |
| 314 | Prop := |
| 315 | -- (a) a cocycle for `χ` that obeys the relations |
| 316 | c ∈ ribetCocycles u (rankOneRep χ) p ∧ |
| 317 | -- (b) zero at the `δ v` |
| 318 | (∀ v : W, c (δ v) = 0) ∧ |
| 319 | -- (c) if `c γ = 0`, every `χ g - 1` kills `c a` |
| 320 | (c γ = 0 → ∀ g : G, (χ g - 1) • c a = 0) |
| 321 | |
| 322 | /-- The finite set `s` detects the module `Z` of functions: an element of `Z` that vanishes on `s` |
| 323 | is zero. -/ |
| 324 | def IsDetectedBy {B : Type*} [AddCommGroup B] [Module O B] (Z : Submodule O (G → B)) |
| 325 | (s : Finset G) : Prop := |
| 326 | ∀ c ∈ Z, (∀ g ∈ s, c g = 0) → c = 0 |
| 327 | |
| 328 | /-- One Ribet element for a family `β` of functions `β i : Y → L`. Here `S` is an algebra of |
| 329 | families, indexed by `x : Y`, of polynomials over `L` in the variables `X j`, and `𝒥` is an |
| 330 | `S`-module of such families. Every family of constant polynomials `x ↦ C (β i x)` lies in `S` and |
| 331 | vanishes on `𝓧`. One `f : S` multiplies all of them into `𝒥`; for `x ∈ 𝓧`, `f x` has no monomial |
| 332 | properly dividing `∏ X j`; and the coefficient of `∏ X j` in `f π` is `c`. -/ |
| 333 | def IsCommonRibetElement [Fintype J] {I : Type*} (β : I → Y → L) {𝓧 : Set Y} (π : 𝓧) (c : L) : |
| 334 | Prop := |
| 335 | (∀ i : I, (fun x : Y ↦ MvPolynomial.C (β i x)) ∈ S) ∧ |
| 336 | (∀ (i : I) (x : 𝓧), β i x = 0) ∧ |
| 337 | ∃ f : S, |
| 338 | -- (a) `f` multiplies every `β i` into `𝒥` |
| 339 | (∀ i : I, f.val * (fun x : Y ↦ MvPolynomial.C (β i x)) ∈ 𝒥) ∧ |
| 340 | -- (b) on `𝓧`, `f` has no term below `∏ X j` |
| 341 | (∀ x : 𝓧, ∀ d < ∑ j : J, Finsupp.single j 1, (f.val x).coeff d = 0) ∧ |
| 342 | -- (c) the coefficient of `∏ X j` at `π` |
| 343 | (f.val π).coeff (∑ j : J, Finsupp.single j 1) = c |
| 344 | |
| 345 | end Definitions |
| 346 | |
| 347 | section SmallLemmas |
| 348 | |
| 349 | variable {O L Y G J σ W : Type} [CommRing O] [CommRing L] [Algebra O L] [Fintype σ] [DecidableEq σ] |
| 350 | [Group G] (u : Y → G →* Matrix σ σ O) {S : Subalgebra O (Y → MvPolynomial J L)} |
| 351 | (𝒥 : Submodule S (Y → MvPolynomial J L)) |
| 352 | |
| 353 | /-- Let `N` be a module of vectors over `A`, let `η e` be finitely many characters of `A`, and let |
| 354 | `c j` be finitely many coordinates. If for each `e` and each `i` some `w ∈ N` has coordinates |
| 355 | `w (c j)` that `η e` sends to the unit vector `i`, then for each `i` one `w ∈ N` does so for all `e` |
| 356 | at once. -/ |
| 357 | lemma exists_common_unit_row {Λ A E ι κ : Type} [CommRing Λ] [Ring A] [Algebra Λ A] [Fintype E] |
| 358 | [Fintype κ] [DecidableEq κ] (η : E → A →ₐ[Λ] Λ) (N : Submodule A (ι → A)) (c : κ → ι) |
| 359 | (h_unit : ∀ (e : E) (i : κ), ∃ w ∈ N, ∀ j : κ, η e (w (c j)) = if j = i then 1 else 0) (i : κ) : |
| 360 | ∃ w ∈ N, ∀ (e : E) (j : κ), η e (w (c j)) = if j = i then 1 else 0 := by |
| 361 | classical |
| 362 | choose m hm hm_eq using h_unit |
| 363 | suffices ∃ w ∈ N, ∀ e ∈ univ, ∀ j : κ, η e (w (c j)) = if j = i then 1 else 0 by simpa |
| 364 | -- Correct `w` on one more character `e` without changing it on the earlier ones. |
| 365 | induction (univ : Finset E) using Finset.induction_on with |
| 366 | | empty => exact ⟨0, by simp⟩ |
| 367 | | insert e s _ ih => |
| 368 | obtain ⟨w, hw, hw_eq⟩ := ih |
| 369 | let w' : ι → A := w + ∑ j : κ, ((if j = i then 1 else 0) - w (c j)) • m e j |
| 370 | have hw' : w' ∈ N := add_mem hw (sum_mem fun j _ ↦ N.smul_mem _ (hm e j)) |
| 371 | have h_new (j : κ) : η e (w' (c j)) = if j = i then 1 else 0 := by simp [w', hm_eq] |
| 372 | have h_old (e' : E) (he' : e' ∈ s) (j : κ) : η e' (w' (c j)) = if j = i then 1 else 0 := by |
| 373 | simp [w', hw_eq e' he'] |
| 374 | exact ⟨w', hw', (forall_mem_insert ..).2 ⟨h_new, h_old⟩⟩ |
| 375 | |
| 376 | /-- Let `R` be a `Λ`-algebra with characters `χ e : R →ₐ[Λ] Λ`, and let `π e` have `χ e (π e) = μ e` |
| 377 | and `χ e' (π e) = 0` for `e' ≠ e`. Let `N` be a module of relations among generators indexed by |
| 378 | `ι₀ ⊕ ι`. Suppose that the generators in `ι` suffice modulo the kernel of each `χ e`: for each `e` |
| 379 | and `i : ι₀` some `w ∈ N` is, under `χ e`, the unit vector `i` on `ι₀`. Let each row of `B e` be |
| 380 | `χ e` of the `ι`-part of some `w ∈ N` whose `ι₀`-part `χ e` kills. Then there is a square matrix `M` |
| 381 | with rows in `N` such that `det (χ e M) = μ e ^ #ι det (B e)` for all `e`. -/ |
| 382 | lemma exists_rows_det_eq_pow_mul_det {Λ R E ι₀ ι : Type} [CommRing Λ] [Ring R] [Algebra Λ R] |
| 383 | [Fintype E] [DecidableEq E] [Fintype ι₀] [DecidableEq ι₀] [Fintype ι] [DecidableEq ι] |
| 384 | (χ : E → R →ₐ[Λ] Λ) {π : E → R} {μ : E → Λ} |
| 385 | (hπ : ∀ e e' : E, χ e' (π e) = if e' = e then μ e else 0) (N : Submodule R (ι₀ ⊕ ι → R)) |
| 386 | (h_gen : ∀ (e : E) (i : ι₀), ∃ w ∈ N, ∀ j : ι₀, χ e (w (.inl j)) = if j = i then 1 else 0) |
| 387 | (B : E → Matrix ι ι Λ) |
| 388 | (hB : ∀ (e : E) (l : ι), ∃ w ∈ N, |
| 389 | (∀ j : ι₀, χ e (w (.inl j)) = 0) ∧ ∀ i : ι, χ e (w (.inr i)) = B e l i) : |
| 390 | ∃ M : Matrix (ι₀ ⊕ ι) (ι₀ ⊕ ι) R, |
| 391 | (∀ k : ι₀ ⊕ ι, M k ∈ N) ∧ |
| 392 | ∀ e : E, (M.map (χ e)).det = μ e ^ Fintype.card ι * (B e).det := by |
| 393 | classical |
| 394 | -- The rows of `ι₀`: one relation that is the unit vector on every character at once |
| 395 | -- (`exists_common_unit_row`). The rows of `ι`: `∑ e π e w e l` with `w e l` from `hB`, which is |
| 396 | -- `μ e` times row `l` of `B e` on `χ e`, and zero on `ι₀`. |
| 397 | choose w hw hw_zero hw_eq using hB |
| 398 | have unit_row (i : ι₀) : |
| 399 | ∃ v ∈ N, ∀ (e : E) (j : ι₀), χ e (v (.inl j)) = if j = i then 1 else 0 := |
| 400 | exists_common_unit_row χ N Sum.inl h_gen i |
| 401 | choose v hv hv_eq using unit_row |
| 402 | let M : Matrix (ι₀ ⊕ ι) (ι₀ ⊕ ι) R := Sum.elim v fun l ↦ ∑ e', π e' • w e' l |
| 403 | have h_first (e : E) (i j : ι₀) : χ e (M (.inl i) (.inl j)) = if j = i then 1 else 0 := |
| 404 | hv_eq i e j |
| 405 | have h_last (e : E) (l : ι) (k : ι₀ ⊕ ι) : |
| 406 | χ e (M (.inr l) k) = μ e * χ e (w e l k) := by |
| 407 | simp [M, Finset.sum_apply, hπ] |
| 408 | refine ⟨M, fun k ↦ ?_, fun e ↦ ?_⟩ |
| 409 | · rcases k with i | l |
| 410 | · exact hv i |
| 411 | · exact sum_mem fun e' _ ↦ N.smul_mem _ (hw e' l) |
| 412 | -- On `χ e` the matrix is block triangular, with `1` and `μ e • B e` on the diagonal. |
| 413 | have h_blocks : M.map (χ e) = fromBlocks 1 ((M.map (χ e)).toBlocks₁₂) 0 (μ e • B e) := by |
| 414 | ext (i | l) (j | j) |
| 415 | · simp [h_first, Matrix.one_apply, eq_comm (a := i)] |
| 416 | · rfl |
| 417 | · simp [h_last, hw_zero] |
| 418 | · simp [h_last, hw_eq] |
| 419 | rw [h_blocks, det_fromBlocks_zero₂₁, det_one, one_mul, det_smul] |
| 420 | |
| 421 | /-- If each of finitely many `ψ x` kills an element on which all characters `η e` are `1`, then one |
| 422 | such element is killed by all `ψ x`. -/ |
| 423 | lemma exists_forall_eq_one_and_forall_eq_zero {Λ A B E I : Type} [CommRing Λ] [Ring A] [Ring B] |
| 424 | [Algebra Λ A] [Algebra Λ B] [Fintype I] (η : E → A →ₐ[Λ] Λ) (ψ : I → A →ₐ[Λ] B) |
| 425 | (h_each : ∀ x : I, ∃ k : A, (∀ e : E, η e k = 1) ∧ ψ x k = 0) : |
| 426 | ∃ k : A, (∀ e : E, η e k = 1) ∧ ∀ x : I, ψ x k = 0 := by |
| 427 | classical |
| 428 | suffices ∃ k : A, (∀ e : E, η e k = 1) ∧ ∀ x ∈ univ, ψ x k = 0 by simpa |
| 429 | -- Multiply the given elements. |
| 430 | induction (univ : Finset I) using Finset.induction_on with |
| 431 | | empty => exact ⟨1, by simp⟩ |
| 432 | | insert x s _ ih => |
| 433 | obtain ⟨k, hkη, hkψ⟩ : ∃ k : A, (∀ e : E, η e k = 1) ∧ ∀ x' ∈ s, ψ x' k = 0 := ih |
| 434 | obtain ⟨k', hk'η, hk'ψ⟩ : ∃ k' : A, (∀ e : E, η e k' = 1) ∧ ψ x k' = 0 := h_each x |
| 435 | exact ⟨k * k', by simp [hkη, hk'η], by simp +contextual [hkψ, hk'ψ]⟩ |
| 436 | |
| 437 | /-- Let `η k` be finitely many characters of `A` and `a : A`. If `c` is a multiple of the product of |
| 438 | the differences `η e a - η k a` over `k ≠ e`, then some element of `A` is `c` on the character `η e` |
| 439 | and `0` on the other characters. -/ |
| 440 | lemma exists_apply_eq_ite_of_prod_dvd {Λ A E : Type} [CommRing Λ] [Ring A] [Algebra Λ A] |
| 441 | [Fintype E] [DecidableEq E] (η : E → A →ₐ[Λ] Λ) (a : A) {e : E} {c : Λ} |
| 442 | (hc : ∏ k ∈ ({e}ᶜ : Finset E), (η e a - η k a) ∣ c) : |
| 443 | ∃ q : A, ∀ e' : E, η e' q = if e' = e then c else 0 := by |
| 444 | obtain ⟨w, rfl⟩ : ∃ w : Λ, c = (∏ k ∈ {e}ᶜ, (η e a - η k a)) * w := hc |
| 445 | let P : Λ[X] := ∏ k ∈ {e}ᶜ, (X - Polynomial.C (η k a)) |
| 446 | refine ⟨w • aeval a P, fun e' ↦ ?_⟩ |
| 447 | have h_value : η e' (w • aeval a P) = w * ∏ k ∈ {e}ᶜ, (η e' a - η k a) := by |
| 448 | rw [map_smul, ← aeval_algHom_apply] |
| 449 | simp [P] |
| 450 | rw [h_value] |
| 451 | split_ifs with he |
| 452 | · rw [he, mul_comm] |
| 453 | · rw [prod_eq_zero (i := e') (by simpa using he) (sub_self _), mul_zero] |
| 454 | |
| 455 | /-- An element of the Fitting ideal of the image `f N` is a linear combination of determinants of |
| 456 | matrices `B i` whose rows are the images of elements `B' i j` of `N`. -/ |
| 457 | lemma exists_sum_mul_det_of_mem_fittingIdeal_map {R ι M : Type} [CommRing R] [Fintype ι] |
| 458 | [DecidableEq ι] [AddCommGroup M] [Module R M] {N : Submodule R M} {f : M →ₗ[R] ι → R} {d : R} |
| 459 | (hd : d ∈ fittingIdeal (N.map f)) : |
| 460 | ∃ (l : ℕ) (w : Fin l → R) (B : Fin l → Matrix ι ι R) (B' : Fin l → ι → M), |
| 461 | (∀ (i : Fin l) (j : ι), B' i j ∈ N) ∧ |
| 462 | (∀ (i : Fin l) (j : ι), f (B' i j) = B i j) ∧ |
| 463 | ∑ i : Fin l, w i * (B i).det = d := by |
| 464 | rw [fittingIdeal] at hd |
| 465 | obtain ⟨l, w, D, hw⟩ : |
| 466 | ∃ (l : ℕ) (w : Fin l → R) (D : Fin l → det '' {B : Matrix ι ι R | ∀ j : ι, B j ∈ N.map f}), |
| 467 | ∑ i : Fin l, w i • (D i : R) = d := |
| 468 | mem_span_set'.1 hd |
| 469 | have h_det (i : Fin l) : |
| 470 | ∃ B : Matrix ι ι R, (∀ j : ι, ∃ b ∈ N, f b = B j) ∧ B.det = D i := (D i).prop |
| 471 | choose B hB hB_det using h_det |
| 472 | choose B' hB' hB'_eq using hB |
| 473 | exact ⟨l, w, B, B', hB', hB'_eq, by simp [hB_det, ← hw]⟩ |
| 474 | |
| 475 | /-- The ideal spanned by the monomials that do not divide `∏ X j`. -/ |
| 476 | noncomputable abbrev nonDivisorIdeal (O J : Type) [CommRing O] [Fintype J] : |
| 477 | Ideal (MvPolynomial J O) := |
| 478 | restrictSupportIdeal O (Set.Iic (∑ j : J, Finsupp.single j 1))ᶜ (IsLowerSet.Iic _).compl |
| 479 | |
| 480 | /-- A polynomial lies in `nonDivisorIdeal O J` if and only if none of its monomials divides |
| 481 | `∏ X j`. -/ |
| 482 | lemma mem_nonDivisorIdeal [Fintype J] {f : MvPolynomial J O} : |
| 483 | f ∈ nonDivisorIdeal O J ↔ ∀ d ∈ f.support, ¬d ≤ ∑ j : J, Finsupp.single j 1 := |
| 484 | Iff.rfl |
| 485 | |
| 486 | /-- Let `X j` (`j : J`) be finitely many variables over the commutative ring `O`, each with a type |
| 487 | `ty j`. If `ty i < e`, the product of `X i` with `∏ j with ty j < e, X j` is divisible by `X i ^ 2`, |
| 488 | so it lies in `nonDivisorIdeal O J`, the ideal spanned by the monomials that do not divide |
| 489 | `∏ X j`. -/ |
| 490 | lemma X_mem_colon_nonDivisorIdeal [Fintype J] {t : ℕ} {ty : J → Fin t} {i : J} {e : Fin t} |
| 491 | (h_lt : ty i < e) : |
| 492 | MvPolynomial.X i ∈ (nonDivisorIdeal O J).colon {∏ j : J with ty j < e, MvPolynomial.X j} := by |
| 493 | classical |
| 494 | let d : J →₀ ℕ := Finsupp.single i 1 + ∑ j : J with ty j < e, Finsupp.single j 1 |
| 495 | have h_monomial : MvPolynomial.X i * ∏ j : J with ty j < e, MvPolynomial.X j = |
| 496 | monomial d (1 : O) := by |
| 497 | simp [d, MvPolynomial.X, ← monomial_sum_one] |
| 498 | have h_not_le : ¬d ≤ ∑ j : J, Finsupp.single j 1 := fun h_le ↦ by |
| 499 | simpa [d, h_lt, Finsupp.single_apply] using h_le i |
| 500 | rw [mem_colon_singleton, smul_eq_mul, h_monomial, mem_nonDivisorIdeal] |
| 501 | intro d' hd' |
| 502 | rwa [mem_singleton.1 (support_monomial_subset hd')] |
| 503 | |
| 504 | /-- Let the variables `X j` of polynomials over the commutative ring `O` be indexed by a finite |
| 505 | linear order `J`, and let `ty : J →o Fin t` be a monotone map that gives each variable a type. |
| 506 | Suppose that `d e` is `Γ e * ∏ j with ty j = e, X j` up to an error `ζ e` that |
| 507 | `∏ j with ty j < e, X j` multiplies into `nonDivisorIdeal O J`, the ideal spanned by the monomials |
| 508 | that do not divide `∏ X j`. Then `F * ∏ d e` has no monomial properly dividing `∏ X j`, and the |
| 509 | coefficient of `∏ X j` is the constant term of `F * ∏ Γ e`. -/ |
| 510 | lemma coeff_mul_prod_of_mem_colon [Fintype J] [LinearOrder J] {t : ℕ} (ty : J →o Fin t) |
| 511 | {d ζ Γ : Fin t → MvPolynomial J O} |
| 512 | (hζ : ∀ e : Fin t, ζ e ∈ (nonDivisorIdeal O J).colon {∏ j : J with ty j < e, MvPolynomial.X j}) |
| 513 | (hdζ : ∀ e : Fin t, d e + ζ e = Γ e * ∏ j : J with ty j = e, MvPolynomial.X j) |
| 514 | (F : MvPolynomial J O) {i : J →₀ ℕ} (hi : i ≤ ∑ j : J, Finsupp.single j 1) : |
| 515 | (F * ∏ e : Fin t, d e).coeff i = |
| 516 | if ∑ j : J, Finsupp.single j 1 = i then constantCoeff (F * ∏ e : Fin t, Γ e) else 0 := by |
| 517 | set 𝔫 : Ideal (MvPolynomial J O) := nonDivisorIdeal O J |
| 518 | let error : MvPolynomial J O := |
| 519 | ∑ e : Fin t, ζ e * (∏ k : Fin t with k < e, (d k + ζ k)) * ∏ k : Fin t with e < k, d k |
| 520 | -- The factor `∏ k < e, (d k + ζ k)` is a multiple of `∏ j with ty j < e, X j`, which |
| 521 | -- multiplies `ζ e` into `𝔫`. |
| 522 | have h_dvd (e : Fin t) : |
| 523 | ∏ j : J with ty j < e, MvPolynomial.X j ∣ ∏ k : Fin t with k < e, (d k + ζ k) := by |
| 524 | simp [hdζ, prod_fiberwise_eq_prod_filter, prod_mul_distrib] |
| 525 | have h_error : error ∈ 𝔫 := by |
| 526 | refine sum_mem fun e _ ↦ 𝔫.mem_of_dvd ?_ (mem_colon_singleton.1 (hζ e)) |
| 527 | exact (mul_dvd_mul_left (ζ e) (h_dvd e)).mul_right _ |
| 528 | have h_prod : ∏ e : Fin t, d e = ∏ e : Fin t, (d e + ζ e) - error := |
| 529 | eq_sub_of_add_eq (prod_add_ordered univ d ζ).symm |
| 530 | have h_zero : (F * error).coeff i = 0 := |
| 531 | notMem_support_iff.1 fun h ↦ mem_nonDivisorIdeal.1 (𝔫.mul_mem_left F h_error) i h hi |
| 532 | have h_main : F * ∏ e : Fin t, (d e + ζ e) = |
| 533 | (F * ∏ e : Fin t, Γ e) * monomial (∑ j : J, Finsupp.single j 1) 1 := by |
| 534 | simp [hdζ, sum_fiberwise, MvPolynomial.X, ← mul_assoc, ← monomial_sum_one, prod_mul_distrib] |
| 535 | rw [h_prod, mul_sub, AddMonoidAlgebra.coeff_sub_apply, h_zero, sub_zero, h_main, |
| 536 | coeff_mul_monomial'] |
| 537 | simp +contextual [hi.ge_iff_eq', ← constantCoeff_eq] |
| 538 | |
| 539 | /-- Let `χ x` (`x : Y`) be representations of the group algebra `Λ[G]` by `σ × σ` matrices and `η₀` |
| 540 | the augmentation, and let every `g`, under every `χ x`, be some `m` in the left ideal spanned by the |
| 541 | `y i` plus `1`. Then under every `χ x` an element `l` is some `l'` in that left ideal plus the |
| 542 | scalar `η₀ l`. -/ |
| 543 | private lemma exists_mem_span_apply_eq_add_algebraMap {Λ ι : Type} [CommRing Λ] |
| 544 | {χ : Y → Λ[G] →ₐ[Λ] Matrix σ σ Λ} {η₀ : Λ[G] →ₐ[Λ] Λ} (hη₀ : ∀ g : G, η₀ (.single g 1) = 1) |
| 545 | {y : ι → Λ[G]} |
| 546 | (hy : ∀ g : G, ∃ m ∈ span Λ[G] (Set.range y), ∀ x : Y, χ x (.single g 1) = χ x m + 1) |
| 547 | (l : Λ[G]) : ∃ l' ∈ span Λ[G] (Set.range y), |
| 548 | ∀ x : Y, χ x l = χ x l' + algebraMap Λ (Matrix σ σ Λ) (η₀ l) := by |
| 549 | induction l using MonoidAlgebra.induction_on with |
| 550 | | of g => simpa [hη₀] using hy g |
| 551 | | add l₁ l₂ ih₁ ih₂ => |
| 552 | obtain ⟨l₁', hl₁', hl₁'_eq⟩ := ih₁ |
| 553 | obtain ⟨l₂', hl₂', hl₂'_eq⟩ := ih₂ |
| 554 | refine ⟨l₁' + l₂', add_mem hl₁' hl₂', fun x ↦ ?_⟩ |
| 555 | simp only [map_add, hl₁'_eq, hl₂'_eq] |
| 556 | abel |
| 557 | | smul c l ih => |
| 558 | obtain ⟨l', hl', hl'_eq⟩ := ih |
| 559 | refine ⟨c • l', smul_of_tower_mem _ c hl', fun x ↦ ?_⟩ |
| 560 | simp only [hl'_eq, map_mul, Algebra.smul_def, mul_add, AlgHom.commutes, |
| 561 | Algebra.algebraMap_self_apply] |
| 562 | |
| 563 | /-- Let `χ x` (`x : Y`) be representations of the group algebra `Λ[G]` by `σ × σ` matrices and `η₀` |
| 564 | the augmentation, and let every `g - 1` be, up to elements that every `χ x` kills, in the left ideal |
| 565 | spanned by the `y i`. Further let `S` be an algebra of families `Y → L[X j]`, where `L[X j]` is |
| 566 | `MvPolynomial J L`, and `𝒥` an `S`-module of such families, and let `b` lie in the left ideal |
| 567 | spanned by the `w` with `x ↦ tr (χ x (w g))` in `𝒥` for every `g`. If `η₀ m = 0`, then |
| 568 | `b + m ρ₀ = b' + m' ρ₀` with `b'` in that left ideal and `m'` in the left ideal spanned by the |
| 569 | `y i`. -/ |
| 570 | lemma exists_mem_span_add_mul_eq_add_mul {S : Subalgebra O (Y → MvPolynomial J L)} |
| 571 | (𝒥 : Submodule S (Y → MvPolynomial J L)) {Λ ι : Type} [CommRing Λ] |
| 572 | [Algebra Λ (MvPolynomial J L)] (χ : Y → Λ[G] →ₐ[Λ] Matrix σ σ Λ) (η₀ : Λ[G] →ₐ[Λ] Λ) |
| 573 | (hη₀ : ∀ g : G, η₀ (.single g 1) = 1) (y : ι → Λ[G]) |
| 574 | (hy : ∀ g : G, ∃ m ∈ span Λ[G] (Set.range y), ∀ x : Y, χ x (.single g 1) = χ x m + 1) |
| 575 | (ρ₀ : Λ[G]) {b m : Λ[G]} |
| 576 | (hb : b ∈ span Λ[G] {w : Λ[G] | ∀ g : G, |
| 577 | (fun x : Y ↦ algebraMap Λ (MvPolynomial J L) (χ x w * χ x (.single g 1)).trace) ∈ 𝒥}) |
| 578 | (hm : η₀ m = 0) : |
| 579 | ∃ b' ∈ span Λ[G] {w : Λ[G] | ∀ g : G, |
| 580 | (fun x : Y ↦ algebraMap Λ (MvPolynomial J L) (χ x w * χ x (.single g 1)).trace) ∈ 𝒥}, |
| 581 | ∃ m' ∈ span Λ[G] (Set.range y), b + m * ρ₀ = b' + m' * ρ₀ := by |
| 582 | -- Under every `χ x`, an element `l` is some `l'` in the span plus the scalar `η₀ l`. |
| 583 | have h_aug (l : Λ[G]) : ∃ l' ∈ span Λ[G] (Set.range y), |
| 584 | ∀ x : Y, χ x l = χ x l' + algebraMap Λ (Matrix σ σ Λ) (η₀ l) := |
| 585 | exists_mem_span_apply_eq_add_algebraMap hη₀ hy l |
| 586 | -- As `η₀ m = 0`, the difference `(m - m') ρ₀` is killed by every `χ x`. |
| 587 | obtain ⟨m', hm', hm'_eq⟩ : ∃ m' ∈ span Λ[G] (Set.range y), ∀ x : Y, χ x m = χ x m' := by |
| 588 | simpa [hm] using h_aug m |
| 589 | have h_kill : (m - m') * ρ₀ ∈ span Λ[G] {w : Λ[G] | ∀ g : G, |
| 590 | (fun x : Y ↦ algebraMap Λ (MvPolynomial J L) (χ x w * χ x (.single g 1)).trace) ∈ 𝒥} := |
| 591 | subset_span fun g ↦ by simp [hm'_eq, ← Pi.zero_def] |
| 592 | refine ⟨b + (m - m') * ρ₀, add_mem hb h_kill, m', hm', ?_⟩ |
| 593 | rw [sub_mul, add_assoc, sub_add_cancel] |
| 594 | |
| 595 | /-- Rows with a determinant of bounded valuation under a representation `ρ` whose matrices span. Let |
| 596 | `O` be a discrete valuation ring and `u x` (`x : Y`) matrix representations of `G` over `O`. Let |
| 597 | `ψ₀` be a representation of `A` by matrices over `O` that is `ρ` on the group elements `ofGroup g`, |
| 598 | and let `v` send vectors over `O` to rows over `A`, with `ψ₀ (v m j) = m j • 1`. Let `N` be a module |
| 599 | of rows that holds, for the vectors `z g`, the cocycle rule, the equations `z (gen i) = eᵢ`, the |
| 600 | linear relations among the families `(u x g - 1)_x`, and, through `ψ₀`, the equations `z (τ k) = 0` |
| 601 | and `z γ = 0`. If the cocycles of `ρ` with values in `DivisibleQuot O = Frac(O) / O` that obey those |
| 602 | linear relations and vanish at the `τ k` and at `γ` have length at most `b₀`, then for some square |
| 603 | matrix `B₀` with rows in `N` the determinant of the block matrix `ψ₀(B₀)` has valuation at most |
| 604 | `b₀`. -/ |
| 605 | lemma exists_block_rows (u : Y → G →* Matrix σ σ O) [DVR O] {r ι A K : Type} [Fintype r] |
| 606 | [DecidableEq r] [Fintype ι] [DecidableEq ι] [Ring A] [Algebra O A] |
| 607 | (ρ : G →* Matrix r r O) (hρ_span : span O (Set.range ρ) = ⊤) (ψ₀ : A →ₐ[O] Matrix r r O) |
| 608 | (ofGroup : G →* A) (hψ₀ : ∀ g : G, ψ₀ (ofGroup g) = ρ g) (v : (ι → O) →ₗ[O] ι → A) |
| 609 | (hψ₀v : ∀ (m : ι → O) (j : ι), ψ₀ (v m j) = m j • 1) (gen : ι → G) (z : G → ι → O) |
| 610 | (N : Submodule A (ι → A)) (τ : K → G) (γ : G) {b₀ : ℕ} |
| 611 | (hb₀ : length O (ribetCocyclesVanishingOn u ρ (DivisibleQuot O) (Set.range τ) γ) ≤ b₀) |
| 612 | (h_cocycle : ∀ g h : G, v (z (g * h) - z g) - ofGroup g • v (z h) ∈ N) |
| 613 | (h_gen : ∀ i : ι, v (z (gen i)) - Pi.single i 1 ∈ N) |
| 614 | (h_rel : ∀ θ : G →₀ O, linearCombination O (fun (g : G) (x : Y) ↦ u x g - 1) θ = 0 → |
| 615 | v (linearCombination O z θ) ∈ N) |
| 616 | (h_τ : ∀ k : K, ∃ t ∈ N, ∀ j : ι, ψ₀ (t j) = ψ₀ (v (z (τ k)) j)) |
| 617 | (h_γ : ∃ t ∈ N, ∀ j : ι, ψ₀ (t j) = ψ₀ (v (z γ) j)) : |
| 618 | ∃ B₀ : Matrix ι ι A, |
| 619 | (∀ i : ι, B₀ i ∈ N) ∧ |
| 620 | addVal O (Matrix.comp ι ι r r O (B₀.map ψ₀)).det ≤ b₀ := by |
| 621 | -- A vector `w` with entries in `Frac(O) / O` that `ψ₀ N` kills is `Ψ ∘ z` on the generators, for |
| 622 | -- the form `Ψ` that `w` defines, and `Ψ ∘ z` is a cocycle in the module `V` of `hb₀`. |
| 623 | let V : Submodule O (G → r → DivisibleQuot O) := |
| 624 | ribetCocyclesVanishingOn u ρ (DivisibleQuot O) (Set.range τ) γ |
| 625 | have h_span_le : span O (Set.range ρ) ≤ LinearMap.range ψ₀.toLinearMap := by |
| 626 | simp [span_le, ← hψ₀, Set.subset_def] |
| 627 | have h_surj : Function.Surjective ψ₀ := |
| 628 | ψ₀.toLinearMap.range_eq_top.1 (eq_top_mono h_span_le hρ_span) |
| 629 | have h_length : length O (V.map (LinearMap.funLeft O (r → DivisibleQuot O) gen)) ≤ b₀ := |
| 630 | (length_le_of_le_map _ V le_rfl).trans hb₀ |
| 631 | refine exists_rows_addVal_det_le_of_divisible ψ₀ h_surj N h_length fun w hw ↦ ?_ |
| 632 | let Ψ : (ι → O) →ₗ[O] r → DivisibleQuot O := Fintype.linearCombination O w |
| 633 | have hΨ (m : ι → O) : ∑ j : ι, ψ₀ (v m j) • w j = Ψ m := by |
| 634 | simp [Ψ, hψ₀v, Fintype.linearCombination] |
| 635 | -- A row in `N` with the image of `v m` under `ψ₀` gives `Ψ m = 0`. |
| 636 | have h_zero (m : ι → O) (h_row : ∃ t ∈ N, ∀ j : ι, ψ₀ (t j) = ψ₀ (v m j)) : Ψ m = 0 := by |
| 637 | obtain ⟨t, ht, ht_eq⟩ := h_row |
| 638 | simpa [ht_eq, hΨ] using hw t ht |
| 639 | have h_coc (g h : G) : Ψ (z (g * h)) = Ψ (z g) + ρ g • Ψ (z h) := by |
| 640 | simpa [hΨ, hψ₀, mul_smul, ← smul_sum, sub_smul, sub_eq_iff_eq_add'] using hw _ (h_cocycle g h) |
| 641 | have h_gen_eq (i : ι) : Ψ (z (gen i)) = w i := by |
| 642 | simpa [hΨ, sub_smul, Pi.single_apply, sub_eq_iff_eq_add'] using hw _ (h_gen i) |
| 643 | have h_rel_eq (θ : G →₀ O) (hθ : linearCombination O (fun (g : G) (x : Y) ↦ u x g - 1) θ = 0) : |
| 644 | linearCombination O (Ψ ∘ z) θ = 0 := by |
| 645 | rw [← Finsupp.apply_linearCombination, ← hΨ] |
| 646 | exact hw _ (h_rel θ hθ) |
| 647 | have h_obey : Ψ ∘ z ∈ ribetCocyclesIn u ρ (DivisibleQuot O) := |
| 648 | ⟨mem_obeying_cocycleRelations.2 h_coc, h_rel_eq⟩ |
| 649 | have h_mem : Ψ ∘ z ∈ V := |
| 650 | (mem_ribetCocyclesVanishingOn u).2 |
| 651 | ⟨h_obey, Set.forall_mem_range.2 fun k ↦ h_zero _ (h_τ k), h_zero _ h_γ⟩ |
| 652 | exact mem_map.2 ⟨Ψ ∘ z, h_mem, funext h_gen_eq⟩ |
| 653 | |
| 654 | /-- The character step. Let `u x` (`x : Y`) be matrix representations of `G` over `O`. Let `Φ` send |
| 655 | vectors over `O` to rows, and let `N` hold the images under `Φ` of the cocycle rule of the vectors |
| 656 | `z g` for the character `ξ`, of the `z (δ w)`, of the linear relations among the families |
| 657 | `(u x g - 1)_x`, and of the multiples `(ξ g - 1) (c₁ z γ + z a)`. Then every `c` in |
| 658 | `formsMod Φ z N p`, that is, `c = Ψ ∘ z` for a linear form `Ψ` modulo `p` that vanishes on `Φ⁻¹ N`, |
| 659 | is a cocycle for `ξ` that obeys the linear relations and vanishes at the `δ w`; and if `c γ = 0`, |
| 660 | then every `ξ g - 1` kills `c a`. -/ |
| 661 | lemma isCharacterCocycle_of_mem_formsMod {n ι R : Type} [CommRing R] [Algebra O R] |
| 662 | (Φ : (n → O) →ₗ[O] ι → R) (z : G → n → O) (N : Submodule R (ι → R)) {p : O} (ξ : G →* O) |
| 663 | (δ : W → G) (a γ : G) (c₁ : O) (h_cocycle : ∀ g h : G, Φ (z (g * h) - z g - ξ g • z h) ∈ N) |
| 664 | (h_δ : ∀ w : W, Φ (z (δ w)) ∈ N) |
| 665 | (h_rel : ∀ θ : G →₀ O, linearCombination O (fun (g : G) (x : Y) ↦ u x g - 1) θ = 0 → |
| 666 | Φ (linearCombination O z θ) ∈ N) |
| 667 | (h_fix : ∀ g : G, Φ ((ξ g - 1) • (c₁ • z γ + z a)) ∈ N) : |
| 668 | ∀ c ∈ formsMod Φ z N p, IsCharacterCocycle u ξ δ γ a c := by |
| 669 | intro c hc |
| 670 | obtain ⟨Ψ, hΨ, rfl⟩ := mem_formsMod.1 hc |
| 671 | have h_coc (g h : G) : Ψ (z (g * h)) = Ψ (z g) + rankOneRep ξ g • Ψ (z h) := by |
| 672 | have h_smul : rankOneRep ξ g • Ψ (z h) = ξ g • Ψ (z h) := by simp |
| 673 | rw [h_smul, ← sub_eq_iff_eq_add', ← sub_eq_zero, ← map_sub, ← map_smul, ← map_sub] |
| 674 | exact hΨ (h_cocycle g h) |
| 675 | have h_rel_eq (θ : G →₀ O) (hθ : linearCombination O (fun (g : G) (x : Y) ↦ u x g - 1) θ = 0) : |
| 676 | linearCombination O (Ψ ∘ z) θ = 0 := by |
| 677 | rw [← Finsupp.apply_linearCombination] |
| 678 | exact hΨ (h_rel θ hθ) |
| 679 | have h_obey : Ψ ∘ z ∈ ribetCocycles u (rankOneRep ξ) p := |
| 680 | mem_ribetCocycles.2 ⟨h_coc, h_rel_eq⟩ |
| 681 | have h_kill (hγ : Ψ (z γ) = 0) (g : G) : (ξ g - 1) • Ψ (z a) = 0 := by |
| 682 | have h_fix_eq : Ψ ((ξ g - 1) • (c₁ • z γ + z a)) = 0 := hΨ (h_fix g) |
| 683 | rwa [map_smul, map_add, map_smul, hγ, smul_zero, zero_add] at h_fix_eq |
| 684 | exact ⟨h_obey, fun w ↦ hΨ (h_δ w), h_kill⟩ |
| 685 | |
| 686 | /-- Let `η` be a character of `A` and `p ≠ 0`. Let `N` hold `p` times every row and, for each |
| 687 | generator `gen i`, the row `v (z (gen i)) - eᵢ`, where `gen` is the identity on `s`. Let `E` read |
| 688 | rows under `η` on the `S₀`-coordinates only, and take the linear forms `Ψ` modulo `p` that kill |
| 689 | every `m` with `E (v m)` in the image of `N` under `E`. Suppose that every function `Ψ ∘ z` that |
| 690 | vanishes on `s` is zero. Then for each `i : S₀` some row in `N` is, under `η`, the unit vector `i` |
| 691 | on the `S₀`-coordinates. -/ |
| 692 | lemma exists_unit_row {O G : Type} [CommRing O] [DVR O] {Λ A W S₀ : Type} [CommRing Λ] |
| 693 | [Algebra O Λ] [Ring A] [Algebra Λ A] [Algebra O A] [IsScalarTower O Λ A] [Fintype W] |
| 694 | [DecidableEq W] [Fintype S₀] [DecidableEq S₀] [DecidableEq G] {s : Finset G} (η : A →ₐ[Λ] Λ) |
| 695 | (N : Submodule A (W ⊕ S₀ ⊕ s → A)) (v : (W ⊕ S₀ ⊕ s → O) →ₗ[O] W ⊕ S₀ ⊕ s → A) |
| 696 | (gen : W ⊕ S₀ ⊕ s → G) (z : G → W ⊕ S₀ ⊕ s → O) {p : O} (hp : p ≠ 0) |
| 697 | (h_p : ∀ w : W ⊕ S₀ ⊕ s → A, p • w ∈ N) |
| 698 | (h_gen : ∀ i : W ⊕ S₀ ⊕ s, v (z (gen i)) - Pi.single i 1 ∈ N) |
| 699 | (h_gen_s : ∀ j : s, gen (inr (inr j)) = j) |
| 700 | (E : (W ⊕ S₀ ⊕ s → A) →ₗ[Λ] S₀ → Λ) |
| 701 | (hE : ∀ (w : W ⊕ S₀ ⊕ s → A) (j : S₀), E w j = η (w (inr (inl j)))) |
| 702 | (h_detect : |
| 703 | IsDetectedBy (formsMod (E.restrictScalars O ∘ₗ v) z ((N.restrictScalars Λ).map E) p) s) |
| 704 | (i : S₀) : |
| 705 | ∃ w ∈ N, ∀ j : S₀, η (w (inr (inl j))) = if j = i then 1 else 0 := by |
| 706 | -- By duality (`mem_of_forall_form_eq_zero`), the image of `v (z (gen i))` lies in that of `N`; |
| 707 | -- modulo `N` this row is the unit row `eᵢ`. |
| 708 | let K : Submodule Λ (S₀ → Λ) := (N.restrictScalars Λ).map E |
| 709 | have hK {w : W ⊕ S₀ ⊕ s → A} (hw : w ∈ N) : E w ∈ K := mem_map_of_mem hw |
| 710 | have hK_p (m : W ⊕ S₀ ⊕ s → O) : E (v (p • m)) ∈ K := hK (by simpa using h_p (v m)) |
| 711 | -- The unit row at `g ∈ s` has no `S₀`-coordinates. |
| 712 | have hK_s (g : s) : E (v (z g)) ∈ K := by |
| 713 | have h_unit : E (Pi.single (inr (inr g)) 1) = 0 := funext fun j ↦ by simp [hE] |
| 714 | simpa [h_gen_s, h_unit] using hK (h_gen (inr (inr g))) |
| 715 | have hK_i : E (v (z (gen (inr (inl i))))) ∈ K := by |
| 716 | refine mem_of_forall_form_eq_zero (Φ := E.restrictScalars O ∘ₗ v) hp hK_p fun Ψ hΨ ↦ ?_ |
| 717 | have h_zero : Ψ ∘ z = 0 := |
| 718 | h_detect _ (mem_formsMod.2 ⟨Ψ, hΨ, rfl⟩) fun g hg ↦ hΨ (hK_s ⟨g, hg⟩) |
| 719 | exact congrFun h_zero (gen (inr (inl i))) |
| 720 | have hK_unit : E (Pi.single (inr (inl i)) 1) ∈ K := by |
| 721 | simpa using K.sub_mem hK_i (hK (h_gen (inr (inl i)))) |
| 722 | obtain ⟨w, hw, hw_eq⟩ : ∃ w ∈ N, E w = E (Pi.single (inr (inl i)) 1) := mem_map.1 hK_unit |
| 723 | exact ⟨w, hw, fun j ↦ by simpa [hE, Pi.single_apply] using congrFun hw_eq j⟩ |
| 724 | |
| 725 | /-- Clearing the `S₀`-coordinates. Let the rows `ν i ∈ N` be, under the character `η`, the unit |
| 726 | vectors on the `S₀`-coordinates. Subtracting multiples of them turns a row `w ∈ N` into a row of `N` |
| 727 | that is zero under `η` on the `S₀`-coordinates; on the `S`-coordinates it is the result of |
| 728 | eliminating the `S₀`-coordinates of `w` by the `ν i`. -/ |
| 729 | lemma exists_row_apply_eq_zero {Λ A W S₀ S : Type} [CommRing Λ] [Ring A] [Algebra Λ A] |
| 730 | [Fintype S₀] [DecidableEq S₀] [Fintype S] [DecidableEq S] (η : A →ₐ[Λ] Λ) |
| 731 | {N : Submodule A (W ⊕ S₀ ⊕ S → A)} {ν : S₀ → W ⊕ S₀ ⊕ S → A} (hν : ∀ i : S₀, ν i ∈ N) |
| 732 | (hν_eq : ∀ i j : S₀, η (ν i (inr (inl j))) = if j = i then 1 else 0) |
| 733 | {w : W ⊕ S₀ ⊕ S → A} (hw : w ∈ N) : |
| 734 | ∃ w' ∈ N, |
| 735 | (∀ i : S₀, η (w' (inr (inl i))) = 0) ∧ |
| 736 | (fun j : S ↦ η (w' (inr (inr j)))) = |
| 737 | vecMulLinear |
| 738 | (fromRows (-of fun (i : S₀) (j : S) ↦ η (ν i (inr (inr j)))) (1 : Matrix S S Λ)) |
| 739 | fun l : S₀ ⊕ S ↦ η (w (inr l)) := by |
| 740 | refine ⟨w - ∑ i : S₀, w (inr (inl i)) • ν i, |
| 741 | sub_mem hw (sum_mem fun i _ ↦ N.smul_mem _ (hν i)), fun i ↦ ?_, funext fun j ↦ ?_⟩ |
| 742 | · simp [hν_eq] |
| 743 | · simp [vecMul_eq_sum, Matrix.one_apply, sub_eq_neg_add] |
| 744 | |
| 745 | end SmallLemmas |
| 746 | |
| 747 | end New.Selmer |
| 748 | |
| 749 | end RibetFirstOrder |