feat: Add alternative prod_assoc lemma

This commit is contained in:
jstoobysmith 2024-10-22 13:29:21 +00:00
parent 2894cfd0f8
commit 6bca8c295c
2 changed files with 15 additions and 0 deletions

View file

@ -107,6 +107,14 @@ lemma perm_eq_id {n : } {c : Fin n → S.C} (σ : (OverColor.mk c) ⟶ (OverC
(h : σ = 𝟙 _) (t : TensorTree S c) : (perm σ t).tensor = t.tensor := by
simp [perm_tensor, h]
lemma perm_eq_of_eq_perm {n m : } {c : Fin n → S.C} {c1 : Fin m → S.C}
(σ : (OverColor.mk c) ≅ (OverColor.mk c1))
{t : TensorTree S c} {t2 : TensorTree S c1} (h : (perm σ.hom t).tensor = t2.tensor) :
t.tensor = (perm σ.inv t2).tensor := by
rw [perm_tensor, ← h]
change _ = (S.F.map σ.hom ≫ S.F.map σ.inv).hom _
simp only [Iso.map_hom_inv_id, Action.id_hom, ModuleCat.id_apply]
/-!
## Additive identities

View file

@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import HepLean.Tensors.Tree.Basic
import HepLean.Tensors.Tree.NodeIdentities.Basic
/-!
# Associativity of products
@ -104,4 +105,10 @@ theorem prod_assoc (t : TensorTree S c) (t2 : TensorTree S c2) (t3 : TensorTree
ModuleCat.coe_comp, Function.comp_apply]
rfl
/-- The alternative version of associativity for `prod` where the permutation is on the opposite
side. -/
lemma prod_assoc' (t : TensorTree S c) (t2 : TensorTree S c2) (t3 : TensorTree S c3) :
(prod (prod t t2) t3).tensor = (perm (assocPerm c c2 c3).inv (prod t (prod t2 t3))).tensor :=
perm_eq_of_eq_perm _ (prod_assoc c c2 c3 t t2 t3).symm
end TensorTree