roseking's picture
Sync from openai/math@faee2cf485a8 (part 23)
607ee45 verified
Raw History Blame Contribute Delete
6.01 kB
18
lemma short_transpose_height (r δ : ℕ) : (ShortColumns.shape r δ).transpose.colLen 0 = r+δ := by
proof · 3 lines
  rw [YoungDiagram.colLen_transpose]
  exact YoungDiagram.rowLen_ofRowLens (hw := by apply List.Pairwise.sortedGE; simp)
    (show Fin [r+δ,r].length from ⟨0,by simp⟩)
23
lemma repeat_transpose_height {m k : ℕ} (hm : 0 < m) :
    (YoungDiagram.ofRowLens (List.replicate m k) (replicate_sorted m k)).transpose.colLen 0 = k := by
proof · 4 lines
  rw [YoungDiagram.colLen_transpose]
  simpa only [Fin.getElem_fin,List.getElem_replicate] using
    YoungDiagram.rowLen_ofRowLens (hw := replicate_sorted m k)
      (show Fin (List.replicate m k).length from ⟨0,by simpa⟩)
30
lemma repeat_transpose_rows {m k : ℕ} (hk : 0 < k) :
    (YoungDiagram.ofRowLens (List.replicate m k) (replicate_sorted m k)).transpose.transpose.rowLens =
      List.replicate m k := by
proof · 5 lines
  rw [YoungDiagram.transpose_transpose]
  apply YoungDiagram.rowLens_ofRowLens_eq_self
  intro x hx
  rw [(List.mem_replicate.mp hx).2]
  exact hk
39
lemma repeated_twos_shape (m : ℕ) :
    (YoungDiagram.ofRowLens (List.replicate m 2) (replicate_sorted m 2)).transpose =
      ShortColumns.shape m 0 := by
proof · 10 lines
  apply YoungDiagram.ext
  apply Finset.ext
  intro x
  rcases x with ⟨i,j⟩
  change (i,j) ∈ (YoungDiagram.ofRowLens (List.replicate m 2) (replicate_sorted m 2)).transpose ↔
    (i,j) ∈ ShortColumns.shape m 0
  simp only [YoungDiagram.mem_transpose,YoungDiagram.mem_ofRowLens,
    List.length_replicate,List.getElem_replicate,ShortColumns.mem_shape,Prod.swap_prod_mk]
  simp only [exists_prop,Nat.add_zero]
  omega
53
lemma two_paths_two_support_sizes {n a b q : ℕ} {ν : YoungDiagram}
    (hn : n = 2*q+4) (ha : a = 2*q+2) (hb : b = 2) (hq : 3 ≤ q)
    (t : Tableau a (ShortColumns.shape q 2).transpose) (u : Tableau b ν)
    (e : Fin n ≃ Fin a ⊕ Fin b)
    (hu : ∀ i, (columnLengthWord u i).val+1 = 1) :
    SupportLE (wordRep n 4)
      (Representation.coind (sumPermHom e)
        (outer (projectedSpechtTensor t t (inOutputs (Set.Icc q (2*q+3)))
          (inOutputs_invariant (Set.Icc q (2*q+3)))).toRepresentation
          (projectedSpechtTensor u u (inOutputs {1}) (inOutputs_invariant {1})).toRepresentation)) := by
proof · 3 lines
  subst n a b
  exact (two_paths_two_coind q hq t e).trans
    (SupportLE.coind _ ((SupportLE.refl _).outer (constant_output_support u 1 hu)))
67
theorem WordPacking.twoPaths {q d : ℕ} (hq : 3 ≤ q) (hd : q+2 ≤ d)
    {ps : List ℕ} (hsum : ps.sum = 2*q+4) (hlen : ps.length ≤ 4)
    (k l : ℕ) (hne : k ≠ l) (A : Fin (d*d) → Prop) (label : Fin (d*d) → ℕ)
    (he : ∀ a, (A a ∧ label a = k) ↔ output a ∈ Set.Icc q (2*q+3))
    (he' : ∀ a, (A a ∧ label a = l) ↔ output a = 1) :
    Nonempty (WordPacking ([q+2,q] ++ List.replicate 2 1) ps d A label {k,l}) := by
proof · 11 lines
  have hrow : (ShortColumns.shape q 2).rowLens = [q+2,q] :=
    YoungDiagram.rowLens_ofRowLens_eq_self (by simp; omega)
  let ν := (YoungDiagram.ofRowLens (List.replicate 2 1) (replicate_sorted 2 1)).transpose
  apply WordPacking.of_binary_shapes (μ := (ShortColumns.shape q 2).transpose) (ν := ν)
    (by rw [YoungDiagram.transpose_transpose,hrow]) (by rw [repeat_transpose_rows (by decide)])
    (by rw [short_transpose_height]; exact hd)
    (by rw [repeat_transpose_height (by decide)]; omega)
    (by simp; omega) hlen k l hne _ {1} A label he he'
  intro t u
  exact two_paths_two_support_sizes (by simp; omega) (by simp; omega) (by simp)
    hq t u (appendPositions _ _) (repeated_column_length (by decide) u)
85
lemma even_twos_odd_support_sizes {n a b m x : ℕ} {ν : YoungDiagram}
    (hn : n = 2*m+x) (ha : a = 2*m) (hb : b = x)
    (hm : 1 ≤ m) (hx : Odd x) (hxc : x ≤ 2*m)
    (t : Tableau a (ShortColumns.shape m 0)) (u : Tableau b ν)
    (e : Fin n ≃ Fin a ⊕ Fin b) (hu : ∀ i, (columnLengthWord u i).val+1 = x) :
    SupportLE (wordRep n 2)
      (Representation.coind (sumPermHom e)
        (outer (projectedSpechtTensor t t (inOutputs {2}) (inOutputs_invariant {2})).toRepresentation
          (projectedSpechtTensor u u (inOutputs {x}) (inOutputs_invariant {x})).toRepresentation)) := by
proof · 3 lines
  subst n a b
  exact (even_twos_odd_coind m x hm hx hxc t e).trans
    (SupportLE.coind _ ((SupportLE.refl _).outer (constant_output_support u x hu)))
98
theorem WordPacking.twosOdd {m x d : ℕ} (hm : 1 ≤ m) (hx : Odd x) (hxc : x ≤ 2*m)
    (hd : 2 ≤ d) (hd' : x ≤ d)
    {ps : List ℕ} (hsum : ps.sum = 2*m+x) (hlen : ps.length ≤ 2)
    (k l : ℕ) (hne : k ≠ l) (A : Fin (d*d) → Prop) (label : Fin (d*d) → ℕ)
    (he : ∀ a, (A a ∧ label a = k) ↔ output a = 2)
    (he' : ∀ a, (A a ∧ label a = l) ↔ output a = x) :
    Nonempty (WordPacking (List.replicate m 2 ++ [x]) ps d A label {k,l}) := by
proof · 13 lines
  let ν := (YoungDiagram.ofRowLens (List.replicate 1 x) (replicate_sorted 1 x)).transpose
  have hxpos : 0 < x := hx.pos
  have hp : (List.replicate m 2).Perm (ShortColumns.shape m 0).transpose.rowLens := by
    rw [← repeated_twos_shape,repeat_transpose_rows (by decide)]
  apply WordPacking.of_binary_shapes (μ := ShortColumns.shape m 0) (ν := ν) hp
    (by rw [repeat_transpose_rows hxpos]; rfl)
    ((ShortColumns.height_le m 0).trans hd)
    (by rw [repeat_transpose_height (by decide)]; exact hd')
    (by simp only [List.sum_append,List.sum_replicate,List.sum_singleton,smul_eq_mul]; omega)
    hlen k l hne {2} {x} A label he he'
  intro t u
  exact even_twos_odd_support_sizes (by simp; omega) (by simp; omega) (by simp)
    hm hx hxc t u (appendPositions _ _) (repeated_column_length hxpos u)