math / data /lean /OAI /RepresentationTheory /UniversalSquare /Contraction /PolynomialDetection.lean
Download data/lean/OAI/RepresentationTheory/UniversalSquare/Contraction/PolynomialDetection.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 6.31 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/RepresentationTheory/UniversalSquare/Contraction/PolynomialDetection.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/RepresentationTheory/UniversalSquare/Contraction/PolynomialDetection.lean
-
curl -L -o PolynomialDetection.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/RepresentationTheory/UniversalSquare/Contraction/PolynomialDetection.lean
6.31 kB
Lean 4 Β· 11
declarations fullstatements
| import Mathlib | |
| import OAI.RepresentationTheory.Saxl.Main | |
| import OAI.RepresentationTheory.UniversalSquare.Contraction.SquareDetection | |
| namespace OAI | |
| /-! Polynomial Detection. -/ | |
| section | |
| noncomputable section | |
| open scoped TensorProduct | |
| namespace Saxl | |
| def jointContent {n d e : β} (a : Fin n β Fin d) (b : Fin n β Fin e) : | |
| (Fin d Γ Fin e) ββ β := β i, Finsupp.single (a i, b i) 1 | |
| lemma jointContent_apply {n d e : β} (a : Fin n β Fin d) (b : Fin n β Fin e) | |
| (j : Fin d Γ Fin e) : jointContent a b j = | |
| (Finset.univ.filter (fun i => (a i, b i) = j)).card := by | |
| classical | |
| simp [jointContent, Finsupp.single_apply, eq_comm] | |
| lemma perm_of_equal_jointContent {n d e : β} | |
| (a a' : Fin n β Fin d) (b b' : Fin n β Fin e) | |
| (h : jointContent a b = jointContent a' b') : | |
| β g : Equiv.Perm (Fin n), a' β g = a β§ b' β g = b := by | |
| classical | |
| have hc : β j : Fin (d*e), | |
| (Finset.univ.filter (fun i => finProdFinEquiv (a i,b i) = j)).card = | |
| (Finset.univ.filter (fun i => finProdFinEquiv (a' i,b' i) = j)).card := by | |
| intro j | |
| have hh := DFunLike.congr_fun h (finProdFinEquiv.symm j) | |
| simp only [jointContent_apply] at hh | |
| simpa only [β Equiv.eq_symm_apply] using hh | |
| obtain β¨g, hgβ© := perm_of_equal_content | |
| (fun i => finProdFinEquiv (a i, b i)) | |
| (fun i => finProdFinEquiv (a' i, b' i)) hc | |
| refine β¨g, ?_, ?_β© | |
| Β· funext i | |
| exact congrArg Prod.fst (finProdFinEquiv.injective (congrFun hg i)) | |
| Β· funext i | |
| exact congrArg Prod.snd (finProdFinEquiv.injective (congrFun hg i)) | |
| lemma intertwiner_jointContent {n d e : β} | |
| (F : Representation.IntertwiningMap (wordRep n d) (wordRep n e)) | |
| (a a' : Fin n β Fin d) (b b' : Fin n β Fin e) | |
| (h : jointContent a b = jointContent a' b') : | |
| F (Pi.single a 1) b = F (Pi.single a' 1) b' := by | |
| classical | |
| obtain β¨g, ha, hbβ© := perm_of_equal_jointContent a a' b b' h | |
| have hs : wordRep n d g (Pi.single a 1) = Pi.single a' 1 := by | |
| ext w | |
| change (Pi.single a 1 : WordSpace n d) (w β g) = (Pi.single a' 1 : WordSpace n d) w | |
| simp only [Pi.single_apply] | |
| have he : (w β g = a) β w = a' := by | |
| rw [β ha] | |
| exact β¨fun h => funext (fun i => by | |
| have hh := congrFun h (gβ»ΒΉ i) | |
| simpa using hh), | |
| fun h => by rw [h]β© | |
| simp only [he] | |
| have hh := congrFun (LinearMap.congr_fun (F.isIntertwining' g) (Pi.single a 1)) b' | |
| simp only [LinearMap.comp_apply] at hh | |
| rw [hs] at hh | |
| change F (Pi.single a' 1) b' = F (Pi.single a 1) (b' β g) at hh | |
| rw [hb] at hh | |
| exact hh.symm | |
| def pairingPolynomial {n d e : β} (x : WordSpace n d) (y : WordSpace n e) : | |
| MvPolynomial (Fin d Γ Fin e) β := | |
| β a, β b, MvPolynomial.monomial (jointContent a b) (x a * y b) | |
| lemma eval_jointContent_monomial {n d e : β} | |
| (a : Fin n β Fin d) (b : Fin n β Fin e) | |
| (c : β) (L : Fin d β Fin e β β) : | |
| MvPolynomial.eval (fun j => L j.1 j.2) | |
| (MvPolynomial.monomial (jointContent a b) c) = | |
| c * β i, L (a i) (b i) := by | |
| classical | |
| rw [jointContent, MvPolynomial.monomial_sum_index] | |
| simp only [map_mul, MvPolynomial.eval_C, map_prod] | |
| congr 1 | |
| apply Finset.prod_congr rfl | |
| intro i hi | |
| change MvPolynomial.eval _ (MvPolynomial.X (a i, b i)) = _ | |
| exact MvPolynomial.eval_X _ | |
| lemma pairingPolynomial_eval {n d e : β} | |
| (x : WordSpace n d) (y : WordSpace n e) (L : Fin d β Fin e β β) : | |
| MvPolynomial.eval (fun j => L j.1 j.2) (pairingPolynomial x y) = | |
| dotProduct (wordMap L x) y := by | |
| classical | |
| simp only [pairingPolynomial, map_sum, eval_jointContent_monomial] | |
| change (β a, β b, x a * y b * β i, L (a i) (b i)) = | |
| β b, (β a, x a * β i, L (a i) (b i)) * y b | |
| simp_rw [Finset.sum_mul] | |
| rw [Finset.sum_comm] | |
| apply Finset.sum_congr rfl | |
| intro b hb | |
| apply Finset.sum_congr rfl | |
| intro a ha | |
| ring | |
| def jointContentWeight {n d e : β} | |
| (F : Representation.IntertwiningMap (wordRep n d) (wordRep n e)) | |
| (m : (Fin d Γ Fin e) ββ β) : β := | |
| if h : β a b, jointContent a b = m then | |
| F (Pi.single h.choose 1) h.choose_spec.choose else 0 | |
| lemma jointContentWeight_apply {n d e : β} | |
| (F : Representation.IntertwiningMap (wordRep n d) (wordRep n e)) | |
| (a : Fin n β Fin d) (b : Fin n β Fin e) : | |
| jointContentWeight F (jointContent a b) = F (Pi.single a 1) b := by | |
| classical | |
| unfold jointContentWeight | |
| have hab : β a' b', jointContent a' b' = jointContent a b := β¨a,b,rflβ© | |
| rw [dite_eq_left hab] | |
| exact intertwiner_jointContent F _ a _ b hab.choose_spec.choose_spec | |
| lemma pairingPolynomial_zero_pair {n d e : β} | |
| (F : Representation.IntertwiningMap (wordRep n d) (wordRep n e)) | |
| (x : WordSpace n d) (y : WordSpace n e) (h : pairingPolynomial x y = 0) : | |
| dotProduct (F x) y = 0 := by | |
| classical | |
| let w : MvPolynomial (Fin d Γ Fin e) β ββ[β] β := | |
| (Finsupp.linearCombination β (jointContentWeight F)).comp | |
| (AddMonoidAlgebra.coeffLinearEquiv β).toLinearMap | |
| have he := congrArg w h | |
| have hw (m : (Fin d Γ Fin e) ββ β) (c : β) : | |
| w (MvPolynomial.monomial m c) = c * jointContentWeight F m := by | |
| change Finsupp.linearCombination β (jointContentWeight F) (Finsupp.single m c) = _ | |
| simp | |
| have he' : (β a, β b, (x a * y b) * F (Pi.single a 1) b) = 0 := by | |
| simpa only [pairingPolynomial, map_sum, map_zero, hw, jointContentWeight_apply] using he | |
| have hx : x = β a, x a β’ Pi.single a 1 := by | |
| ext a | |
| simp [Pi.single_apply] | |
| rw [hx, map_sum] | |
| simp only [map_smul, dotProduct, Finset.sum_apply, Pi.smul_apply, smul_eq_mul, | |
| Finset.sum_mul] | |
| rw [Finset.sum_comm] | |
| convert he' using 1 | |
| apply Finset.sum_congr rfl | |
| intro a ha | |
| apply Finset.sum_congr rfl | |
| intro b hb | |
| ring | |
| theorem wordMap_detects_intertwiner {n d e : β} | |
| (F : Representation.IntertwiningMap (wordRep n d) (wordRep n e)) | |
| (x : WordSpace n d) (y : WordSpace n e) | |
| (h : dotProduct (F x) y β 0) : | |
| β L : Fin d β Fin e β β, dotProduct (wordMap L x) y β 0 := by | |
| by_contra hn | |
| push Not at hn | |
| apply h | |
| apply pairingPolynomial_zero_pair F | |
| apply MvPolynomial.funext | |
| intro L | |
| simpa only [map_zero, pairingPolynomial_eval] using | |
| (pairingPolynomial_eval x y (fun a b => L (a,b))).trans (hn _) | |
| end Saxl | |
| end | |
| end | |
| end OAI | |
Outline
- def
jointContent15 - lemma
jointContent_apply18 - lemma
perm_of_equal_jointContent24 - lemma
intertwiner_jointContent45 - def
pairingPolynomial70 - lemma
eval_jointContent_monomial74 - lemma
pairingPolynomial_eval89 - def
jointContentWeight105 - lemma
jointContentWeight_apply111 - lemma
pairingPolynomial_zero_pair121 - theorem
wordMap_detects_intertwiner150