Download data/lean/OAI/RepresentationTheory/UniversalSquare/Balance/BalanceProjection.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 8.41 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/RepresentationTheory/UniversalSquare/Balance/BalanceProjection.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/RepresentationTheory/UniversalSquare/Balance/BalanceProjection.lean
-
curl -L -o BalanceProjection.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/RepresentationTheory/UniversalSquare/Balance/BalanceProjection.lean
8.41 kB
| import Mathlib | |
| import OAI.RepresentationTheory.Saxl.Main | |
| import OAI.RepresentationTheory.UniversalSquare.Balance.BalanceSeparation | |
| import OAI.RepresentationTheory.UniversalSquare.Support.ProjectedTensor | |
| namespace OAI | |
| /-! Balance Projection. -/ | |
| section | |
| noncomputable section | |
| namespace Saxl.Balance | |
| def FixedComponentSums {n d : β} (c : Fin n β β) (z : Fin d β β€) | |
| (Ο : β β β€) (x : WordSpace n d) : Prop := | |
| β w, x w β 0 β β k, β i β Finset.univ.filter (fun i => c i = k), z (w i) = Ο k | |
| def balanceWords {n d : β} (c : Fin n β β) (A : Fin d β Prop) | |
| (label : Fin d β β) (z : Fin d β β€) (Ο : β β β€) | |
| (w : Fin n β Fin d) : Prop := | |
| (β i, A (w i)) β§ β k, | |
| (Finset.univ.filter (fun i => label (w i) = k)).card = | |
| (Finset.univ.filter (fun i => c i = k)).card β§ | |
| β i β Finset.univ.filter (fun i => label (w i) = k), z (w i) = Ο k | |
| def componentWords {n d : β} (c : Fin n β β) (A : Fin d β Prop) | |
| (label : Fin d β β) (w : Fin n β Fin d) : Prop := | |
| (β i, A (w i)) β§ β i, label (w i) = c i | |
| lemma perm_filter_card {X : Type*} [Fintype X] [DecidableEq X] | |
| (g : Equiv.Perm X) (p : X β Prop) [DecidablePred p] : | |
| (Finset.univ.filter (fun x => p (g x))).card = (Finset.univ.filter p).card := by | |
| classical | |
| apply Finset.card_bij (fun x _ => g x) | |
| Β· intro x hx | |
| exact Finset.mem_filter.mpr β¨Finset.mem_univ _, (Finset.mem_filter.mp hx).2β© | |
| Β· intro x hx y hy hxy | |
| exact g.injective hxy | |
| Β· intro y hy | |
| refine β¨g.symm y, ?_, g.apply_symm_apply yβ© | |
| simpa only [Finset.mem_filter, Finset.mem_univ, true_and, Equiv.apply_symm_apply] | |
| using (Finset.mem_filter.mp hy).2 | |
| lemma perm_filter_sum {X : Type*} [Fintype X] [DecidableEq X] | |
| (g : Equiv.Perm X) (p : X β Prop) [DecidablePred p] (f : X β β€) : | |
| β i β Finset.univ.filter (fun i => p (g i)), f (g i) = | |
| β i β Finset.univ.filter p, f i := by | |
| simpa only [Finset.sum_filter] using | |
| Equiv.sum_comp g (fun i => if p i then f i else 0) | |
| lemma balanceWords_invariant {n d : β} (c : Fin n β β) (A : Fin d β Prop) | |
| (label : Fin d β β) (z : Fin d β β€) (Ο : β β β€) | |
| (g : Equiv.Perm (Fin n)) (w : Fin n β Fin d) : | |
| balanceWords c A label z Ο (w β g) β balanceWords c A label z Ο w := by | |
| classical | |
| unfold balanceWords | |
| have hc (k) := perm_filter_card g (fun i => label (w i) = k) | |
| have hs (k) := perm_filter_sum g (fun i => label (w i) = k) (fun i => z (w i)) | |
| simp only [Function.comp_apply, hc, hs] | |
| constructor | |
| Β· rintro β¨h,hcβ© | |
| exact β¨fun i => by simpa using h (g.symm i),hcβ© | |
| Β· rintro β¨h,hcβ© | |
| exact β¨fun i => h (g i),hcβ© | |
| lemma balanceWords_iff_components {n d : β} (c : Fin n β β) (A : Fin d β Prop) | |
| (label : Fin d β β) (z : Fin d β β€) (Ο : β β β€) | |
| (ho : β a b, A a β A b β label a < label b β z a < z b) | |
| (w : Fin n β Fin d) | |
| (hw : β k, β i β Finset.univ.filter (fun i => c i = k), z (w i) = Ο k) : | |
| balanceWords c A label z Ο w β componentWords c A label w := by | |
| classical | |
| constructor | |
| Β· rintro β¨hA,hcsβ© | |
| refine β¨hA,fun i => ?_β© | |
| exact (ordered_output_labels_eq Finset.univ c (fun i => label (w i)) | |
| (fun i => z (w i)) (fun i hi j hj hh => ho _ _ (hA i) (hA j) hh) | |
| (fun k => (hcs k).1.symm) (fun k => (hw k).trans (hcs k).2.symm) | |
| i (Finset.mem_univ i)).symm | |
| Β· rintro β¨hA,hlβ© | |
| refine β¨hA, fun k => ?_β© | |
| simp only [hl] | |
| exact β¨True.intro,hw kβ© | |
| theorem balance_projection_eq {n d : β} (c : Fin n β β) (A : Fin d β Prop) | |
| (label : Fin d β β) (z : Fin d β β€) (Ο : β β β€) | |
| (ho : β a b, A a β A b β label a < label b β z a < z b) | |
| (x : WordSpace n d) (hx : FixedComponentSums c z Ο x) : | |
| coordinateProjection (balanceWords c A label z Ο) x = | |
| coordinateProjection (componentWords c A label) x := by | |
| classical | |
| funext w | |
| by_cases hw : x w = 0 | |
| Β· simp only [coordinateProjection_apply, hw, ite_self] | |
| Β· simp only [coordinateProjection_apply, | |
| balanceWords_iff_components c A label z Ο ho w (hx w hw)] | |
| theorem component_projection_mem {n d : β} (c : Fin n β β) (A : Fin d β Prop) | |
| (label : Fin d β β) (z : Fin d β β€) (Ο : β β β€) | |
| (ho : β a b, A a β A b β label a < label b β z a < z b) | |
| (W : Subrepresentation (wordRep n d)) (x : WordSpace n d) | |
| (hxW : x β W) (hx : FixedComponentSums c z Ο x) : | |
| coordinateProjection (componentWords c A label) x β | |
| ((invariantCoordinateProjection (balanceWords c A label z Ο) | |
| (balanceWords_invariant c A label z Ο)).comp (subrepInclusion W)).range := by | |
| refine β¨β¨x,hxWβ©, ?_β© | |
| exact balance_projection_eq c A label z Ο ho x hx | |
| theorem components_support_transfer {n d : β} {X : Type*} | |
| [AddCommGroup X] [Module β X] | |
| (Ο : Representation β (Equiv.Perm (Fin n)) X) | |
| (W : Subrepresentation (wordRep n d)) | |
| (c : Fin n β β) (A : Fin d β Prop) (label : Fin d β β) | |
| (f : X ββ[β] WordSpace n d) (hf : f β 0) | |
| (he : β g β fiberGroup c, β x, f (Ο g x) = wordRep n d g (f x)) | |
| (hm : β x, f x β W) | |
| (hs : β x w, f x w β 0 β componentWords c A label w) : | |
| β F : Representation.IntertwiningMap Ο W.toRepresentation, F β 0 := by | |
| classical | |
| let P := coordinateProjection (componentWords c A label) | |
| have hP (x) : P (f x) = f x := by | |
| ext w | |
| change (if componentWords c A label w then f x w else 0) = _ | |
| split_ifs with h | |
| Β· rfl | |
| Β· exact (not_ne_iff.mp (fun hh => h (hs x w hh))).symm | |
| have hk (g : Equiv.Perm (Fin n)) (hg : g β fiberGroup c) (x) : | |
| P (wordRep n d g (f x)) = 0 := by | |
| ext w | |
| change (if componentWords c A label w then f x (w β g) else 0) = 0 | |
| split_ifs with hw | |
| Β· by_contra hn | |
| have hh := hs x (w β g) hn | |
| apply hg | |
| intro i | |
| exact (hw.2 (g i)).symm.trans (hh.2 i) | |
| Β· rfl | |
| let F := averagedMap Ο (wordRep n d) f | |
| have hF : F β 0 := sector_average_nonzero Ο (wordRep n d) (fiberGroup c) f hf he P hP hk | |
| have hmem (x) : F x β W := by | |
| rw [show F x = _ from averagedMap_apply Ο (wordRep n d) f x] | |
| apply Submodule.sum_mem | |
| intro g hg | |
| exact W.apply_mem_toSubmodule g (hm _) | |
| let T : Representation.IntertwiningMap Ο W.toRepresentation := | |
| { toLinearMap := F.toLinearMap.codRestrict _ hmem | |
| isIntertwining' := by | |
| intro g | |
| apply LinearMap.ext | |
| intro x | |
| apply Subtype.ext | |
| exact LinearMap.congr_fun (F.isIntertwining' g) x } | |
| refine β¨T, ?_β© | |
| intro hz | |
| apply hF | |
| apply Representation.IntertwiningMap.ext | |
| apply LinearMap.ext | |
| intro x | |
| exact congrArg Subtype.val (congrArg (fun l => l x) hz) | |
| theorem balance_support_transfer {n d : β} {X : Type*} | |
| [AddCommGroup X] [Module β X] | |
| (Ο : Representation β (Equiv.Perm (Fin n)) X) | |
| (W : Subrepresentation (wordRep n d)) | |
| (c : Fin n β β) (A : Fin d β Prop) (label : Fin d β β) | |
| (z : Fin d β β€) (Ο : β β β€) | |
| (ho : β a b, A a β A b β label a < label b β z a < z b) | |
| (L : X ββ[β] WordSpace n d) | |
| (hm : β x, L x β W) (hΟ : β x, FixedComponentSums c z Ο (L x)) | |
| (hf : (coordinateProjection (componentWords c A label)).comp L β 0) | |
| (he : β g β fiberGroup c, β x, | |
| coordinateProjection (componentWords c A label) (L (Ο g x)) = | |
| wordRep n d g (coordinateProjection (componentWords c A label) (L x))) : | |
| β F : Representation.IntertwiningMap Ο W.toRepresentation, F β 0 := by | |
| classical | |
| let P := (invariantCoordinateProjection (balanceWords c A label z Ο) | |
| (balanceWords_invariant c A label z Ο)).comp (subrepInclusion W) | |
| let f := (coordinateProjection (componentWords c A label)).comp L | |
| have hmem (x) : f x β P.range := | |
| component_projection_mem c A label z Ο ho W (L x) (hm x) (hΟ x) | |
| have hsector (x w) (hw : f x w β 0) : componentWords c A label w := by | |
| by_contra hn | |
| exact hw (by change (if componentWords c A label w then L x w else 0) = 0; rw [ite_eq_right hn]) | |
| obtain β¨T,hTβ© := components_support_transfer Ο P.range c A label f hf he hmem hsector | |
| obtain β¨i,hiβ© := subrepresentation_embeds_of_le_range P P.range le_rfl | |
| refine β¨i.comp T, ?_β© | |
| exact intertwining_comp_ne_zero i hi T hT | |
| end Saxl.Balance | |
| end | |
| end | |
| end OAI | |