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.Algebra.Module.LinearMap.Polynomial |
| 4 | public import Mathlib.RingTheory.MvPolynomial.IrreducibleQuadratic |
| 5 | public import Mathlib.RingTheory.MvPowerSeries.Derivative |
| 6 | import TauCeti.Algebra.MvPolynomial.PDeriv |
| 7 | public import TauCeti.RingTheory.MvPolynomial.JetPairing |
| 8 | public import Lib.Speed |
| 9 | |
| 10 | /-! |
| 11 | # Schur modules: semi-invariants, minors, Fock pairing, Schur and Gram matrices |
| 12 | |
| 13 | This file sets up a polynomial model of the representations of products of general linear groups |
| 14 | over any commutative ring `R`. The variables `X (a, i)` of `New.MatrixPoly m R` form an array with |
| 15 | rows `a : m` and columns `i : ℕ`. A colour map `c` assigns each row a place `τ`, and a weight `κ` |
| 16 | gives the number `κ τ h` of columns of height `h` at `τ`. `New.nabla R c l` consists of the `f` with |
| 17 | `f(y b) = ∏ b(τ, i, i) ^ l(τ, i) · f(y)` for upper triangular `b`, one matrix for each colour, and a |
| 18 | chosen set of products of minors is taken as its basis. The Weyl module is the dual module, written |
| 19 | in the dual basis as `New.WeylIndexFamily n κ → R`; `Lib.GLn.SchurModule.TensorModel` embeds it into |
| 20 | a tensor product of exterior powers. Left substitution `f ↦ f(z y)` and the Fock pairing |
| 21 | `⟨p, q⟩ = p(∂) q (0)` are the main tools. The rows of the Schur matrix expand the substituted basis |
| 22 | elements, so it acts on the Weyl module, and the Gram matrix is the coefficient matrix of the kernel |
| 23 | `New.weylKernel` in the basis. |
| 24 | |
| 25 | ## Main definitions and results |
| 26 | |
| 27 | * `MvPolynomial.jetPairing`, `New.fockPairing`: the pairing `P(∂) F` at `0`, on power series and on |
| 28 | polynomials. `New.fockPairing_linSubst` computes adjoints of linear substitutions. |
| 29 | * `New.nabla`, `New.nablaFamily`: the semi-invariants under upper triangular matrices acting on |
| 30 | columns. |
| 31 | * `New.tableauPoly`, `New.IsTableauBasis`, `New.nablaBasis`: products of minors, and a chosen basis |
| 32 | among them. |
| 33 | * `New.schur`, `New.weylGram`, `New.weylEval`: the matrix of `f ↦ f(z y)`, the Gram matrix and the |
| 34 | evaluation vectors in that basis. |
| 35 | * `New.mem_nabla`, `New.minor_mem_nabla`, `New.rowSubst_mem_nabla`: membership as an identity over |
| 36 | all algebras; minors are members; left substitution `f ↦ f(z y)` (`New.rowSubst`) keeps the |
| 37 | weight. |
| 38 | * `New.fockPairing_comm`, `New.fockPairing_rowSubst`, `New.fockPairing_star_self_pos`: the pairing |
| 39 | `⟨p, q⟩ = p(∂) q (0)` is symmetric, the adjoint of `New.rowSubst z` is substitution by the |
| 40 | transposes, and `⟨p̄, p⟩ > 0` for `p ≠ 0`. |
| 41 | |
| 42 | ## Relation to the literature |
| 43 | |
| 44 | Known; see `Lib.GLn.SchurModule.MinorBasis` for sources. |
| 45 | -/ |
| 46 | |
| 47 | @[expose] public section |
| 48 | |
| 49 | noncomputable section |
| 50 | |
| 51 | /-! |
| 52 | ## The polynomial model and its basic objects |
| 53 | |
| 54 | Bases are chosen by `Classical.epsilon`. Coordinates in `schur` and `weylGram` are chosen by |
| 55 | `Function.invFun`. |
| 56 | -/ |
| 57 | |
| 58 | section Defs |
| 59 | |
| 60 | open MvPolynomial Module Finset Matrix Nat Sigma Finsupp Fintype Function |
| 61 | |
| 62 | namespace New |
| 63 | |
| 64 | variable {σ Φ m R : Type} [CommRing R] [Fintype Φ] [DecidableEq Φ] |
| 65 | (n n' : Φ → Type) [∀ τ : Φ, Fintype (n τ)] [∀ τ : Φ, DecidableEq (n τ)] |
| 66 | [∀ τ : Φ, Fintype (n' τ)] [∀ τ : Φ, DecidableEq (n' τ)] (c : m → Φ) (N e : Φ → ℕ) |
| 67 | (κ : Φ → ℕ → ℕ) (τ : Φ) |
| 68 | |
| 69 | /-- For a row colouring `c` and arrays `b` and `y`, the array `y b` has `(a, j)` entry |
| 70 | `Σ_{i≤j} y(a,i) b(c(a),i,j)`; here `x = (a, j)`. It uses the upper triangular part of `b` at the |
| 71 | colour of `a`. -/ |
| 72 | def borelMul (b : Φ × ℕ × ℕ → R) (y : m × ℕ → R) (x : m × ℕ) : R := |
| 73 | ∑ i ∈ range (x.snd + 1), y (x.fst, i) * b (c x.fst, i, x.snd) |
| 74 | |
| 75 | /-- For bounds `N` and column multiplicities `κ` (`κ τ h` columns of height `h` at `τ`, for |
| 76 | `h < N τ`), the finitely supported weight whose value at `(τ, i)`, columns numbered from 0, is the |
| 77 | sum of `κ τ h` over `i < h < N τ`. -/ |
| 78 | def diagramWeight : Φ × ℕ →₀ ℕ := |
| 79 | ∑ τ : Φ, ∑ h ∈ range (N τ), κ τ h • ∑ i ∈ range h, Finsupp.single (τ, i) 1 |
| 80 | |
| 81 | variable (m R) |
| 82 | |
| 83 | /-! ### Polynomial arrays, the Fock pairing, minors, semi-invariants and fillings -/ |
| 84 | |
| 85 | /-- Polynomials over `R` in an array of variables `X (a, i)`, with rows `a : m` and columns |
| 86 | `i : ℕ`. -/ |
| 87 | abbrev MatrixPoly : Type := MvPolynomial (m × ℕ) R |
| 88 | |
| 89 | /-- The type of fillings assigning, for each height h<N, to each of k(h) columns an h-tuple of |
| 90 | elements of m, with no ordering condition. -/ |
| 91 | abbrev Tableau (N : ℕ) (k : ℕ → ℕ) : Type := ∀ h : Fin N, Fin (k h) → Fin h → m |
| 92 | |
| 93 | variable {m} {h N : ℕ} {k : ℕ → ℕ} |
| 94 | |
| 95 | /-- The bilinear form on polynomials ⟨P,Q⟩ = P(∂)Q(0), for which monomials are orthogonal and |
| 96 | ⟨x^d,x^d⟩ = d!. -/ |
| 97 | @[local simp] |
| 98 | def fockPairing : LinearMap.BilinForm R (MvPolynomial σ R) := |
| 99 | jetPairing.compl₂ (coeToMvPowerSeries.algHom R).toLinearMap |
| 100 | |
| 101 | /-- For an h-tuple I of rows, the polynomial determinant of the h×h matrix of variables in rows |
| 102 | I and the first h columns. -/ |
| 103 | def minor (I : Fin h → m) : MatrixPoly m R := det (of fun a b ↦ X (I a, b)) |
| 104 | |
| 105 | /-- For a row colouring `c : m → Φ` and a weight `l`, the module of Borel semi-invariants: the |
| 106 | polynomials `f` with `f(yβ) = ∏ β_{τ,ii}^{l(τ,i)} f(y)` for generic upper triangular matrices `β_τ`, |
| 107 | one per colour. -/ |
| 108 | def nabla (l : Φ × ℕ →₀ ℕ) : Submodule R (MatrixPoly m R) := |
| 109 | -- Both maps go to polynomials over `R[b]`, in the entries `b (τ, i, j)` of a generic upper |
| 110 | -- triangular matrix: right translation by `b`, and multiplication by the character of `l`. |
| 111 | (aeval (borelMul c (C ∘ X (R := R)) X)).toLinearMap.eqLocus |
| 112 | ((l.prod fun p j ↦ X (R := R) (p.fst, p.snd, p.snd) ^ j) • (aeval X).toLinearMap) |
| 113 | |
| 114 | /-- For a filling `T` with entries in `σ` and a map `e : σ → m` to the rows, the product over |
| 115 | the columns of `T` of the minors `New.minor` whose rows are the `e`-images of the column's |
| 116 | entries. -/ |
| 117 | def tableauPoly (e : σ → m) (T : Tableau σ N k) : MatrixPoly m R := |
| 118 | ∏ h : Fin N, ∏ j : Fin (k h), minor (m := m) R (e ∘ T h j) |
| 119 | |
| 120 | /-- For x in ℂ^N and l : ℕ → ℕ, the alternant det(x_i^{l(N−1−j)+j}), 0 ≤ i, j < N, if l(N) = 0, |
| 121 | and zero otherwise. -/ |
| 122 | def GL.alternant (x : Fin N → ℂ) (l : ℕ → ℕ) : ℂ := |
| 123 | if l N = 0 then det (of fun i j ↦ x i ^ (l j.rev + j)) else 0 |
| 124 | |
| 125 | /-- The set `s` of fillings is a standard set, in two parts: (a) over every commutative ring the |
| 126 | minor products of `s` form a basis of the span of all minor products; (b) for every enumeration `e` |
| 127 | of the rows and every `x : m → ℂ`, `(Σ_{T∈s} x^T) a_0(x) = a_λ(x)`. Here `x^T` is the product of `x` |
| 128 | over the entries of `T`, `a` is the alternant `New.GL.alternant`, and `λ(i)` is the sum of `k(h)` |
| 129 | over `i < h < N`. -/ |
| 130 | def IsTableauBasis (s : Finset (Tableau m N k)) : Prop := |
| 131 | -- (a) the minor products of `s` are a basis of the span of all minor products |
| 132 | (∀ (R : Type) [CommRing R], |
| 133 | let v (T : Tableau m N k) := tableauPoly R id T |
| 134 | LinearIndepOn R v s ∧ ∀ T : Tableau m N k, v T ∈ Submodule.span R (v '' s)) ∧ |
| 135 | -- (b) the Weyl character formula, for every enumeration `e` of the rows |
| 136 | ∀ (M : ℕ) (e : Fin M ≃ m) (x : m → ℂ), |
| 137 | (∑ T ∈ s, ∏ h : Fin N, ∏ j : Fin (k h), ∏ a : Fin h, x (T h j a)) * GL.alternant (x ∘ e) 0 = |
| 138 | GL.alternant (x ∘ e) fun i ↦ ∑ h ∈ Ioo i N, k h |
| 139 | |
| 140 | /-- For a standard set `s` (`IsTableauBasis`), over every commutative ring `R` the minor products |
| 141 | `tableauPoly R id T`, `T ∈ s`, are linearly independent. -/ |
| 142 | lemma IsTableauBasis.linearIndepOn {s : Finset (Tableau m N k)} (hs : IsTableauBasis s) |
| 143 | (R : Type) [CommRing R] : |
| 144 | LinearIndepOn R (tableauPoly R id) (s : Set (Tableau m N k)) := |
| 145 | (hs.left R).left |
| 146 | |
| 147 | /-- For a standard set `s`, over every commutative ring `R` the minor product of every filling `T` |
| 148 | lies in the span of the minor products of the members of `s`. -/ |
| 149 | lemma IsTableauBasis.mem_span {s : Finset (Tableau m N k)} (hs : IsTableauBasis s) |
| 150 | (R : Type) [CommRing R] (T : Tableau m N k) : |
| 151 | tableauPoly R id T ∈ Submodule.span R (tableauPoly R id '' (s : Set (Tableau m N k))) := |
| 152 | (hs.left R).right T |
| 153 | |
| 154 | /-- The Weyl character formula for a standard set `s`: for every enumeration `e : Fin M ≃ m` of |
| 155 | the rows and every `x : m → ℂ`, `(Σ_{T ∈ s} x^T) a_0(x) = a_λ(x)`, where `x^T` is the product of |
| 156 | `x` over the entries of `T`, `a` is `New.GL.alternant` and `λ i` is the sum of `k h` over |
| 157 | `i < h < N`. -/ |
| 158 | lemma IsTableauBasis.weyl_character_formula {s : Finset (Tableau m N k)} (hs : IsTableauBasis s) |
| 159 | (M : ℕ) (e : Fin M ≃ m) (x : m → ℂ) : |
| 160 | (∑ T ∈ s, ∏ h : Fin N, ∏ j : Fin (k h), ∏ a : Fin h, x (T h j a)) * GL.alternant (x ∘ e) 0 = |
| 161 | GL.alternant (x ∘ e) fun i ↦ ∑ h ∈ Ioo i N, k h := |
| 162 | hs.right M e x |
| 163 | |
| 164 | /-- A set `s` of fillings is a standard set if, over every commutative ring, its minor products are |
| 165 | linearly independent and span all minor products, and it satisfies the Weyl character formula. -/ |
| 166 | lemma IsTableauBasis.of_linearIndepOn_of_mem_span_of_character {s : Finset (Tableau m N k)} |
| 167 | (h_indep : ∀ (R : Type) [CommRing R], |
| 168 | LinearIndepOn R (tableauPoly R id) (s : Set (Tableau m N k))) |
| 169 | (h_span : ∀ (R : Type) [CommRing R] (T : Tableau m N k), |
| 170 | tableauPoly R id T ∈ Submodule.span R (tableauPoly R id '' (s : Set (Tableau m N k)))) |
| 171 | (h_char : ∀ (M : ℕ) (e : Fin M ≃ m) (x : m → ℂ), |
| 172 | (∑ T ∈ s, ∏ h : Fin N, ∏ j : Fin (k h), ∏ a : Fin h, x (T h j a)) * |
| 173 | GL.alternant (x ∘ e) 0 = |
| 174 | GL.alternant (x ∘ e) fun i ↦ ∑ h ∈ Ioo i N, k h) : |
| 175 | IsTableauBasis s := |
| 176 | ⟨fun R _ ↦ ⟨h_indep R, h_span R⟩, h_char⟩ |
| 177 | |
| 178 | /-- The standard fillings: the members of a chosen finite set of fillings that satisfies |
| 179 | `IsTableauBasis` as soon as some set does. This is the case for a finite alphabet `m` |
| 180 | (`isTableauBasis_epsilon`). They need not be semistandard tableaux. -/ |
| 181 | def BasisTableau (m : Type) (N : ℕ) (k : ℕ → ℕ) : Type := |
| 182 | {T : Tableau m N k // T ∈ (Classical.epsilon IsTableauBasis : Finset (Tableau m N k))} |
| 183 | deriving Fintype |
| 184 | |
| 185 | instance {m : Type} [DecidableEq m] {N : ℕ} {k : ℕ → ℕ} : |
| 186 | DecidableEq (BasisTableau m N k) := by |
| 187 | unfold BasisTableau |
| 188 | infer_instance |
| 189 | |
| 190 | /-- The number of elements of the finite row type n_τ at the place τ. -/ |
| 191 | abbrev rankAt : ℕ := Fintype.card (n τ) |
| 192 | |
| 193 | /-- The fixed enumeration of the rows of n_τ by 0,…,|n_τ|−1, as an equivalence of n_τ with `Fin` |
| 194 | |n_τ|. -/ |
| 195 | abbrev GL.rowEquivFin : n τ ≃ Fin (Fintype.card (n τ)) := Fintype.equivFin (n τ) |
| 196 | |
| 197 | /-- The type of families choosing, for each place τ, a filling in the chosen standard set with |
| 198 | rows n_τ, heights below |n_τ| and multiplicities κ_τ. It indexes the basis `nablaBasis` of |
| 199 | `nablaFamily`; the Weyl module over `R` is the dual, `WeylIndexFamily n κ → R` in the dual basis. -/ |
| 200 | abbrev WeylIndexFamily : Type := ∀ τ : Φ, BasisTableau (n τ) (rankAt n τ) (κ τ) |
| 201 | |
| 202 | /-- The type of families of chosen standard fillings over the places, in the case where the row |
| 203 | type is the same finite type n at every place. -/ |
| 204 | abbrev WeylIndex (n : Type) [Fintype n] (κ : Φ → ℕ → ℕ) : |
| 205 | Type := WeylIndexFamily (fun _ : Φ ↦ n) κ |
| 206 | |
| 207 | /-- The module of Borel semi-invariant polynomials in rows (τ,a), coloured by τ, whose weight is |
| 208 | the partition tuple built from κ using heights below |n_τ|. It is the span ∇ of the products of |
| 209 | minors, one for each column of the diagram (`span_fillingPoly`). -/ |
| 210 | abbrev nablaFamily : Submodule R (MatrixPoly (Sigma n) R) := |
| 211 | nabla R (fst (β := n)) (diagramWeight (rankAt n) κ) |
| 212 | |
| 213 | /-- For a family i of chosen standard fillings, the polynomial that is the product over places τ |
| 214 | of the minor product of i_τ in the rows of block τ. -/ |
| 215 | def nablaBasis (i : WeylIndexFamily n κ) : MatrixPoly ((τ : Φ) × n τ) R := |
| 216 | ∏ τ : Φ, tableauPoly (m := Σ τ : Φ, n τ) R (Sigma.mk τ) (i τ).val |
| 217 | |
| 218 | /-- The polynomial product over places τ and h<N_τ of the leading principal h×h minor of the |
| 219 | variables in block τ raised to κ_τ(h). -/ |
| 220 | def highestPoly (N : Φ → ℕ) : MatrixPoly ((τ : Φ) × Fin (N τ)) R := |
| 221 | ∏ τ : Φ, |
| 222 | tableauPoly R (Sigma.mk τ) (fun h _ ↦ Fin.castLE h.is_le' : Tableau (Fin (N τ)) (N τ) (κ τ)) |
| 223 | |
| 224 | /-- For exponents `e : Φ → ℕ`, the product over places τ of the determinant of the variables in |
| 225 | all rows of block τ (fixed enumeration) and the first |n_τ| columns, raised to `e τ`. -/ |
| 226 | def detPow : MatrixPoly ((τ : Φ) × n τ) R := |
| 227 | ∏ τ : Φ, minor (m := Σ τ : Φ, n τ) R (fun a ↦ ⟨τ, (Fintype.equivFin (n τ)).symm a⟩) ^ e τ |
| 228 | |
| 229 | /-- The generic tuple of square matrices: the `(a, b)` entry at `τ` is the variable |
| 230 | `X ⟨τ, a, b⟩`. -/ |
| 231 | def GL.genericMatrixAt : Matrix (n τ) (n τ) (MvPolynomial ((τ : Φ) × n τ × n τ) R) := |
| 232 | of fun a b ↦ X (R := R) (σ := Σ τ : Φ, n τ × n τ) ⟨τ, a, b⟩ |
| 233 | |
| 234 | /-- The hook number: the integer ⟨f,f⟩ = f(∂)f(0), where f is the product of the leading |
| 235 | principal h×h minors raised to κ_τ(h), h<N_τ. -/ |
| 236 | def hookNumber (N : Φ → ℕ) : ℤ := fockPairing ℤ (highestPoly ℤ κ N) (highestPoly ℤ κ N) |
| 237 | |
| 238 | /-- The natural number κ_τ(|n_τ|) if |n_τ| < |n'_τ|, and 0 otherwise, as a function of the place |
| 239 | τ. Under `FitsRanks` and for |n_τ| > 0 it is the length of row number |n_τ|, counted from 1, of the |
| 240 | diagram with κ_τ(h) columns of height h < |n'_τ|. -/ |
| 241 | def schurDetExp : ℕ := if rankAt n τ < rankAt n' τ then κ τ (rankAt n τ) else 0 |
| 242 | |
| 243 | /-- The condition, at every place τ, that |n_τ| ≤ |n'_τ| and κ_τ(h) = 0 for |n_τ| < h < |n'_τ|: |
| 244 | the diagram with κ_τ(h) columns of height h < |n'_τ| has at most |n_τ| rows. -/ |
| 245 | @[grind] |
| 246 | def FitsRanks : Prop := |
| 247 | ∀ τ : Φ, rankAt n τ ≤ rankAt n' τ ∧ ∀ h ∈ Ioo (rankAt n τ) (rankAt n' τ), κ τ h = 0 |
| 248 | |
| 249 | variable {R n n'} (y : (Σ τ : Φ, n τ) × ℕ → R) (α : σ →₀ ℕ) (a : R) (f g : MvPolynomial σ R) (i : σ) |
| 250 | (F : MvPowerSeries σ R) |
| 251 | |
| 252 | /-! ### Substitutions and evaluations -/ |
| 253 | |
| 254 | /-- For matrices z_τ of size n'_τ×n_τ, the algebra homomorphism f ↦ f(zy) sending variable |
| 255 | y_{(τ,b),i} to Σ_a z_τ(b,a) y_{(τ,a),i}; here `x = (⟨τ, b⟩, i)`. -/ |
| 256 | def rowSubst (z : (τ : Φ) → Matrix (n' τ) (n τ) R) : |
| 257 | MatrixPoly (Σ τ : Φ, n' τ) R →ₐ[R] MatrixPoly (Σ τ : Φ, n τ) R := |
| 258 | aeval fun x ↦ ∑ a : n x.fst.fst, z x.fst.fst x.fst.snd a • X (⟨x.fst.fst, a⟩, x.snd) |
| 259 | |
| 260 | /-- For maps e_τ from rows to natural numbers, the array over R whose entry at row (τ,a), column |
| 261 | i is 1 if e_τ(a)=i and 0 otherwise. -/ |
| 262 | def permArray (e : ∀ τ : Φ, n τ → ℕ) (x : ((τ : Φ) × n τ) × ℕ) : R := |
| 263 | if e x.fst.fst x.fst.snd = x.snd then (1 : R) else 0 |
| 264 | |
| 265 | /-- A numbering of the rows is read as a map to `ℕ`. -/ |
| 266 | instance : CoeOut (∀ τ : Φ, n τ ≃ Fin (rankAt n τ)) (∀ τ : Φ, n τ → ℕ) := ⟨(· · ·)⟩ |
| 267 | |
| 268 | /-- The R-linear map sending a coordinate vector ξ to the polynomial Σ_i ξ_i b_i, where the b_i are |
| 269 | the basis products of minors `New.nablaBasis`. -/ |
| 270 | abbrev GL.nablaCombination : (WeylIndexFamily n κ → R) →ₗ[R] MatrixPoly ((τ : Φ) × n τ) R := |
| 271 | Fintype.linearCombination R (nablaBasis R n κ) |
| 272 | |
| 273 | /-- For square matrices `z τ`, the ring homomorphism from polynomials in variables (τ,a,b) to R |
| 274 | evaluating each variable at the matrix entry z_τ(a,b); here `x = ⟨τ, (a, b)⟩`. -/ |
| 275 | abbrev GL.evalMatrix (z : ∀ τ : Φ, Matrix (n τ) (n τ) R) : |
| 276 | MvPolynomial ((τ : Φ) × n τ × n τ) R →+* R := |
| 277 | MvPolynomial.eval (R := R) fun x : Σ τ : Φ, n τ × n τ ↦ z x.fst x.snd.fst x.snd.snd |
| 278 | |
| 279 | omit [Fintype Φ] [DecidableEq Φ] [∀ τ : Φ, Fintype (n τ)] [∀ τ : Φ, DecidableEq (n τ)] in |
| 280 | /-- Evaluating the entries of the generic matrix at `τ` by `evalMatrix z` gives the matrix `z τ`. -/ |
| 281 | @[simp] |
| 282 | lemma GL.genericMatrixAt_map_evalMatrix (z : ∀ τ : Φ, Matrix (n τ) (n τ) R) (τ : Φ) : |
| 283 | (genericMatrixAt R n τ).map (evalMatrix z) = z τ := by |
| 284 | ext a b |
| 285 | simp [genericMatrixAt] |
| 286 | |
| 287 | attribute [local simp↓ low] jetPairing_eq_sum |
| 288 | attribute [local simp↓] jetPairing_mul_X |
| 289 | |
| 290 | /-- The Fock pairing `⟨a * X ^ α, g⟩` is `α! * a * g.coeff α`, where `α!` is the product of the |
| 291 | factorials of the exponents. -/ |
| 292 | lemma fockPairing_monomial : |
| 293 | fockPairing R (monomial α a) g = α.prod (fun (_k : σ) (j : ℕ) ↦ j !) * (a * g.coeff α) := by |
| 294 | classical |
| 295 | simp |
| 296 | grind |
| 297 | |
| 298 | /-- The Fock pairing of a constant `a` with `g` is `a` times the constant term of `g`. -/ |
| 299 | lemma fockPairing_C : fockPairing R (C a) g = a * constantCoeff g := by |
| 300 | classical |
| 301 | aesop |
| 302 | |
| 303 | /-- For the Fock form, multiplication by `X i` is adjoint to the derivative in `X i`. -/ |
| 304 | lemma fockPairing_mul_X : fockPairing R (f * X i) g = fockPairing R f (pderiv i g) := by |
| 305 | simp [MvPowerSeries.pderiv_coe] |
| 306 | |
| 307 | /-- The Schur matrix `S_κ(z)` of a family of matrices `z τ` of size `n' τ × n τ`. Let `b` and `b'` |
| 308 | be `nablaBasis` for `n` and `n'`, and let `d` be `schurDetExp n n' κ`. Row `i` holds chosen |
| 309 | coordinates of `b'_i(z y)` in the family `b_j(y) * ∏ τ, det(y_τ) ^ d τ`; see |
| 310 | `sum_schur_smul_eq_rowSubst_of_exists`. The row is unspecified if there are no such coordinates; |
| 311 | they exist under `FitsRanks n n' κ` (`sum_schur_smul_nablaBasis`). It is the map of Weyl modules |
| 312 | induced by `z`; for square `z` it is the restriction of the action on tensors |
| 313 | (`fillingMatrixOver_mul_schur`). -/ |
| 314 | def schur (z : ∀ τ : Φ, Matrix (n' τ) (n τ) R) : |
| 315 | Matrix (WeylIndexFamily n' κ) (WeylIndexFamily n κ) R := |
| 316 | of (invFun |
| 317 | (Fintype.linearCombination R fun j ↦ nablaBasis R n κ j * detPow R n (schurDetExp n n' κ)) ∘ |
| 318 | rowSubst z ∘ nablaBasis R n' κ) |
| 319 | |
| 320 | omit [(τ : Φ) → DecidableEq (n τ)] [(τ : Φ) → DecidableEq (n' τ)] in |
| 321 | /-- In the notation of `schur` (`n τ`, `n' τ` the finite row types and `κ τ h` the column counts at |
| 322 | the place `τ`): if `b'_i(z y)` is a linear combination of the products |
| 323 | `b_j(y) * ∏ τ, det(y_τ) ^ d τ`, then row `i` of the Schur matrix gives the coefficients of such a |
| 324 | combination. -/ |
| 325 | lemma sum_schur_smul_eq_rowSubst_of_exists (z : ∀ τ : Φ, Matrix (n' τ) (n τ) R) |
| 326 | (i : WeylIndexFamily n' κ) |
| 327 | (h_coords : ∃ w : WeylIndexFamily n κ → R, |
| 328 | ∑ j : WeylIndexFamily n κ, w j • (nablaBasis R n κ j * detPow R n (schurDetExp n n' κ)) = |
| 329 | rowSubst z (nablaBasis R n' κ i)) : |
| 330 | ∑ j : WeylIndexFamily n κ, schur κ z i j • |
| 331 | (nablaBasis R n κ j * detPow R n (schurDetExp n n' κ)) = |
| 332 | rowSubst z (nablaBasis R n' κ i) := |
| 333 | invFun_eq (f := Fintype.linearCombination R |
| 334 | fun j ↦ nablaBasis R n κ j * detPow R n (schurDetExp n n' κ)) h_coords |
| 335 | |
| 336 | /-- For a family i of fillings, a place τ and a row a, the number of entries of the filling i_τ |
| 337 | equal to a. -/ |
| 338 | def tableauWeight {κ : Φ → ℕ → ℕ} (i : WeylIndexFamily n κ) (τ : Φ) (a : n τ) : ℕ := |
| 339 | ∑ h : Fin (rankAt n τ), ∑ j : Fin (κ τ h), #{s : Fin h | (i τ).val h j s = a} |
| 340 | |
| 341 | variable (n) |
| 342 | |
| 343 | /-- For an array `y` over `R`, the polynomial `f(yᵀx)` in `x`, where `f` is the product of leading |
| 344 | minors `New.highestPoly`. Block `τ` uses the first `|n_τ|` columns of `y`. It is the pairing of the |
| 345 | tensors of `x` and `y` (`weylKernel_eq_sum_fillingPoly`). -/ |
| 346 | def weylKernel : MatrixPoly ((τ : Φ) × n τ) R := |
| 347 | rowSubst (fun τ ↦ of fun i a ↦ y (⟨τ, a⟩, i.val)) (highestPoly R κ (rankAt n)) |
| 348 | |
| 349 | /-- The Gram matrix `G`: chosen integer coefficients of the generic kernel `weylKernel n κ X` in |
| 350 | the products `b_i(x) * b_j(y)`, where `b` is `nablaBasis`. The kernel is first expanded in the |
| 351 | `b_i(x)` with coefficients in `ℤ[y]`, and row `i` expands the `i`-th coefficient in the `b_j(y)`. |
| 352 | Both expansions exist, and `toPoly_weylEval` states |
| 353 | the resulting identity. It is the matrix of the form on the Weyl module for which the basis tensors |
| 354 | are orthonormal (`fillingMatrix_transpose_mul_self`). -/ |
| 355 | def weylGram : Matrix (WeylIndexFamily n κ) (WeylIndexFamily n κ) ℤ := |
| 356 | of (invFun (GL.nablaCombination (R := ℤ) κ) ∘ |
| 357 | invFun (GL.nablaCombination (R := MatrixPoly (Σ τ : Φ, n τ) ℤ) κ) (weylKernel n κ X)) |
| 358 | |
| 359 | variable {n} in |
| 360 | /-- The integer Gram matrix `New.weylGram` for the row type n and column counts κ, with its entries |
| 361 | mapped into R. -/ |
| 362 | abbrev weylGramOver {κ : Φ → ℕ → ℕ} : Matrix (WeylIndexFamily n κ) (WeylIndexFamily n κ) R := |
| 363 | (weylGram n κ).map (Int.cast : ℤ → R) |
| 364 | |
| 365 | /-- The polynomial of a vector ξ of the Weyl module: Σ_i (Gξ)_i b_i, with G the Gram matrix and b_i |
| 366 | the basis minor products. -/ |
| 367 | def toPoly : (WeylIndexFamily n κ → R) →ₗ[R] MatrixPoly ((τ : Φ) × n τ) R := |
| 368 | GL.nablaCombination κ ∘ₗ ((weylGram n κ).map (Int.cast : ℤ → R)).mulVecLin |
| 369 | |
| 370 | /-- For an array `y` over `R`, the value `b_i(y)` at `y` of the basis product of minors |
| 371 | `b_i = nablaBasis R n κ i`. The vector `weylEval n κ y` of the Weyl module is the evaluation at `y`; |
| 372 | as a tensor it is the tensor of `y` (`fillingMatrixOver_mulVec_weylEval`). -/ |
| 373 | def weylEval (i : WeylIndexFamily n κ) : R := (nablaBasis R n κ i).eval y |
| 374 | |
| 375 | variable [Fintype m] (z : Matrix m σ R) {R' : Type _} [CommRing R'] [Fintype σ] [DecidableEq σ] |
| 376 | |
| 377 | /-! ### Linear substitutions, symmetric powers and polynomials from coefficients -/ |
| 378 | |
| 379 | /-- For an m×σ matrix z over R, the R-algebra map from polynomials in variables indexed by σ to |
| 380 | those indexed by m sending X_b to ∑_t z_{tb} X_t. -/ |
| 381 | def linSubst : MvPolynomial σ R →ₐ[R] MvPolynomial m R := aeval fun s ↦ ∑ t : m, z t s • X t |
| 382 | |
| 383 | /-- The chain rule for a linear substitution: the derivative of `p(zᵀx)` in `x_i` is |
| 384 | `Σ_a z_{ia} (∂p/∂x_a)(zᵀx)`. -/ |
| 385 | lemma pderiv_linSubst {σ m R : Type} [CommRing R] [Fintype m] (z : Matrix m σ R) [Fintype σ] |
| 386 | (p : MvPolynomial σ R) (i : m) : |
| 387 | (linSubst z p).pderiv i = ∑ a : σ, z i a • linSubst z (p.pderiv a) := by |
| 388 | classical |
| 389 | rw [linSubst, pderiv_aeval] |
| 390 | simp [pderiv_X, Pi.single_apply, smul_eq_C_mul, mul_comm] |
| 391 | |
| 392 | /-- For an `m × σ` matrix `z` over the commutative ring `R`, the substitutions by `z` and by `zᵀ` |
| 393 | (`New.linSubst`) are adjoint for the Fock form `⟨p, q⟩ = p(∂) q (0)`. -/ |
| 394 | lemma fockPairing_linSubst {σ m R : Type} [CommRing R] [Fintype m] (z : Matrix m σ R) [Fintype σ] |
| 395 | (f : MvPolynomial m R) (g : MvPolynomial σ R) : |
| 396 | fockPairing R f (linSubst z g) = fockPairing R (linSubst zᵀ f) g := by |
| 397 | classical |
| 398 | -- A factor `X i` of `f` moves across the Fock form as `pderiv i` (`fockPairing_mul_X`), and |
| 399 | -- both sides then agree by the chain rule; for constants only the constant terms matter. |
| 400 | induction f using MvPolynomial.induction_on generalizing g with |
| 401 | | C c => simp [linSubst, fockPairing_C, -fockPairing] |
| 402 | | add p q hp hq => simp [hp, hq, -fockPairing] |
| 403 | | mul_X p i hp => |
| 404 | have h_subst : linSubst zᵀ (p * X i) = ∑ a : σ, z i a • (linSubst zᵀ p * X a) := by |
| 405 | simp [linSubst, univ.mul_sum] |
| 406 | simp [fockPairing_mul_X, pderiv_linSubst, h_subst, hp, -fockPairing] |
| 407 | |
| 408 | variable {n} (a : ℕ) (ψ : R →+* R') (A B : Matrix σ σ R) |
| 409 | |
| 410 | variable (σ) in |
| 411 | /-- The exponents of the monomials of degree `a` in variables indexed by `σ`. -/ |
| 412 | abbrev Monomials : Type := ↥((univ : Finset σ).finsuppAntidiag a) |
| 413 | |
| 414 | omit [DecidableEq σ] in |
| 415 | /-- `linSubst A` substitutes for each variable the linear form of the matching row of `Aᵀ`. -/ |
| 416 | lemma linSubst_eq_bind₁ : linSubst A = aeval Aᵀ.toMvPolynomial := by |
| 417 | ext s : 1 |
| 418 | simp [linSubst, Matrix.toMvPolynomial, smul_eq_C_mul, C_mul_X_eq_monomial] |
| 419 | |
| 420 | @[simp] |
| 421 | lemma linSubst_one : linSubst 1 f = f := by |
| 422 | simp [linSubst_eq_bind₁, aeval_X_left_apply] |
| 423 | |
| 424 | omit [DecidableEq σ] in |
| 425 | lemma linSubst_mul : linSubst (A * B) f = linSubst A (linSubst B f) := by |
| 426 | simp [linSubst_eq_bind₁, comp_aeval_apply, ← toMvPolynomial_mul] |
| 427 | |
| 428 | omit [DecidableEq σ] in |
| 429 | lemma map_linSubst : |
| 430 | MvPolynomial.map ψ (linSubst A f) = linSubst (A.map ψ) (MvPolynomial.map ψ f) := by |
| 431 | simp [linSubst, ← C_mul', aeval_def, eval₂_map, MvPolynomial.algebraMap_eq, hom_eval₂, map_comp_C] |
| 432 | |
| 433 | variable {a f} {S : Type _} [Fintype S] [DecidableEq S] (α : Monomials σ a) |
| 434 | |
| 435 | /-- The exponent of a monomial of degree `a` has degree `a`. -/ |
| 436 | lemma Monomials.degree_eq : α.val.degree = a := by |
| 437 | simpa [degree_eq_sum] using (mem_finsuppAntidiag.mp α.property).left |
| 438 | |
| 439 | lemma Monomials.isHomogeneous_linSubst : (linSubst A (monomial α 1)).IsHomogeneous a := by |
| 440 | rw [linSubst_eq_bind₁] |
| 441 | simpa only [one_mul] using |
| 442 | (isHomogeneous_monomial (1 : R) α.degree_eq).aeval _ Aᵀ.toMvPolynomial_isHomogeneous |
| 443 | |
| 444 | /-- A polynomial `f`, homogeneous of degree `a` in finitely many variables, is the sum of its terms |
| 445 | `f.coeff β • X ^ β` over the exponents `β` of degree `a`. -/ |
| 446 | lemma sum_monomials_eq_of_isHomogeneous (hf : f.IsHomogeneous a) : |
| 447 | ∑ β : Monomials σ a, f.coeff β • monomial β 1 = f := by |
| 448 | ext d |
| 449 | -- Only the term `β = d` contributes; if `d` has another degree, `f.coeff d = 0`. |
| 450 | simpa [coeff_sum, eq_comm, sum_attach _ fun β ↦ ite _ (f.coeff β) 0, ← degree_eq_sum] using |
| 451 | hf.coeff_eq_zero (d := d) |
| 452 | |
| 453 | /-- The a-th symmetric power: the homomorphism sending a square matrix A to the matrix, in the |
| 454 | monomial basis, of `New.linSubst` A on forms of degree a. -/ |
| 455 | def symPowMatrix (a : ℕ) : Matrix σ σ R →* Matrix (Monomials σ a) (Monomials σ a) R where |
| 456 | toFun A := of fun β α ↦ (linSubst A (monomial α.val 1)).coeff β.val |
| 457 | map_one' := by simp [eq_comm, Matrix.one_apply, ← ext_iff] |
| 458 | map_mul' A B := by |
| 459 | ext β α |
| 460 | -- Expand `linSubst B (monomial α 1)` in the monomials of degree `a`, then apply `linSubst A`. |
| 461 | change (linSubst (A * B) (monomial α.val 1)).coeff β.val = _ |
| 462 | rw [linSubst_mul, ← sum_monomials_eq_of_isHomogeneous (α.isHomogeneous_linSubst B)] |
| 463 | simp [mul_comm, Matrix.mul_apply] |
| 464 | |
| 465 | /-- For a family `β` of degree-`a` exponent vectors indexed by `S`, the single exponent vector on |
| 466 | the variables `(b, s)` whose value is `β_s(b)`. -/ |
| 467 | def exponentOf : (S → Monomials σ a) ↪ σ × S →₀ ℕ where |
| 468 | toFun β := equivFunOnFinite.symm fun x ↦ (β x.2).val x.1 |
| 469 | inj' := |
| 470 | id fun β β' h ↦ by |
| 471 | ext s t |
| 472 | exact DFunLike.congr_fun h (t, s) |
| 473 | |
| 474 | /-- For a coefficient function F on families β of degree-a exponents, the polynomial ∑_β F(β) |
| 475 | x^β in the variables (b,s). -/ |
| 476 | def polyOfCoeffs : ((S → Monomials σ a) → R) →ₗ[R] MvPolynomial (σ × S) R := |
| 477 | ∑ β : S → Monomials σ a, monomial (R := R) (exponentOf β) ∘ₗ LinearMap.proj β |
| 478 | |
| 479 | lemma symPowMatrix_map : symPowMatrix a (A.map ψ) = (symPowMatrix a A).map ψ := by |
| 480 | simp [symPowMatrix, ← coeff_map, map_linSubst, ← ext_iff] |
| 481 | |
| 482 | end New |
| 483 | |
| 484 | end Defs |
| 485 | |
| 486 | /-! |
| 487 | ## Semi-invariants, substitution, the Fock pairing and change of coefficients |
| 488 | |
| 489 | * `New.diagramWeight_apply`: the weight in closed form. |
| 490 | * The pairings and the polynomials `New.nablaBasis`, `New.highestPoly`, `New.detPow` commute with |
| 491 | change of the coefficient ring. |
| 492 | -/ |
| 493 | |
| 494 | section Nabla |
| 495 | |
| 496 | open Finset MvPolynomial Matrix Sigma SetLike |
| 497 | |
| 498 | namespace New |
| 499 | |
| 500 | variable {σ : Type} {Φ m : Type} {R S : Type} |
| 501 | {l : Φ × ℕ →₀ ℕ} [CommRing R] [CommRing S] |
| 502 | {c : m → Φ} (φ : R →+* S) (p q : MvPolynomial σ R) {n n' : Φ → Type _} |
| 503 | {n'' : Φ → Type} [∀ τ : Φ, Fintype (n τ)] [∀ τ : Φ, Fintype (n' τ)] |
| 504 | (z : ∀ τ : Φ, Matrix (n' τ) (n τ) R) {f : MatrixPoly m R} |
| 505 | |
| 506 | /-! ### Semi-invariants -/ |
| 507 | |
| 508 | /-- `f` lies in `New.nabla R c l` (it is a semi-invariant of weight `l` for the row colouring `c`) |
| 509 | iff for every `R`-algebra `S` and all arrays `b`, `y` over `S` we have |
| 510 | `f(y b) = ∏ b(τ, i, i) ^ l(τ, i) · f(y)`. Here `y b` is `New.borelMul c b y`, the array with |
| 511 | `(a, j)` entry `Σ_{i ≤ j} y(a, i) b(c a, i, j)`, so only the upper triangular part of `b` is |
| 512 | used. -/ |
| 513 | lemma mem_nabla : |
| 514 | f ∈ nabla R c l ↔ |
| 515 | ∀ (S : Type) [CommRing S] [Algebra R S] (b : Φ × ℕ × ℕ → S) (y : m × ℕ → S), |
| 516 | aeval (borelMul c b y) f = |
| 517 | (l.prod fun (p : Φ × ℕ) (k : ℕ) ↦ b (p.fst, p.snd, p.snd) ^ k) * aeval y f := by |
| 518 | -- By definition, membership is this identity for the generic arrays, whose entries are variables. |
| 519 | simp only [nabla, LinearMap.mem_eqLocus, AlgHom.toLinearMap_apply, LinearMap.smul_apply] |
| 520 | constructor |
| 521 | · intro h S _ _ b y |
| 522 | -- Specialise both families of variables, to `b` and to `y`, by the evaluation `ψ`. |
| 523 | let ψ : MatrixPoly m (MvPolynomial (Φ × ℕ × ℕ) R) →ₐ[R] S := aevalTower (aeval b) y |
| 524 | simpa [ψ, comp_aeval_apply, borelMul.eq_unfold, smul_eq_C_mul, map_finsuppProd] using |
| 525 | congr_arg ψ h |
| 526 | · intro h |
| 527 | -- The identity for the generic arrays `C ∘ X` and `X` is membership. |
| 528 | simpa [smul_eq_C_mul, map_finsuppProd] using |
| 529 | h (MatrixPoly m (MvPolynomial (Φ × ℕ × ℕ) R)) (C ∘ X) X |
| 530 | |
| 531 | /-- Semi-invariants multiply, and their weights add. -/ |
| 532 | instance : SetLike.GradedMonoid (nabla R c) where |
| 533 | one_mem := by simp [mem_nabla] |
| 534 | mul_mem l₁ l₂ f₁ f₂ hf₁ hf₂ := by |
| 535 | rw [mem_nabla] at hf₁ hf₂ ⊢ |
| 536 | intro S _ _ b y |
| 537 | simp [hf₁, hf₂, Finsupp.prod_add_index', mul_mul_mul_comm, pow_add] |
| 538 | |
| 539 | /-- A minor on `h` rows of colour `τ` and the first `h` columns is a semi-invariant of weight `1` |
| 540 | at `(τ, 0), …, (τ, h - 1)` and `0` elsewhere. -/ |
| 541 | lemma minor_mem_nabla {h : ℕ} {τ : Φ} {I : Fin h → m} (hI : ∀ s : Fin h, c (I s) = τ) : |
| 542 | minor R I ∈ nabla R c (∑ i ∈ range h, Finsupp.single (τ, i) 1) := by |
| 543 | -- The chosen `h × h` block of `borelMul c b y` is `Y * B`, with `Y` the block of `y` and `B` |
| 544 | -- upper triangular, so its determinant is the minor of `y` times the diagonal entries of `B`. |
| 545 | rw [mem_nabla] |
| 546 | intro S _ _ b y |
| 547 | let Y : Matrix (Fin h) (Fin h) S := of fun s t ↦ y (I s, t) |
| 548 | let B : Matrix (Fin h) (Fin h) S := of fun s t ↦ if s ≤ t then b (τ, s, t) else 0 |
| 549 | have h_block : (of fun s t : Fin h ↦ borelMul c b y (I s, t)) = Y * B := by |
| 550 | ext s t |
| 551 | simp [Y, B, hI, sum_ite, filter_ge_eq_Iic, Nat.range_succ_eq_Iic, ← Fin.map_valEmbedding_Iic, |
| 552 | borelMul, Matrix.mul_apply] |
| 553 | have hB_upper : B.IsUpperTriangular := fun s t h_lt ↦ ite_eq_right h_lt.not_ge |
| 554 | have hB_det : B.det = ∏ i ∈ range h, b (τ, i, i) := by |
| 555 | rw [det_of_isUpperTriangular hB_upper, prod_range] |
| 556 | simp [B] |
| 557 | have h_minor (y' : m × ℕ → S) : |
| 558 | aeval y' (minor R I) = (of fun s t : Fin h ↦ y' (I s, t)).det := by |
| 559 | simp [minor, det_apply] |
| 560 | have h_weight : ((∑ i ∈ range h, Finsupp.single (τ, i) 1).prod |
| 561 | fun (x : Φ × ℕ) (k : ℕ) ↦ b (x.fst, x.snd, x.snd) ^ k) = ∏ i ∈ range h, b (τ, i, i) := by |
| 562 | simp [← Finsupp.prod_finsetSum_index, pow_add] |
| 563 | rw [h_weight] |
| 564 | calc aeval (borelMul c b y) (minor R I) |
| 565 | = (of fun s t : Fin h ↦ borelMul c b y (I s, t)).det := h_minor _ |
| 566 | _ = (∏ i ∈ range h, b (τ, i, i)) * Y.det := by rw [h_block, det_mul, hB_det, mul_comm] |
| 567 | _ = (∏ i ∈ range h, b (τ, i, i)) * aeval y (minor R I) := by rw [h_minor] |
| 568 | |
| 569 | omit [∀ τ : Φ, Fintype (n' τ)] in |
| 570 | /-- Colour the row `(τ, a)` by `τ` (the colouring `fst`). If `f` is a Borel semi-invariant of |
| 571 | weight `l` in the rows `(τ, b)`, `b : n' τ`, then its substitution `f ↦ f(z y)` by the matrices |
| 572 | `z τ` of size `n' τ × n τ` (`New.rowSubst`) is a Borel semi-invariant of the same weight in the |
| 573 | rows `(τ, a)`, `a : n τ`. -/ |
| 574 | lemma rowSubst_mem_nabla {f : MatrixPoly ((τ : Φ) × n' τ) R} (hf : f ∈ nabla R fst l) : |
| 575 | rowSubst z f ∈ nabla R fst l := by |
| 576 | rw [mem_nabla] at hf ⊢ |
| 577 | intro S _ _ b y |
| 578 | -- `zy y'` is the array `y'` with its rows combined by `z`; `f(z y)` at `y'` is `f` at `zy y'`. |
| 579 | let zy (y' : ((τ : Φ) × n τ) × ℕ → S) (x : ((τ : Φ) × n' τ) × ℕ) : S := |
| 580 | ∑ a : n x.fst.fst, z x.fst.fst x.fst.snd a • y' (⟨x.fst.fst, a⟩, x.snd) |
| 581 | have h_subst (y' : ((τ : Φ) × n τ) × ℕ → S) : aeval y' (rowSubst z f) = aeval (zy y') f := by |
| 582 | simp [zy, rowSubst, comp_aeval_apply, Algebra.smul_def] |
| 583 | -- `z` combines rows of one colour, so it commutes with the right multiplication `borelMul`. |
| 584 | have h_comm : zy (borelMul fst b y) = borelMul fst b (zy y) := by |
| 585 | ext x |
| 586 | simp [zy, borelMul, smul_sum, sum_mul, sum_comm (γ := n _)] |
| 587 | rw [h_subst, h_comm, hf, h_subst] |
| 588 | |
| 589 | /-! ### Substitution and the Fock pairing -/ |
| 590 | |
| 591 | /-- Substituting by `z'` (from the rows `n'' τ` to the rows `n' τ`) and then by `z` (to the rows |
| 592 | `n τ`) is substituting by the products `z' τ * z τ`. -/ |
| 593 | lemma rowSubst_rowSubst (z' : (τ : Φ) → Matrix (n'' τ) (n' τ) R) |
| 594 | (f : MatrixPoly ((τ : Φ) × n'' τ) R) : |
| 595 | rowSubst z (rowSubst (n' := n'') z' f) = rowSubst (fun τ : Φ ↦ z' τ * z τ) f := by |
| 596 | simp [comp_aeval_apply, mul_smul, sum_smul, sum_comm (γ := n _), rowSubst, smul_sum, |
| 597 | Matrix.mul_apply] |
| 598 | |
| 599 | @[simp] |
| 600 | lemma rowSubst_one [∀ τ : Φ, DecidableEq (n τ)] (f : MatrixPoly (Sigma n) R) : |
| 601 | rowSubst (fun τ : Φ ↦ (1 : Matrix (n τ) (n τ) R)) f = f := by |
| 602 | simp [rowSubst, Matrix.one_apply, aeval_X_left_apply] |
| 603 | |
| 604 | /-- The Fock pairing `⟨p, q⟩` is the sum, over the monomials `d` of `p`, of |
| 605 | `p.coeff d * d! * q.coeff d`, where `d!` is the product of the factorials of the exponents. -/ |
| 606 | lemma fockPairing_eq_sum : fockPairing R p q = |
| 607 | ∑ d ∈ p.support, p.coeff d * (d.prod fun (_k : σ) (j : ℕ) ↦ (j.factorial : R)) * q.coeff d := by |
| 608 | simp [fockPairing, jetPairing_eq_sum] |
| 609 | |
| 610 | /-- The Fock pairing is symmetric. -/ |
| 611 | lemma fockPairing_comm : fockPairing R p q = fockPairing R q p := by |
| 612 | -- Both sides are sums of `p.coeff d * d! * q.coeff d`; the terms outside the common support |
| 613 | -- vanish. |
| 614 | rw [fockPairing_eq_sum, fockPairing_eq_sum] |
| 615 | exact sum_congr_of_eq_on_inter (by simp +contextual) (by simp +contextual) fun d _ _ ↦ by ring |
| 616 | |
| 617 | /-- The Fock pairing commutes with a change of coefficients along a ring homomorphism `φ`. -/ |
| 618 | lemma map_fockPairing : |
| 619 | φ (fockPairing R p q) = fockPairing S (MvPolynomial.map φ p) (MvPolynomial.map φ q) := by |
| 620 | -- Reading `q` as a power series commutes with `map φ`. |
| 621 | have h_coe : MvPowerSeries.map φ (q : MvPowerSeries σ R) = MvPolynomial.map φ q := by |
| 622 | ext d |
| 623 | simp [coeff_map] |
| 624 | simp [fockPairing, map_jetPairing, h_coe] |
| 625 | |
| 626 | /-- The adjoint of substitution by `z` for the Fock pairing is substitution by the transposes. -/ |
| 627 | lemma fockPairing_rowSubst [∀ τ : Φ, DecidableEq (n τ)] (p : MatrixPoly ((τ : Φ) × n' τ) R) : |
| 628 | ∀ q : MvPolynomial (((τ : Φ) × n τ) × ℕ) R, |
| 629 | fockPairing R (rowSubst z p) q = fockPairing R p (rowSubst (fun τ : Φ ↦ (z τ)ᵀ) q) := by |
| 630 | classical |
| 631 | set w : MatrixPoly ((τ : Φ) × n τ) R →ₐ[R] MatrixPoly ((τ : Φ) × n' τ) R := |
| 632 | rowSubst fun τ ↦ (z τ)ᵀ |
| 633 | -- The chain rule for the transposed substitution `w`, by induction on `q` (Leibniz rule). |
| 634 | have h_chain (q : MatrixPoly ((τ : Φ) × n τ) R) (τ : Φ) (b : n' τ) (k : ℕ) : |
| 635 | (w q).pderiv (⟨τ, b⟩, k) = ∑ a : n τ, z τ b a • w (q.pderiv (⟨τ, a⟩, k)) := by |
| 636 | induction q using MvPolynomial.induction_on with |
| 637 | | C a => simp [w, rowSubst] |
| 638 | | add q₁ q₂ h₁ h₂ => simp [h₁, h₂, sum_add_distrib, smul_add] |
| 639 | | mul_X q j h_q => |
| 640 | -- The Leibniz rule for `w q * w (X j)`; the derivative of `w (X j)` is an entry of `z`. |
| 641 | obtain ⟨⟨τ', a'⟩, k'⟩ := j |
| 642 | have h_X : w (X (⟨τ', a'⟩, k')) = ∑ d : n' τ', z τ' d a' • X (⟨τ', d⟩, k') := by |
| 643 | simp [w, rowSubst] |
| 644 | -- Both sides are `z τ b a' • w q` if `τ' = τ` and `k' = k`, and `0` otherwise; `aesop` |
| 645 | -- matches the dependent pairs. |
| 646 | suffices h : (w q * ∑ x : n' τ', if (τ' = τ ∧ x ≍ b) ∧ k' = k then z τ' x a' • 1 else 0) = |
| 647 | ∑ x : n τ, if (τ' = τ ∧ a' ≍ x) ∧ k' = k then z τ b x • w q else 0 by |
| 648 | simpa [h_q, mul_sum (ι := n _), apply_ite, sum_add_distrib, Pi.single_apply, smul_add, h_X] |
| 649 | using h |
| 650 | aesop (add simp ite_and) |
| 651 | -- Induction on `p`: multiplication by a variable is adjoint to the partial derivative. |
| 652 | induction p using MvPolynomial.induction_on with |
| 653 | | C a => simp [w, fockPairing_C, rowSubst] |
| 654 | | add p₁ p₂ h₁ h₂ => simp [h₁, h₂] |
| 655 | | mul_X p j h_p => |
| 656 | intro q |
| 657 | obtain ⟨⟨τ, b⟩, k⟩ := j |
| 658 | -- `rowSubst z (X j)` is a combination of variables, each of which moves across as `pderiv`. |
| 659 | have h_X : rowSubst z (X (⟨τ, b⟩, k)) = ∑ a : n τ, z τ b a • X (⟨τ, a⟩, k) := by |
| 660 | simp [rowSubst] |
| 661 | simp [fockPairing_mul_X, h_chain, h_X, mul_sum, h_p] |
| 662 | |
| 663 | variable [Fintype Φ] {N : Φ → ℕ} {κ κ' : Φ → ℕ → ℕ} {p} |
| 664 | |
| 665 | /-- Over a star-ordered domain `R`, `⟨p̄, p⟩ > 0` for every nonzero polynomial `p`, where `p̄` |
| 666 | applies `star` to each coefficient. -/ |
| 667 | lemma fockPairing_star_self_pos [PartialOrder R] [StarRing R] [StarOrderedRing R] [IsDomain R] |
| 668 | (hp : p ≠ 0) : |
| 669 | 0 < fockPairing R (MvPolynomial.map (starRingEnd R) p) p := by |
| 670 | -- The value is `∑ d, p.coeff d * d! * star (p.coeff d)` over the nonempty support of `p`. |
| 671 | rw [fockPairing_comm, fockPairing_eq_sum] |
| 672 | refine sum_pos (fun d hd ↦ ?_) (support_nonempty.mpr hp) |
| 673 | rw [coeff_map, starRingEnd_apply] |
| 674 | exact star_right_conjugate_pos (by simp [Finsupp.prod, prod_pos, Nat.factorial_pos]) |
| 675 | (isRegular_iff_ne_zero.mpr (mem_support_iff.mp hd)) |
| 676 | |
| 677 | /-! ### The weight, and change of coefficients -/ |
| 678 | |
| 679 | /-- The weight at `(τ, i)` is the number `∑ i < h < N τ, κ τ h` of columns of colour `τ` higher |
| 680 | than `i`. -/ |
| 681 | lemma diagramWeight_apply (τ : Φ) (i : ℕ) : diagramWeight N κ (τ, i) = (Ioo i (N τ)).sum (κ τ) := by |
| 682 | classical |
| 683 | -- Only the heights `h` at the place `τ` with `i < h` count. |
| 684 | have h_eval : diagramWeight N κ (τ, i) = ∑ h ∈ range (N τ), if i < h then κ τ h else 0 := by |
| 685 | simp [Finsupp.single_apply, diagramWeight, smul_sum, ite_and] |
| 686 | rw [h_eval, ← sum_filter, show (range (N τ)).filter (fun h ↦ i < h) = Ioo i (N τ) by grind] |
| 687 | |
| 688 | /-- The weight `diagramWeight N κ` is additive in the column multiplicities `κ`. -/ |
| 689 | lemma diagramWeight_add : diagramWeight N (κ + κ') = diagramWeight N κ + diagramWeight N κ' := by |
| 690 | simp [diagramWeight, smul_sum, sum_add_distrib] |
| 691 | |
| 692 | private lemma map_minor {h : ℕ} (I : Fin h → m) : |
| 693 | MvPolynomial.map φ (minor R I) = minor S I := by |
| 694 | simp only [minor, RingHom.map_det] |
| 695 | congr 1 |
| 696 | ext a b |
| 697 | simp |
| 698 | |
| 699 | @[simp] |
| 700 | lemma map_nablaBasis (i : WeylIndexFamily n κ) : |
| 701 | MvPolynomial.map φ (nablaBasis R n κ i) = nablaBasis S n κ i := by |
| 702 | simp [nablaBasis, tableauPoly, map_minor] |
| 703 | |
| 704 | /-- A ring homomorphism `φ` maps the polynomial `highestPoly R κ N` to `highestPoly S κ N`. -/ |
| 705 | @[simp] |
| 706 | lemma map_highestPoly : MvPolynomial.map φ (highestPoly R κ N) = highestPoly S κ N := by |
| 707 | simp [highestPoly, tableauPoly, map_minor] |
| 708 | |
| 709 | @[simp] |
| 710 | lemma map_detPow (e : Φ → ℕ) : MvPolynomial.map φ (detPow R n e) = detPow S n e := by |
| 711 | simp [detPow, map_minor] |
| 712 | |
| 713 | @[simp] |
| 714 | lemma detPow_zero : detPow R n 0 = 1 := by simp [detPow] |
| 715 | |
| 716 | end New |
| 717 | |
| 718 | end Nabla |
| 719 | |
| 720 | end |