import Mathlib /-! # Frame–Robinson–Thrall Hook-Length Formula, Stanley's Hook-Content Formula & Catalan Specialization Self-contained Lean 4 formalization of Pillar 4: 1. Integer partitions, Young diagram cells, conjugate lengths, hook lengths `hookLen`, contents. 2. **Row Hook-vs-Difference Disjointness Identity**: `∏ i < m, (ℓ_i)! = hookProd λ * ∏_{i < j} (ℓ_i - ℓ_j)` where `ℓ_i = λ_i + m - 1 - i`. 3. **Lagrange Interpolation Rational Identity**: `∑ r, z_r * ∏_{k ≠ r} (z_r - 1 - z_k) / (z_r - z_k) = ∑ r, z_r - C(m, 2)` proved cleanly via `X * g(X - 1) - (X - m) * g(X)` on `Polynomial ℚ`. 4. **Frobenius–Young Formula** & **Frame–Robinson–Thrall Hook-Length Formula**: `f^λ * ∏_{□ ∈ λ} h_λ(□) = n!` for EVERY partition `λ ⊢ n`. 5. **Bialternant Principal `q`-Specialization**, **Weyl Dimension Formula**, and **Stanley's Hook-Content Formula**: `|SSYT(λ, m)| * ∏_{□ ∈ λ} h_λ(□) = ∏_{□ ∈ λ} (m + c(□))` for EVERY partition `λ` with `ℓ(λ) ≤ m`. 6. **Catalan Specialization**: `f^{(k, k)} = catalan k` for every `k : ℕ`, plus concrete sharp witnesses (`f^{(3,2)} = 5`, `f^{(3,2,1)} = 16`, `|SSYT((2,1), 3)| = 8`, `f^{(3,3)} = 5`, `f^{(4,4)} = 14`). -/ namespace HookLengthTheory open Finset Polynomial Matrix /-! ## Section 1: Partitions, Cells, Conjugate, Hook Lengths & Contents -/ /-- An integer partition represented by a finite weakly decreasing list of positive integers. -/ @[ext] structure Partition (n : ℕ) where parts : List ℕ pos : ∀ p ∈ parts, 0 < p anti : parts.Pairwise (· ≥ ·) sum_eq : parts.sum = n deriving DecidableEq /-- `i`-th row length of a partition list (0 beyond `parts.length`). -/ def rowLen (l : List ℕ) (i : ℕ) : ℕ := l.getD i 0 /-- `j`-th column length of a partition list: number of rows of length `> j`. -/ def colLen (l : List ℕ) (j : ℕ) : ℕ := (l.filter (· > j)).length lemma rowLen_anti_of_pairwise {l : List ℕ} (hanti : l.Pairwise (· ≥ ·)) {i₁ i₂ : ℕ} (h : i₁ ≤ i₂) : rowLen l i₂ ≤ rowLen l i₁ := by unfold rowLen by_cases h2 : i₂ < l.length · have h1 : i₁ < l.length := lt_of_le_of_lt h h2 rw [List.getD_eq_getElem _ _ h1, List.getD_eq_getElem _ _ h2] rcases eq_or_lt_of_le h with rfl | hlt · exact le_rfl · exact List.pairwise_iff_getElem.mp hanti i₁ i₂ h1 h2 hlt · rw [List.getD_eq_default _ _ (Nat.le_of_not_lt h2)] exact Nat.zero_le _ lemma rowLen_eq_zero_of_ge {l : List ℕ} {i : ℕ} (h : l.length ≤ i) : rowLen l i = 0 := List.getD_eq_default _ _ h lemma colLen_eq_card_filter (l : List ℕ) (j : ℕ) : colLen l j = ((Finset.range l.length).filter (fun i => j < rowLen l i)).card := by unfold colLen induction l with | nil => simp | cons a rest ih => simp only [List.length_cons, List.filter_cons] have hcard_split : ((Finset.range (rest.length + 1)).filter (fun i => j < rowLen (a :: rest) i)).card = (if j < a then 1 else 0) + ((Finset.range rest.length).filter (fun i => j < rowLen rest i)).card := by have hrange : Finset.range (rest.length + 1) = insert 0 ((Finset.range rest.length).image (· + 1)) := by ext x; simp only [Finset.mem_range, Finset.mem_insert, Finset.mem_image] cases x with | zero => simp | succ x' => simp rw [hrange, Finset.filter_insert] have h0_not : (0 : ℕ) ∉ ((Finset.range rest.length).image (· + 1)).filter (fun i => j < rowLen (a :: rest) i) := by simp have himg : (((Finset.range rest.length).image (· + 1)).filter (fun i => j < rowLen (a :: rest) i)).card = ((Finset.range rest.length).filter (fun i => j < rowLen rest i)).card := by rw [Finset.filter_image] have heq : (Finset.range rest.length).filter (fun x => j < rowLen (a :: rest) (x + 1)) = (Finset.range rest.length).filter (fun x => j < rowLen rest x) := by ext x; simp [rowLen] rw [heq, Finset.card_image_of_injective _ (fun _ _ h => Nat.succ.inj h)] have h0_eq : rowLen (a :: rest) 0 = a := rfl rw [h0_eq] split_ifs with hja · rw [Finset.card_insert_of_notMem h0_not, himg, add_comm] · rw [himg, zero_add] rw [hcard_split, ← ih] by_cases hja : j < a · simp [hja, add_comm] · simp [hja] lemma lt_colLen_iff {l : List ℕ} (hanti : l.Pairwise (· ≥ ·)) (i j : ℕ) : i < colLen l j ↔ j < rowLen l i := by rw [colLen_eq_card_filter] have hinit : ∀ k₁ k₂, k₁ ≤ k₂ → k₂ < l.length → j < rowLen l k₂ → j < rowLen l k₁ := fun k₁ k₂ hle _ h2 => lt_of_lt_of_le h2 (rowLen_anti_of_pairwise hanti hle) constructor · intro hi by_contra hnot have hsub : (Finset.range l.length).filter (fun k => j < rowLen l k) ⊆ Finset.range i := by intro k hk simp only [Finset.mem_filter, Finset.mem_range] at hk ⊢ by_contra hge push Not at hge exact hnot (hinit i k hge hk.1 hk.2) have hcard := Finset.card_le_card hsub rw [Finset.card_range] at hcard omega · intro hj have hi_lt : i < l.length := by by_contra hge push Not at hge rw [rowLen_eq_zero_of_ge hge] at hj omega have hsub : Finset.range (i + 1) ⊆ (Finset.range l.length).filter (fun k => j < rowLen l k) := by intro k hk simp only [Finset.mem_range, Finset.mem_filter] at hk ⊢ exact ⟨by omega, hinit k i (by omega) hi_lt hj⟩ have hcard := Finset.card_le_card hsub rw [Finset.card_range] at hcard omega /-- Young diagram cells of a partition list `l`, as a `Finset (ℕ × ℕ)`. -/ def cells (l : List ℕ) : Finset (ℕ × ℕ) := (Finset.range l.length).biUnion fun i => (Finset.range (rowLen l i)).image (fun j => (i, j)) lemma mem_cells_iff {l : List ℕ} {c : ℕ × ℕ} : c ∈ cells l ↔ c.2 < rowLen l c.1 := by simp only [cells, Finset.mem_biUnion, Finset.mem_range, Finset.mem_image] constructor · rintro ⟨i, _, j, hj, heq⟩ rcases Prod.mk.inj heq with ⟨rfl, rfl⟩ exact hj · intro hj have hi : c.1 < l.length := by by_contra hge push Not at hge rw [rowLen_eq_zero_of_ge hge] at hj omega exact ⟨c.1, hi, c.2, hj, rfl⟩ lemma cells_pairwiseDisjoint (l : List ℕ) : (Finset.range l.length : Set ℕ).PairwiseDisjoint (fun i => (Finset.range (rowLen l i)).image (fun j => (i, j))) := by intro i₁ _ i₂ _ hne exact Finset.disjoint_left.mpr fun x hx1 hx2 => by rcases Finset.mem_image.mp hx1 with ⟨j₁, _, rfl⟩ rcases Finset.mem_image.mp hx2 with ⟨j₂, _, heq⟩ exact hne (Prod.mk.inj heq).1.symm lemma card_cells {l : List ℕ} : (cells l).card = l.sum := by unfold cells rw [Finset.card_biUnion (cells_pairwiseDisjoint l)] have hcard_row : ∀ i ∈ Finset.range l.length, ((Finset.range (rowLen l i)).image (fun j => (i, j))).card = rowLen l i := fun i _ => by rw [Finset.card_image_of_injective _ (fun _ _ h => (Prod.mk.inj h).2), Finset.card_range] rw [Finset.sum_congr rfl hcard_row] clear * - induction l with | nil => simp | cons a rest ih => simp only [List.length_cons, List.sum_cons, Finset.sum_range_succ'] have : ∑ k ∈ Finset.range rest.length, rowLen (a :: rest) (k + 1) = ∑ k ∈ Finset.range rest.length, rowLen rest k := Finset.sum_congr rfl fun k _ => by simp [rowLen] rw [this, ih] simp [rowLen, add_comm] /-- Hook length `h_λ(i, j) = (λ_i - j) + (λ'_j - i) - 1`. -/ def hookLen (l : List ℕ) (c : ℕ × ℕ) : ℕ := (rowLen l c.1 - c.2) + (colLen l c.2 - c.1) - 1 /-- Product of all hook lengths of `l`. -/ def hookProd (l : List ℕ) : ℕ := ∏ c ∈ cells l, hookLen l c /-- Shifted content `m + c(i, j) = m + j - i`. -/ def shiftedContent (m : ℕ) (c : ℕ × ℕ) : ℕ := m + c.2 - c.1 /-! ## Section 2: Row Hook-vs-Difference Disjointness Theorem -/ /-- Shifted parts `ℓ_i = λ_i + m - 1 - i` for `i < m`. -/ def shiftedPart (l : List ℕ) (m i : ℕ) : ℕ := rowLen l i + m - 1 - i lemma shiftedPart_strictAnti {l : List ℕ} (hanti : l.Pairwise (· ≥ ·)) {m : ℕ} {i k : ℕ} (hik : i < k) (hk : k < m) : shiftedPart l m k < shiftedPart l m i := by have hle := rowLen_anti_of_pairwise hanti (Nat.le_of_lt hik) unfold shiftedPart omega /-- **Row Hook-vs-Difference Disjointness**: For any row `i < m` (with `l.length ≤ m`), the hook lengths `{h_l(i, j) | j < λ_i}` and shifted differences `{ℓ_i - ℓ_k | i < k < m}` form a disjoint partition of `{1, 2, ..., ℓ_i}`, hence `ℓ_i! = (∏_{j < λ_i} h_l(i, j)) * (∏_{i < k < m} (ℓ_i - ℓ_k))`. -/ theorem row_factorial_eq_hooks_mul_diffs {l : List ℕ} (hanti : l.Pairwise (· ≥ ·)) {m : ℕ} (hm : l.length ≤ m) {i : ℕ} (hi : i < m) : (shiftedPart l m i).factorial = (∏ j ∈ Finset.range (rowLen l i), hookLen l (i, j)) * (∏ k ∈ Finset.Ioo i m, (shiftedPart l m i - shiftedPart l m k)) := by set L := shiftedPart l m i set S_hook : Finset ℕ := (Finset.range (rowLen l i)).image (fun j => hookLen l (i, j)) set S_diff : Finset ℕ := (Finset.Ioo i m).image (fun k => L - shiftedPart l m k) have hhook_inj : Set.InjOn (fun j => hookLen l (i, j)) (Finset.range (rowLen l i) : Set ℕ) := by intro j₁ hj₁ j₂ hj₂ heq simp only [Finset.coe_range, Set.mem_Iio] at hj₁ hj₂ dsimp only [hookLen] at heq have hc₁ : i < colLen l j₁ := (lt_colLen_iff hanti i j₁).mpr hj₁ have hc₂ : i < colLen l j₂ := (lt_colLen_iff hanti i j₂).mpr hj₂ have hcol_anti : ∀ a b, a ≤ b → colLen l b ≤ colLen l a := by intro a b hab rw [colLen_eq_card_filter, colLen_eq_card_filter] apply Finset.card_le_card intro r hr simp only [Finset.mem_filter, Finset.mem_range] at hr ⊢ exact ⟨hr.1, lt_of_le_of_lt hab hr.2⟩ by_contra hne rcases lt_or_gt_of_ne hne with hlt | hgt · have hca := hcol_anti j₁ j₂ (Nat.le_of_lt hlt) omega · have hca := hcol_anti j₂ j₁ (Nat.le_of_lt hgt) omega have hdiff_inj : Set.InjOn (fun k => L - shiftedPart l m k) (Finset.Ioo i m : Set ℕ) := by intro k₁ hk₁ k₂ hk₂ heq simp only [Finset.coe_Ioo, Set.mem_Ioo] at hk₁ hk₂ dsimp only at heq have hlt₁ : shiftedPart l m k₁ < L := shiftedPart_strictAnti hanti hk₁.1 hk₁.2 have hlt₂ : shiftedPart l m k₂ < L := shiftedPart_strictAnti hanti hk₂.1 hk₂.2 by_contra hne rcases lt_or_gt_of_ne hne with hlt | hgt · have := shiftedPart_strictAnti hanti hlt hk₂.2; omega · have := shiftedPart_strictAnti hanti hgt hk₁.2; omega have hdisj : Disjoint S_hook S_diff := by rw [Finset.disjoint_left] intro x hx1 hx2 simp only [S_hook, S_diff, Finset.mem_image, Finset.mem_range, Finset.mem_Ioo] at hx1 hx2 rcases hx1 with ⟨j, hj, rfl⟩ rcases hx2 with ⟨k, ⟨hik, hkm⟩, heq⟩ have hc_i : i < colLen l j := (lt_colLen_iff hanti i j).mpr hj have hlt_k : shiftedPart l m k < L := shiftedPart_strictAnti hanti hik hkm have heq' : (rowLen l i - j) + (colLen l j - i) - 1 = (rowLen l i + m - 1 - i) - (rowLen l k + m - 1 - k) := heq.symm by_cases hjk : j < rowLen l k · have hc_k : k < colLen l j := (lt_colLen_iff hanti k j).mpr hjk omega · have hc_k : ¬ (k < colLen l j) := fun h => hjk ((lt_colLen_iff hanti k j).mp h) omega have hsub_hook : S_hook ⊆ Finset.Icc 1 L := by intro x hx simp only [S_hook, Finset.mem_image, Finset.mem_range] at hx rcases hx with ⟨j, hj, rfl⟩ have hc_i : i < colLen l j := (lt_colLen_iff hanti i j).mpr hj have hc_le : colLen l j ≤ m := by rw [colLen_eq_card_filter] exact le_trans (Finset.card_filter_le _ _) (by rw [Finset.card_range]; exact hm) simp only [Finset.mem_Icc, hookLen, L, shiftedPart] omega have hsub_diff : S_diff ⊆ Finset.Icc 1 L := by intro x hx simp only [S_diff, Finset.mem_image, Finset.mem_Ioo] at hx rcases hx with ⟨k, ⟨hik, hkm⟩, rfl⟩ have hlt_k : shiftedPart l m k < L := shiftedPart_strictAnti hanti hik hkm simp only [Finset.mem_Icc] omega have hunion : S_hook ∪ S_diff = Finset.Icc 1 L := by apply Finset.eq_of_subset_of_card_le (Finset.union_subset hsub_hook hsub_diff) rw [Finset.card_union_of_disjoint hdisj, Finset.card_image_of_injOn hhook_inj, Finset.card_image_of_injOn hdiff_inj, Finset.card_range, Nat.card_Ioo, Nat.card_Icc] simp only [L, shiftedPart] omega have hprod_icc : ∏ x ∈ Finset.Icc 1 L, x = L.factorial := by clear * - induction L with | zero => simp | succ n ih => rw [Finset.prod_Icc_succ_top (by omega), ih, Nat.factorial_succ, mul_comm] rw [← hprod_icc, ← hunion, Finset.prod_union hdisj, Finset.prod_image (fun a ha b hb h => hhook_inj ha hb h), Finset.prod_image (fun a ha b hb h => hdiff_inj ha hb h)] /-- **Global Hook-Product / Vandermonde Identity**: `∏ i < m, (ℓ_i)! = hookProd λ * ∏_{0 ≤ i < k < m} (ℓ_i - ℓ_k)`. -/ theorem prod_shiftedPart_factorial_eq {l : List ℕ} (hanti : l.Pairwise (· ≥ ·)) {m : ℕ} (hm : l.length ≤ m) : (∏ i ∈ Finset.range m, (shiftedPart l m i).factorial) = hookProd l * ∏ i ∈ Finset.range m, ∏ k ∈ Finset.Ioo i m, (shiftedPart l m i - shiftedPart l m k) := by have hrow : ∀ i ∈ Finset.range m, (shiftedPart l m i).factorial = (∏ j ∈ Finset.range (rowLen l i), hookLen l (i, j)) * (∏ k ∈ Finset.Ioo i m, (shiftedPart l m i - shiftedPart l m k)) := fun i hi => row_factorial_eq_hooks_mul_diffs hanti hm (Finset.mem_range.mp hi) rw [Finset.prod_congr rfl hrow, Finset.prod_mul_distrib] congr 1 unfold hookProd cells rw [Finset.prod_biUnion (cells_pairwiseDisjoint l)] have hprod_row : ∀ i ∈ Finset.range l.length, (∏ c ∈ (Finset.range (rowLen l i)).image (fun j => (i, j)), hookLen l c) = ∏ j ∈ Finset.range (rowLen l i), hookLen l (i, j) := fun i _ => Finset.prod_image (fun _ _ _ _ h => (Prod.mk.inj h).2) rw [Finset.prod_congr rfl hprod_row] have hsplit : Finset.range m = Finset.range l.length ∪ Finset.Ico l.length m := by ext x; simp only [Finset.mem_range, Finset.mem_union, Finset.mem_Ico]; omega rw [hsplit, Finset.prod_union] · have htail : ∏ i ∈ Finset.Ico l.length m, ∏ j ∈ Finset.range (rowLen l i), hookLen l (i, j) = 1 := by apply Finset.prod_eq_one intro i hi rw [rowLen_eq_zero_of_ge (Finset.mem_Ico.mp hi).1] simp rw [htail, mul_one] · exact Finset.disjoint_left.mpr fun x hx1 hx2 => by simp only [Finset.mem_range, Finset.mem_Ico] at hx1 hx2; omega /-! ## Section 3: Lagrange Interpolation Identity for Frobenius–Young Recursion -/ /-- For any polynomial `P ∈ ℚ[X]` of degree `< m` and any `m` distinct nodes `z : Fin m → ℚ`, the coefficient of `X^{m-1}` in `P` equals `∑ r, P(z r) / ∏_{k ≠ r} (z r - z k)`. -/ lemma coeff_pred_eq_sum_lagrange {m : ℕ} (_hm : 0 < m) (z : Fin m → ℚ) (hz : Function.Injective z) (P : ℚ[X]) (hdeg : P.natDegree < m) : P.coeff (m - 1) = ∑ r : Fin m, P.eval (z r) / ∏ k ∈ Finset.univ.erase r, (z r - z k) := by have hinterp : P = Lagrange.interpolate Finset.univ z (fun r => P.eval (z r)) := Lagrange.eq_interpolate (s := Finset.univ) (v := z) (fun a _ b _ hab => hz hab) (f := P) (by rw [Finset.card_univ, Fintype.card_fin] exact (Polynomial.degree_lt_iff_coeff_zero _ _).mpr fun k hk => Polynomial.coeff_eq_zero_of_natDegree_lt (lt_of_lt_of_le hdeg hk)) conv_lhs => rw [hinterp] rw [Lagrange.interpolate_apply, Polynomial.finsetSum_coeff] apply Finset.sum_congr rfl intro r _ rw [Polynomial.coeff_C_mul] have hcard : (Finset.univ.erase r : Finset (Fin m)).card = m - 1 := by rw [Finset.card_erase_of_mem (Finset.mem_univ r), Finset.card_univ, Fintype.card_fin] have hbasis_eq : Lagrange.basis Finset.univ z r = (∏ j ∈ Finset.univ.erase r, (Polynomial.X - Polynomial.C (z j))) * Polynomial.C (∏ j ∈ Finset.univ.erase r, (z r - z j)⁻¹) := by rw [Lagrange.basis, map_prod, ← Finset.prod_mul_distrib] apply Finset.prod_congr rfl intro j _ simp [Lagrange.basisDivisor, mul_comm] rw [hbasis_eq, Polynomial.coeff_mul_C] have hmonic : (∏ j ∈ Finset.univ.erase r, (Polynomial.X - Polynomial.C (z j))).Monic := Polynomial.monic_prod_of_monic _ _ (fun j _ => Polynomial.monic_X_sub_C (z j)) have hndeg : (∏ j ∈ Finset.univ.erase r, (Polynomial.X - Polynomial.C (z j))).natDegree = m - 1 := by rw [Polynomial.natDegree_prod_of_monic _ _ (fun j _ => Polynomial.monic_X_sub_C (z j))] simp [hcard] rw [← hndeg, hmonic.coeff_natDegree, one_mul, div_eq_mul_inv, Finset.prod_inv_distrib] /-- **Frobenius–Young Rational Identity (via Lagrange Interpolation)**: For any `m` distinct rationals `z : Fin m → ℚ`, `∑ r, z_r * ∏_{k ≠ r} (z_r - 1 - z_k) / (z_r - z_k) = (∑ r, z_r) - m*(m-1)/2`. -/ theorem lagrange_frobenius_young_identity {m : ℕ} (z : Fin m → ℚ) (hz : Function.Injective z) : ∑ r : Fin m, z r * (∏ k ∈ Finset.univ.erase r, (z r - 1 - z k) / (z r - z k)) = (∑ r : Fin m, z r) - (m * (m - 1) : ℚ) / 2 := by cases m with | zero => simp | succ m' => set g : ℚ[X] := ∏ k : Fin (m' + 1), (Polynomial.X - Polynomial.C (z k)) have hpoly_aux : ∀ (s : Finset (Fin (m' + 1))), let gs : ℚ[X] := ∏ k ∈ s, (Polynomial.X - Polynomial.C (z k)) let Ps : ℚ[X] := Polynomial.X * gs.comp (Polynomial.X - 1) - (Polynomial.X - Polynomial.C (s.card : ℚ)) * gs (∀ d, s.card ≤ d → Ps.coeff d = 0) ∧ (0 < s.card → Ps.coeff (s.card - 1) = ((s.card : ℚ) * ((s.card : ℚ) - 1)) / 2 - ∑ k ∈ s, z k) := by intro s induction s using Finset.induction_on with | empty => simp only [Finset.prod_empty, Finset.card_empty, Nat.cast_zero, sub_zero, Polynomial.one_comp, mul_one, map_zero, sub_self, Polynomial.coeff_zero] exact ⟨fun _ _ => trivial, fun h => absurd h (by omega)⟩ | @insert a s ha ih => dsimp only at ih ⊢ set gs : ℚ[X] := ∏ k ∈ s, (Polynomial.X - Polynomial.C (z k)) have hgs_monic : gs.Monic := Polynomial.monic_prod_of_monic _ _ (fun k _ => Polynomial.monic_X_sub_C (z k)) have hgs_deg : gs.natDegree = s.card := by rw [Polynomial.natDegree_prod_of_monic _ _ (fun k _ => Polynomial.monic_X_sub_C (z k))] simp have hgs_top : gs.coeff s.card = 1 := by rw [← hgs_deg, hgs_monic.coeff_natDegree] have hgs_above : ∀ d, s.card < d → gs.coeff d = 0 := fun d hd => Polynomial.coeff_eq_zero_of_natDegree_lt (hgs_deg ▸ hd) set Ps : ℚ[X] := Polynomial.X * gs.comp (Polynomial.X - 1) - (Polynomial.X - Polynomial.C (s.card : ℚ)) * gs have hrec : Polynomial.X * (∏ k ∈ insert a s, (Polynomial.X - Polynomial.C (z k))).comp (Polynomial.X - 1) - (Polynomial.X - Polynomial.C ((insert a s).card : ℚ)) * ∏ k ∈ insert a s, (Polynomial.X - Polynomial.C (z k)) = Polynomial.X * Ps - Polynomial.C (z a + 1) * Ps + Polynomial.C ((s.card : ℚ) - z a) * gs := by rw [Finset.prod_insert ha, Finset.card_insert_of_notMem ha, Nat.cast_add, Nat.cast_one, Polynomial.mul_comp, Polynomial.sub_comp, Polynomial.X_comp, Polynomial.C_comp] simp only [Ps, map_add, map_sub, map_one] ring rw [hrec, Finset.card_insert_of_notMem ha] constructor · intro d hd simp only [Polynomial.coeff_add, Polynomial.coeff_sub, Polynomial.coeff_C_mul] have hd_gt : s.card < d := by omega have h1 : (Polynomial.X * Ps).coeff d = 0 := by cases d with | zero => omega | succ d' => rw [Polynomial.coeff_X_mul]; exact ih.1 d' (by omega) rw [h1, ih.1 d (by omega), hgs_above d hd_gt] ring · intro _ simp only [Nat.add_sub_cancel, Polynomial.coeff_add, Polynomial.coeff_sub, Polynomial.coeff_C_mul, ih.1 s.card le_rfl, hgs_top, mul_zero, sub_zero, mul_one, Finset.sum_insert ha] cases hc : s.card with | zero => simp only [Polynomial.coeff_X_mul_zero, zero_add, Nat.cast_zero, zero_sub] have hs0 : s = ∅ := Finset.card_eq_zero.mp hc subst hs0; simp | succ n' => rw [Polynomial.coeff_X_mul] have hih2 := ih.2 (by omega) rw [hc, Nat.add_sub_cancel] at hih2 rw [hih2] push_cast ring have haux := hpoly_aux Finset.univ simp only [Finset.card_univ, Fintype.card_fin] at haux set P : ℚ[X] := Polynomial.X * g.comp (Polynomial.X - 1) - (Polynomial.X - Polynomial.C ((m' + 1 : ℕ) : ℚ)) * g have hP_deg : P.natDegree < m' + 1 := by by_contra hge push Not at hge have hne : P ≠ 0 := by intro h0; rw [h0, Polynomial.natDegree_zero] at hge; omega have hlc := Polynomial.leadingCoeff_ne_zero.mpr hne rw [Polynomial.leadingCoeff] at hlc exact hlc (haux.1 P.natDegree hge) have hcoeff := coeff_pred_eq_sum_lagrange (Nat.succ_pos m') z hz P hP_deg rw [haux.2 (Nat.succ_pos m')] at hcoeff have hPeval : ∀ r : Fin (m' + 1), P.eval (z r) = -(z r * ∏ k ∈ Finset.univ.erase r, (z r - 1 - z k)) := by intro r have hgr : g.eval (z r) = 0 := by simp only [g, Polynomial.eval_prod] exact Finset.prod_eq_zero (Finset.mem_univ r) (by simp) simp only [P, Polynomial.eval_sub, Polynomial.eval_mul, Polynomial.eval_X, Polynomial.eval_comp, Polynomial.eval_one, hgr, mul_zero, sub_zero] simp only [g, Polynomial.eval_prod, Polynomial.eval_sub, Polynomial.eval_X, Polynomial.eval_C] rw [← Finset.mul_prod_erase Finset.univ _ (Finset.mem_univ r)] ring simp_rw [hPeval, neg_div, Finset.sum_neg_distrib] at hcoeff have hrew : ∑ r : Fin (m' + 1), (z r * ∏ k ∈ Finset.univ.erase r, (z r - 1 - z k)) / ∏ k ∈ Finset.univ.erase r, (z r - z k) = ∑ r : Fin (m' + 1), z r * ∏ k ∈ Finset.univ.erase r, (z r - 1 - z k) / (z r - z k) := by apply Finset.sum_congr rfl intro r _ rw [mul_div_assoc, Finset.prod_div_distrib] rw [hrew] at hcoeff push_cast at hcoeff ⊢ linarith /-! ## Section 4: Standard Young Tableaux & Frame–Robinson–Thrall Hook-Length Formula -/ /-- A Standard Young Tableau of shape `λ : Partition n`, represented as a grid function `ℕ × ℕ → ℕ` forming a bijection from `cells λ.parts` to `{0, ..., n - 1}`. -/ @[ext] structure SYT {n : ℕ} (lam : Partition n) where entry : ℕ × ℕ → ℕ row_strict : ∀ i j, (i, j + 1) ∈ cells lam.parts → entry (i, j) < entry (i, j + 1) col_strict : ∀ i j, (i + 1, j) ∈ cells lam.parts → entry (i, j) < entry (i + 1, j) zeros : ∀ c, c ∉ cells lam.parts → entry c = 0 image_eq : (cells lam.parts).image entry = Finset.range n noncomputable instance instDecidableEqSYT {n : ℕ} (lam : Partition n) : DecidableEq (SYT lam) := Classical.decEq _ lemma syt_bijOn {n : ℕ} {lam : Partition n} (T : SYT lam) : Set.BijOn T.entry (cells lam.parts : Set (ℕ × ℕ)) (Finset.range n : Set ℕ) := by have hinj : Set.InjOn T.entry (cells lam.parts : Set (ℕ × ℕ)) := Finset.injOn_of_card_image_eq (by rw [T.image_eq, Finset.card_range, card_cells, lam.sum_eq]) exact ⟨fun c hc => by have : T.entry c ∈ (cells lam.parts).image T.entry := Finset.mem_image_of_mem _ hc rwa [T.image_eq] at this, hinj, by intro y hy have hy' : y ∈ (cells lam.parts).image T.entry := by rwa [T.image_eq] rcases Finset.mem_image.mp hy' with ⟨c, hc, rfl⟩ exact ⟨c, hc, rfl⟩⟩ noncomputable instance instFintypeSYT {n : ℕ} (lam : Partition n) : Fintype (SYT lam) := by refine Fintype.ofInjective (fun (T : SYT lam) (c : cells lam.parts) => (⟨T.entry c.1, Finset.mem_range.mp (T.image_eq ▸ Finset.mem_image_of_mem _ c.2)⟩ : Fin n)) ?_ intro T₁ T₂ h ext c by_cases hc : c ∈ cells lam.parts · exact congrArg (fun f => (f ⟨c, hc⟩).1) h · rw [T₁.zeros c hc, T₂.zeros c hc] /-- Whether row `r` is an outer corner of `l`: `rowLen l (r + 1) < rowLen l r`. -/ def isCorner (l : List ℕ) (r : ℕ) : Prop := rowLen l (r + 1) < rowLen l r instance decidableIsCorner (l : List ℕ) (r : ℕ) : Decidable (isCorner l r) := inferInstanceAs (Decidable (rowLen l (r + 1) < rowLen l r)) /-- Remove one box from row `r` of a list (deleting the row if its length becomes 0). -/ def removeBoxAt : ℕ → List ℕ → List ℕ | _, [] => [] | 0, a :: rest => if a ≤ 1 then rest else (a - 1) :: rest | r + 1, a :: rest => a :: removeBoxAt r rest lemma rowLen_removeBoxAt {l : List ℕ} (hpos : ∀ p ∈ l, 0 < p) (hanti : l.Pairwise (· ≥ ·)) {r : ℕ} (hcr : isCorner l r) : ∀ i, rowLen (removeBoxAt r l) i = rowLen l i - (if i = r then 1 else 0) := by induction l generalizing r with | nil => simp [isCorner, rowLen] at hcr | cons a rest ih => cases r with | zero => simp only [isCorner, rowLen, List.getD_cons_zero, List.getD_cons_succ] at hcr simp only [removeBoxAt] split_ifs with ha1 · have hrest_nil : rest = [] := by cases rest with | nil => rfl | cons b bs => have hb : 0 < b := hpos b (by simp) simp at hcr; omega subst hrest_nil intro i; cases i <;> simp [rowLen] omega · intro i; cases i <;> simp [rowLen] | succ r' => simp only [isCorner, rowLen, List.getD_cons_succ] at hcr simp only [removeBoxAt] intro i cases i with | zero => simp [rowLen] | succ i' => simpa [rowLen] using ih (fun p hp => hpos p (List.mem_cons_of_mem a hp)) (List.pairwise_cons.mp hanti).2 hcr i' lemma removeBoxAt_pos {l : List ℕ} (hpos : ∀ p ∈ l, 0 < p) (r : ℕ) : ∀ p ∈ removeBoxAt r l, 0 < p := by induction l generalizing r with | nil => simp [removeBoxAt] | cons a rest ih => cases r with | zero => simp only [removeBoxAt] split_ifs with ha1 · exact fun p hp => hpos p (List.mem_cons_of_mem a hp) · intro p hp rcases List.mem_cons.mp hp with rfl | hp · omega · exact hpos p (List.mem_cons_of_mem a hp) | succ r' => intro p hp simp only [removeBoxAt] at hp rcases List.mem_cons.mp hp with rfl | hp · exact hpos p (by simp) · exact ih (fun q hq => hpos q (List.mem_cons_of_mem a hq)) r' p hp lemma removeBoxAt_anti {l : List ℕ} (hpos : ∀ p ∈ l, 0 < p) (hanti : l.Pairwise (· ≥ ·)) {r : ℕ} (hcr : isCorner l r) : (removeBoxAt r l).Pairwise (· ≥ ·) := by rw [List.pairwise_iff_getElem] intro i j hi hj hij have h1 := rowLen_removeBoxAt hpos hanti hcr i have h2 := rowLen_removeBoxAt hpos hanti hcr j unfold rowLen at h1 h2 rw [List.getD_eq_getElem _ _ hi] at h1 rw [List.getD_eq_getElem _ _ hj] at h2 have hle := rowLen_anti_of_pairwise hanti (Nat.le_of_lt hij) unfold rowLen at hle by_cases hjr : j = r · subst hjr have hir : i ≠ j := ne_of_lt hij simp only [hir, ↓reduceIte, Nat.sub_zero] at h1 simp only [↓reduceIte] at h2 omega · by_cases hir : i = r · subst hir have hle2 := rowLen_anti_of_pairwise hanti (show i + 1 ≤ j by omega) unfold rowLen at hle2 unfold isCorner rowLen at hcr simp only [↓reduceIte] at h1 simp only [hjr, ↓reduceIte, Nat.sub_zero] at h2 omega · simp only [hir, hjr, ↓reduceIte, Nat.sub_zero] at h1 h2 omega lemma removeBoxAt_length_le (l : List ℕ) (r : ℕ) : (removeBoxAt r l).length ≤ l.length := by induction l generalizing r with | nil => simp [removeBoxAt] | cons a rest ih => cases r with | zero => simp only [removeBoxAt]; split_ifs <;> simp | succ r' => simp only [removeBoxAt, List.length_cons]; exact Nat.succ_le_succ (ih r') lemma removeBoxAt_sum {l : List ℕ} (hpos : ∀ p ∈ l, 0 < p) (hanti : l.Pairwise (· ≥ ·)) {r : ℕ} (hcr : isCorner l r) : (removeBoxAt r l).sum + 1 = l.sum := by induction l generalizing r with | nil => simp [isCorner, rowLen] at hcr | cons a rest ih => cases r with | zero => simp only [isCorner, rowLen, List.getD_cons_zero, List.getD_cons_succ] at hcr simp only [removeBoxAt] have ha : 0 < a := hpos a (by simp) split_ifs with ha1 · simp; omega · simp; omega | succ r' => simp only [isCorner, rowLen, List.getD_cons_succ] at hcr simp only [removeBoxAt, List.sum_cons] have h := ih (fun p hp => hpos p (List.mem_cons_of_mem a hp)) (List.pairwise_cons.mp hanti).2 hcr omega /-- Partition obtained by removing the outer corner at row `r`. -/ def removeCorner {n : ℕ} (lam : Partition (n + 1)) {r : ℕ} (hcr : isCorner lam.parts r) : Partition n where parts := removeBoxAt r lam.parts pos := removeBoxAt_pos lam.pos r anti := removeBoxAt_anti lam.pos lam.anti hcr sum_eq := by have := removeBoxAt_sum lam.pos lam.anti hcr have hs := lam.sum_eq omega lemma cells_removeCorner {n : ℕ} (lam : Partition (n + 1)) {r : ℕ} (hcr : isCorner lam.parts r) : cells (removeCorner lam hcr).parts = (cells lam.parts).erase (r, rowLen lam.parts r - 1) := by ext ⟨i, j⟩ rw [mem_cells_iff, Finset.mem_erase, mem_cells_iff] dsimp only [removeCorner] rw [rowLen_removeBoxAt lam.pos lam.anti hcr i] have hr_pos : 0 < rowLen lam.parts r := by unfold isCorner at hcr; omega by_cases hir : i = r · subst hir simp only [↓reduceIte, ne_eq, Prod.mk.injEq, true_and] omega · simp [hir] /-- Helper: unique cell holding the maximum entry `n` in an `SYT` of size `n + 1`. -/ noncomputable def maxCell {n : ℕ} {lam : Partition (n + 1)} (T : SYT lam) : ℕ × ℕ := Classical.choose (Finset.mem_image.mp (show n ∈ (cells lam.parts).image T.entry by rw [T.image_eq]; exact Finset.mem_range.mpr (Nat.lt_succ_self n))) lemma maxCell_spec {n : ℕ} {lam : Partition (n + 1)} (T : SYT lam) : maxCell T ∈ cells lam.parts ∧ T.entry (maxCell T) = n := Classical.choose_spec (Finset.mem_image.mp (show n ∈ (cells lam.parts).image T.entry by rw [T.image_eq]; exact Finset.mem_range.mpr (Nat.lt_succ_self n))) lemma maxCell_props {n : ℕ} {lam : Partition (n + 1)} (T : SYT lam) : (maxCell T).1 < lam.parts.length ∧ (maxCell T).2 = rowLen lam.parts (maxCell T).1 - 1 ∧ isCorner lam.parts (maxCell T).1 := by set c := maxCell T have hc := maxCell_spec T have hc_mem : c.2 < rowLen lam.parts c.1 := mem_cells_iff.mp hc.1 have hlt_len : c.1 < lam.parts.length := by by_contra hge; push Not at hge rw [rowLen_eq_zero_of_ge hge] at hc_mem; omega have hmax_all : ∀ c' ∈ cells lam.parts, T.entry c' ≤ n := fun c' hc' => Nat.le_of_lt_succ (Finset.mem_range.mp (T.image_eq ▸ Finset.mem_image_of_mem _ hc')) have hc_col : c.2 = rowLen lam.parts c.1 - 1 := by by_contra hne have hnext : (c.1, c.2 + 1) ∈ cells lam.parts := mem_cells_iff.mpr (by dsimp only; omega) have hlt := T.row_strict c.1 c.2 hnext have hle := hmax_all _ hnext have heq : T.entry (c.1, c.2) = n := hc.2 omega have hcr : isCorner lam.parts c.1 := by unfold isCorner by_contra hnot; push Not at hnot have hdown : (c.1 + 1, c.2) ∈ cells lam.parts := mem_cells_iff.mpr (by dsimp only; omega) have hlt := T.col_strict c.1 c.2 hdown have hle := hmax_all _ hdown have heq : T.entry (c.1, c.2) = n := hc.2 omega exact ⟨hlt_len, hc_col, hcr⟩ /-- Restrict an `SYT` of size `n + 1` by deleting the cell with maximum entry `n`. -/ noncomputable def restrictMax {n : ℕ} {lam : Partition (n + 1)} (T : SYT lam) : SYT (removeCorner lam (maxCell_props T).2.2) where entry := fun x => if x = maxCell T then 0 else T.entry x row_strict := fun i j hij => by have hprops := maxCell_props T rw [cells_removeCorner, Finset.mem_erase] at hij have hc_eq : ((maxCell T).1, rowLen lam.parts (maxCell T).1 - 1) = maxCell T := Prod.ext rfl hprops.2.1.symm rw [hc_eq] at hij have hij' : (i, j) ≠ maxCell T := by intro heq have h1 : i = (maxCell T).1 := congrArg Prod.fst heq have h2 : j = (maxCell T).2 := congrArg Prod.snd heq have hmem : j + 1 < rowLen lam.parts i := mem_cells_iff.mp hij.2 rw [h1] at hmem omega simp only [hij', hij.1, ↓reduceIte] exact T.row_strict i j hij.2 col_strict := fun i j hij => by have hprops := maxCell_props T rw [cells_removeCorner, Finset.mem_erase] at hij have hc_eq : ((maxCell T).1, rowLen lam.parts (maxCell T).1 - 1) = maxCell T := Prod.ext rfl hprops.2.1.symm rw [hc_eq] at hij have hij' : (i, j) ≠ maxCell T := by intro heq have h1 : i = (maxCell T).1 := congrArg Prod.fst heq have h2 : j = (maxCell T).2 := congrArg Prod.snd heq have hmem : j < rowLen lam.parts (i + 1) := mem_cells_iff.mp hij.2 rw [h1] at hmem have hcr := hprops.2.2; unfold isCorner at hcr omega simp only [hij', hij.1, ↓reduceIte] exact T.col_strict i j hij.2 zeros := fun x hx => by have hprops := maxCell_props T rw [cells_removeCorner, Finset.mem_erase] at hx have hc_eq : ((maxCell T).1, rowLen lam.parts (maxCell T).1 - 1) = maxCell T := Prod.ext rfl hprops.2.1.symm rw [hc_eq] at hx by_cases hxc : x = maxCell T · simp [hxc] · simp only [hxc, ↓reduceIte] exact T.zeros x (fun hmem => hx ⟨hxc, hmem⟩) image_eq := by have hprops := maxCell_props T have hc := maxCell_spec T rw [cells_removeCorner] have hc_eq : ((maxCell T).1, rowLen lam.parts (maxCell T).1 - 1) = maxCell T := Prod.ext rfl hprops.2.1.symm rw [hc_eq] have hbij := syt_bijOn T ext y simp only [Finset.mem_image, Finset.mem_erase, Finset.mem_range] constructor · rintro ⟨x, ⟨hxne, hxmem⟩, rfl⟩ simp only [hxne, ↓reduceIte] have hylt : T.entry x < n + 1 := Finset.mem_range.mp (T.image_eq ▸ Finset.mem_image_of_mem _ hxmem) have hyne : T.entry x ≠ n := fun h => hxne (hbij.injOn hxmem hc.1 (h.trans hc.2.symm)) omega · intro hy have hy_mem : y ∈ (cells lam.parts).image T.entry := by rw [T.image_eq]; exact Finset.mem_range.mpr (by omega) rcases Finset.mem_image.mp hy_mem with ⟨x, hxmem, hxy⟩ have hxne : x ≠ maxCell T := by intro h; subst h; rw [hc.2] at hxy; omega exact ⟨x, ⟨hxne, hxmem⟩, by simp [hxne, hxy]⟩ /-- Extend an `SYT` of `removeCorner lam hcr` by placing `n` in the corner cell `(r, λ_r - 1)`. -/ def extendCorner {n : ℕ} (lam : Partition (n + 1)) {r : ℕ} (hcr : isCorner lam.parts r) (T' : SYT (removeCorner lam hcr)) : SYT lam where entry := fun x => if x = (r, rowLen lam.parts r - 1) then n else T'.entry x row_strict := fun i j hij => by set c : ℕ × ℕ := (r, rowLen lam.parts r - 1) have hlt_n : ∀ x ∈ cells (removeCorner lam hcr).parts, T'.entry x < n := fun x hx => Finset.mem_range.mp (T'.image_eq ▸ Finset.mem_image_of_mem _ hx) by_cases h2 : (i, j + 1) = c · have h1 : (i, j) ≠ c := by intro h; rw [← h2] at h; simp at h have h1_mem : (i, j) ∈ cells (removeCorner lam hcr).parts := by rw [cells_removeCorner, Finset.mem_erase] have hm : j + 1 < rowLen lam.parts i := mem_cells_iff.mp hij exact ⟨h1, mem_cells_iff.mpr (by dsimp only; omega)⟩ simp only [h1, h2, ↓reduceIte] exact hlt_n _ h1_mem · have h1 : (i, j) ≠ c := by intro h have hi : i = r := congrArg Prod.fst h have hj : j = rowLen lam.parts r - 1 := congrArg Prod.snd h have hm : j + 1 < rowLen lam.parts i := mem_cells_iff.mp hij rw [hi] at hm omega have h2_mem : (i, j + 1) ∈ cells (removeCorner lam hcr).parts := by rw [cells_removeCorner, Finset.mem_erase]; exact ⟨h2, hij⟩ simp only [h1, h2, ↓reduceIte] exact T'.row_strict i j h2_mem col_strict := fun i j hij => by set c : ℕ × ℕ := (r, rowLen lam.parts r - 1) have hlt_n : ∀ x ∈ cells (removeCorner lam hcr).parts, T'.entry x < n := fun x hx => Finset.mem_range.mp (T'.image_eq ▸ Finset.mem_image_of_mem _ hx) by_cases h2 : (i + 1, j) = c · have h1 : (i, j) ≠ c := by intro h; rw [← h2] at h; simp at h have h1_mem : (i, j) ∈ cells (removeCorner lam hcr).parts := by rw [cells_removeCorner, Finset.mem_erase] have hle := rowLen_anti_of_pairwise lam.anti (Nat.le_succ i) have hm : j < rowLen lam.parts (i + 1) := mem_cells_iff.mp hij exact ⟨h1, mem_cells_iff.mpr (lt_of_lt_of_le hm hle)⟩ simp only [h1, h2, ↓reduceIte] exact hlt_n _ h1_mem · have h1 : (i, j) ≠ c := by intro h have hi : i = r := congrArg Prod.fst h have hj : j = rowLen lam.parts r - 1 := congrArg Prod.snd h have hm : j < rowLen lam.parts (i + 1) := mem_cells_iff.mp hij rw [hi] at hm unfold isCorner at hcr omega have h2_mem : (i + 1, j) ∈ cells (removeCorner lam hcr).parts := by rw [cells_removeCorner, Finset.mem_erase]; exact ⟨h2, hij⟩ simp only [h1, h2, ↓reduceIte] exact T'.col_strict i j h2_mem zeros := fun x hx => by have hr_pos : 0 < rowLen lam.parts r := by unfold isCorner at hcr; omega have hc_mem : (r, rowLen lam.parts r - 1) ∈ cells lam.parts := mem_cells_iff.mpr (by dsimp only; omega) have hxc : x ≠ (r, rowLen lam.parts r - 1) := fun h => hx (h ▸ hc_mem) simp only [hxc, ↓reduceIte] apply T'.zeros rw [cells_removeCorner, Finset.mem_erase] exact fun h => hx h.2 image_eq := by have hr_pos : 0 < rowLen lam.parts r := by unfold isCorner at hcr; omega have hc_mem : (r, rowLen lam.parts r - 1) ∈ cells lam.parts := mem_cells_iff.mpr (by dsimp only; omega) have hlt_n : ∀ x ∈ cells (removeCorner lam hcr).parts, T'.entry x < n := fun x hx => Finset.mem_range.mp (T'.image_eq ▸ Finset.mem_image_of_mem _ hx) ext y simp only [Finset.mem_image, Finset.mem_range] constructor · rintro ⟨x, hx, rfl⟩ by_cases hxc : x = (r, rowLen lam.parts r - 1) · simp [hxc] · simp only [hxc, ↓reduceIte] have hx' : x ∈ cells (removeCorner lam hcr).parts := by rw [cells_removeCorner, Finset.mem_erase]; exact ⟨hxc, hx⟩ exact Nat.lt_succ_of_lt (hlt_n x hx') · intro hy by_cases hyn : y = n · subst hyn; exact ⟨(r, rowLen lam.parts r - 1), hc_mem, by simp⟩ · have hy_mem : y ∈ (cells (removeCorner lam hcr).parts).image T'.entry := by rw [T'.image_eq]; exact Finset.mem_range.mpr (by omega) rcases Finset.mem_image.mp hy_mem with ⟨x, hx', hxy⟩ rw [cells_removeCorner, Finset.mem_erase] at hx' exact ⟨x, hx'.2, by simp [hx'.1, hxy]⟩ /-- Branching recursion for `f^λ`: `Fintype.card (SYT lam) = ∑ r ∈ corners, Fintype.card (SYT (removeCorner lam r))`. -/ theorem card_syt_branching {n : ℕ} (lam : Partition (n + 1)) : Fintype.card (SYT lam) = ∑ r : {r : Fin lam.parts.length // isCorner lam.parts r.1}, Fintype.card (SYT (removeCorner lam r.2)) := by rw [← Fintype.card_sigma] apply Fintype.card_congr refine { toFun := fun T => ⟨⟨⟨(maxCell T).1, (maxCell_props T).1⟩, (maxCell_props T).2.2⟩, restrictMax T⟩ invFun := fun ⟨r, T'⟩ => extendCorner lam r.2 T' left_inv := fun T => by ext x have hprops := maxCell_props T have hc := maxCell_spec T dsimp only [extendCorner, restrictMax] have hc_eq : ((maxCell T).1, rowLen lam.parts (maxCell T).1 - 1) = maxCell T := Prod.ext rfl hprops.2.1.symm rw [hc_eq] by_cases hxc : x = maxCell T · subst hxc; simp [hc.2] · simp [hxc] right_inv := fun ⟨r, T'⟩ => by set T := extendCorner lam r.2 T' have hmc : maxCell T = (r.1.1, rowLen lam.parts r.1.1 - 1) := by have hspec := maxCell_spec T by_contra hne have h1 : T.entry (maxCell T) = T'.entry (maxCell T) := by change (if maxCell T = (r.1.1, rowLen lam.parts r.1.1 - 1) then n else T'.entry (maxCell T)) = _ simp [hne] have hmem' : maxCell T ∈ cells (removeCorner lam r.2).parts := by rw [cells_removeCorner, Finset.mem_erase]; exact ⟨hne, hspec.1⟩ have hlt : T'.entry (maxCell T) < n := Finset.mem_range.mp (T'.image_eq ▸ Finset.mem_image_of_mem _ hmem') omega have hr_eq : (⟨⟨(maxCell T).1, (maxCell_props T).1⟩, (maxCell_props T).2.2⟩ : {r : Fin lam.parts.length // isCorner lam.parts r.1}) = r := by ext; simp [hmc] refine Sigma.ext hr_eq ?_ have hcast : ∀ (a b : {r : Fin lam.parts.length // isCorner lam.parts r.1}) (heq : a = b) (U : SYT (removeCorner lam a.2)) (V : SYT (removeCorner lam b.2)), (∀ x, U.entry x = V.entry x) → HEq U V := by intro a b heq U V hfun subst heq exact heq_of_eq (SYT.ext (funext hfun)) apply hcast _ _ hr_eq intro x change (if x = maxCell T then 0 else T.entry x) = T'.entry x rw [hmc] change (if x = (r.1.1, rowLen lam.parts r.1.1 - 1) then 0 else if x = (r.1.1, rowLen lam.parts r.1.1 - 1) then n else T'.entry x) = T'.entry x split_ifs with hxc · subst hxc symm; apply T'.zeros rw [cells_removeCorner, Finset.mem_erase]; exact fun h => h.1 rfl · rfl } /-- Helper: double product `∏_{0 ≤ i < k < m} (z i - z k)` over `Fin m`. -/ def vandProd {m : ℕ} (z : Fin m → ℚ) : ℚ := ∏ i : Fin m, ∏ k ∈ Finset.univ.filter (fun k : Fin m => i < k), (z i - z k) lemma vandProd_eq_range {m : ℕ} (f : ℕ → ℚ) : vandProd (fun i : Fin m => f i.1) = ∏ i ∈ Finset.range m, ∏ k ∈ Finset.Ioo i m, (f i - f k) := by unfold vandProd dsimp only simp_rw [Fin.lt_def] rw [Fin.prod_univ_eq_prod_range (fun i => ∏ k ∈ Finset.univ.filter (fun k : Fin m => i < k.1), (f i - f k.1))] apply Finset.prod_congr rfl intro i hi have hi' : i < m := Finset.mem_range.mp hi apply Finset.prod_bij (fun k _ => k.1) · intro k hk; simp only [Finset.mem_filter, Finset.mem_univ, true_and] at hk exact Finset.mem_Ioo.mpr ⟨hk, k.2⟩ · intro k₁ _ k₂ _ heq; exact Fin.ext heq · intro k hk; rcases Finset.mem_Ioo.mp hk with ⟨hik, hkm⟩ exact ⟨⟨k, hkm⟩, by simp [hik], rfl⟩ · intro _ _; rfl /-- Ratio of Vandermonde products when decrementing `z r` by 1. -/ lemma vandProd_update_sub_one {m : ℕ} (z : Fin m → ℚ) (hz : Function.Injective z) (r : Fin m) : vandProd (Function.update z r (z r - 1)) = vandProd z * ∏ k ∈ Finset.univ.erase r, (z r - 1 - z k) / (z r - z k) := by set z' := Function.update z r (z r - 1) have hne : ∀ k ∈ Finset.univ.erase r, z r - z k ≠ 0 := fun k hk h0 => (Finset.mem_erase.mp hk).1 (hz (sub_eq_zero.mp h0).symm) -- Express both vandProd as products over ordered pairs `S = {(i, k) | i < k}` set S : Finset (Fin m × Fin m) := Finset.univ.filter (fun p : Fin m × Fin m => p.1 < p.2) have hvand_S : ∀ w : Fin m → ℚ, vandProd w = ∏ p ∈ S, (w p.1 - w p.2) := by intro w unfold vandProd rw [Finset.prod_sigma'] apply Finset.prod_bij (fun (p : Σ _ : Fin m, Fin m) _ => (p.1, p.2)) · intro p hp simp only [Finset.mem_sigma, Finset.mem_univ, Finset.mem_filter, true_and] at hp exact Finset.mem_filter.mpr ⟨Finset.mem_univ _, hp⟩ · intro p₁ _ p₂ _ heq rcases p₁ with ⟨a₁, b₁⟩; rcases p₂ with ⟨a₂, b₂⟩ simp only [Prod.mk.injEq] at heq; rcases heq with ⟨rfl, rfl⟩; rfl · intro p hp simp only [S, Finset.mem_filter, Finset.mem_univ, true_and] at hp exact ⟨⟨p.1, p.2⟩, by simp [hp], rfl⟩ · intro _ _; rfl rw [hvand_S z', hvand_S z] -- Multiply by ∏_{k ≠ r} (z r - z k) and show equality! have hden_ne : (∏ k ∈ Finset.univ.erase r, (z r - z k)) ≠ 0 := Finset.prod_ne_zero_iff.mpr hne rw [Finset.prod_div_distrib, mul_div_assoc', eq_div_iff hden_ne] -- Partition S into pairs touching r vs not touching r set S_touch := S.filter (fun p => p.1 = r ∨ p.2 = r) set S_rest := S.filter (fun p => ¬ (p.1 = r ∨ p.2 = r)) have hsplit_S : ∀ f : Fin m × Fin m → ℚ, ∏ p ∈ S, f p = (∏ p ∈ S_touch, f p) * (∏ p ∈ S_rest, f p) := fun f => (Finset.prod_filter_mul_prod_filter_not S (fun p => p.1 = r ∨ p.2 = r) f).symm rw [hsplit_S (fun p => z' p.1 - z' p.2), hsplit_S (fun p => z p.1 - z p.2)] have hrest_eq : ∏ p ∈ S_rest, (z' p.1 - z' p.2) = ∏ p ∈ S_rest, (z p.1 - z p.2) := by apply Finset.prod_congr rfl intro p hp have hnot := (Finset.mem_filter.mp hp).2 push Not at hnot simp [z', hnot.1, hnot.2] rw [hrest_eq] -- Biject S_touch with Finset.univ.erase r: p ↦ if p.1 = r then p.2 else p.1 have htouch_eq : ∀ (w : Fin m → ℚ), (∏ p ∈ S_touch, (w p.1 - w p.2)) = ∏ k ∈ Finset.univ.erase r, (if r < k then w r - w k else w k - w r) := by intro w apply Finset.prod_bij (fun p _ => if p.1 = r then p.2 else p.1) · intro p hp simp only [S_touch, S, Finset.mem_filter, Finset.mem_univ, true_and] at hp simp only [Finset.mem_erase, Finset.mem_univ, and_true] rcases hp.2 with h1 | h2 · simp only [h1, ↓reduceIte]; exact ne_of_gt (h1 ▸ hp.1) · have h1ne : p.1 ≠ r := ne_of_lt (h2 ▸ hp.1) simp only [h1ne, ↓reduceIte]; exact h1ne · intro p₁ hp₁ p₂ hp₂ heq simp only [S_touch, S, Finset.mem_filter, Finset.mem_univ, true_and] at hp₁ hp₂ rcases hp₁.2 with h1 | h1 <;> rcases hp₂.2 with h2 | h2 · simp only [h1, h2, ↓reduceIte] at heq; exact Prod.ext (h1.trans h2.symm) heq · have h2ne : p₂.1 ≠ r := ne_of_lt (h2 ▸ hp₂.1) simp only [h1, h2ne, ↓reduceIte] at heq have : r < p₂.1 := heq ▸ (h1 ▸ hp₁.1) exact absurd (lt_trans this (h2 ▸ hp₂.1)) (lt_irrefl _) · have h1ne : p₁.1 ≠ r := ne_of_lt (h1 ▸ hp₁.1) simp only [h1ne, h2, ↓reduceIte] at heq have : r < p₁.1 := heq.symm ▸ (h2 ▸ hp₂.1) exact absurd (lt_trans this (h1 ▸ hp₁.1)) (lt_irrefl _) · have h1ne : p₁.1 ≠ r := ne_of_lt (h1 ▸ hp₁.1) have h2ne : p₂.1 ≠ r := ne_of_lt (h2 ▸ hp₂.1) simp only [h1ne, h2ne, ↓reduceIte] at heq exact Prod.ext heq (h1.trans h2.symm) · intro k hk have hkr : k ≠ r := (Finset.mem_erase.mp hk).1 rcases lt_or_gt_of_ne hkr with hlt | hgt · exact ⟨(k, r), by simp [S_touch, S, hlt], by simp [ne_of_lt hlt]⟩ · exact ⟨(r, k), by simp [S_touch, S, hgt], by simp⟩ · intro p hp simp only [S_touch, S, Finset.mem_filter, Finset.mem_univ, true_and] at hp rcases hp.2 with h1 | h2 · have hrlt : r < p.2 := h1 ▸ hp.1 simp [h1, hrlt] · have h1ne : p.1 ≠ r := ne_of_lt (h2 ▸ hp.1) have hnot : ¬ (r < p.1) := not_lt.mpr (le_of_lt (h2 ▸ hp.1)) simp [h1ne, hnot, h2] rw [htouch_eq z', htouch_eq z] have hprod_mul : (∏ k ∈ Finset.univ.erase r, (if r < k then z' r - z' k else z' k - z' r)) * (∏ k ∈ Finset.univ.erase r, (z r - z k)) = (∏ k ∈ Finset.univ.erase r, (if r < k then z r - z k else z k - z r)) * (∏ k ∈ Finset.univ.erase r, (z r - 1 - z k)) := by rw [← Finset.prod_mul_distrib, ← Finset.prod_mul_distrib] apply Finset.prod_congr rfl intro k hk have hkr : k ≠ r := (Finset.mem_erase.mp hk).1 simp only [z', Function.update_self, Function.update_of_ne hkr] split_ifs <;> ring calc (∏ k ∈ Finset.univ.erase r, (if r < k then z' r - z' k else z' k - z' r)) * (∏ p ∈ S_rest, (z p.1 - z p.2)) * ∏ k ∈ Finset.univ.erase r, (z r - z k) = ((∏ k ∈ Finset.univ.erase r, (if r < k then z' r - z' k else z' k - z' r)) * ∏ k ∈ Finset.univ.erase r, (z r - z k)) * ∏ p ∈ S_rest, (z p.1 - z p.2) := by ring _ = ((∏ k ∈ Finset.univ.erase r, (if r < k then z r - z k else z k - z r)) * ∏ k ∈ Finset.univ.erase r, (z r - 1 - z k)) * ∏ p ∈ S_rest, (z p.1 - z p.2) := by rw [hprod_mul] _ = (∏ k ∈ Finset.univ.erase r, (if r < k then z r - z k else z k - z r)) * (∏ p ∈ S_rest, (z p.1 - z p.2)) * ∏ k ∈ Finset.univ.erase r, (z r - 1 - z k) := by ring /-- **Frobenius–Young Factorial Formula**: For EVERY `m ≥ lam.parts.length`, `f^λ * ∏_{i < m} (ℓ_i)! = n! * ∏_{0 ≤ i < k < m} (ℓ_i - ℓ_k)`. -/ theorem frobenius_young_formula (n : ℕ) : ∀ (lam : Partition n) (m : ℕ), lam.parts.length ≤ m → (Fintype.card (SYT lam) : ℚ) * (∏ i ∈ Finset.range m, ((shiftedPart lam.parts m i).factorial : ℚ)) = (n.factorial : ℚ) * ∏ i ∈ Finset.range m, ∏ k ∈ Finset.Ioo i m, ((shiftedPart lam.parts m i : ℚ) - (shiftedPart lam.parts m k : ℚ)) := by induction n with | zero => intro lam m _ have hnil : lam.parts = [] := by cases h : lam.parts with | nil => rfl | cons a rest => have ha := lam.pos a (by simp [h]) have hs := lam.sum_eq rw [h] at hs; simp at hs; omega have hcard : Fintype.card (SYT lam) = 1 := by have : Unique (SYT lam) := { default := ⟨fun _ => 0, fun _ _ h => by simp [hnil, cells] at h, fun _ _ h => by simp [hnil, cells] at h, fun _ _ => rfl, by simp [hnil, cells]⟩ uniq := fun T => by ext c have hc : c ∉ cells lam.parts := by simp [hnil, cells] exact T.zeros c hc } exact Fintype.card_unique rw [hcard, Nat.cast_one, one_mul, Nat.factorial_zero, Nat.cast_one, one_mul] have hshift : ∀ i, shiftedPart lam.parts m i = m - 1 - i := by intro i; simp [shiftedPart, hnil, rowLen] simp_rw [hshift] apply Finset.prod_congr rfl intro i hi have hi' : i < m := Finset.mem_range.mp hi have hprod : ∏ k ∈ Finset.Ioo i m, ((m - 1 - i : ℕ) - (m - 1 - k : ℕ) : ℚ) = ((m - 1 - i).factorial : ℚ) := by have hsub : ∀ k ∈ Finset.Ioo i m, ((m - 1 - i : ℕ) - (m - 1 - k : ℕ) : ℚ) = ((k - i : ℕ) : ℚ) := by intro k hk have := Finset.mem_Ioo.mp hk have h1 : (m - 1 - i : ℕ) = (m - 1 - k : ℕ) + (k - i) := by omega push_cast [h1]; ring rw [Finset.prod_congr rfl hsub, ← Nat.cast_prod] congr 1 have hbij : ∏ k ∈ Finset.Ioo i m, (k - i) = ∏ d ∈ Finset.Icc 1 (m - 1 - i), d := by apply Finset.prod_bij (fun k _ => k - i) · intro k hk; simp only [Finset.mem_Ioo, Finset.mem_Icc] at hk ⊢; omega · intro k₁ hk₁ k₂ hk₂ heq; simp only [Finset.mem_Ioo] at hk₁ hk₂; omega · intro d hd; simp only [Finset.mem_Icc] at hd exact ⟨d + i, by simp only [Finset.mem_Ioo]; omega, by omega⟩ · intro _ _; rfl rw [hbij] generalize m - 1 - i = t induction t with | zero => simp | succ s ih => rw [Finset.prod_Icc_succ_top (by omega), ih, Nat.factorial_succ, mul_comm] exact hprod.symm | succ n ih => intro lam m hm let z : Fin m → ℚ := fun i => (shiftedPart lam.parts m i.1 : ℚ) have hz_inj : Function.Injective z := by intro i j hij by_contra hne have hne' : i.1 ≠ j.1 := fun h => hne (Fin.ext h) rcases lt_or_gt_of_ne hne' with hlt | hgt · have := Nat.cast_lt (α := ℚ).mpr (shiftedPart_strictAnti lam.anti hlt j.2) exact ne_of_gt this hij · have := Nat.cast_lt (α := ℚ).mpr (shiftedPart_strictAnti lam.anti hgt i.2) exact ne_of_lt this hij rw [← vandProd_eq_range (fun i => (shiftedPart lam.parts m i : ℚ))] rw [card_syt_branching lam, Nat.cast_sum, Finset.sum_mul] -- Compute each corner term via IH + vandProd_update_sub_one have hcorner_term : ∀ (r : {r : Fin lam.parts.length // isCorner lam.parts r.1}), (Fintype.card (SYT (removeCorner lam r.2)) : ℚ) * (∏ i ∈ Finset.range m, ((shiftedPart lam.parts m i).factorial : ℚ)) = (n.factorial : ℚ) * vandProd z * (z ⟨r.1.1, lt_of_lt_of_le r.1.2 hm⟩ * ∏ k ∈ Finset.univ.erase (⟨r.1.1, lt_of_lt_of_le r.1.2 hm⟩ : Fin m), (z ⟨r.1.1, lt_of_lt_of_le r.1.2 hm⟩ - 1 - z k) / (z ⟨r.1.1, lt_of_lt_of_le r.1.2 hm⟩ - z k)) := by intro r set rFin : Fin m := ⟨r.1.1, lt_of_lt_of_le r.1.2 hm⟩ have hlen' : (removeCorner lam r.2).parts.length ≤ m := le_trans (removeBoxAt_length_le lam.parts r.1.1) hm have hih := ih (removeCorner lam r.2) m hlen' rw [← vandProd_eq_range (fun i => (shiftedPart (removeCorner lam r.2).parts m i : ℚ))] at hih have hr_pos : 0 < rowLen lam.parts r.1.1 := by have := r.2; unfold isCorner at this; omega have hshift_eq : (fun i : Fin m => (shiftedPart (removeCorner lam r.2).parts m i.1 : ℚ)) = Function.update z rFin (z rFin - 1) := by funext i dsimp only [removeCorner, shiftedPart, z] rw [rowLen_removeBoxAt lam.pos lam.anti r.2 i.1] by_cases hi : i = rFin · subst hi simp only [rFin, Function.update_self, ↓reduceIte] have h1 : rowLen lam.parts r.1.1 - 1 + m - 1 - r.1.1 + 1 = rowLen lam.parts r.1.1 + m - 1 - r.1.1 := by have := rFin.2; omega have h2 : ((rowLen lam.parts r.1.1 - 1 + m - 1 - r.1.1 : ℕ) : ℚ) + 1 = ((rowLen lam.parts r.1.1 + m - 1 - r.1.1 : ℕ) : ℚ) := by exact_mod_cast h1 linarith · have hi' : i.1 ≠ r.1.1 := fun h => hi (Fin.ext h) simp [hi, hi'] rw [hshift_eq, vandProd_update_sub_one z hz_inj rFin] at hih -- Relate the two factorial products have hfac_rel : (∏ i ∈ Finset.range m, ((shiftedPart lam.parts m i).factorial : ℚ)) = z rFin * (∏ i ∈ Finset.range m, ((shiftedPart (removeCorner lam r.2).parts m i).factorial : ℚ)) := by rw [← Fin.prod_univ_eq_prod_range (fun i => ((shiftedPart lam.parts m i).factorial : ℚ)), ← Fin.prod_univ_eq_prod_range (fun i => ((shiftedPart (removeCorner lam r.2).parts m i).factorial : ℚ))] rw [← Finset.mul_prod_erase Finset.univ _ (Finset.mem_univ rFin), ← Finset.mul_prod_erase Finset.univ _ (Finset.mem_univ rFin)] have hother : ∏ x ∈ Finset.univ.erase rFin, ((shiftedPart lam.parts m x.1).factorial : ℚ) = ∏ x ∈ Finset.univ.erase rFin, ((shiftedPart (removeCorner lam r.2).parts m x.1).factorial : ℚ) := by apply Finset.prod_congr rfl intro x hx have hne : x.1 ≠ r.1.1 := fun h => (Finset.mem_erase.mp hx).1 (Fin.ext h) dsimp only [removeCorner, shiftedPart] rw [rowLen_removeBoxAt lam.pos lam.anti r.2 x.1] simp [hne] rw [hother] have hstep : shiftedPart lam.parts m r.1.1 = shiftedPart (removeCorner lam r.2).parts m r.1.1 + 1 := by dsimp only [removeCorner, shiftedPart] rw [rowLen_removeBoxAt lam.pos lam.anti r.2 r.1.1] simp only [↓reduceIte] have := rFin.2; omega have hfac1 : ((shiftedPart lam.parts m r.1.1).factorial : ℚ) = z rFin * ((shiftedPart (removeCorner lam r.2).parts m r.1.1).factorial : ℚ) := by rw [hstep, Nat.factorial_succ] push_cast [z, rFin, hstep] ring rw [hfac1]; ring rw [hfac_rel] calc (Fintype.card (SYT (removeCorner lam r.2)) : ℚ) * (z rFin * ∏ i ∈ Finset.range m, ((shiftedPart (removeCorner lam r.2).parts m i).factorial : ℚ)) = z rFin * ((Fintype.card (SYT (removeCorner lam r.2)) : ℚ) * ∏ i ∈ Finset.range m, ((shiftedPart (removeCorner lam r.2).parts m i).factorial : ℚ)) := by ring _ = z rFin * ((n.factorial : ℚ) * (vandProd z * ∏ k ∈ Finset.univ.erase rFin, (z rFin - 1 - z k) / (z rFin - z k))) := by rw [hih] _ = (n.factorial : ℚ) * vandProd z * (z rFin * ∏ k ∈ Finset.univ.erase rFin, (z rFin - 1 - z k) / (z rFin - z k)) := by ring rw [Finset.sum_congr rfl (fun r _ => hcorner_term r), ← Finset.mul_sum] -- Show sum over corners equals full sum over Fin m (non-corners contribute 0!) let term : Fin m → ℚ := fun r => z r * ∏ k ∈ Finset.univ.erase r, (z r - 1 - z k) / (z r - z k) have hsum_corners : (∑ r : {r : Fin lam.parts.length // isCorner lam.parts r.1}, term ⟨r.1.1, lt_of_lt_of_le r.1.2 hm⟩) = ∑ r : Fin m, term r := by have hinj_emb : Function.Injective (fun r : {r : Fin lam.parts.length // isCorner lam.parts r.1} => (⟨r.1.1, lt_of_lt_of_le r.1.2 hm⟩ : Fin m)) := by intro a b hab exact Subtype.ext (Fin.ext (congrArg (fun x : Fin m => x.1) hab)) rw [← Finset.sum_image (fun a _ b _ h => hinj_emb h)] apply Finset.sum_subset (Finset.subset_univ _) intro r _ hr_not have hnot_cr : ¬ isCorner lam.parts r.1 := by intro hcr have hr_lt : r.1 < lam.parts.length := by by_contra hge; push Not at hge unfold isCorner at hcr rw [rowLen_eq_zero_of_ge hge] at hcr; omega exact hr_not (Finset.mem_image.mpr ⟨⟨⟨r.1, hr_lt⟩, hcr⟩, Finset.mem_univ _, Fin.ext rfl⟩) have hle_eq : rowLen lam.parts r.1 = rowLen lam.parts (r.1 + 1) := by have h1 := rowLen_anti_of_pairwise lam.anti (show r.1 ≤ r.1 + 1 by omega) unfold isCorner at hnot_cr omega by_cases hr_last : r.1 + 1 < m · -- Then z r - 1 = z (r + 1), so factor k = r + 1 is 0! let r1 : Fin m := ⟨r.1 + 1, hr_last⟩ have hr1_mem : r1 ∈ Finset.univ.erase r := Finset.mem_erase.mpr ⟨fun h => by have := congrArg Fin.val h; dsimp [r1] at this; omega, Finset.mem_univ _⟩ have hzero : z r - 1 - z r1 = 0 := by dsimp only [z, r1, shiftedPart] have h1 : rowLen lam.parts (r.1 + 1) + m - 1 - (r.1 + 1) + 1 = rowLen lam.parts r.1 + m - 1 - r.1 := by omega have h2 : ((rowLen lam.parts (r.1 + 1) + m - 1 - (r.1 + 1) : ℕ) : ℚ) + 1 = ((rowLen lam.parts r.1 + m - 1 - r.1 : ℕ) : ℚ) := by exact_mod_cast h1 linarith dsimp only [term] rw [Finset.prod_eq_zero hr1_mem (by rw [hzero, zero_div]), mul_zero] · -- r.1 = m - 1, so rowLen lam.parts (r.1 + 1) = 0, hence rowLen lam.parts r.1 = 0, hence z r = 0! have hrl0 : rowLen lam.parts r.1 = 0 := by rw [hle_eq, rowLen_eq_zero_of_ge (by omega)] have hz0 : z r = 0 := by dsimp only [z, shiftedPart] have : rowLen lam.parts r.1 + m - 1 - r.1 = 0 := by omega simp [this] simp [term, hz0] rw [show (∑ r : {r : Fin lam.parts.length // isCorner lam.parts r.1}, z ⟨r.1.1, lt_of_lt_of_le r.1.2 hm⟩ * ∏ k ∈ Finset.univ.erase (⟨r.1.1, lt_of_lt_of_le r.1.2 hm⟩ : Fin m), (z ⟨r.1.1, lt_of_lt_of_le r.1.2 hm⟩ - 1 - z k) / (z ⟨r.1.1, lt_of_lt_of_le r.1.2 hm⟩ - z k)) = ∑ r : Fin m, term r from hsum_corners] rw [lagrange_frobenius_young_identity z hz_inj] -- Compute (∑ r : Fin m, z r) - m * (m - 1) / 2 = n + 1! have hsum_z : (∑ r : Fin m, z r) - (m * (m - 1) : ℚ) / 2 = ((n + 1 : ℕ) : ℚ) := by have hsum_nat : ∑ i ∈ Finset.range m, shiftedPart lam.parts m i = (n + 1) + ∑ i ∈ Finset.range m, (m - 1 - i) := by have hadd : ∀ i ∈ Finset.range m, shiftedPart lam.parts m i = rowLen lam.parts i + (m - 1 - i) := by intro i hi; have := Finset.mem_range.mp hi; unfold shiftedPart; omega rw [Finset.sum_congr rfl hadd, Finset.sum_add_distrib] congr 1 have hsplit : Finset.range m = Finset.range lam.parts.length ∪ Finset.Ico lam.parts.length m := by ext x; simp only [Finset.mem_range, Finset.mem_union, Finset.mem_Ico]; omega rw [hsplit, Finset.sum_union (Finset.disjoint_left.mpr fun x h1 h2 => by simp only [Finset.mem_range, Finset.mem_Ico] at h1 h2; omega)] have htail : ∑ i ∈ Finset.Ico lam.parts.length m, rowLen lam.parts i = 0 := Finset.sum_eq_zero fun i hi => rowLen_eq_zero_of_ge (Finset.mem_Ico.mp hi).1 rw [htail, add_zero] have hsum_l : ∀ l : List ℕ, ∑ i ∈ Finset.range l.length, rowLen l i = l.sum := by intro l induction l with | nil => simp | cons a rest ih => simp only [List.length_cons, List.sum_cons, Finset.sum_range_succ'] have : ∑ k ∈ Finset.range rest.length, rowLen (a :: rest) (k + 1) = ∑ k ∈ Finset.range rest.length, rowLen rest k := Finset.sum_congr rfl fun k _ => by simp [rowLen] rw [this, ih]; simp [rowLen, add_comm] rw [hsum_l lam.parts, lam.sum_eq] have htri : 2 * ∑ i ∈ Finset.range m, (m - 1 - i) = m * (m - 1) := by have hbij : ∑ i ∈ Finset.range m, (m - 1 - i) = ∑ j ∈ Finset.range m, j := by apply Finset.sum_bij (fun i _ => m - 1 - i) · intro i hi; simp only [Finset.mem_range] at hi ⊢; omega · intro i₁ hi₁ i₂ hi₂ heq; simp only [Finset.mem_range] at hi₁ hi₂; omega · intro j hj; simp only [Finset.mem_range] at hj exact ⟨m - 1 - j, Finset.mem_range.mpr (by omega), by omega⟩ · intro _ _; rfl rw [hbij, mul_comm, Finset.sum_range_id_mul_two] have hcast1 : ∑ r : Fin m, z r = ((∑ i ∈ Finset.range m, shiftedPart lam.parts m i : ℕ) : ℚ) := by rw [Fin.sum_univ_eq_sum_range (fun i => (shiftedPart lam.parts m i : ℚ)), Nat.cast_sum] have hcast2 : 2 * ((∑ i ∈ Finset.range m, (m - 1 - i) : ℕ) : ℚ) = (m * (m - 1) : ℚ) := by cases m with | zero => simp | succ m' => have : (2 * ∑ i ∈ Finset.range (m' + 1), (m' + 1 - 1 - i) : ℕ) = (m' + 1) * m' := htri have hq : ((2 * ∑ i ∈ Finset.range (m' + 1), (m' + 1 - 1 - i) : ℕ) : ℚ) = (((m' + 1) * m' : ℕ) : ℚ) := by exact_mod_cast this push_cast at hq ⊢ linarith rw [hcast1, hsum_nat, Nat.cast_add] linarith rw [hsum_z] rw [Nat.factorial_succ] push_cast ring /-- **Frame–Robinson–Thrall Hook-Length Formula**: For EVERY `n : ℕ` and EVERY partition `λ : Partition n`, `f^λ * ∏_{□ ∈ λ} h_λ(□) = n!`. -/ theorem hook_length_formula {n : ℕ} (lam : Partition n) : Fintype.card (SYT lam) * hookProd lam.parts = n.factorial := by set m := lam.parts.length have hfy := frobenius_young_formula n lam m le_rfl have hhd := prod_shiftedPart_factorial_eq lam.anti (m := m) le_rfl have hhd_q : (∏ i ∈ Finset.range m, ((shiftedPart lam.parts m i).factorial : ℚ)) = (hookProd lam.parts : ℚ) * ∏ i ∈ Finset.range m, ∏ k ∈ Finset.Ioo i m, ((shiftedPart lam.parts m i : ℚ) - (shiftedPart lam.parts m k : ℚ)) := by have h1 : ((∏ i ∈ Finset.range m, (shiftedPart lam.parts m i).factorial : ℕ) : ℚ) = ((hookProd lam.parts * ∏ i ∈ Finset.range m, ∏ k ∈ Finset.Ioo i m, (shiftedPart lam.parts m i - shiftedPart lam.parts m k) : ℕ) : ℚ) := by exact_mod_cast hhd push_cast at h1 rw [h1] congr 1 apply Finset.prod_congr rfl intro i hi apply Finset.prod_congr rfl intro k hk have hlt := shiftedPart_strictAnti lam.anti (Finset.mem_Ioo.mp hk).1 (Finset.mem_Ioo.mp hk).2 rw [Nat.cast_sub (le_of_lt hlt)] have hvand_ne : (∏ i ∈ Finset.range m, ∏ k ∈ Finset.Ioo i m, ((shiftedPart lam.parts m i : ℚ) - (shiftedPart lam.parts m k : ℚ))) ≠ 0 := by apply Finset.prod_ne_zero_iff.mpr intro i _ apply Finset.prod_ne_zero_iff.mpr intro k hk have hlt := shiftedPart_strictAnti lam.anti (Finset.mem_Ioo.mp hk).1 (Finset.mem_Ioo.mp hk).2 have : (shiftedPart lam.parts m k : ℚ) < (shiftedPart lam.parts m i : ℚ) := Nat.cast_lt.mpr hlt linarith rw [hhd_q, ← mul_assoc] at hfy have hq : (Fintype.card (SYT lam) : ℚ) * (hookProd lam.parts : ℚ) = (n.factorial : ℚ) := mul_right_cancel₀ hvand_ne hfy exact_mod_cast hq /-! ## Section 5: Catalan Specialization `f^{(k, k)} = C_k` -/ /-- Two-row rectangular partition `(k, k)` of `2 * k` (empty when `k = 0`). -/ def rect2Part (k : ℕ) : Partition (2 * k) := if hk : k = 0 then { parts := [] pos := by simp anti := List.Pairwise.nil sum_eq := by simp [hk] } else { parts := [k, k] pos := by intro p hp; simp only [List.mem_cons, List.not_mem_nil, or_false] at hp; rcases hp with rfl | rfl <;> omega anti := by simp sum_eq := by simp; omega } /-- **Catalan Specialization of Hook-Length Formula**: For every `k : ℕ`, `(k + 1) * f^{(k, k)} = Nat.choose (2 * k) k` and `f^{(k, k)} = catalan k`. -/ theorem hook_length_catalan (k : ℕ) : Fintype.card (SYT (rect2Part k)) = catalan k := by have hhl := hook_length_formula (rect2Part k) by_cases hk : k = 0 · subst hk have hhp : hookProd (rect2Part 0).parts = 1 := by simp [rect2Part, hookProd, cells] rw [hhp, mul_one] at hhl simpa [catalan_zero] using hhl · have hparts : (rect2Part k).parts = [k, k] := by simp [rect2Part, hk] -- Compute hookProd [k, k] = (k + 1)! * k! have hhp : hookProd [k, k] = (k + 1).factorial * k.factorial := by unfold hookProd cells rw [Finset.prod_biUnion (cells_pairwiseDisjoint [k, k])] simp only [List.length_cons, List.length_nil] rw [Finset.prod_range_succ, Finset.prod_range_succ, Finset.prod_range_zero, one_mul] have hrow0 : rowLen [k, k] 0 = k := rfl have hrow1 : rowLen [k, k] 1 = k := rfl rw [hrow0, hrow1] rw [Finset.prod_image (fun _ _ _ _ h => (Prod.mk.inj h).2), Finset.prod_image (fun _ _ _ _ h => (Prod.mk.inj h).2)] have hcol : ∀ j < k, colLen [k, k] j = 2 := by intro j hj; simp [colLen, hj] have hp0 : (∏ j ∈ Finset.range k, hookLen [k, k] (0, j)) = (k + 1).factorial := by have heq : ∀ j ∈ Finset.range k, hookLen [k, k] (0, j) = k + 1 - j := by intro j hj have hj' := Finset.mem_range.mp hj unfold hookLen rw [hrow0, hcol j hj'] omega rw [Finset.prod_congr rfl heq] have hbij : ∏ j ∈ Finset.range k, (k + 1 - j) = ∏ d ∈ Finset.Icc 2 (k + 1), d := by apply Finset.prod_bij (fun j _ => k + 1 - j) · intro j hj; simp only [Finset.mem_range, Finset.mem_Icc] at hj ⊢; omega · intro j₁ hj₁ j₂ hj₂ heq; simp only [Finset.mem_range] at hj₁ hj₂; omega · intro d hd; simp only [Finset.mem_Icc] at hd exact ⟨k + 1 - d, Finset.mem_range.mpr (by omega), by omega⟩ · intro _ _; rfl rw [hbij] have h1 : ∏ d ∈ Finset.Icc 1 (k + 1), d = 1 * ∏ d ∈ Finset.Icc 2 (k + 1), d := by rw [← Finset.mul_prod_erase (Finset.Icc 1 (k + 1)) (fun d => d) (Finset.mem_Icc.mpr ⟨le_rfl, by omega⟩)] have hset : (Finset.Icc 1 (k + 1)).erase 1 = Finset.Icc 2 (k + 1) := by ext x; simp only [Finset.mem_erase, Finset.mem_Icc]; omega rw [hset] rw [← one_mul (∏ d ∈ Finset.Icc 2 (k + 1), d), ← h1] clear * - generalize k + 1 = m induction m with | zero => simp | succ s ih => rw [Finset.prod_Icc_succ_top (by omega), ih, Nat.factorial_succ, mul_comm] have hp1 : (∏ j ∈ Finset.range k, hookLen [k, k] (1, j)) = k.factorial := by have heq : ∀ j ∈ Finset.range k, hookLen [k, k] (1, j) = k - j := by intro j hj have hj' := Finset.mem_range.mp hj unfold hookLen rw [hrow1, hcol j hj'] omega rw [Finset.prod_congr rfl heq] have hbij : ∏ j ∈ Finset.range k, (k - j) = ∏ d ∈ Finset.Icc 1 k, d := by apply Finset.prod_bij (fun j _ => k - j) · intro j hj; simp only [Finset.mem_range, Finset.mem_Icc] at hj ⊢; omega · intro j₁ hj₁ j₂ hj₂ heq; simp only [Finset.mem_range] at hj₁ hj₂; omega · intro d hd; simp only [Finset.mem_Icc] at hd exact ⟨k - d, Finset.mem_range.mpr (by omega), by omega⟩ · intro _ _; rfl rw [hbij] clear * - induction k with | zero => simp | succ s ih => rw [Finset.prod_Icc_succ_top (by omega), ih, Nat.factorial_succ, mul_comm] rw [hp0, hp1] rw [hparts, hhp] at hhl have hcat : catalan k * ((k + 1).factorial * k.factorial) = (2 * k).factorial := by have h1 : (k + 1) * catalan k = Nat.choose (2 * k) k := by rw [catalan_eq_centralBinom_div] exact Nat.mul_div_cancel' (Nat.succ_dvd_centralBinom k) have h2 := Nat.choose_mul_factorial_mul_factorial (show k ≤ 2 * k by omega) have h3 : 2 * k - k = k := by omega rw [h3] at h2 calc catalan k * ((k + 1).factorial * k.factorial) = ((k + 1) * catalan k) * (k.factorial * k.factorial) := by rw [Nat.factorial_succ]; ring _ = Nat.choose (2 * k) k * k.factorial * k.factorial := by rw [h1]; ring _ = (2 * k).factorial := h2 have hpos : 0 < (k + 1).factorial * k.factorial := Nat.mul_pos (Nat.factorial_pos _) (Nat.factorial_pos _) exact Nat.eq_of_mul_eq_mul_right hpos (hhl.trans hcat.symm) /-! ## Section 6: Universal Bialternant, Principal `q`-Specialization & Stanley's Hook-Content Formula -/ /-- Cells of a length-`m` vector `v : Fin m → ℕ`. -/ def cellsVec {m : ℕ} (v : Fin m → ℕ) : Finset (ℕ × ℕ) := (Finset.univ : Finset (Fin m)).biUnion fun i => (Finset.range (v i)).image (fun j => (i.1, j)) lemma cellsVec_pairwiseDisjoint {m : ℕ} (v : Fin m → ℕ) : ((Finset.univ : Finset (Fin m)) : Set (Fin m)).PairwiseDisjoint (fun i => (Finset.range (v i)).image (fun j => (i.1, j))) := by intro i₁ _ i₂ _ hne exact Finset.disjoint_left.mpr fun x hx1 hx2 => by rcases Finset.mem_image.mp hx1 with ⟨_, _, rfl⟩ rcases Finset.mem_image.mp hx2 with ⟨_, _, heq⟩ exact hne (Fin.ext (Prod.mk.inj heq).1.symm) lemma mem_cellsVec_iff {m : ℕ} {v : Fin m → ℕ} {c : ℕ × ℕ} : c ∈ cellsVec v ↔ ∃ h : c.1 < m, c.2 < v ⟨c.1, h⟩ := by simp only [cellsVec, Finset.mem_biUnion, Finset.mem_univ, true_and, Finset.mem_image, Finset.mem_range] constructor · rintro ⟨i, j, hj, heq⟩ have h1 : i.1 = c.1 := (Prod.mk.inj heq).1 have h2 : j = c.2 := (Prod.mk.inj heq).2 refine ⟨h1 ▸ i.2, ?_⟩ have hi : (⟨c.1, h1 ▸ i.2⟩ : Fin m) = i := Fin.ext h1.symm rw [hi, ← h2]; exact hj · rintro ⟨h, hj⟩ exact ⟨⟨c.1, h⟩, c.2, hj, rfl⟩ lemma cellsVec_padParts {l : List ℕ} {m : ℕ} (hm : l.length ≤ m) : cellsVec (fun i : Fin m => rowLen l i.1) = cells l := by ext ⟨i, j⟩ rw [mem_cellsVec_iff, mem_cells_iff] constructor · rintro ⟨_, hj⟩; exact hj · intro hj have hi : i < l.length := by by_contra hge; push Not at hge rw [rowLen_eq_zero_of_ge hge] at hj; omega exact ⟨lt_of_lt_of_le hi hm, hj⟩ /-- Semistandard Young Tableau of shape `v : Fin m → ℕ` with entries in `{0, ..., m - 1}`. -/ @[ext] structure SSYTVec {m : ℕ} (v : Fin m → ℕ) where entry : ℕ × ℕ → ℕ row_weak : ∀ i j, (i, j + 1) ∈ cellsVec v → entry (i, j) ≤ entry (i, j + 1) col_strict : ∀ i j, (i + 1, j) ∈ cellsVec v → entry (i, j) < entry (i + 1, j) lt_m : ∀ c ∈ cellsVec v, entry c < m zeros : ∀ c, c ∉ cellsVec v → entry c = 0 noncomputable instance instDecidableEqSSYTVec {m : ℕ} (v : Fin m → ℕ) : DecidableEq (SSYTVec v) := Classical.decEq _ noncomputable instance instFintypeSSYTVec {m : ℕ} (v : Fin m → ℕ) : Fintype (SSYTVec v) := by refine Fintype.ofInjective (fun (T : SSYTVec v) (c : cellsVec v) => (⟨T.entry c.1, T.lt_m c.1 c.2⟩ : Fin m)) ?_ intro T₁ T₂ h ext c by_cases hc : c ∈ cellsVec v · exact congrArg (fun f => (f ⟨c, hc⟩).1) h · rw [T₁.zeros c hc, T₂.zeros c hc] /-- Semistandard Young Tableau of partition shape `l` with entries in `{0, ..., m - 1}`. -/ @[ext] structure SSYT (l : List ℕ) (m : ℕ) where entry : ℕ × ℕ → ℕ row_weak : ∀ i j, (i, j + 1) ∈ cells l → entry (i, j) ≤ entry (i, j + 1) col_strict : ∀ i j, (i + 1, j) ∈ cells l → entry (i, j) < entry (i + 1, j) lt_m : ∀ c ∈ cells l, entry c < m zeros : ∀ c, c ∉ cells l → entry c = 0 noncomputable instance instDecidableEqSSYT (l : List ℕ) (m : ℕ) : DecidableEq (SSYT l m) := Classical.decEq _ noncomputable instance instFintypeSSYT (l : List ℕ) (m : ℕ) : Fintype (SSYT l m) := by refine Fintype.ofInjective (fun (T : SSYT l m) (c : cells l) => (⟨T.entry c.1, T.lt_m c.1 c.2⟩ : Fin m)) ?_ intro T₁ T₂ h ext c by_cases hc : c ∈ cells l · exact congrArg (fun f => (f ⟨c, hc⟩).1) h · rw [T₁.zeros c hc, T₂.zeros c hc] lemma card_ssyt_eq_card_ssytVec {l : List ℕ} {m : ℕ} (hm : l.length ≤ m) : Fintype.card (SSYT l m) = Fintype.card (SSYTVec (fun i : Fin m => rowLen l i.1)) := by have hcells := cellsVec_padParts hm apply Fintype.card_congr exact { toFun := fun T => ⟨T.entry, fun i j h => T.row_weak i j (hcells ▸ h), fun i j h => T.col_strict i j (hcells ▸ h), fun c h => T.lt_m c (hcells ▸ h), fun c h => T.zeros c (hcells ▸ h)⟩ invFun := fun T => ⟨T.entry, fun i j h => T.row_weak i j (hcells.symm ▸ h), fun i j h => T.col_strict i j (hcells.symm ▸ h), fun c h => T.lt_m c (hcells.symm ▸ h), fun c h => T.zeros c (hcells.symm ▸ h)⟩ left_inv := fun _ => rfl right_inv := fun _ => rfl } /-- Universal combinatorial Schur evaluation `s_v(x_0, ..., x_{m-1})` in any commutative ring `R`. -/ noncomputable def schurEvalClean {R : Type*} [CommRing R] {m : ℕ} (v : Fin m → ℕ) (x : Fin m → R) : R := ∑ T : SSYTVec v, ∏ c ∈ (cellsVec v).attach, x ⟨T.entry c.1, T.lt_m c.1 c.2⟩ /-- Helper: entry in row `i` is `≥ i` in any `SSYTVec`. -/ lemma ssytVec_ge_row {m : ℕ} {v : Fin m → ℕ} (hv : Antitone v) (T : SSYTVec v) : ∀ {i j : ℕ}, (i, j) ∈ cellsVec v → i ≤ T.entry (i, j) := by intro i induction i with | zero => intro j _; exact Nat.zero_le _ | succ i ih => intro j hij have hmem_above : (i, j) ∈ cellsVec v := by rcases mem_cellsVec_iff.mp hij with ⟨hi, hj⟩ refine mem_cellsVec_iff.mpr ⟨by omega, lt_of_lt_of_le hj (hv (show (⟨i, by omega⟩ : Fin m) ≤ ⟨i + 1, hi⟩ by simp [Fin.le_def]))⟩ have h1 := ih hmem_above have h2 := T.col_strict i j hij omega /-- Helper: in any `SSYTVec`, row entries are weakly increasing over arbitrary `j₁ ≤ j₂`. -/ lemma ssytVec_row_le {m : ℕ} {v : Fin m → ℕ} (T : SSYTVec v) {i j₁ j₂ : ℕ} (hle : j₁ ≤ j₂) (h₂ : (i, j₂) ∈ cellsVec v) : T.entry (i, j₁) ≤ T.entry (i, j₂) := by induction j₂ with | zero => have : j₁ = 0 := by omega subst this; exact le_rfl | succ k ih => rcases eq_or_lt_of_le hle with rfl | hlt · exact le_rfl · have hk_mem : (i, k) ∈ cellsVec v := by rcases mem_cellsVec_iff.mp h₂ with ⟨hi, hj⟩ dsimp only at hi hj exact mem_cellsVec_iff.mpr ⟨hi, by dsimp only; omega⟩ exact le_trans (ih (by omega) hk_mem) (T.row_weak i k h₂) /-- **Branching Rule for `schurEvalClean`**: Peeling off entries equal to `m` from `SSYTVec (m + 1) v` gives `s_v(x_0, ..., x_m) = ∑_{u ≺ v} s_u(x_0, ..., x_{m-1}) * x_m^{∑ v - ∑ u}`. -/ theorem schurEvalClean_branching {R : Type*} [CommRing R] {m : ℕ} (v : Fin (m + 1) → ℕ) (hv : Antitone v) (x : Fin (m + 1) → R) : schurEvalClean v x = ∑ u ∈ (Fintype.piFinset fun j : Fin m => Finset.Icc (v j.succ) (v j.castSucc)), schurEvalClean u (fun i => x i.castSucc) * (x (Fin.last m)) ^ ((∑ i : Fin (m + 1), v i) - (∑ j : Fin m, u j)) := by set Iset := Fintype.piFinset (fun j : Fin m => Finset.Icc (v j.succ) (v j.castSucc)) -- Construct explicit equivalence: SSYTVec v ≃ Σ u : Iset, SSYTVec u.1 let toU : SSYTVec v → (Fin m → ℕ) := fun T j => ((Finset.range (v j.castSucc)).filter (fun c => T.entry (j.1, c) < m)).card have htoU_spec : ∀ (T : SSYTVec v) (j : Fin m) (c : ℕ), c < v j.castSucc → (c < toU T j ↔ T.entry (j.1, c) < m) := by intro T j c hc have hinit : ∀ a b, a ≤ b → b < v j.castSucc → T.entry (j.1, b) < m → T.entry (j.1, a) < m := fun a b hab hb hlt => lt_of_le_of_lt (ssytVec_row_le T hab (mem_cellsVec_iff.mpr ⟨j.castSucc.2, hb⟩)) hlt constructor · intro hlt by_contra hge have hsub : (Finset.range (v j.castSucc)).filter (fun k => T.entry (j.1, k) < m) ⊆ Finset.range c := by intro k hk simp only [Finset.mem_filter, Finset.mem_range] at hk ⊢ by_contra hkge; push Not at hkge exact hge (hinit c k hkge hk.1 hk.2) have hcard := Finset.card_le_card hsub rw [Finset.card_range] at hcard dsimp only [toU] at hlt; omega · intro hlt have hsub : Finset.range (c + 1) ⊆ (Finset.range (v j.castSucc)).filter (fun k => T.entry (j.1, k) < m) := by intro k hk simp only [Finset.mem_range, Finset.mem_filter] at hk ⊢ exact ⟨by omega, hinit k c (by omega) hc hlt⟩ have hcard := Finset.card_le_card hsub rw [Finset.card_range] at hcard dsimp only [toU]; omega have htoU_mem : ∀ T : SSYTVec v, toU T ∈ Iset := by intro T rw [Fintype.mem_piFinset] intro j rw [Finset.mem_Icc] refine ⟨?_, ?_⟩ · -- v j.succ ≤ toU T j: for every c < v j.succ, (j+1, c) ∈ cellsVec v so T(j,c) < T(j+1,c) < m+1 => T(j,c) < m! have hsub : Finset.range (v j.succ) ⊆ (Finset.range (v j.castSucc)).filter (fun c => T.entry (j.1, c) < m) := by intro c hc have hc' := Finset.mem_range.mp hc have hle_v : v j.succ ≤ v j.castSucc := hv (show j.castSucc ≤ j.succ by simp [Fin.le_def]) have hcell_down : (j.1 + 1, c) ∈ cellsVec v := mem_cellsVec_iff.mpr ⟨j.succ.2, hc'⟩ have hcol := T.col_strict j.1 c hcell_down have hlt_m1 := T.lt_m (j.1 + 1, c) hcell_down exact Finset.mem_filter.mpr ⟨Finset.mem_range.mpr (lt_of_lt_of_le hc' hle_v), by omega⟩ have hcard := Finset.card_le_card hsub rwa [Finset.card_range] at hcard · exact le_trans (Finset.card_filter_le _ _) (by rw [Finset.card_range]) let toPair : SSYTVec v → Σ u : Iset, SSYTVec u.1 := fun T => ⟨⟨toU T, htoU_mem T⟩, { entry := fun c => if c ∈ cellsVec (toU T) then T.entry c else 0 row_weak := fun i j hij => by rcases mem_cellsVec_iff.mp hij with ⟨hi, hj⟩ dsimp only at hi hj have hj_le : toU T ⟨i, hi⟩ ≤ v (⟨i, hi⟩ : Fin m).castSucc := (Finset.mem_Icc.mp (Fintype.mem_piFinset.mp (htoU_mem T) ⟨i, hi⟩)).2 have h1 : (i, j) ∈ cellsVec (toU T) := mem_cellsVec_iff.mpr ⟨hi, by dsimp only; omega⟩ have h2 : (i, j + 1) ∈ cellsVec v := mem_cellsVec_iff.mpr ⟨by dsimp only; omega, lt_of_lt_of_le hj hj_le⟩ simp only [h1, hij, ↓reduceIte] exact T.row_weak i j h2 col_strict := fun i j hij => by rcases mem_cellsVec_iff.mp hij with ⟨hi, hj⟩ dsimp only at hi hj have hi_lt : i < m := by omega have hle_u : toU T ⟨i + 1, hi⟩ ≤ toU T ⟨i, hi_lt⟩ := by have h1 := (Finset.mem_Icc.mp (Fintype.mem_piFinset.mp (htoU_mem T) ⟨i, hi_lt⟩)).1 have h2 := (Finset.mem_Icc.mp (Fintype.mem_piFinset.mp (htoU_mem T) ⟨i + 1, hi⟩)).2 exact le_trans h2 h1 have h1 : (i, j) ∈ cellsVec (toU T) := mem_cellsVec_iff.mpr ⟨hi_lt, lt_of_lt_of_le hj hle_u⟩ have hj_le : toU T ⟨i + 1, hi⟩ ≤ v (⟨i + 1, hi⟩ : Fin m).castSucc := (Finset.mem_Icc.mp (Fintype.mem_piFinset.mp (htoU_mem T) ⟨i + 1, hi⟩)).2 have h2 : (i + 1, j) ∈ cellsVec v := mem_cellsVec_iff.mpr ⟨by dsimp only; omega, lt_of_lt_of_le hj hj_le⟩ simp only [h1, hij, ↓reduceIte] exact T.col_strict i j h2 lt_m := fun c hc => by simp only [hc, ↓reduceIte] rcases mem_cellsVec_iff.mp hc with ⟨hi, hj⟩ have hj_le : toU T ⟨c.1, hi⟩ ≤ v (⟨c.1, hi⟩ : Fin m).castSucc := (Finset.mem_Icc.mp (Fintype.mem_piFinset.mp (htoU_mem T) ⟨c.1, hi⟩)).2 exact (htoU_spec T ⟨c.1, hi⟩ c.2 (lt_of_lt_of_le hj hj_le)).mp hj zeros := fun c hc => by simp [hc] }⟩ let fromPair : (Σ u : Iset, SSYTVec u.1) → SSYTVec v := fun ⟨u, S⟩ => { entry := fun c => if c ∈ cellsVec u.1 then S.entry c else if c ∈ cellsVec v then m else 0 row_weak := fun i j hij => by rcases mem_cellsVec_iff.mp hij with ⟨hi, hj⟩ dsimp only at hi hj have h1_v : (i, j) ∈ cellsVec v := mem_cellsVec_iff.mpr ⟨hi, by dsimp only; omega⟩ by_cases h2_u : (i, j + 1) ∈ cellsVec u.1 · rcases mem_cellsVec_iff.mp h2_u with ⟨hi_m, hj_u⟩ dsimp only at hi_m hj_u have h1_u : (i, j) ∈ cellsVec u.1 := mem_cellsVec_iff.mpr ⟨hi_m, by dsimp only; omega⟩ simp only [h1_u, h2_u, ↓reduceIte] exact S.row_weak i j h2_u · by_cases h1_u : (i, j) ∈ cellsVec u.1 · simp only [h1_u, h2_u, hij, ↓reduceIte] exact le_of_lt (S.lt_m (i, j) h1_u) · simp only [h1_u, h2_u, h1_v, hij, ↓reduceIte, le_rfl] col_strict := fun i j hij => by rcases mem_cellsVec_iff.mp hij with ⟨hi, hj⟩ dsimp only at hi hj have hi_m : i < m := by omega have hu_ge : v (⟨i, hi_m⟩ : Fin m).succ ≤ u.1 ⟨i, hi_m⟩ := (Finset.mem_Icc.mp (Fintype.mem_piFinset.mp u.2 ⟨i, hi_m⟩)).1 have h1_u : (i, j) ∈ cellsVec u.1 := mem_cellsVec_iff.mpr ⟨hi_m, lt_of_lt_of_le hj hu_ge⟩ by_cases h2_u : (i + 1, j) ∈ cellsVec u.1 · simp only [h1_u, h2_u, ↓reduceIte] exact S.col_strict i j h2_u · simp only [h1_u, h2_u, hij, ↓reduceIte] exact S.lt_m (i, j) h1_u lt_m := fun c hc => by by_cases hcu : c ∈ cellsVec u.1 · simp only [hcu, ↓reduceIte]; exact Nat.lt_succ_of_lt (S.lt_m c hcu) · simp only [hcu, hc, ↓reduceIte]; exact Nat.lt_succ_self m zeros := fun c hc => by have hcu : c ∉ cellsVec u.1 := by intro h rcases mem_cellsVec_iff.mp h with ⟨hi, hj⟩ have hle := (Finset.mem_Icc.mp (Fintype.mem_piFinset.mp u.2 ⟨c.1, hi⟩)).2 exact hc (mem_cellsVec_iff.mpr ⟨by omega, lt_of_lt_of_le hj hle⟩) simp [hcu, hc] } let hbij : SSYTVec v ≃ Σ u : Iset, SSYTVec u.1 := { toFun := toPair invFun := fromPair left_inv := fun T => by ext c dsimp only [fromPair, toPair] by_cases hc_u : c ∈ cellsVec (toU T) · simp [hc_u] · by_cases hc_v : c ∈ cellsVec v · simp only [hc_u, hc_v, ↓reduceIte] rcases mem_cellsVec_iff.mp hc_v with ⟨hi, hj⟩ have hlt_m1 := T.lt_m c hc_v by_cases hi_m : c.1 < m · have hnot : ¬ (c.2 < toU T ⟨c.1, hi_m⟩) := fun h => hc_u (mem_cellsVec_iff.mpr ⟨hi_m, h⟩) have hge : ¬ (T.entry c < m) := fun h => hnot ((htoU_spec T ⟨c.1, hi_m⟩ c.2 hj).mpr h) omega · have heq : c.1 = m := by omega have hge : c.1 ≤ T.entry c := ssytVec_ge_row hv T hc_v omega · simp only [hc_u, hc_v, ↓reduceIte]; exact (T.zeros c hc_v).symm right_inv := fun ⟨u, S⟩ => by have hu_eq : toU (fromPair ⟨u, S⟩) = u.1 := by funext j have hfilt : (Finset.range (v j.castSucc)).filter (fun c => (fromPair ⟨u, S⟩).entry (j.1, c) < m) = Finset.range (u.1 j) := by ext c simp only [Finset.mem_filter, Finset.mem_range] have hu_le := (Finset.mem_Icc.mp (Fintype.mem_piFinset.mp u.2 j)).2 constructor · rintro ⟨hc, hlt⟩ by_contra hnot have hcu : (j.1, c) ∉ cellsVec u.1 := fun h => hnot (mem_cellsVec_iff.mp h).2 have hcv : (j.1, c) ∈ cellsVec v := mem_cellsVec_iff.mpr ⟨j.castSucc.2, hc⟩ simp [fromPair, hcu, hcv] at hlt · intro hc have hcu : (j.1, c) ∈ cellsVec u.1 := mem_cellsVec_iff.mpr ⟨j.2, hc⟩ refine ⟨lt_of_lt_of_le hc hu_le, ?_⟩ simp only [fromPair, hcu, ↓reduceIte] exact S.lt_m (j.1, c) hcu dsimp only [toU] rw [hfilt, Finset.card_range] have hu_sub : (⟨toU (fromPair ⟨u, S⟩), htoU_mem (fromPair ⟨u, S⟩)⟩ : Iset) = u := Subtype.ext hu_eq refine Sigma.ext hu_sub ?_ have hcast : ∀ (a b : Iset) (heq : a = b) (U : SSYTVec a.1) (V : SSYTVec b.1), (∀ c, U.entry c = V.entry c) → HEq U V := by intro a b heq U V hfun; subst heq; exact heq_of_eq (SSYTVec.ext (funext hfun)) apply hcast _ _ hu_sub intro c change (if c ∈ cellsVec (toU (fromPair ⟨u, S⟩)) then (fromPair ⟨u, S⟩).entry c else 0) = S.entry c rw [hu_eq] by_cases hcu : c ∈ cellsVec u.1 · simp [fromPair, hcu] · simp [hcu, S.zeros c hcu] } -- Reindex sum along hbij and compute weight of each (u, S)! unfold schurEvalClean rw [← Equiv.sum_comp hbij.symm, Fintype.sum_sigma, ← Finset.sum_coe_sort Iset] apply Finset.sum_congr rfl intro u _ rw [Finset.sum_mul] apply Finset.sum_congr rfl intro S _ -- Split cellsVec v into cellsVec u.1 and (cellsVec v \ cellsVec u.1) have hsub : cellsVec u.1 ⊆ cellsVec v := by intro c hc rcases mem_cellsVec_iff.mp hc with ⟨hi, hj⟩ have hle := (Finset.mem_Icc.mp (Fintype.mem_piFinset.mp u.2 ⟨c.1, hi⟩)).2 exact mem_cellsVec_iff.mpr ⟨by omega, lt_of_lt_of_le hj hle⟩ have hcard_vec : ∀ {k : ℕ} (w : Fin k → ℕ), (cellsVec w).card = ∑ i : Fin k, w i := by intro k w unfold cellsVec rw [Finset.card_biUnion (cellsVec_pairwiseDisjoint w)] apply Finset.sum_congr rfl intro i _ rw [Finset.card_image_of_injective _ (fun _ _ h => (Prod.mk.inj h).2), Finset.card_range] have hweight : (∏ c ∈ (cellsVec v).attach, x ⟨(fromPair ⟨u, S⟩).entry c.1, (fromPair ⟨u, S⟩).lt_m c.1 c.2⟩) = (∏ c ∈ (cellsVec u.1).attach, x (⟨S.entry c.1, S.lt_m c.1 c.2⟩ : Fin m).castSucc) * (x (Fin.last m)) ^ ((∑ i : Fin (m + 1), v i) - (∑ j : Fin m, u.1 j)) := by -- Replace attach product with a Finset.prod over cellsVec v using an explicit function let f : ℕ × ℕ → R := fun c => if h : (fromPair ⟨u, S⟩).entry c < m + 1 then x ⟨(fromPair ⟨u, S⟩).entry c, h⟩ else 1 have h1 : (∏ c ∈ (cellsVec v).attach, x ⟨(fromPair ⟨u, S⟩).entry c.1, (fromPair ⟨u, S⟩).lt_m c.1 c.2⟩) = ∏ c ∈ cellsVec v, f c := by rw [← Finset.prod_attach (cellsVec v) f] apply Finset.prod_congr rfl intro c _ dsimp only [f] rw [dif_pos ((fromPair ⟨u, S⟩).lt_m c.1 c.2)] rw [h1, ← Finset.prod_sdiff hsub, mul_comm] congr 1 · rw [← Finset.prod_attach (cellsVec u.1) f] apply Finset.prod_congr rfl intro c _ have hcu : c.1 ∈ cellsVec u.1 := c.2 have hlt := S.lt_m c.1 hcu dsimp only [f] have hval : (fromPair ⟨u, S⟩).entry c.1 = S.entry c.1 := by simp [fromPair, hcu] rw [dif_pos (by rw [hval]; exact Nat.lt_succ_of_lt hlt)] congr 1 exact Fin.ext hval · have hconst : ∀ c ∈ cellsVec v \ cellsVec u.1, f c = x (Fin.last m) := by intro c hc rcases Finset.mem_sdiff.mp hc with ⟨hcv, hcu⟩ dsimp only [f] have hval : (fromPair ⟨u, S⟩).entry c = m := by simp [fromPair, hcu, hcv] rw [dif_pos (by rw [hval]; exact Nat.lt_succ_self m)] congr 1 exact Fin.ext hval rw [Finset.prod_congr rfl hconst, Finset.prod_const, Finset.card_sdiff_of_subset hsub, hcard_vec v, hcard_vec u.1] exact hweight /-- **Alternant Branching Identity (Column Operations + Laplace Expansion + Multilinearity)**: For any `CommRing R`, antitone `v : Fin (m + 1) → ℕ`, and `x : Fin (m + 1) → R`, `det(x_i^{v_j + m - j}) = (∏_{i < m} (x_i - x_m)) * ∑_{u ≺ v} x_m^{∑ v - ∑ u} * det(x_i^{u_j + m - 1 - j})`. -/ theorem alternant_branching {R : Type*} [CommRing R] {m : ℕ} (v : Fin (m + 1) → ℕ) (hv : Antitone v) (x : Fin (m + 1) → R) : (Matrix.of fun i j : Fin (m + 1) => (x i) ^ (v j + m - j.1)).det = (∏ i : Fin m, (x i.castSucc - x (Fin.last m))) * ∑ u ∈ (Fintype.piFinset fun j : Fin m => Finset.Icc (v j.succ) (v j.castSucc)), (x (Fin.last m)) ^ ((∑ i : Fin (m + 1), v i) - (∑ j : Fin m, u j)) * (Matrix.of fun i j : Fin m => (x i.castSucc) ^ (u j + (m - 1) - j.1)).det := by let ℓ : Fin (m + 1) → ℕ := fun j => v j + m - j.1 have hℓ_lt : ∀ j : Fin m, ℓ j.succ < ℓ j.castSucc := by intro j have hle : v j.succ ≤ v j.castSucc := hv (show j.castSucc ≤ j.succ by simp [Fin.le_def]) dsimp only [ℓ]; simp only [Fin.val_succ, Fin.val_castSucc]; omega let M : Matrix (Fin (m + 1)) (Fin (m + 1)) R := Matrix.of fun i j => (x i) ^ (ℓ j) let U : Matrix (Fin (m + 1)) (Fin (m + 1)) R := Matrix.of fun a b => if a = b then 1 else if a.1 = b.1 + 1 then -((x (Fin.last m)) ^ (ℓ b - ℓ a)) else 0 have hU_lower : U.BlockTriangular OrderDual.toDual := by intro a b hab have hlt : a.1 < b.1 := hab have hne : a ≠ b := ne_of_lt hlt have hne1 : a.1 ≠ b.1 + 1 := by omega simp [U, hne, hne1] have hU_det : U.det = 1 := by rw [Matrix.det_of_isLowerTriangular U hU_lower] apply Finset.prod_eq_one intro a _; simp [U] have hMU_det : (M * U).det = M.det := by rw [Matrix.det_mul, hU_det, mul_one] have hMU_cast : ∀ (i : Fin (m + 1)) (j : Fin m), (M * U) i j.castSucc = (x i) ^ (ℓ j.castSucc) - (x (Fin.last m)) ^ (ℓ j.castSucc - ℓ j.succ) * (x i) ^ (ℓ j.succ) := by intro i j rw [Matrix.mul_apply] have hne_cs : j.succ ≠ j.castSucc := ne_of_gt (Fin.castSucc_lt_succ (i := j)) have hsum : ∑ a : Fin (m + 1), M i a * U a j.castSucc = M i j.castSucc * U j.castSucc j.castSucc + M i j.succ * U j.succ j.castSucc := by rw [← Finset.add_sum_erase _ _ (Finset.mem_univ j.castSucc)] have hsucc_mem : j.succ ∈ Finset.univ.erase j.castSucc := Finset.mem_erase.mpr ⟨hne_cs, Finset.mem_univ _⟩ rw [← Finset.add_sum_erase _ _ hsucc_mem] have hzero : ∑ a ∈ (Finset.univ.erase j.castSucc).erase j.succ, M i a * U a j.castSucc = 0 := by apply Finset.sum_eq_zero intro a ha have h1 : a ≠ j.succ := (Finset.mem_erase.mp ha).1 have h2 : a ≠ j.castSucc := (Finset.mem_erase.mp (Finset.mem_erase.mp ha).2).1 have h3 : a.1 ≠ j.1 + 1 := fun h => h1 (Fin.ext (by simpa using h)) simp [U, h2, h3] rw [hzero, add_zero] rw [hsum] have hval : j.succ.1 = j.castSucc.1 + 1 := by simp simp only [M, U, Matrix.of_apply, ↓reduceIte, hne_cs, hval, mul_one] ring have hMU_last : ∀ i : Fin (m + 1), (M * U) i (Fin.last m) = (x i) ^ (ℓ (Fin.last m)) := by intro i rw [Matrix.mul_apply, Finset.sum_eq_single (Fin.last m)] · simp [M, U] · intro a _ hne have hne1 : a.1 ≠ m + 1 := by have := a.2; omega simp [U, hne, hne1] · intro h; exact absurd (Finset.mem_univ _) h have hlast_zero : ∀ j : Fin m, (M * U) (Fin.last m) j.castSucc = 0 := by intro j rw [hMU_cast] have hadd : (ℓ j.castSucc - ℓ j.succ) + ℓ j.succ = ℓ j.castSucc := by have := hℓ_lt j; omega rw [← pow_add, hadd, sub_self] have hlaplace : (M * U).det = (x (Fin.last m)) ^ (ℓ (Fin.last m)) * ((M * U).submatrix Fin.castSucc Fin.castSucc).det := by rw [Matrix.det_succ_row (M * U) (Fin.last m)] rw [Finset.sum_eq_single (Fin.last m)] · have hsign : (-1 : R) ^ ((Fin.last m : ℕ) + (Fin.last m : ℕ)) = 1 := by rw [← two_mul, pow_mul]; norm_num rw [hsign, one_mul, hMU_last] congr 2 ext i j simp [Matrix.submatrix_apply, Fin.succAbove_last] · intro j _ hne rcases Fin.exists_castSucc_eq.mpr hne with ⟨j', rfl⟩ rw [hlast_zero j', mul_zero, zero_mul] · intro h; exact absurd (Finset.mem_univ _) h -- Factor (x i.castSucc - x_last) out of each row of the m × m submatrix let B : Matrix (Fin m) (Fin m) R := Matrix.of fun i j => ∑ k ∈ Finset.Ico (ℓ j.succ) (ℓ j.castSucc), (x i.castSucc) ^ k * (x (Fin.last m)) ^ (ℓ j.castSucc - 1 - k) have hsub_eq : (M * U).submatrix Fin.castSucc Fin.castSucc = Matrix.diagonal (fun i : Fin m => x i.castSucc - x (Fin.last m)) * B := by ext i j simp only [Matrix.submatrix_apply, Matrix.diagonal_mul, B, Matrix.of_apply] rw [hMU_cast] set a := ℓ j.castSucc set b := ℓ j.succ have hab : b < a := hℓ_lt j -- Reindex Ico b a as k = b + t for t ∈ range (a - b) and apply geom_sum₂_mul! have hsum_eq : (∑ k ∈ Finset.Ico b a, (x i.castSucc) ^ k * (x (Fin.last m)) ^ (a - 1 - k)) = (x i.castSucc) ^ b * ∑ t ∈ Finset.range (a - b), (x i.castSucc) ^ t * (x (Fin.last m)) ^ (a - b - 1 - t) := by rw [Finset.mul_sum] apply Finset.sum_bij (fun k _ => k - b) · intro k hk; simp only [Finset.mem_Ico, Finset.mem_range] at hk ⊢; omega · intro k₁ hk₁ k₂ hk₂ heq; simp only [Finset.mem_Ico] at hk₁ hk₂; omega · intro t ht; simp only [Finset.mem_range] at ht exact ⟨b + t, Finset.mem_Ico.mpr ⟨by omega, by omega⟩, by omega⟩ · intro k hk have hk' := Finset.mem_Ico.mp hk have h1 : b + (k - b) = k := by omega have h2 : a - b - 1 - (k - b) = a - 1 - k := by omega rw [h2, ← mul_assoc, ← pow_add, h1] rw [hsum_eq] have hgeom := geom_sum₂_mul (x i.castSucc) (x (Fin.last m)) (a - b) have hpow_add : (x i.castSucc) ^ b * (x i.castSucc) ^ (a - b) = (x i.castSucc) ^ a := by rw [← pow_add, Nat.add_sub_cancel' (le_of_lt hab)] calc (x i.castSucc) ^ a - (x (Fin.last m)) ^ (a - b) * (x i.castSucc) ^ b = (x i.castSucc) ^ b * ((x i.castSucc) ^ (a - b) - (x (Fin.last m)) ^ (a - b)) := by rw [mul_sub, hpow_add]; ring _ = (x i.castSucc) ^ b * ((∑ t ∈ Finset.range (a - b), (x i.castSucc) ^ t * (x (Fin.last m)) ^ (a - b - 1 - t)) * (x i.castSucc - x (Fin.last m))) := by rw [← hgeom] _ = (x i.castSucc - x (Fin.last m)) * ((x i.castSucc) ^ b * ∑ t ∈ Finset.range (a - b), (x i.castSucc) ^ t * (x (Fin.last m)) ^ (a - b - 1 - t)) := by ring -- Expand B.det by column multilinearity (Matrix.det_apply + Finset.prod_univ_sum + Finset.sum_comm)! have hB_det : B.det = ∑ k ∈ (Fintype.piFinset fun j : Fin m => Finset.Ico (ℓ j.succ) (ℓ j.castSucc)), (∏ j : Fin m, (x (Fin.last m)) ^ (ℓ j.castSucc - 1 - k j)) * (Matrix.of fun i j : Fin m => (x i.castSucc) ^ (k j)).det := by rw [Matrix.det_apply] have hstep : ∀ σ : Equiv.Perm (Fin m), ∏ j : Fin m, B (σ j) j = ∑ k ∈ (Fintype.piFinset fun j : Fin m => Finset.Ico (ℓ j.succ) (ℓ j.castSucc)), (∏ j : Fin m, (x (Fin.last m)) ^ (ℓ j.castSucc - 1 - k j)) * (∏ j : Fin m, (x (σ j).castSucc) ^ (k j)) := by intro σ dsimp only [B, Matrix.of_apply] rw [Finset.prod_univ_sum] apply Finset.sum_congr rfl intro k _ rw [← Finset.prod_mul_distrib] apply Finset.prod_congr rfl intro j _; ring simp_rw [hstep, Finset.smul_sum] rw [Finset.sum_comm] apply Finset.sum_congr rfl intro k _ rw [Matrix.det_apply, Finset.mul_sum] apply Finset.sum_congr rfl intro σ _ simp only [Matrix.of_apply] exact (mul_smul_comm _ _ _).symm -- Put everything together and reindex k j = u j + (m - 1) - j.1! rw [← hMU_det, hlaplace, hsub_eq, Matrix.det_mul, Matrix.det_diagonal, hB_det] have hrew : (x (Fin.last m)) ^ (ℓ (Fin.last m)) * ((∏ i : Fin m, (x i.castSucc - x (Fin.last m))) * ∑ k ∈ (Fintype.piFinset fun j : Fin m => Finset.Ico (ℓ j.succ) (ℓ j.castSucc)), (∏ j : Fin m, (x (Fin.last m)) ^ (ℓ j.castSucc - 1 - k j)) * (Matrix.of fun i j : Fin m => (x i.castSucc) ^ (k j)).det) = (∏ i : Fin m, (x i.castSucc - x (Fin.last m))) * ∑ k ∈ (Fintype.piFinset fun j : Fin m => Finset.Ico (ℓ j.succ) (ℓ j.castSucc)), (x (Fin.last m)) ^ (ℓ (Fin.last m) + ∑ j : Fin m, (ℓ j.castSucc - 1 - k j)) * (Matrix.of fun i j : Fin m => (x i.castSucc) ^ (k j)).det := by rw [mul_left_comm, Finset.mul_sum] congr 1 apply Finset.sum_congr rfl intro k _ rw [Finset.prod_pow_eq_pow_sum, ← mul_assoc, ← pow_add] rw [hrew] congr 1 apply Finset.sum_bij (fun k _ j => k j - (m - 1 - j.1)) · intro k hk rw [Fintype.mem_piFinset] at hk ⊢ intro j have hkj := Finset.mem_Ico.mp (hk j) dsimp only [ℓ] at hkj simp only [Fin.val_succ, Fin.val_castSucc] at hkj exact Finset.mem_Icc.mpr ⟨by omega, by omega⟩ · intro k₁ hk₁ k₂ hk₂ heq rw [Fintype.mem_piFinset] at hk₁ hk₂ funext j have h1 := Finset.mem_Ico.mp (hk₁ j) have h2 := Finset.mem_Ico.mp (hk₂ j) have hj := congrFun heq j dsimp only [ℓ] at h1 h2 simp only [Fin.val_succ, Fin.val_castSucc] at h1 h2 omega · intro u hu rw [Fintype.mem_piFinset] at hu refine ⟨fun j => u j + (m - 1) - j.1, ?_, ?_⟩ · rw [Fintype.mem_piFinset] intro j have huj := Finset.mem_Icc.mp (hu j) dsimp only [ℓ] simp only [Fin.val_succ, Fin.val_castSucc] exact Finset.mem_Ico.mpr ⟨by omega, by omega⟩ · funext j; dsimp only; omega · intro k hk rw [Fintype.mem_piFinset] at hk have hk_eq : ∀ j : Fin m, k j - (m - 1 - j.1) + (m - 1) - j.1 = k j := by intro j have hkj := Finset.mem_Ico.mp (hk j) dsimp only [ℓ] at hkj simp only [Fin.val_succ, Fin.val_castSucc] at hkj omega have hexp : ℓ (Fin.last m) + ∑ j : Fin m, (ℓ j.castSucc - 1 - k j) = (∑ i : Fin (m + 1), v i) - ∑ j : Fin m, (k j - (m - 1 - j.1)) := by have hsum_v : ∑ i : Fin (m + 1), v i = (∑ j : Fin m, v j.castSucc) + v (Fin.last m) := Fin.sum_univ_castSucc v have hterm : ∀ j : Fin m, (ℓ j.castSucc - 1 - k j) + (k j - (m - 1 - j.1)) = v j.castSucc := by intro j have hkj := Finset.mem_Ico.mp (hk j) dsimp only [ℓ] at hkj ⊢ simp only [Fin.val_succ, Fin.val_castSucc] at hkj ⊢ omega have hsum_add : (∑ j : Fin m, (ℓ j.castSucc - 1 - k j)) + (∑ j : Fin m, (k j - (m - 1 - j.1))) = ∑ j : Fin m, v j.castSucc := by rw [← Finset.sum_add_distrib] exact Finset.sum_congr rfl fun j _ => hterm j have hlast_ℓ : ℓ (Fin.last m) = v (Fin.last m) := by dsimp [ℓ]; simp rw [hsum_v, hlast_ℓ]; omega rw [hexp] congr 2 ext i j simp [hk_eq j] /-- Vandermonde product `∏_{0 ≤ i < j < m} (x i - x j)` in any `CommRing R`. -/ def vandPoly {R : Type*} [CommRing R] {m : ℕ} (x : Fin m → R) : R := ∏ i : Fin m, ∏ j ∈ Finset.univ.filter (fun j : Fin m => i < j), (x i - x j) lemma vandPoly_succ {R : Type*} [CommRing R] {m : ℕ} (x : Fin (m + 1) → R) : vandPoly x = vandPoly (fun i : Fin m => x i.castSucc) * ∏ i : Fin m, (x i.castSucc - x (Fin.last m)) := by unfold vandPoly rw [Fin.prod_univ_castSucc] have hlast_empty : (Finset.univ.filter (fun j : Fin (m + 1) => Fin.last m < j)) = ∅ := by ext j; simp only [Finset.mem_filter, Finset.mem_univ, true_and, Finset.notMem_empty, iff_false] exact not_lt.mpr (Fin.le_last j) rw [hlast_empty, Finset.prod_empty, mul_one, ← Finset.prod_mul_distrib] apply Finset.prod_congr rfl intro i _ have hmem_last : Fin.last m ∈ Finset.univ.filter (fun j : Fin (m + 1) => i.castSucc < j) := Finset.mem_filter.mpr ⟨Finset.mem_univ _, Fin.castSucc_lt_last i⟩ rw [← Finset.prod_erase_mul _ _ hmem_last] congr 1 symm apply Finset.prod_bij (fun j _ => j.castSucc) · intro j hj simp only [Finset.mem_filter, Finset.mem_univ, true_and] at hj exact Finset.mem_erase.mpr ⟨(Fin.castSucc_lt_last j).ne, Finset.mem_filter.mpr ⟨Finset.mem_univ _, Fin.castSucc_lt_castSucc_iff.mpr hj⟩⟩ · intro _ _ _ _ h; exact Fin.castSucc_injective m h · intro j hj rcases Finset.mem_erase.mp hj with ⟨hne, hlt⟩ rcases Fin.exists_castSucc_eq.mpr hne with ⟨j', rfl⟩ refine ⟨j', Finset.mem_filter.mpr ⟨Finset.mem_univ _, Fin.castSucc_lt_castSucc_iff.mp (Finset.mem_filter.mp hlt).2⟩, rfl⟩ · intro _ _; rfl /-- **Universal Bialternant Equivalence Theorem**: For EVERY `CommRing R`, `m : ℕ`, antitone `v : Fin m → ℕ`, and `x : Fin m → R`, `schurEvalClean v x * ∏_{i < j} (x i - x j) = det(x_i^{v_j + m - 1 - j})`. -/ theorem bialternant_universal {R : Type*} [CommRing R] : ∀ {m : ℕ} (v : Fin m → ℕ), Antitone v → ∀ (x : Fin m → R), schurEvalClean v x * vandPoly x = (Matrix.of fun i j : Fin m => (x i) ^ (v j + (m - 1) - j.1)).det | 0, v, _, x => by have : Unique (SSYTVec v) := { default := ⟨fun _ => 0, fun _ _ h => by exfalso; rcases mem_cellsVec_iff.mp h with ⟨hi, _⟩; omega, fun _ _ h => by exfalso; rcases mem_cellsVec_iff.mp h with ⟨hi, _⟩; omega, fun _ h => by exfalso; rcases mem_cellsVec_iff.mp h with ⟨hi, _⟩; omega, fun _ _ => rfl⟩ uniq := fun T => by ext c; exact T.zeros c (fun h => by rcases mem_cellsVec_iff.mp h with ⟨hi, _⟩; omega) } have hempty : cellsVec v = ∅ := by ext c; simp only [mem_cellsVec_iff, Finset.notMem_empty, iff_false]; rintro ⟨h, _⟩; omega unfold schurEvalClean vandPoly have hterm : ∀ T : SSYTVec v, ∏ c ∈ (cellsVec v).attach, x ⟨T.entry c.1, T.lt_m c.1 c.2⟩ = 1 := fun T => Finset.prod_eq_one fun c _ => by exfalso; rcases mem_cellsVec_iff.mp c.2 with ⟨h, _⟩; omega simp [hterm] | m + 1, v, hv, x => by simp only [Nat.add_sub_cancel] rw [schurEvalClean_branching v hv x, vandPoly_succ x, alternant_branching v hv x] rw [Finset.sum_mul, Finset.mul_sum] apply Finset.sum_congr rfl intro u hu have hu_anti : Antitone u := by intro a b hab rcases eq_or_lt_of_le hab with rfl | hlt · exact le_rfl · have h1 := (Finset.mem_Icc.mp (Fintype.mem_piFinset.mp hu a)).1 have h2 := (Finset.mem_Icc.mp (Fintype.mem_piFinset.mp hu b)).2 have hstep : a.succ ≤ b.castSucc := by simp [Fin.le_def]; omega exact le_trans h2 (le_trans (hv hstep) h1) have hih := bialternant_universal u hu_anti (fun i => x i.castSucc) calc schurEvalClean u (fun i => x i.castSucc) * (x (Fin.last m)) ^ ((∑ i : Fin (m + 1), v i) - ∑ j : Fin m, u j) * (vandPoly (fun i => x i.castSucc) * ∏ i : Fin m, (x i.castSucc - x (Fin.last m))) = (∏ i : Fin m, (x i.castSucc - x (Fin.last m))) * ((x (Fin.last m)) ^ ((∑ i : Fin (m + 1), v i) - ∑ j : Fin m, u j) * (schurEvalClean u (fun i => x i.castSucc) * vandPoly (fun i => x i.castSucc))) := by ring _ = (∏ i : Fin m, (x i.castSucc - x (Fin.last m))) * ((x (Fin.last m)) ^ ((∑ i : Fin (m + 1), v i) - ∑ j : Fin m, u j) * (Matrix.of fun i j : Fin m => (x i.castSucc) ^ (u j + (m - 1) - j.1)).det) := by rw [hih] /-- **Weyl Dimension Formula** (proved via Stanley's principal `q`-specialization `x_i = X^i` + `Matrix.det_vandermonde` + cancellation of `(X - 1)^{C(m,2)}` + evaluation at `X = 1`): `|SSYTVec v| * ∏_{i < j} (j - i) = ∏_{i < j} (ℓ_i - ℓ_j)`. -/ theorem weyl_dimension_formula {m : ℕ} (v : Fin m → ℕ) (hv : Antitone v) : Fintype.card (SSYTVec v) * (∏ i : Fin m, ∏ j ∈ Finset.univ.filter (fun j : Fin m => i < j), (j.1 - i.1)) = ∏ i : Fin m, ∏ j ∈ Finset.univ.filter (fun j : Fin m => i < j), ((v i + (m - 1) - i.1) - (v j + (m - 1) - j.1)) := by let x : Fin m → ℤ[X] := fun i => Polynomial.X ^ i.1 let ℓ : Fin m → ℕ := fun j => v j + (m - 1) - j.1 have hℓ_anti : ∀ {i j : Fin m}, i < j → ℓ j < ℓ i := by intro i j hij have hle := hv (le_of_lt hij) have hlt : i.1 < j.1 := hij dsimp only [ℓ]; omega have hbi := bialternant_universal v hv x -- Rewrite the RHS determinant via Matrix.det_vandermonde! have hdet_eq : (Matrix.of fun i j : Fin m => (x i) ^ (ℓ j)).det = ∏ i : Fin m, ∏ j ∈ Finset.univ.filter (fun j : Fin m => i < j), (Polynomial.X ^ (ℓ j) - Polynomial.X ^ (ℓ i) : ℤ[X]) := by have htr : (Matrix.of fun i j : Fin m => (x i) ^ (ℓ j)) = (Matrix.vandermonde (fun j : Fin m => (Polynomial.X : ℤ[X]) ^ (ℓ j))).transpose := by ext i j simp only [Matrix.of_apply, Matrix.transpose_apply, Matrix.vandermonde_apply, x] rw [← pow_mul, ← pow_mul, mul_comm] rw [htr, Matrix.det_transpose, Matrix.det_vandermonde] apply Finset.prod_congr rfl intro i _ have hset : Finset.Ioi i = Finset.univ.filter (fun j : Fin m => i < j) := by ext j; simp rw [hset] rw [hdet_eq] at hbi -- Factor each (X^a - X^b) as -(X - 1) * X^a * ∑_{t < b - a} X^t on BOTH sides! have hfactor : ∀ {a b : ℕ}, a ≤ b → (Polynomial.X ^ a - Polynomial.X ^ b : ℤ[X]) = (-(Polynomial.X - 1)) * ((Polynomial.X : ℤ[X]) ^ a * ∑ t ∈ Finset.range (b - a), Polynomial.X ^ t) := by intro a b hab have hgeom : (∑ t ∈ Finset.range (b - a), (Polynomial.X : ℤ[X]) ^ t) * (Polynomial.X - 1) = Polynomial.X ^ (b - a) - 1 := geom_sum_mul Polynomial.X (b - a) have hpow : (Polynomial.X : ℤ[X]) ^ a * Polynomial.X ^ (b - a) = Polynomial.X ^ b := by rw [← pow_add, Nat.add_sub_cancel' hab] calc (Polynomial.X : ℤ[X]) ^ a - Polynomial.X ^ b = -(Polynomial.X ^ a * (Polynomial.X ^ (b - a) - 1)) := by rw [mul_sub, hpow]; ring _ = -(Polynomial.X ^ a * ((∑ t ∈ Finset.range (b - a), Polynomial.X ^ t) * (Polynomial.X - 1))) := by rw [hgeom] _ = (-(Polynomial.X - 1)) * (Polynomial.X ^ a * ∑ t ∈ Finset.range (b - a), Polynomial.X ^ t) := by ring have hfactor_rev : ∀ {a b : ℕ}, b ≤ a → (Polynomial.X ^ b - Polynomial.X ^ a : ℤ[X]) = (-(Polynomial.X - 1)) * ((Polynomial.X : ℤ[X]) ^ b * ∑ t ∈ Finset.range (a - b), Polynomial.X ^ t) := fun hba => hfactor hba -- Pull out ∏_{i < j} (-(X - 1)) from both sides of hbi! set C : ℤ[X] := ∏ i : Fin m, ∏ _j ∈ Finset.univ.filter (fun j : Fin m => i < j), (-(Polynomial.X - 1) : ℤ[X]) have hC_ne : C ≠ 0 := by apply Finset.prod_ne_zero_iff.mpr intro i _ apply Finset.prod_ne_zero_iff.mpr intro j _ h0 have h1 : (Polynomial.X - 1 : ℤ[X]) = 0 := neg_eq_zero.mp h0 have h2 : (Polynomial.X - 1 : ℤ[X]).eval 0 = 0 := by rw [h1]; simp simp at h2 have hlhs_fac : vandPoly x = C * ∏ i : Fin m, ∏ j ∈ Finset.univ.filter (fun j : Fin m => i < j), ((Polynomial.X : ℤ[X]) ^ i.1 * ∑ t ∈ Finset.range (j.1 - i.1), Polynomial.X ^ t) := by unfold vandPoly C rw [← Finset.prod_mul_distrib] apply Finset.prod_congr rfl intro i _ rw [← Finset.prod_mul_distrib] apply Finset.prod_congr rfl intro j hj exact hfactor (le_of_lt (Finset.mem_filter.mp hj).2) have hrhs_fac : (∏ i : Fin m, ∏ j ∈ Finset.univ.filter (fun j : Fin m => i < j), (Polynomial.X ^ (ℓ j) - Polynomial.X ^ (ℓ i) : ℤ[X])) = C * ∏ i : Fin m, ∏ j ∈ Finset.univ.filter (fun j : Fin m => i < j), ((Polynomial.X : ℤ[X]) ^ (ℓ j) * ∑ t ∈ Finset.range (ℓ i - ℓ j), Polynomial.X ^ t) := by unfold C rw [← Finset.prod_mul_distrib] apply Finset.prod_congr rfl intro i _ rw [← Finset.prod_mul_distrib] apply Finset.prod_congr rfl intro j hj exact hfactor_rev (le_of_lt (hℓ_anti (Finset.mem_filter.mp hj).2)) rw [hlhs_fac, hrhs_fac] at hbi have hcancel : schurEvalClean v x * (∏ i : Fin m, ∏ j ∈ Finset.univ.filter (fun j : Fin m => i < j), ((Polynomial.X : ℤ[X]) ^ i.1 * ∑ t ∈ Finset.range (j.1 - i.1), Polynomial.X ^ t)) = ∏ i : Fin m, ∏ j ∈ Finset.univ.filter (fun j : Fin m => i < j), ((Polynomial.X : ℤ[X]) ^ (ℓ j) * ∑ t ∈ Finset.range (ℓ i - ℓ j), Polynomial.X ^ t) := by apply mul_left_cancel₀ hC_ne calc C * (schurEvalClean v x * _) = schurEvalClean v x * (C * _) := by ring _ = C * _ := hbi -- Evaluate both sides at X = 1! have heval := congrArg (Polynomial.eval (1 : ℤ)) hcancel have heval_schur : (schurEvalClean v x).eval (1 : ℤ) = (Fintype.card (SSYTVec v) : ℤ) := by unfold schurEvalClean rw [Polynomial.eval_finsetSum] have hterm : ∀ T : SSYTVec v, (∏ c ∈ (cellsVec v).attach, x ⟨T.entry c.1, T.lt_m c.1 c.2⟩).eval (1 : ℤ) = 1 := by intro T rw [Polynomial.eval_prod] exact Finset.prod_eq_one fun c _ => by simp [x] simp [hterm] simp only [Polynomial.eval_mul, Polynomial.eval_prod, Polynomial.eval_pow, Polynomial.eval_X, one_pow, one_mul, Polynomial.eval_finsetSum, Finset.sum_const, Finset.card_range, nsmul_eq_mul, mul_one, heval_schur] at heval exact_mod_cast heval /-- **Stanley's Hook-Content Formula**: For EVERY `n, m : ℕ` and EVERY partition `λ : Partition n` with `λ.parts.length ≤ m`, `|SSYT(λ, m)| * ∏_{□ ∈ λ} h_λ(□) = ∏_{□ ∈ λ} (m + c(□))`. -/ theorem hook_content_formula {n m : ℕ} (lam : Partition n) (hm : lam.parts.length ≤ m) : Fintype.card (SSYT lam.parts m) * hookProd lam.parts = ∏ c ∈ cells lam.parts, shiftedContent m c := by let v : Fin m → ℕ := fun i => rowLen lam.parts i.1 have hv : Antitone v := fun i j hij => rowLen_anti_of_pairwise lam.anti hij have hweyl := weyl_dimension_formula v hv rw [← card_ssyt_eq_card_ssytVec hm] at hweyl have hhd := prod_shiftedPart_factorial_eq lam.anti hm -- Convert range/Ioo double product to Fin m double product have hdiff_eq : (∏ i : Fin m, ∏ j ∈ Finset.univ.filter (fun j : Fin m => i < j), ((v i + (m - 1) - i.1) - (v j + (m - 1) - j.1))) = ∏ i ∈ Finset.range m, ∏ k ∈ Finset.Ioo i m, (shiftedPart lam.parts m i - shiftedPart lam.parts m k) := by simp_rw [Fin.lt_def] rw [Fin.prod_univ_eq_prod_range (fun i => ∏ j ∈ Finset.univ.filter (fun j : Fin m => i < j.1), ((rowLen lam.parts i + (m - 1) - i) - (rowLen lam.parts j.1 + (m - 1) - j.1)))] apply Finset.prod_congr rfl intro i hi have hi' := Finset.mem_range.mp hi apply Finset.prod_bij (fun j _ => j.1) · intro j hj; exact Finset.mem_Ioo.mpr ⟨(Finset.mem_filter.mp hj).2, j.2⟩ · intro _ _ _ _ h; exact Fin.ext h · intro k hk; rcases Finset.mem_Ioo.mp hk with ⟨hik, hkm⟩ exact ⟨⟨k, hkm⟩, Finset.mem_filter.mpr ⟨Finset.mem_univ _, hik⟩, rfl⟩ · intro j hj have hj' := (Finset.mem_filter.mp hj).2 unfold shiftedPart; omega -- Also convert ∏_{i < j} (j - i) = ∏_{i < m} (m - 1 - i)! have hden_eq : (∏ i : Fin m, ∏ j ∈ Finset.univ.filter (fun j : Fin m => i < j), (j.1 - i.1)) = ∏ i ∈ Finset.range m, (m - 1 - i).factorial := by simp_rw [Fin.lt_def] rw [Fin.prod_univ_eq_prod_range (fun i => ∏ j ∈ Finset.univ.filter (fun j : Fin m => i < j.1), (j.1 - i))] apply Finset.prod_congr rfl intro i hi have hi' := Finset.mem_range.mp hi have hbij : (∏ j ∈ Finset.univ.filter (fun j : Fin m => i < j.1), (j.1 - i)) = ∏ d ∈ Finset.Icc 1 (m - 1 - i), d := by apply Finset.prod_bij (fun j _ => j.1 - i) · intro j hj; have h := (Finset.mem_filter.mp hj).2; exact Finset.mem_Icc.mpr ⟨by omega, by omega⟩ · intro j₁ hj₁ j₂ hj₂ heq have h1 := (Finset.mem_filter.mp hj₁).2; have h2 := (Finset.mem_filter.mp hj₂).2 exact Fin.ext (by omega) · intro d hd; rcases Finset.mem_Icc.mp hd with ⟨h1, h2⟩ exact ⟨⟨d + i, by omega⟩, Finset.mem_filter.mpr ⟨Finset.mem_univ _, by dsimp only; omega⟩, by dsimp only; omega⟩ · intro _ _; rfl rw [hbij] generalize m - 1 - i = t induction t with | zero => simp | succ s ih => rw [Finset.prod_Icc_succ_top (by omega), ih, Nat.factorial_succ, mul_comm] -- And relate ∏_{i < m} (ℓ_i)! = (∏_{i < m} (m - 1 - i)!) * (∏_{c ∈ cells} (m + c.2 - c.1))! have hcontent_eq : (∏ i ∈ Finset.range m, (shiftedPart lam.parts m i).factorial) = (∏ i ∈ Finset.range m, (m - 1 - i).factorial) * ∏ c ∈ cells lam.parts, shiftedContent m c := by have hprod_cells : ∏ c ∈ cells lam.parts, shiftedContent m c = ∏ i ∈ Finset.range m, ∏ j ∈ Finset.range (rowLen lam.parts i), (m + j - i) := by unfold cells shiftedContent rw [Finset.prod_biUnion (cells_pairwiseDisjoint lam.parts)] have hrow : ∀ i ∈ Finset.range lam.parts.length, (∏ c ∈ (Finset.range (rowLen lam.parts i)).image (fun j => (i, j)), (m + c.2 - c.1)) = ∏ j ∈ Finset.range (rowLen lam.parts i), (m + j - i) := fun i _ => Finset.prod_image (fun _ _ _ _ h => (Prod.mk.inj h).2) rw [Finset.prod_congr rfl hrow] have hsplit : Finset.range m = Finset.range lam.parts.length ∪ Finset.Ico lam.parts.length m := by ext x; simp only [Finset.mem_range, Finset.mem_union, Finset.mem_Ico]; omega rw [hsplit, Finset.prod_union (Finset.disjoint_left.mpr fun x h1 h2 => by simp only [Finset.mem_range, Finset.mem_Ico] at h1 h2; omega)] have htail : ∏ i ∈ Finset.Ico lam.parts.length m, ∏ j ∈ Finset.range (rowLen lam.parts i), (m + j - i) = 1 := by apply Finset.prod_eq_one intro i hi; rw [rowLen_eq_zero_of_ge (Finset.mem_Ico.mp hi).1]; simp rw [htail, mul_one] rw [hprod_cells, ← Finset.prod_mul_distrib] apply Finset.prod_congr rfl intro i hi have hi' := Finset.mem_range.mp hi -- (m - 1 - i)! * ∏_{j < r} (m + j - i) = (r + m - 1 - i)! have hshift_eq : shiftedPart lam.parts m i = (m - 1 - i) + rowLen lam.parts i := by unfold shiftedPart; omega rw [hshift_eq] generalize rowLen lam.parts i = r induction r with | zero => simp | succ r ih => rw [Finset.prod_range_succ, ← mul_assoc, ← ih, ← Nat.add_assoc, Nat.factorial_succ] have heq : (m - 1 - i) + r + 1 = m + r - i := by omega rw [heq, mul_comm] -- Combine: |SSYT| * hookProd * den = |SSYT| * den * hookProd = diff * hookProd = ∏ ℓ_i! = den * content! have hden_pos : 0 < ∏ i ∈ Finset.range m, (m - 1 - i).factorial := Finset.prod_pos fun _ _ => Nat.factorial_pos _ rw [hden_eq, hdiff_eq] at hweyl have htotal : (Fintype.card (SSYT lam.parts m) * hookProd lam.parts) * (∏ i ∈ Finset.range m, (m - 1 - i).factorial) = (∏ c ∈ cells lam.parts, shiftedContent m c) * (∏ i ∈ Finset.range m, (m - 1 - i).factorial) := by calc (Fintype.card (SSYT lam.parts m) * hookProd lam.parts) * (∏ i ∈ Finset.range m, (m - 1 - i).factorial) = (Fintype.card (SSYT lam.parts m) * ∏ i ∈ Finset.range m, (m - 1 - i).factorial) * hookProd lam.parts := by ring _ = (∏ i ∈ Finset.range m, ∏ k ∈ Finset.Ioo i m, (shiftedPart lam.parts m i - shiftedPart lam.parts m k)) * hookProd lam.parts := by rw [hweyl] _ = hookProd lam.parts * ∏ i ∈ Finset.range m, ∏ k ∈ Finset.Ioo i m, (shiftedPart lam.parts m i - shiftedPart lam.parts m k) := by ring _ = ∏ i ∈ Finset.range m, (shiftedPart lam.parts m i).factorial := hhd.symm _ = (∏ c ∈ cells lam.parts, shiftedContent m c) * (∏ i ∈ Finset.range m, (m - 1 - i).factorial) := by rw [hcontent_eq, mul_comm] exact Nat.eq_of_mul_eq_mul_right hden_pos htotal /-! ## Section 7: Sharp Concrete Evaluations & Axiom Audit -/ /-- Partition `(3, 2) ⊢ 5` has `f^{(3,2)} = 5`. -/ def part32 : Partition 5 := ⟨[3, 2], by decide, by decide, rfl⟩ theorem syt_count_32 : Fintype.card (SYT part32) = 5 := by have h := hook_length_formula part32 have hhp : hookProd part32.parts = 24 := by decide have hfac : (5 : ℕ).factorial = 120 := rfl rw [hhp, hfac] at h omega /-- Staircase partition `(3, 2, 1) ⊢ 6` has `f^{(3,2,1)} = 16`. -/ def part321 : Partition 6 := ⟨[3, 2, 1], by decide, by decide, rfl⟩ theorem syt_count_321 : Fintype.card (SYT part321) = 16 := by have h := hook_length_formula part321 have hhp : hookProd part321.parts = 45 := by decide have hfac : (6 : ℕ).factorial = 720 := rfl rw [hhp, hfac] at h omega /-- Catalan witnesses: `f^{(3,3)} = 5 = C_3` and `f^{(4,4)} = 14 = C_4`. -/ theorem syt_count_33_catalan : Fintype.card (SYT (rect2Part 3)) = 5 := by rw [hook_length_catalan 3, catalan_eq_centralBinom_div] norm_num [Nat.centralBinom, Nat.choose] theorem syt_count_44_catalan : Fintype.card (SYT (rect2Part 4)) = 14 := by rw [hook_length_catalan 4, catalan_eq_centralBinom_div] norm_num [Nat.centralBinom, Nat.choose] /-- Hook-Content witness: `|SSYT((2, 1), 3)| = 8` (dimension of the adjoint `SL_3` representation!). -/ def part21 : Partition 3 := ⟨[2, 1], by decide, by decide, rfl⟩ theorem ssyt_count_21_3 : Fintype.card (SSYT part21.parts 3) = 8 := by have h := hook_content_formula part21 (m := 3) (by decide) have hhp : hookProd part21.parts = 3 := by decide have hcp : (∏ c ∈ cells part21.parts, shiftedContent 3 c) = 24 := by decide rw [hhp, hcp] at h omega #print axioms row_factorial_eq_hooks_mul_diffs #print axioms prod_shiftedPart_factorial_eq #print axioms lagrange_frobenius_young_identity #print axioms card_syt_branching #print axioms frobenius_young_formula #print axioms hook_length_formula #print axioms hook_length_catalan #print axioms schurEvalClean_branching #print axioms alternant_branching #print axioms bialternant_universal #print axioms weyl_dimension_formula #print axioms hook_content_formula #print axioms syt_count_32 #print axioms syt_count_321 #print axioms syt_count_33_catalan #print axioms syt_count_44_catalan #print axioms ssyt_count_21_3 end HookLengthTheory