Skip to content

Commit 4360e2d

Browse files
joelrioubjoernkjoshanssen
authored andcommitted
feat: symmetric monoidal structure on graded objects (#7389)
In this PR, we construct the braiding for the monoidal structure on graded objects (#14457). We show it is symmetric if the original category is symmetric. Co-authored-by: Joël Riou <[email protected]>
1 parent 6f2c3fc commit 4360e2d

File tree

3 files changed

+181
-1
lines changed

3 files changed

+181
-1
lines changed

Mathlib.lean

+1
Original file line numberDiff line numberDiff line change
@@ -1484,6 +1484,7 @@ import Mathlib.CategoryTheory.GlueData
14841484
import Mathlib.CategoryTheory.GradedObject
14851485
import Mathlib.CategoryTheory.GradedObject.Associator
14861486
import Mathlib.CategoryTheory.GradedObject.Bifunctor
1487+
import Mathlib.CategoryTheory.GradedObject.Braiding
14871488
import Mathlib.CategoryTheory.GradedObject.Monoidal
14881489
import Mathlib.CategoryTheory.GradedObject.Single
14891490
import Mathlib.CategoryTheory.GradedObject.Trifunctor

Mathlib/CategoryTheory/GradedObject/Bifunctor.lean

-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ variable {I J K : Type*} (p : I × J → K)
4646
/-- Given a bifunctor `F : C₁ ⥤ C₂ ⥤ C₃`, graded objects `X : GradedObject I C₁` and
4747
`Y : GradedObject J C₂` and a map `p : I × J → K`, this is the `K`-graded object sending
4848
`k` to the coproduct of `(F.obj (X i)).obj (Y j)` for `p ⟨i, j⟩ = k`. -/
49-
@[simp]
5049
noncomputable def mapBifunctorMapObj (X : GradedObject I C₁) (Y : GradedObject J C₂)
5150
[HasMap (((mapBifunctor F I J).obj X).obj Y) p] : GradedObject K C₃ :=
5251
(((mapBifunctor F I J).obj X).obj Y).mapObj p
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
/-
2+
Copyright (c) 2024 Joël Riou. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Joël Riou
5+
-/
6+
import Mathlib.CategoryTheory.GradedObject.Monoidal
7+
import Mathlib.CategoryTheory.Monoidal.Braided.Basic
8+
/-!
9+
# The braided and symmetric category structures on graded objects
10+
11+
In this file, we construct the braiding
12+
`GradedObject.Monoidal.braiding : tensorObj X Y ≅ tensorObj Y X`
13+
for two objects `X` and `Y` in `GradedObject I C`, when `I` is a commutative
14+
additive monoid (and suitable coproducts exist in a braided category `C`).
15+
16+
When `C` is a braided category and suitable assumptions are made, we obtain the braided category
17+
structure on `GradedObject I C` and show that it is symmetric if `C` is symmetric.
18+
19+
-/
20+
21+
namespace CategoryTheory
22+
23+
open Category Limits
24+
25+
variable {I : Type*} [AddCommMonoid I] {C : Type*} [Category C] [MonoidalCategory C]
26+
27+
namespace GradedObject
28+
29+
namespace Monoidal
30+
31+
variable (X Y Z : GradedObject I C)
32+
33+
section Braided
34+
35+
variable [BraidedCategory C]
36+
37+
/-- The braiding `tensorObj X Y ≅ tensorObj Y X` when `X` and `Y` are graded objects
38+
indexed by a commutative additive monoid. -/
39+
noncomputable def braiding [HasTensor X Y] [HasTensor Y X] : tensorObj X Y ≅ tensorObj Y X where
40+
hom k := tensorObjDesc (fun i j hij => (β_ _ _).hom ≫
41+
ιTensorObj Y X j i k (by simpa only [add_comm j i] using hij))
42+
inv k := tensorObjDesc (fun i j hij => (β_ _ _).inv ≫
43+
ιTensorObj X Y j i k (by simpa only [add_comm j i] using hij))
44+
45+
variable {Y Z} in
46+
lemma braiding_naturality_right [HasTensor X Y] [HasTensor Y X] [HasTensor X Z] [HasTensor Z X]
47+
(f : Y ⟶ Z) :
48+
whiskerLeft X f ≫ (braiding X Z).hom = (braiding X Y).hom ≫ whiskerRight f X := by
49+
dsimp [braiding]
50+
aesop_cat
51+
52+
variable {X Y} in
53+
lemma braiding_naturality_left [HasTensor Y Z] [HasTensor Z Y] [HasTensor X Z] [HasTensor Z X]
54+
(f : X ⟶ Y) :
55+
whiskerRight f Z ≫ (braiding Y Z).hom = (braiding X Z).hom ≫ whiskerLeft Z f := by
56+
dsimp [braiding]
57+
aesop_cat
58+
59+
lemma hexagon_forward [HasTensor X Y] [HasTensor Y X] [HasTensor Y Z]
60+
[HasTensor Z X] [HasTensor X Z]
61+
[HasTensor (tensorObj X Y) Z] [HasTensor X (tensorObj Y Z)]
62+
[HasTensor (tensorObj Y Z) X] [HasTensor Y (tensorObj Z X)]
63+
[HasTensor (tensorObj Y X) Z] [HasTensor Y (tensorObj X Z)]
64+
[HasGoodTensor₁₂Tensor X Y Z] [HasGoodTensorTensor₂₃ X Y Z]
65+
[HasGoodTensor₁₂Tensor Y Z X] [HasGoodTensorTensor₂₃ Y Z X]
66+
[HasGoodTensor₁₂Tensor Y X Z] [HasGoodTensorTensor₂₃ Y X Z] :
67+
(associator X Y Z).hom ≫ (braiding X (tensorObj Y Z)).hom ≫ (associator Y Z X).hom =
68+
whiskerRight (braiding X Y).hom Z ≫ (associator Y X Z).hom ≫
69+
whiskerLeft Y (braiding X Z).hom := by
70+
ext k i₁ i₂ i₃ h
71+
dsimp [braiding]
72+
conv_lhs => rw [ιTensorObj₃'_associator_hom_assoc, ιTensorObj₃_eq X Y Z i₁ i₂ i₃ k h _ rfl,
73+
assoc, ι_tensorObjDesc_assoc, assoc, ← MonoidalCategory.id_tensorHom,
74+
BraidedCategory.braiding_naturality_assoc,
75+
BraidedCategory.braiding_tensor_right, assoc, assoc, assoc, assoc, Iso.hom_inv_id_assoc,
76+
MonoidalCategory.tensorHom_id,
77+
← ιTensorObj₃'_eq_assoc Y Z X i₂ i₃ i₁ k (by rw [add_comm _ i₁, ← add_assoc, h]) _ rfl,
78+
ιTensorObj₃'_associator_hom, Iso.inv_hom_id_assoc]
79+
conv_rhs => rw [ιTensorObj₃'_eq X Y Z i₁ i₂ i₃ k h _ rfl, assoc, ι_tensorHom_assoc,
80+
← MonoidalCategory.tensorHom_id,
81+
← MonoidalCategory.tensor_comp_assoc, id_comp, ι_tensorObjDesc,
82+
categoryOfGradedObjects_id, MonoidalCategory.comp_tensor_id, assoc,
83+
MonoidalCategory.tensorHom_id, MonoidalCategory.tensorHom_id,
84+
← ιTensorObj₃'_eq_assoc Y X Z i₂ i₁ i₃ k
85+
(by rw [add_comm i₂ i₁, h]) (i₁ + i₂) (add_comm i₂ i₁),
86+
ιTensorObj₃'_associator_hom_assoc,
87+
ιTensorObj₃_eq Y X Z i₂ i₁ i₃ k (by rw [add_comm i₂ i₁, h]) _ rfl, assoc,
88+
ι_tensorHom, categoryOfGradedObjects_id, ← MonoidalCategory.tensorHom_id,
89+
← MonoidalCategory.id_tensorHom,
90+
← MonoidalCategory.id_tensor_comp_assoc,
91+
ι_tensorObjDesc, MonoidalCategory.id_tensor_comp, assoc,
92+
← MonoidalCategory.id_tensor_comp_assoc, MonoidalCategory.tensorHom_id,
93+
MonoidalCategory.id_tensorHom, MonoidalCategory.whiskerLeft_comp, assoc,
94+
← ιTensorObj₃_eq Y Z X i₂ i₃ i₁ k (by rw [add_comm _ i₁, ← add_assoc, h])
95+
(i₁ + i₃) (add_comm _ _ )]
96+
97+
lemma hexagon_reverse [HasTensor X Y] [HasTensor Y Z] [HasTensor Z X]
98+
[HasTensor Z Y] [HasTensor X Z]
99+
[HasTensor (tensorObj X Y) Z] [HasTensor X (tensorObj Y Z)]
100+
[HasTensor Z (tensorObj X Y)] [HasTensor (tensorObj Z X) Y]
101+
[HasTensor X (tensorObj Z Y)] [HasTensor (tensorObj X Z) Y]
102+
[HasGoodTensor₁₂Tensor X Y Z] [HasGoodTensorTensor₂₃ X Y Z]
103+
[HasGoodTensor₁₂Tensor Z X Y] [HasGoodTensorTensor₂₃ Z X Y]
104+
[HasGoodTensor₁₂Tensor X Z Y] [HasGoodTensorTensor₂₃ X Z Y]:
105+
(associator X Y Z).inv ≫ (braiding (tensorObj X Y) Z).hom ≫ (associator Z X Y).inv =
106+
whiskerLeft X (braiding Y Z).hom ≫ (associator X Z Y).inv ≫
107+
whiskerRight (braiding X Z).hom Y := by
108+
ext k i₁ i₂ i₃ h
109+
dsimp [braiding]
110+
conv_lhs => rw [ιTensorObj₃_associator_inv_assoc, ιTensorObj₃'_eq X Y Z i₁ i₂ i₃ k h _ rfl, assoc,
111+
ι_tensorObjDesc_assoc, assoc, ← MonoidalCategory.tensorHom_id,
112+
BraidedCategory.braiding_naturality_assoc,
113+
BraidedCategory.braiding_tensor_left, assoc, assoc, assoc, assoc, Iso.inv_hom_id_assoc,
114+
MonoidalCategory.id_tensorHom,
115+
← ιTensorObj₃_eq_assoc Z X Y i₃ i₁ i₂ k (by rw [add_assoc, add_comm i₃, h]) _ rfl,
116+
ιTensorObj₃_associator_inv, Iso.hom_inv_id_assoc]
117+
conv_rhs => rw [ιTensorObj₃_eq X Y Z i₁ i₂ i₃ k h _ rfl, assoc, ι_tensorHom_assoc,
118+
← MonoidalCategory.id_tensorHom,
119+
← MonoidalCategory.tensor_comp_assoc, id_comp, ι_tensorObjDesc,
120+
categoryOfGradedObjects_id, MonoidalCategory.id_tensor_comp, assoc,
121+
MonoidalCategory.id_tensorHom, MonoidalCategory.id_tensorHom,
122+
← ιTensorObj₃_eq_assoc X Z Y i₁ i₃ i₂ k
123+
(by rw [add_assoc, add_comm i₃, ← add_assoc, h]) (i₂ + i₃) (add_comm _ _),
124+
ιTensorObj₃_associator_inv_assoc,
125+
ιTensorObj₃'_eq X Z Y i₁ i₃ i₂ k (by rw [add_assoc, add_comm i₃, ← add_assoc, h]) _ rfl,
126+
assoc, ι_tensorHom, categoryOfGradedObjects_id, ← MonoidalCategory.tensorHom_id,
127+
← MonoidalCategory.comp_tensor_id_assoc,
128+
ι_tensorObjDesc, MonoidalCategory.comp_tensor_id, assoc,
129+
MonoidalCategory.tensorHom_id, MonoidalCategory.tensorHom_id,
130+
← ιTensorObj₃'_eq Z X Y i₃ i₁ i₂ k (by rw [add_assoc, add_comm i₃, h])
131+
(i₁ + i₃) (add_comm _ _)]
132+
133+
end Braided
134+
135+
@[reassoc (attr := simp)]
136+
lemma symmetry [SymmetricCategory C] [HasTensor X Y] [HasTensor Y X] :
137+
(braiding X Y).hom ≫ (braiding Y X).hom = 𝟙 _ := by
138+
dsimp [braiding]
139+
aesop_cat
140+
141+
end Monoidal
142+
143+
section Instances
144+
145+
variable
146+
[∀ (X₁ X₂ : GradedObject I C), HasTensor X₁ X₂]
147+
[∀ (X₁ X₂ X₃ : GradedObject I C), HasGoodTensor₁₂Tensor X₁ X₂ X₃]
148+
[∀ (X₁ X₂ X₃ : GradedObject I C), HasGoodTensorTensor₂₃ X₁ X₂ X₃]
149+
[DecidableEq I] [HasInitial C]
150+
[∀ X₁, PreservesColimit (Functor.empty.{0} C)
151+
((MonoidalCategory.curriedTensor C).obj X₁)]
152+
[∀ X₂, PreservesColimit (Functor.empty.{0} C)
153+
((MonoidalCategory.curriedTensor C).flip.obj X₂)]
154+
[∀ (X₁ X₂ X₃ X₄ : GradedObject I C), HasTensor₄ObjExt X₁ X₂ X₃ X₄]
155+
156+
noncomputable instance braidedCategory [BraidedCategory C] :
157+
BraidedCategory (GradedObject I C) where
158+
braiding X Y := Monoidal.braiding X Y
159+
braiding_naturality_left _ _:= Monoidal.braiding_naturality_left _ _
160+
braiding_naturality_right _ _ _ _ := Monoidal.braiding_naturality_right _ _
161+
hexagon_forward _ _ _ := Monoidal.hexagon_forward _ _ _
162+
hexagon_reverse _ _ _ := Monoidal.hexagon_reverse _ _ _
163+
164+
noncomputable instance symmetricCategory [SymmetricCategory C] :
165+
SymmetricCategory (GradedObject I C) where
166+
symmetry _ _ := Monoidal.symmetry _ _
167+
168+
/-!
169+
The braided/symmetric monoidal category structure on `GradedObject ℕ C` can
170+
be inferred from the assumptions `[HasFiniteCoproducts C]`,
171+
`[∀ (X : C), PreservesFiniteCoproducts ((curriedTensor C).obj X)]` and
172+
`[∀ (X : C), PreservesFiniteCoproducts ((curriedTensor C).flip.obj X)]`.
173+
This requires importing `Mathlib.CategoryTheory.Limits.Preserves.Finite`.
174+
-/
175+
176+
end Instances
177+
178+
end GradedObject
179+
180+
end CategoryTheory

0 commit comments

Comments
 (0)