Download data/lean/OAI/RepresentationTheory/UniversalSquare/Balance/WordPacking.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 6.24 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/RepresentationTheory/UniversalSquare/Balance/WordPacking.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/RepresentationTheory/UniversalSquare/Balance/WordPacking.lean
-
curl -L -o WordPacking.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/RepresentationTheory/UniversalSquare/Balance/WordPacking.lean
6.24 kB
| import Mathlib | |
| import OAI.RepresentationTheory.Saxl.Main | |
| import OAI.RepresentationTheory.UniversalSquare.Specht.StandardColumns | |
| import OAI.RepresentationTheory.UniversalSquare.Support.WordContents | |
| namespace OAI | |
| /-! Word Packing. -/ | |
| section | |
| noncomputable section | |
| namespace Saxl | |
| open scoped BigOperators | |
| lemma sum_wordContent {n d : β} (w : Fin n β Fin d) : | |
| β j, wordContent w j = n := by | |
| classical | |
| simp only [wordContent,Finset.card_filter] | |
| rw [Finset.sum_comm] | |
| simp | |
| lemma single_joinPositions {n a b d : β} (e : Fin n β Fin a β Fin b) | |
| (w : Fin a β Fin d) (z : Fin b β Fin d) : | |
| positionProduct e (Pi.single w 1) (Pi.single z 1) = | |
| Pi.single ((positionWordsEquiv e).symm (w,z)) 1 := by | |
| have hl := congrArg Prod.fst ((positionWordsEquiv e).apply_symm_apply (w,z)) | |
| have hr := congrArg Prod.snd ((positionWordsEquiv e).apply_symm_apply (w,z)) | |
| change leftWord e ((positionWordsEquiv e).symm (w,z)) = w at hl | |
| change rightWord e ((positionWordsEquiv e).symm (w,z)) = z at hr | |
| rw [single_positionProduct e,hl,hr] | |
| namespace Balance | |
| open FlagColumns Columns | |
| def Packing.congr {n d e : β} {v u : WordSpace n d} | |
| {A : Fin (d*d) β Prop} {label : Fin (d*d) β β} {w z : WordSpace n e} | |
| (P : Packing v A label w) (hv : v = u) (hw : w = z) : Packing u A label z where | |
| G := P.G | |
| Y := P.Y | |
| c := P.c | |
| Ο := P.Ο | |
| Ο := P.Ο | |
| Ο := P.Ο | |
| piece := by rw [β hv]; exact P.piece | |
| support := by rw [β hw]; exact P.support | |
| structure WordPacking (rs ps : List β) (d : β) | |
| (A : Fin (d*d) β Prop) (label : Fin (d*d) β β) (marks : Finset β) where | |
| word : Fin rs.sum β Fin ps.length | |
| counts : β j, wordContent word j = ps.get j | |
| packing : Packing (blocks rs (standard d)) A label (Pi.single word 1) | |
| marksBound : β i, packing.c i β marks | |
| lemma WordPacking.total {rs ps : List β} {d : β} | |
| {A : Fin (d*d) β Prop} {label : Fin (d*d) β β} {marks : Finset β} | |
| (P : WordPacking rs ps d A label marks) : ps.sum = rs.sum := by | |
| calc | |
| ps.sum = β j, ps.get j := by rw [β List.sum_ofFn, List.ofFn_get] | |
| _ = β j, wordContent P.word j := Finset.sum_congr rfl (fun j _ => (P.counts j).symm) | |
| _ = rs.sum := sum_wordContent P.word | |
| def WordPacking.join {rs ss ps qs : List β} {d : β} | |
| {A : Fin (d*d) β Prop} {label : Fin (d*d) β β} {marks marks' : Finset β} | |
| (P : WordPacking rs ps d A label marks) (Q : WordPacking ss qs d A label marks') | |
| (hdis : Disjoint marks marks') : WordPacking (rs++ss) (ps++qs) d A label (marks βͺ marks') := by | |
| classical | |
| let e := appendPositions rs ss | |
| let f := appendLetters ps qs | |
| let wi := f.symm β Sum.inl β P.word | |
| let zi := f.symm β Sum.inr β Q.word | |
| let P' := P.packing.map (letterLift (f.symm β Sum.inl)) | |
| let Q' := Q.packing.map (letterLift (f.symm β Sum.inr)) | |
| have hd : β i j, P'.c i β Q'.c j := by | |
| intro i j hij | |
| have hβ := P.marksBound i | |
| have hβ := Q.marksBound j | |
| change P.packing.c i = Q.packing.c j at hij | |
| rw [β hij] at hβ | |
| exact Finset.disjoint_left.mp hdis hβ hβ | |
| let R := P'.join Q' e hd | |
| have hv : positionProduct e (blocks rs (standard d)) (blocks ss (standard d)) = | |
| blocks (rs++ss) (standard d) := (blocks_append rs ss _).symm | |
| have hw : positionProduct e (letterLift (f.symm β Sum.inl) (Pi.single P.word 1)) | |
| (letterLift (f.symm β Sum.inr) (Pi.single Q.word 1)) = | |
| Pi.single ((positionWordsEquiv e).symm (wi,zi)) 1 := by | |
| rw [letterLift_single,letterLift_single,single_joinPositions] | |
| rfl | |
| refine { | |
| word := (positionWordsEquiv e).symm (wi,zi) | |
| counts := ?_ | |
| packing := R.congr hv hw | |
| marksBound := ?_ } | |
| Β· intro j | |
| change wordContent ((positionWordsEquiv e).symm | |
| ((fun i => f.symm (Sum.inl (P.word i))), (fun i => f.symm (Sum.inr (Q.word i))))) j = _ | |
| rw [wordContent_position_join e f P.word Q.word j, get_appendLetters] | |
| rcases h : f j with j | j | |
| Β· exact P.counts j | |
| Β· exact Q.counts j | |
| Β· intro i | |
| change joinedLabels e P.packing.c Q.packing.c i β marks βͺ marks' | |
| unfold joinedLabels | |
| rcases e i with i | i | |
| Β· exact Finset.mem_union_left _ (P.marksBound i) | |
| Β· exact Finset.mem_union_right _ (Q.marksBound i) | |
| def WordPacking.sorted {rs ps : List β} {d : β} | |
| {A : Fin (d*d) β Prop} {label : Fin (d*d) β β} {marks : Finset β} | |
| (P : WordPacking rs ps d A label marks) (hp : β p β ps, 0 < p) : | |
| WordPacking rs (columnShape ps).transpose.rowLens d A label marks := by | |
| classical | |
| let q := Classical.choose (list_get_equiv (columnShape_rows_permutation ps hp)) | |
| have hq := Classical.choose_spec (list_get_equiv (columnShape_rows_permutation ps hp)) | |
| refine { | |
| word := q β P.word | |
| counts := ?_ | |
| packing := (P.packing.map (letterLift q)).congr rfl (letterLift_single q P.word) | |
| marksBound := P.marksBound } | |
| intro j | |
| rw [wordContent_lift_equiv,P.counts,β hq,Equiv.apply_symm_apply] | |
| theorem WordPacking.kronecker_pos {rs ps : List β} {lam ΞΌ : YoungDiagram} | |
| (a : Tableau rs.sum lam) (t : Tableau rs.sum ΞΌ) | |
| {A : Fin (lam.colLen 0 * lam.colLen 0) β Prop} | |
| {label : Fin (lam.colLen 0 * lam.colLen 0) β β} {marks : Finset β} | |
| (P : WordPacking rs ps (lam.colLen 0) A label marks) | |
| (hv : blocks rs (standard (lam.colLen 0)) = polytabloid a) | |
| (hp : β p β ps, 0 < p) | |
| (ho : β x y, A x β A y β label x < label y β output x < output y) | |
| (hd : Dominates ΞΌ (columnShape ps).transpose) : 0 < kronecker a a t := by | |
| let ΞΈ := (columnShape ps).transpose | |
| let Q := P.sorted hp | |
| let q : Fin ΞΈ.rowLens.length β Fin (ΞΈ.colLen 0) := finCongr YoungDiagram.length_rowLens | |
| let w := q β Q.word | |
| let R := (Q.packing.map (letterLift q)).congr hv (letterLift_single q Q.word) | |
| apply R.kronecker_pos a t w ho _ hd (Equiv.refl _) _ | |
| Β· have hc : ΞΌ.card = rs.sum := by | |
| simpa only [Fintype.card_fin,Fintype.card_coe] using (Fintype.card_congr t).symm | |
| rw [hc, show ΞΈ.card = ps.sum from by simp only [ΞΈ,transpose_card,columnShape_card]] | |
| exact P.total.symm | |
| Β· intro j | |
| change wordContent w j = ΞΈ.rowLen j | |
| rw [wordContent_lift_equiv,Q.counts] | |
| exact YoungDiagram.get_rowLens | |
| end Balance | |
| end Saxl | |
| end | |
| end | |
| end OAI | |