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 TauCeti.LinearAlgebra.Determinant.Basic |
| 4 | import TauCeti.LinearAlgebra.Submodule.CardFinrank |
| 5 | public import Mathlib.LinearAlgebra.Lagrange |
| 6 | public import Mathlib.RingTheory.Polynomial.UniversalFactorizationRing |
| 7 | import Mathlib.Algebra.AffineMonoid.UniqueSums |
| 8 | import Mathlib.NumberTheory.NumberField.CanonicalEmbedding.Basic |
| 9 | import Mathlib.RingTheory.Coalgebra.IsFrobenius |
| 10 | import Mathlib.RingTheory.Henselian |
| 11 | import Mathlib.RingTheory.HopfAlgebra.Basic |
| 12 | import Mathlib.RingTheory.RegularLocalRing.Defs |
| 13 | import Mathlib.RingTheory.SimpleRing.Principal |
| 14 | public import Lib.Speed |
| 15 | |
| 16 | /-! |
| 17 | # The q-binomial theorem, fibre sums, and Schur polynomials in the coefficients |
| 18 | |
| 19 | The q-binomial theorem is proved as a sum over the subspaces of a vector space over a field with `q` |
| 20 | elements. There is a lemma on grouping a finite sum by the fibres of a map. Schur polynomials are |
| 21 | defined without division, as integer polynomials in the coefficients of a monic polynomial; `s_l(r)` |
| 22 | denotes the Schur polynomial with exponent tuple `l`, evaluated at a tuple of roots `r`. Three |
| 23 | algebraic facts serve to extract values of Schur polynomials from vanishing linear forms. |
| 24 | |
| 25 | ## Main definitions and results |
| 26 | |
| 27 | * `New.q_binomial_submodule`: the sum of `New.heckePolyCoeff X U` over the subspaces `U` of `W` is |
| 28 | `New.SiegelWeil.qPochhammer q (dim W) X`. |
| 29 | * `New.Variety.genericSchur`, `New.Variety.rootCoeffEval`: the Schur polynomial in the coefficients, |
| 30 | and evaluation at the coefficients of the monic polynomial with a given multiset of roots. |
| 31 | * `New.Variety.rootCoeffEval_genericSchur_mul_det`: the value times the Vandermonde determinant is |
| 32 | `det (r i ^ l j)`. |
| 33 | * `New.Variety.sum_lagrange_smul_rootCoeffEval`: for distinct elements r₁, …, r_a of a field, |
| 34 | summing s_l(r₁, …, X rᵢ, …) against the Lagrange factors ∏_{k ≠ i} (X rᵢ − r_k)/(rᵢ − r_k) |
| 35 | gives s_l(r)·∑ⱼ X^(l j). |
| 36 | * `New.Variety.map_prod_rootCoeffEval_eq_zero`: a linear form that kills the families |
| 37 | j ↦ ∏_{i, σ} ∏_{t ∈ x(j, σ)} (1 − c(i, σ)(α) t) for all α, with the c(i, σ) algebraically |
| 38 | independent, kills the products over σ of polynomials of bounded degree in the coefficients of |
| 39 | ∏_{t ∈ x(j, σ)} (X − t). |
| 40 | |
| 41 | ## Relation to the literature |
| 42 | |
| 43 | Known results: the q-binomial theorem, counted over the subspaces of a finite vector space, and the |
| 44 | bialternant formula for Schur polynomials. |
| 45 | -/ |
| 46 | |
| 47 | @[expose] public section |
| 48 | |
| 49 | /-! ## The q-binomial theorem over the subspaces of a finite vector space -/ |
| 50 | |
| 51 | section QBinomial |
| 52 | |
| 53 | open Finset Module Submodule |
| 54 | |
| 55 | -- Finite types of vectors and of subspaces are summed over through `Fintype.ofFinite`. |
| 56 | attribute [local instance low] Fintype.ofFinite |
| 57 | |
| 58 | /-- The product of `1 - q ^ l * X` over `0 ≤ l < m`. For `q` the norm of a split place, it is the |
| 59 | Hecke polynomial of the trivial representation in rank `m`. -/ |
| 60 | @[simp] |
| 61 | noncomputable abbrev New.SiegelWeil.qPochhammer (q m : ℕ) (X : ℂ) : ℂ := |
| 62 | ∏ l ∈ range m, (1 - (q : ℂ) ^ l * X) |
| 63 | |
| 64 | /-- The number `(-X) ^ d * q ^ (d choose 2)` attached to a subspace `U` of `k^n` of dimension `d`, |
| 65 | where `q` is the number of elements of `k`. -/ |
| 66 | noncomputable abbrev New.heckePolyCoeff {n k : Type*} [Field k] (X : ℂ) (U : Submodule k (n → k)) : |
| 67 | ℂ := |
| 68 | (-X) ^ finrank k U * (Nat.card k : ℂ) ^ (finrank k U).choose 2 |
| 69 | |
| 70 | open scoped Classical in |
| 71 | /-- The q-binomial theorem for subspaces: for a subspace `W` of `k^n`, with `n` finite and `k` a |
| 72 | field with `q` elements, and for `X : ℂ`, the sum of `(-X) ^ dim U * q ^ (dim U choose 2)` |
| 73 | (`heckePolyCoeff X U`) over the subspaces `U ≤ W` is `∏ l < dim W, (1 - q ^ l * X)` |
| 74 | (`SiegelWeil.qPochhammer q (dim W) X`). |
| 75 | |
| 76 | A variant of the finite q-binomial theorem as in Macdonald, with a sum over subspaces in place of |
| 77 | Gaussian binomial coefficients. -/ |
| 78 | lemma New.q_binomial_submodule (n k : Type*) [Finite n] [Field k] [Finite k] |
| 79 | (W : Submodule k (n → k)) (X : ℂ) : |
| 80 | ∑ U : Submodule k (n → k) with U ≤ W, heckePolyCoeff X U = |
| 81 | SiegelWeil.qPochhammer (Nat.card k) (finrank k W) X := by |
| 82 | let q := Fintype.card k |
| 83 | let d := finrank k W |
| 84 | let weight (j : ℕ) : ℂ := (-X) ^ j * (q : ℂ) ^ j.choose 2 |
| 85 | -- Submodules below W are the subspaces of W itself. |
| 86 | have subspaces : (∑ U : Submodule k (n → k) with U ≤ W, heckePolyCoeff X U) = |
| 87 | ∑ U : Submodule k W, weight (finrank k U) := by |
| 88 | rw [sum_subtype (p := fun U ↦ U ∈ Set.Iic W) _ (fun U ↦ by simp)] |
| 89 | symm |
| 90 | apply Fintype.sum_equiv W.mapIic.toEquiv |
| 91 | intro T |
| 92 | change weight (finrank k T) = heckePolyCoeff X (T.map W.subtype) |
| 93 | unfold heckePolyCoeff |
| 94 | rw [Nat.card_eq_fintype_card, |
| 95 | ← (T.equivMapOfInjective W.subtype W.subtype_injective).finrank_eq] |
| 96 | -- Collect the terms of each dimension and apply the finite q-binomial theorem. |
| 97 | have ranks (U : Submodule k W) (_ : U ∈ univ) : finrank k U ∈ range (d + 1) := |
| 98 | mem_range.mpr (Nat.lt_succ_of_le U.finrank_le) |
| 99 | rw [subspaces, ← sum_fiberwise_of_maps_to' ranks weight] |
| 100 | have product := TauCeti.prod_one_add_pow_mul_eq_sum_gaussianBinomial (q : ℂ) (-X) d |
| 101 | simp only [mul_neg, ← sub_eq_add_neg] at product |
| 102 | unfold SiegelWeil.qPochhammer |
| 103 | rw [Nat.card_eq_fintype_card, product] |
| 104 | apply sum_congr rfl |
| 105 | intro j _ |
| 106 | rw [sum_const, nsmul_eq_mul, ← Fintype.card_subtype, ← Nat.card_eq_fintype_card, |
| 107 | TauCeti.card_submodule_finrank_eq_gaussianBinomial] |
| 108 | rw [show ((TauCeti.gaussianBinomial q d j : ℕ) : ℂ) = TauCeti.gaussianBinomial (q : ℂ) d j |
| 109 | from TauCeti.map_gaussianBinomial (Nat.castRingHom ℂ) q d j] |
| 110 | dsimp only [weight] |
| 111 | ring |
| 112 | |
| 113 | end QBinomial |
| 114 | |
| 115 | /-! ## Sums over an image grouped by fibres -/ |
| 116 | |
| 117 | /-- Let `S` be a finite set and `ψ` a map. If for `t ∈ S` the value `F (ψ t)` divided by the size of |
| 118 | the fibre of `ψ` in `S` through `t` is `G t / D`, and `G` has sum zero over `S`, then `F` has sum |
| 119 | zero over `ψ '' S`. -/ |
| 120 | lemma New.Variety.finsum_image_eq_zero_of_fibers {T C : Type*} {S : Set T} (hS : S.Finite) |
| 121 | (ψ : T → C) {G : T → ℂ} {F : C → ℂ} {D : ℂ} (h_sum : ∑ᶠ t ∈ S, G t = 0) |
| 122 | (h_ratio : ∀ t ∈ S, F (ψ t) / Nat.card {s ∈ S | ψ s = ψ t} = G t / D) : |
| 123 | ∑ᶠ c ∈ ψ '' S, F c = 0 := by |
| 124 | classical |
| 125 | -- Group the sum `∑ G t / D` over `S` by the fibres of `ψ`: the fibre over `c` contributes `F c`. |
| 126 | lift S to Finset T using hS |
| 127 | rw_mod_cast [finsum_mem_finset_eq_sum] at h_sum ⊢ |
| 128 | have fibre (t : T) (ht : t ∈ S) : F (ψ t) = ∑ s ∈ S with ψ s = ψ t, G s / D := by |
| 129 | -- By `h_ratio` the summand is constant on the fibre. |
| 130 | have const : ∀ s ∈ {s ∈ S | ψ s = ψ t}, G s / D = F (ψ t) / {s ∈ S | ψ s = ψ t}.card := by |
| 131 | simp +contextual [← h_ratio, ← Set.ncard_coe_finset] |
| 132 | rw [Finset.sum_eq_card_nsmul const, nsmul_eq_mul, |
| 133 | mul_div_cancel₀ _ (Nat.cast_ne_zero.2 (Finset.card_ne_zero.2 ⟨t, by simp [ht]⟩))] |
| 134 | rw [S.sum_image' (fun s ↦ G s / D) fibre, ← S.sum_div, h_sum, zero_div] |
| 135 | |
| 136 | /-! |
| 137 | ## Schur polynomials in the coefficients of a monic polynomial |
| 138 | |
| 139 | A Schur polynomial in `a` variables is symmetric, so it is an integer polynomial in the coefficients |
| 140 | of `∏ (X - r i)`. Here it is defined in that form, without division, for any tuple of exponents |
| 141 | `l : Fin a → ℕ` (classically `l j` is a part of a partition plus `j`). |
| 142 | -/ |
| 143 | |
| 144 | section SchurPolynomial |
| 145 | |
| 146 | open Matrix Polynomial Finset Fin Lagrange |
| 147 | |
| 148 | namespace New.Variety |
| 149 | |
| 150 | variable {a : ℕ} (l : Fin a → ℕ) {R S : Type} [CommRing R] [CommRing S] |
| 151 | (r : Fin a → R) (s : Multiset R) |
| 152 | |
| 153 | /-- For exponents `l : Fin a → ℕ`, the determinant of the matrix of coefficients of the remainders |
| 154 | of the `X ^ l j` modulo `freeMonic ℤ a`, the generic monic polynomial of degree `a`. It is an |
| 155 | integer polynomial in the `a` generic coefficients. -/ |
| 156 | noncomputable def genericSchur : MvPolynomial (Fin a) ℤ := |
| 157 | (of fun k j : Fin a ↦ (X ^ l j %ₘ freeMonic ℤ a).coeff k.val).det |
| 158 | |
| 159 | /-- Evaluation of an integer polynomial in `a` variables at the coefficients of degree less than `a` |
| 160 | of `∏ (X - t)`, with `t` running over the multiset `s`. Applied to `genericSchur l`, with `s` of |
| 161 | size `a`, it gives the value of the Schur polynomial at the roots. -/ |
| 162 | noncomputable def rootCoeffEval : MvPolynomial (Fin a) ℤ →ₐ[ℤ] R := |
| 163 | MvPolynomial.aeval (R := ℤ) fun i : Fin a ↦ (s.map fun t : R ↦ X - C t).prod.coeff i |
| 164 | |
| 165 | /-- `rootCoeffEval s`, evaluation at the coefficients of `∏ t ∈ s, (X - t)`, commutes with a ring |
| 166 | homomorphism `f`, applied to the roots. -/ |
| 167 | lemma rootCoeffEval_map (f : R →+* S) (q : MvPolynomial (Fin a) ℤ) : |
| 168 | rootCoeffEval (a := a) (s.map f) q = f (rootCoeffEval s q) := by |
| 169 | rw [rootCoeffEval, rootCoeffEval, MvPolynomial.map_aeval, MvPolynomial.aeval_eq_eval₂Hom, |
| 170 | RingHom.ext_int (f.comp (algebraMap ℤ R)) (algebraMap ℤ S)] |
| 171 | simp [← coeff_map, Polynomial.map_multiset_prod] |
| 172 | |
| 173 | /-- The bialternant formula over a commutative ring `R`: the Schur polynomial `genericSchur l`, |
| 174 | evaluated at the coefficients of `∏ (X - r i)`, times the Vandermonde determinant of `r` is the |
| 175 | generalised Vandermonde determinant `det (r i ^ l j)`. -/ |
| 176 | lemma rootCoeffEval_genericSchur_mul_det : |
| 177 | rootCoeffEval (univ.val.map r) (genericSchur l) * (vandermonde r).det = |
| 178 | (of fun i j : Fin a ↦ r i ^ l j).det := by |
| 179 | nontriviality R |
| 180 | -- Specialise `freeMonic ℤ a` to `nodal univ r = ∏ (X - r k)` via `φ = rootCoeffEval`. |
| 181 | let φ := (MvPolynomial.mapEquivMonic ℤ R a).symm (.mk (nodal univ r) nodal_monic (by simp)) |
| 182 | have hφ : (freeMonic ℤ a).map φ = nodal univ r := |
| 183 | congrArg Subtype.val ((MvPolynomial.mapEquivMonic ℤ R a).apply_symm_apply _) |
| 184 | have hφ_eq : rootCoeffEval (univ.val.map r) = φ := MvPolynomial.algHom_ext fun k ↦ by |
| 185 | simp [rootCoeffEval, φ, MvPolynomial.mapEquivMonic, nodal, ← Fin.prod_ofFn, Function.comp_def] |
| 186 | rw [hφ_eq, genericSchur, mul_comm, AlgHom.map_det, ← det_mul] |
| 187 | refine congrArg det (Matrix.ext fun i j ↦ ?_) |
| 188 | -- Each entry `(i, j)` evaluates `X ^ l j %ₘ freeMonic ℤ a` at `r i`, giving `r i ^ l j`. |
| 189 | trans (X ^ l j %ₘ freeMonic ℤ a).eval₂ φ (r i) |
| 190 | · conv_rhs => rw [← sum_modByMonic_coeff (monic_freeMonic ℤ a) (degree_freeMonic ℤ a).le] |
| 191 | simp [Matrix.mul_apply, mul_comm, eval₂_finsetSum] |
| 192 | · rw [eval₂_modByMonic_eq_self_of_root (by simp [eval₂_eq_eval_map, hφ, eval_nodal_at_node]), |
| 193 | eval₂_X_pow, of_apply] |
| 194 | |
| 195 | end New.Variety |
| 196 | |
| 197 | end SchurPolynomial |
| 198 | |
| 199 | /-! ## Extracting Schur polynomials from vanishing linear forms -/ |
| 200 | |
| 201 | section SchurExtraction |
| 202 | |
| 203 | open NumberField Matrix Submodule Polynomial Finset Lagrange Multiset Set SetLike Fintype |
| 204 | |
| 205 | namespace New.Variety |
| 206 | |
| 207 | variable {a : ℕ} {ι S K R : Type _} [Fintype S] [Field K] [CommRing R] [Algebra K R] |
| 208 | |
| 209 | /-- Lagrange interpolation of `X ^ j`, for `j < a`, at distinct nodes `r₁, …, r_a`, evaluated at a |
| 210 | polynomial `t`. -/ |
| 211 | lemma sum_aeval_lagrange_basis_mul_C_pow (r : Fin a ↪ K) (t : K[X]) (j : Fin a) : |
| 212 | ∑ k : Fin a, aeval t (Lagrange.basis Finset.univ r k) * C (r k) ^ j.val = t ^ j.val := by |
| 213 | have h_pow : (X : K[X]) ^ j.val = ∑ k, Lagrange.basis univ r k * C (r k) ^ j.val := by |
| 214 | simpa [mul_comm] using eq_interpolate (f := X ^ j.val) (s := univ) r.injective.injOn (by simp) |
| 215 | simpa using congrArg (aeval t) h_pow.symm |
| 216 | |
| 217 | /-- For distinct `r₁, …, r_a` in a field `K` and exponents `l : Fin a → ℕ`, the identity `∑ᵢ |
| 218 | ∏_{k ≠ i} (X rᵢ - r_k) / (rᵢ - r_k) · s_l(r₁, …, X rᵢ, …, r_a) = s_l(r) · ∑ⱼ X ^ l j` holds in |
| 219 | `K[X]`. Here `s_l(r)` is `genericSchur l` evaluated by `rootCoeffEval` at the coefficients of |
| 220 | `∏ (T - r_k)`. This is the determinant of the coefficients of the remainders of the `X ^ l j` modulo |
| 221 | that product, so the exponents `l j` play the role of the alternant exponents `λ_j + a - j` of a |
| 222 | Schur polynomial, not of a partition `λ`. -/ |
| 223 | lemma sum_lagrange_smul_rootCoeffEval (l : Fin a → ℕ) (r : Fin a ↪ K) : |
| 224 | ∑ i : Fin a, aeval (X * C (r i)) (Lagrange.basis Finset.univ r i) • |
| 225 | rootCoeffEval (univ.val.map fun k : Fin a ↦ (if k = i then X else 1) * C (r k)) |
| 226 | (genericSchur l) = |
| 227 | C (rootCoeffEval (univ.val.map r) (genericSchur l)) * ∑ j : Fin a, X ^ l j := by |
| 228 | -- Multiply by the Vandermonde determinant of `r` and use the bialternant formula. |
| 229 | refine mul_right_cancel₀ (b := (vandermonde (C ∘ r)).det) |
| 230 | (det_vandermonde_ne_zero_iff.2 (C_injective.comp r.injective)) ?_ |
| 231 | -- The image of the bialternant formula under `C`. |
| 232 | have h_schur : C (rootCoeffEval (univ.val.map r) (genericSchur l)) * (vandermonde (C ∘ r)).det = |
| 233 | (of fun k j : Fin a ↦ C (r k) ^ l j).det := by |
| 234 | simpa [← rootCoeffEval_map, Function.comp_def] using |
| 235 | rootCoeffEval_genericSchur_mul_det l (C ∘ r) |
| 236 | -- By Lagrange interpolation, the row of `X * r i` is the combination of the rows of the `r k` |
| 237 | -- with coefficients `basis k (X * r i)`; only `k = i` counts in the determinant. |
| 238 | have replace_row (i : Fin a) : |
| 239 | aeval (X * C (r i)) (Lagrange.basis univ r i) • (vandermonde (C ∘ r)).det = |
| 240 | (vandermonde fun k ↦ (if k = i then X else 1) * C (r k)).det := by |
| 241 | rw [← det_updateRow_sum _ i fun k ↦ aeval (X * C (r i)) (Lagrange.basis univ r k)] |
| 242 | congr 1 |
| 243 | ext k j : 1 |
| 244 | by_cases hk : k = i <;> simp [hk, sum_aeval_lagrange_basis_mul_C_pow, Finset.sum_apply] |
| 245 | -- So each term on the left becomes a generalised Vandermonde determinant with one row changed. |
| 246 | let A := of fun k j : Fin a ↦ C (r k) ^ l j |
| 247 | have h_left (i : Fin a) : aeval (X * C (r i)) (Lagrange.basis univ r i) • |
| 248 | rootCoeffEval (univ.val.map fun k : Fin a ↦ (if k = i then X else 1) * C (r k)) |
| 249 | (genericSchur l) * (vandermonde (C ∘ r)).det = |
| 250 | (A.updateRow i fun j ↦ X ^ l j * A i j).det := by |
| 251 | rw [smul_mul_assoc, ← mul_smul_comm, replace_row, rootCoeffEval_genericSchur_mul_det] |
| 252 | congr 1 |
| 253 | ext k j : 1 |
| 254 | by_cases hk : k = i |
| 255 | · subst k |
| 256 | simpa [A, Matrix.updateRow_apply, mul_pow] using |
| 257 | (mul_comm (C (r i) ^ l j) ((X : K[X]) ^ l j)) |
| 258 | · simp [A, Matrix.updateRow_apply, hk] |
| 259 | rw [sum_mul, mul_right_comm, h_schur, Finset.sum_congr rfl fun i _ ↦ h_left i, |
| 260 | Matrix.sum_det_updateRow_mul_row, mul_comm] |
| 261 | |
| 262 | open MvPolynomial RingOfIntegers Finsupp |
| 263 | |
| 264 | /-- For a number field `E` and a type `ι`, the doubled coordinate functions `α ↦ σ (2 * α i)` on |
| 265 | `(𝓞 E)^ι`, indexed by the pairs `(i, σ)` of an index `i: ι` and an embedding `σ` of `E` in `ℂ`, are |
| 266 | algebraically independent over `ℂ`. -/ |
| 267 | lemma algebraicIndependent_embedding_two_mul {E : Type*} [Field E] [NumberField E] : |
| 268 | AlgebraicIndependent ℂ fun (p : ι × (E →+* ℂ)) (α : ι → 𝓞 E) ↦ p.2 (2 * α p.1 : 𝓞 E) := by |
| 269 | -- Write `αᵢ` in an integral basis of `𝓞 E`. A relation `P` becomes a polynomial in the |
| 270 | -- coordinates that vanishes at all natural numbers, hence is zero; the change of variables is |
| 271 | -- invertible over `ℂ` because the embedded integral basis `b` is a basis of `(E →+* ℂ) → ℂ`. |
| 272 | refine algebraicIndependent_iff.2 fun P hP ↦ ?_ |
| 273 | let I : Type _ := Module.Free.ChooseBasisIndex ℤ (𝓞 E) |
| 274 | let b : Module.Basis I ℂ ((E →+* ℂ) → ℂ) := canonicalEmbedding.latticeBasis E |
| 275 | -- `coord (i, σ)` is `σ (2 αᵢ)` as a linear form in the coordinates of `αᵢ`. |
| 276 | let coord : ι × (E →+* ℂ) → MvPolynomial (ι × I) ℂ := |
| 277 | fun (i, σ) ↦ 2 • ∑ k : I, .X (i, k) * .C (b k σ) |
| 278 | have h_nat (z : ι × I → ℕ) : |
| 279 | MvPolynomial.aeval (fun p ↦ (z p : ℂ)) (MvPolynomial.aeval coord P) = 0 := by |
| 280 | let α (i : ι) : 𝓞 E := ∑ k : I, (z (i, k) : 𝓞 E) * basis E k |
| 281 | have hPα : MvPolynomial.aeval (fun p : ι × (E →+* ℂ) ↦ p.2 (2 * α p.1 : 𝓞 E)) P = 0 := by |
| 282 | simpa [comp_aeval_apply] using congrArg (Pi.evalAlgHom ℂ _ α) hP |
| 283 | have hb (k : I) (σ : E →+* ℂ) : b k σ = σ (basis E k) := by simp [b, I] |
| 284 | simpa [comp_aeval_apply, α, hb, coord, two_mul] using hPα |
| 285 | have h_zero : MvPolynomial.aeval coord P = 0 := by |
| 286 | refine funext_set (fun _ ↦ Set.range (Nat.cast : ℕ → ℂ)) |
| 287 | (fun _ ↦ infinite_range_of_injective Nat.cast_injective) fun x hx ↦ ?_ |
| 288 | choose z hz using fun p : ι × I ↦ hx p (Set.mem_univ p) |
| 289 | rw [← _root_.funext hz, ← aeval_eq_eval, _root_.map_zero] |
| 290 | exact h_nat z |
| 291 | -- To evaluate `P` at `v`, take as coordinates those of `v (i, ·) / 2` in the basis `b`. |
| 292 | refine MvPolynomial.funext fun v ↦ ?_ |
| 293 | let y (p : ι × I) : ℂ := b.repr (fun σ ↦ v (p.1, σ) / 2) p.2 |
| 294 | have h_coord (p : ι × (E →+* ℂ)) : MvPolynomial.aeval y (coord p) = v p := by |
| 295 | have h_repr : ∑ k : I, y (p.1, k) * b k p.2 = v p / 2 := by |
| 296 | simpa [y] using congrFun (b.sum_repr fun σ ↦ v (p.1, σ) / 2) p.2 |
| 297 | simp [coord, two_mul, h_repr] |
| 298 | simpa [comp_aeval_apply, h_coord] using congrArg (MvPolynomial.aeval y) h_zero |
| 299 | |
| 300 | /-- If a linear form kills the products of `1 - c (i, σ) α * t` for every `α`, algebraic |
| 301 | independence of the functions `c (i, σ)` forces it to kill each product of signed elementary |
| 302 | symmetric functions. These products are the coefficients of the expanded family. -/ |
| 303 | lemma map_prod_esymm_eq_zero [Fintype ι] {A : Type*} {c : ι × S → A → K} |
| 304 | (hc : AlgebraicIndependent K c) {J : Type*} {x : J → S → Multiset R} |
| 305 | (hx : ∀ (j : J) (σ : S), (x j σ).card = a) (L : (J → R) →ₗ[K] K) |
| 306 | (hL : ∀ α : A, L (fun j : J ↦ |
| 307 | ∏ i : ι, ∏ σ : S, ((x j σ).map fun t : R ↦ 1 - algebraMap K R (c (i, σ) α) * t).prod) = 0) |
| 308 | (y : ι × S → Fin a.succ) : |
| 309 | L (∏ p : ι × S, fun j : J ↦ (-1) ^ (y p).val * (x j p.2).esymm (y p)) = 0 := by |
| 310 | classical |
| 311 | let e (σ : S) (k : Fin a.succ) (j : J) : R := (-1) ^ k.val * (x j σ).esymm k |
| 312 | -- Vieta's formula at `X = 1` for the multiset `b • x j σ`. |
| 313 | have vieta (j : J) (σ : S) (b : K) : |
| 314 | ((x j σ).map fun t ↦ 1 - b • t).prod = ∑ k : Fin a.succ, b ^ k.val • e σ k j := by |
| 315 | simpa [eval_multiset_prod, sum_range, eval_finsetSum, hx, ← pow_smul_esymm] using |
| 316 | congrArg (Polynomial.eval 1) ((x j σ).map fun t ↦ b • t).prod_X_sub_X_eq_sum_esymm |
| 317 | have expand (α : A) : |
| 318 | L (∑ y : ι × S → Fin a.succ, (∏ p, c p α ^ (y p).val) • ∏ p, e p.2 (y p)) = 0 := by |
| 319 | rw [← hL α] |
| 320 | refine congrArg L (_root_.funext fun j ↦ ?_) |
| 321 | simp_rw [← Algebra.smul_def, vieta, ← prod_prod_type'] |
| 322 | simp [prod_univ_sum, prod_smul] |
| 323 | -- The expanded relation is a linear combination of distinct monomials in the `c (i, σ)`. |
| 324 | let expo (y : ι × S → Fin a.succ) : ι × S →₀ ℕ := equivFunOnFinite.symm (Fin.val ∘ y) |
| 325 | have indep : LinearIndependent K fun y : ι × S → Fin a.succ ↦ |
| 326 | MvPolynomial.aeval c (monomial (expo y) (1 : K)) := |
| 327 | ((basisMonomials (ι × S) K).linearIndependent.map_injOn (MvPolynomial.aeval c).toLinearMap |
| 328 | hc.injOn).comp expo (equivFunOnFinite.symm.injective.comp Fin.val_injective.comp_left) |
| 329 | refine Fintype.linearIndependent_iff.1 indep (fun y ↦ L (∏ p, e p.2 (y p))) ?_ y |
| 330 | ext α |
| 331 | simpa [expo, MvPolynomial.aeval_monomial, mul_comm] using expand α |
| 332 | |
| 333 | /-- Evaluating a polynomial of total degree at most `n` at the root coefficients gives an |
| 334 | element of the `n`th power of the span of the signed elementary symmetric functions. The |
| 335 | zeroth elementary symmetric function supplies `1`, so monomials of smaller degree can be padded. -/ |
| 336 | lemma rootCoeffEval_mem_pow_span_esymm {J : Type*} {x : J → Multiset R} |
| 337 | (hx : ∀ j : J, (x j).card = a) {q : MvPolynomial (Fin a) ℤ} {n : ℕ} |
| 338 | (h_deg : q.totalDegree ≤ n) : |
| 339 | (fun j ↦ rootCoeffEval (x j) q) ∈ |
| 340 | (span K (.range fun k : Fin a.succ ↦ fun j : J ↦ (-1) ^ k.val * (x j).esymm k)) ^ n := by |
| 341 | classical |
| 342 | let e (k : Fin a.succ) (j : J) : R := (-1) ^ k.val * (x j).esymm k |
| 343 | let M : Submodule K (J → R) := span K (.range e) |
| 344 | have one_le_M : 1 ≤ M := |
| 345 | one_le.2 (subset_span ⟨0, _root_.funext fun j ↦ by simp [e, Multiset.esymm]⟩) |
| 346 | have eval_eq : (fun j ↦ rootCoeffEval (x j) q) = |
| 347 | ∑ d ∈ q.support, q.coeff d • ∏ k : Fin a, e k.castSucc.rev ^ d k := by |
| 348 | ext j |
| 349 | simp [rootCoeffEval, aeval_eq_eval₂Hom, eval₂_eq', prod_X_sub_C_coeff, hx, e] |
| 350 | change (fun j ↦ rootCoeffEval (x j) q) ∈ M ^ n |
| 351 | rw [eval_eq] |
| 352 | refine sum_mem fun d hd ↦ zsmul_mem ?_ _ |
| 353 | have monomial_mem : ∏ k : Fin a, e k.castSucc.rev ^ d k ∈ M ^ ∑ k, d k := by |
| 354 | simpa using prod_pow_mem_graded (fun m : ℕ ↦ M ^ m) 1 (fun k : Fin a ↦ e k.castSucc.rev) d |
| 355 | (by simp [M, mem_span_of_mem]) |
| 356 | exact pow_le_pow_right' one_le_M |
| 357 | (by simpa [sum_fintype] using (le_totalDegree hd).trans h_deg) monomial_mem |
| 358 | |
| 359 | /-- Let the functions `c (i, σ) : A → K` be algebraically independent over `K`, let each polynomial |
| 360 | `q σ` have total degree at most `card ι`, and let each multiset `x j σ` have `a` elements. If a |
| 361 | linear form `L` kills the family `j ↦ ∏_{i, σ} ∏_{t ∈ x j σ} (1 - c (i, σ) α * t)` for every `α`, |
| 362 | then it kills `j ↦ ∏_σ rootCoeffEval (x j σ) (q σ)`, where `rootCoeffEval (x j σ)` evaluates at the |
| 363 | coefficients of `∏_{t ∈ x j σ} (X - t)`. -/ |
| 364 | lemma map_prod_rootCoeffEval_eq_zero [Fintype ι] {A : Type*} {q : S → MvPolynomial (Fin a) ℤ} |
| 365 | (h_deg : ∀ σ : S, (q σ).totalDegree ≤ Fintype.card ι) {c : ι × S → A → K} |
| 366 | (hc : AlgebraicIndependent K c) {J : Type*} {x : J → S → Multiset R} |
| 367 | (hx : ∀ (j : J) (σ : S), (x j σ).card = a) (L : (J → R) →ₗ[K] K) |
| 368 | (hL : ∀ α : A, L (fun j : J ↦ |
| 369 | ∏ i : ι, ∏ σ : S, ((x j σ).map fun t : R ↦ 1 - algebraMap K R (c (i, σ) α) * t).prod) = 0) : |
| 370 | L (fun j : J ↦ ∏ σ : S, rootCoeffEval (x j σ) (q σ)) = 0 := by |
| 371 | classical |
| 372 | let e (σ : S) (k : Fin a.succ) (j : J) : R := (-1) ^ k.val * (x j σ).esymm k |
| 373 | let M (σ : S) : Submodule K (J → R) := span K (.range (e σ)) |
| 374 | -- Coefficient extraction puts the product of the spans in the kernel of `L`. |
| 375 | have le_ker : ∏ σ : S, ∏ _ : ι, M σ ≤ L.ker := by |
| 376 | rw [← prod_prod_type_right' fun (_ : ι) (σ : S) ↦ M σ] |
| 377 | simpa [M, e, prod_span, span_le, ← image_fintype_prod_pi, ← range_piMap, |
| 378 | range_subset_iff] using map_prod_esymm_eq_zero hc hx L hL |
| 379 | -- The degree bound puts each evaluated polynomial in the corresponding power of its span. |
| 380 | have eval_mem (σ : S) : (fun j ↦ rootCoeffEval (x j σ) (q σ)) ∈ ∏ _ : ι, M σ := by |
| 381 | simpa only [M, e, Finset.prod_const, Finset.card_univ] using |
| 382 | rootCoeffEval_mem_pow_span_esymm (K := K) (fun j ↦ hx j σ) (h_deg σ) |
| 383 | simpa [prod_fn] using le_ker |
| 384 | (Finset.prod_hom_rel (r := fun f N ↦ f ∈ N) ⟨1, by simp⟩ fun σ _ _ ↦ mul_mem_mul (eval_mem σ)) |
| 385 | |
| 386 | end New.Variety |
| 387 | |
| 388 | end SchurExtraction |