@@ -17,18 +17,19 @@ We define `Center C` to be pairs `⟨X, b⟩`, where `X : C` and `b` is a half-b
17
17
We show that `Center C` is braided monoidal,
18
18
and provide the monoidal functor `Center.forget` from `Center C` back to `C`.
19
19
20
- ## Future work
20
+ ## Implementation notes
21
21
22
- Verifying the various axioms here is done by tedious rewriting.
22
+ Verifying the various axioms directly requires tedious rewriting.
23
23
Using the `slice` tactic may make the proofs marginally more readable.
24
24
25
25
More exciting, however, would be to make possible one of the following options:
26
26
1. Integration with homotopy.io / globular to give "picture proofs".
27
27
2. The monoidal coherence theorem, so we can ignore associators
28
- (after which most of these proofs are trivial;
29
- I'm unsure if the monoidal coherence theorem is even usable in dependent type theory).
28
+ (after which most of these proofs are trivial).
30
29
3. Automating these proofs using `rewrite_search` or some relative.
31
30
31
+ In this file, we take the second approach using the monoidal composition `⊗≫` and the
32
+ `coherence` tactic.
32
33
-/
33
34
34
35
@@ -56,9 +57,9 @@ structure HalfBraiding (X : C) where
56
57
β : ∀ U, X ⊗ U ≅ U ⊗ X
57
58
monoidal : ∀ U U', (β (U ⊗ U')).hom =
58
59
(α_ _ _ _).inv ≫
59
- ((β U).hom ⊗ 𝟙 U') ≫ (α_ _ _ _).hom ≫ (𝟙 U ⊗ (β U').hom) ≫ (α_ _ _ _).inv := by
60
+ ((β U).hom ▷ U') ≫ (α_ _ _ _).hom ≫ (U ◁ (β U').hom) ≫ (α_ _ _ _).inv := by
60
61
aesop_cat
61
- naturality : ∀ {U U'} (f : U ⟶ U'), (𝟙 X ⊗ f) ≫ (β U').hom = (β U).hom ≫ (f ⊗ 𝟙 X) := by
62
+ naturality : ∀ {U U'} (f : U ⟶ U'), (X ◁ f) ≫ (β U').hom = (β U).hom ≫ (f ▷ X) := by
62
63
aesop_cat
63
64
#align category_theory.half_braiding CategoryTheory.HalfBraiding
64
65
@@ -84,7 +85,7 @@ variable {C}
84
85
@[ext] -- @[nolint has_nonempty_instance] -- Porting note: This linter does not exist yet.
85
86
structure Hom (X Y : Center C) where
86
87
f : X.1 ⟶ Y.1
87
- comm : ∀ U, (f ⊗ 𝟙 U) ≫ (Y.2 .β U).hom = (X.2 .β U).hom ≫ (𝟙 U ⊗ f) := by aesop_cat
88
+ comm : ∀ U, (f ▷ U) ≫ (Y.2 .β U).hom = (X.2 .β U).hom ≫ (U ◁ f) := by aesop_cat
88
89
#align category_theory.center.hom CategoryTheory.Center.Hom
89
90
90
91
attribute [reassoc (attr := simp)] Hom.comm
@@ -118,7 +119,8 @@ a morphism whose underlying morphism is an isomorphism.
118
119
def isoMk {X Y : Center C} (f : X ⟶ Y) [IsIso f.f] : X ≅ Y where
119
120
hom := f
120
121
inv := ⟨inv f.f,
121
- fun U => by simp [← cancel_epi (f.f ⊗ 𝟙 U), ← comp_tensor_id_assoc, ← id_tensor_comp]⟩
122
+ fun U => by simp [← cancel_epi (f.f ▷ U), ← comp_whiskerRight_assoc,
123
+ ← MonoidalCategory.whiskerLeft_comp] ⟩
122
124
#align category_theory.center.iso_mk CategoryTheory.Center.isoMk
123
125
124
126
instance isIso_of_f_isIso {X Y : Center C} (f : X ⟶ Y) [IsIso f.f] : IsIso f := by
@@ -132,48 +134,86 @@ def tensorObj (X Y : Center C) : Center C :=
132
134
⟨X.1 ⊗ Y.1 ,
133
135
{ β := fun U =>
134
136
α_ _ _ _ ≪≫
135
- (Iso.refl X.1 ⊗ Y.2 .β U) ≪≫ (α_ _ _ _).symm ≪≫ (X.2 .β U ⊗ Iso.refl Y.1 ) ≪≫ α_ _ _ _
137
+ (whiskerLeftIso X.1 (Y.2 .β U)) ≪≫ (α_ _ _ _).symm ≪≫
138
+ (whiskerRightIso (X.2 .β U) Y.1 ) ≪≫ α_ _ _ _
136
139
monoidal := fun U U' => by
137
- dsimp
138
- simp only [comp_tensor_id, id_tensor_comp, Category.assoc, HalfBraiding.monoidal]
139
- -- On the RHS, we'd like to commute `((X.snd.β U).hom ⊗ 𝟙 Y.fst) ⊗ 𝟙 U'`
140
- -- and `𝟙 U ⊗ 𝟙 X.fst ⊗ (Y.snd.β U').hom` past each other,
141
- -- but there are some associators we need to get out of the way first.
142
- slice_rhs 6 8 => rw [pentagon]
143
- slice_rhs 5 6 => rw [associator_naturality]
144
- slice_rhs 7 8 => rw [← associator_naturality]
145
- slice_rhs 6 7 =>
146
- rw [tensor_id, tensor_id, tensor_id_comp_id_tensor, ← id_tensor_comp_tensor_id,
147
- ← tensor_id, ← tensor_id]
148
- -- Now insert associators as needed to make the four half-braidings look identical
149
- slice_rhs 10 10 => rw [associator_inv_conjugation]
150
- slice_rhs 7 7 => rw [associator_inv_conjugation]
151
- slice_rhs 6 6 => rw [associator_conjugation]
152
- slice_rhs 3 3 => rw [associator_conjugation]
153
- -- Finish with an application of the coherence theorem.
154
- coherence
155
- naturality := fun f => by
156
- dsimp
157
- rw [Category.assoc, Category.assoc, Category.assoc, Category.assoc,
158
- id_tensor_associator_naturality_assoc, ← id_tensor_comp_assoc, HalfBraiding.naturality,
159
- id_tensor_comp_assoc, associator_inv_naturality_assoc, ← comp_tensor_id_assoc,
160
- HalfBraiding.naturality, comp_tensor_id_assoc, associator_naturality, ← tensor_id] }⟩
140
+ dsimp only [Iso.trans_hom, whiskerLeftIso_hom, Iso.symm_hom, whiskerRightIso_hom]
141
+ simp only [HalfBraiding.monoidal]
142
+ -- We'd like to commute `X.1 ◁ U ◁ (HalfBraiding.β Y.2 U').hom`
143
+ -- and `((HalfBraiding.β X.2 U).hom ▷ U' ▷ Y.1)` past each other.
144
+ -- We do this with the help of the monoidal composition `⊗≫` and the `coherence` tactic.
145
+ calc
146
+ _ = 𝟙 _ ⊗≫
147
+ X.1 ◁ (HalfBraiding.β Y.2 U).hom ▷ U' ⊗≫
148
+ (_ ◁ (HalfBraiding.β Y.2 U').hom ≫
149
+ (HalfBraiding.β X.2 U).hom ▷ _) ⊗≫
150
+ U ◁ (HalfBraiding.β X.2 U').hom ▷ Y.1 ⊗≫ 𝟙 _ := by coherence
151
+ _ = _ := by rw [whisker_exchange]; coherence
152
+ naturality := fun {U U'} f => by
153
+ dsimp only [Iso.trans_hom, whiskerLeftIso_hom, Iso.symm_hom, whiskerRightIso_hom]
154
+ calc
155
+ _ = 𝟙 _ ⊗≫
156
+ (X.1 ◁ (Y.1 ◁ f ≫ (HalfBraiding.β Y.2 U').hom)) ⊗≫
157
+ (HalfBraiding.β X.2 U').hom ▷ Y.1 ⊗≫ 𝟙 _ := by coherence
158
+ _ = 𝟙 _ ⊗≫
159
+ X.1 ◁ (HalfBraiding.β Y.2 U).hom ⊗≫
160
+ (X.1 ◁ f ≫ (HalfBraiding.β X.2 U').hom) ▷ Y.1 ⊗≫ 𝟙 _ := by
161
+ rw [HalfBraiding.naturality]; coherence
162
+ _ = _ := by rw [HalfBraiding.naturality]; coherence }⟩
161
163
#align category_theory.center.tensor_obj CategoryTheory.Center.tensorObj
162
164
165
+ @[reassoc]
166
+ theorem whiskerLeft_comm (X : Center C) {Y₁ Y₂ : Center C} (f : Y₁ ⟶ Y₂) (U : C) :
167
+ (X.1 ◁ f.f) ▷ U ≫ ((tensorObj X Y₂).2 .β U).hom =
168
+ ((tensorObj X Y₁).2 .β U).hom ≫ U ◁ X.1 ◁ f.f := by
169
+ dsimp only [tensorObj_fst, tensorObj_snd_β, Iso.trans_hom, whiskerLeftIso_hom,
170
+ Iso.symm_hom, whiskerRightIso_hom]
171
+ calc
172
+ _ = 𝟙 _ ⊗≫
173
+ X.fst ◁ (f.f ▷ U ≫ (HalfBraiding.β Y₂.snd U).hom) ⊗≫
174
+ (HalfBraiding.β X.snd U).hom ▷ Y₂.fst ⊗≫ 𝟙 _ := by coherence
175
+ _ = 𝟙 _ ⊗≫
176
+ X.fst ◁ (HalfBraiding.β Y₁.snd U).hom ⊗≫
177
+ ((X.fst ⊗ U) ◁ f.f ≫ (HalfBraiding.β X.snd U).hom ▷ Y₂.fst) ⊗≫ 𝟙 _ := by
178
+ rw [f.comm]; coherence
179
+ _ = _ := by rw [whisker_exchange]; coherence
180
+
181
+ /-- Auxiliary definition for the `MonoidalCategory` instance on `Center C`. -/
182
+ def whiskerLeft (X : Center C) {Y₁ Y₂ : Center C} (f : Y₁ ⟶ Y₂) :
183
+ tensorObj X Y₁ ⟶ tensorObj X Y₂ where
184
+ f := X.1 ◁ f.f
185
+ comm U := whiskerLeft_comm X f U
186
+
187
+ @[reassoc]
188
+ theorem whiskerRight_comm {X₁ X₂: Center C} (f : X₁ ⟶ X₂) (Y : Center C) (U : C) :
189
+ f.f ▷ Y.1 ▷ U ≫ ((tensorObj X₂ Y).2 .β U).hom =
190
+ ((tensorObj X₁ Y).2 .β U).hom ≫ U ◁ f.f ▷ Y.1 := by
191
+ dsimp only [tensorObj_fst, tensorObj_snd_β, Iso.trans_hom, whiskerLeftIso_hom,
192
+ Iso.symm_hom, whiskerRightIso_hom]
193
+ calc
194
+ _ = 𝟙 _ ⊗≫
195
+ (f.f ▷ (Y.fst ⊗ U) ≫ X₂.fst ◁ (HalfBraiding.β Y.snd U).hom) ⊗≫
196
+ (HalfBraiding.β X₂.snd U).hom ▷ Y.fst ⊗≫ 𝟙 _ := by coherence
197
+ _ = 𝟙 _ ⊗≫
198
+ X₁.fst ◁ (HalfBraiding.β Y.snd U).hom ⊗≫
199
+ (f.f ▷ U ≫ (HalfBraiding.β X₂.snd U).hom) ▷ Y.fst ⊗≫ 𝟙 _ := by
200
+ rw [← whisker_exchange]; coherence
201
+ _ = _ := by rw [f.comm]; coherence
202
+
203
+ /-- Auxiliary definition for the `MonoidalCategory` instance on `Center C`. -/
204
+ def whiskerRight {X₁ X₂ : Center C} (f : X₁ ⟶ X₂) (Y : Center C) :
205
+ tensorObj X₁ Y ⟶ tensorObj X₂ Y where
206
+ f := f.f ▷ Y.1
207
+ comm U := whiskerRight_comm f Y U
208
+
163
209
/-- Auxiliary definition for the `MonoidalCategory` instance on `Center C`. -/
164
210
@[simps]
165
211
def tensorHom {X₁ Y₁ X₂ Y₂ : Center C} (f : X₁ ⟶ Y₁) (g : X₂ ⟶ Y₂) :
166
212
tensorObj X₁ X₂ ⟶ tensorObj Y₁ Y₂ where
167
213
f := f.f ⊗ g.f
168
214
comm U := by
169
- dsimp
170
- rw [Category.assoc, Category.assoc, Category.assoc, Category.assoc, associator_naturality_assoc,
171
- ← tensor_id_comp_id_tensor, Category.assoc, ← id_tensor_comp_assoc, g.comm,
172
- id_tensor_comp_assoc, tensor_id_comp_id_tensor_assoc, ← id_tensor_comp_tensor_id,
173
- Category.assoc, associator_inv_naturality_assoc, id_tensor_associator_inv_naturality_assoc,
174
- tensor_id, id_tensor_comp_tensor_id_assoc, ← tensor_id_comp_id_tensor g.f, Category.assoc,
175
- ← comp_tensor_id_assoc, f.comm, comp_tensor_id_assoc, id_tensor_associator_naturality,
176
- associator_naturality_assoc, ← id_tensor_comp, tensor_id_comp_id_tensor]
215
+ rw [tensorHom_def, comp_whiskerRight_assoc, whiskerLeft_comm, whiskerRight_comm_assoc,
216
+ MonoidalCategory.whiskerLeft_comp]
177
217
#align category_theory.center.tensor_hom CategoryTheory.Center.tensorHom
178
218
179
219
section
@@ -209,14 +249,14 @@ attribute [local simp] associator_naturality leftUnitor_naturality rightUnitor_n
209
249
210
250
attribute [local simp] Center.associator Center.leftUnitor Center.rightUnitor
211
251
252
+ attribute [local simp] Center.whiskerLeft Center.whiskerRight Center.tensorHom
253
+
212
254
instance : MonoidalCategory (Center C) where
213
255
tensorObj X Y := tensorObj X Y
214
256
tensorHom f g := tensorHom f g
215
257
tensorHom_def := by intros; ext; simp [tensorHom_def]
216
- -- Todo: replace it by `X.1 ◁ f.f`
217
- whiskerLeft X _ _ f := tensorHom (𝟙 X) f
218
- -- Todo: replace it by `f.f ▷ Y.1`
219
- whiskerRight f Y := tensorHom f (𝟙 Y)
258
+ whiskerLeft X _ _ f := whiskerLeft X f
259
+ whiskerRight f Y := whiskerRight f Y
220
260
tensorUnit := tensorUnit
221
261
associator := associator
222
262
leftUnitor := leftUnitor
@@ -231,17 +271,18 @@ theorem tensor_fst (X Y : Center C) : (X ⊗ Y).1 = X.1 ⊗ Y.1 :=
231
271
theorem tensor_β (X Y : Center C) (U : C) :
232
272
(X ⊗ Y).2 .β U =
233
273
α_ _ _ _ ≪≫
234
- (Iso.refl X.1 ⊗ Y.2 .β U) ≪≫ (α_ _ _ _).symm ≪≫ (X.2 .β U ⊗ Iso.refl Y.1 ) ≪≫ α_ _ _ _ :=
274
+ (whiskerLeftIso X.1 (Y.2 .β U)) ≪≫ (α_ _ _ _).symm ≪≫
275
+ (whiskerRightIso (X.2 .β U) Y.1 ) ≪≫ α_ _ _ _ :=
235
276
rfl
236
277
#align category_theory.center.tensor_β CategoryTheory.Center.tensor_β
237
278
238
279
@[simp]
239
280
theorem whiskerLeft_f (X : Center C) {Y₁ Y₂ : Center C} (f : Y₁ ⟶ Y₂) : (X ◁ f).f = X.1 ◁ f.f :=
240
- id_tensorHom X. 1 f.f
281
+ rfl
241
282
242
283
@[simp]
243
284
theorem whiskerRight_f {X₁ X₂ : Center C} (f : X₁ ⟶ X₂) (Y : Center C) : (f ▷ Y).f = f.f ▷ Y.1 :=
244
- tensorHom_id f.f Y. 1
285
+ rfl
245
286
246
287
@[simp]
247
288
theorem tensor_f {X₁ Y₁ X₂ Y₂ : Center C} (f : X₁ ⟶ Y₁) (g : X₂ ⟶ Y₂) : (f ⊗ g).f = f.f ⊗ g.f :=
@@ -344,20 +385,9 @@ def ofBraided : MonoidalFunctor C (Center C) where
344
385
obj := ofBraidedObj
345
386
map f :=
346
387
{ f
347
- comm := fun U => braiding_naturality _ _ }
348
- ε :=
349
- { f := 𝟙 _
350
- comm := fun U => by
351
- dsimp
352
- rw [tensor_id, Category.id_comp, tensor_id, Category.comp_id, ← braiding_rightUnitor,
353
- Category.assoc, Iso.hom_inv_id, Category.comp_id] }
354
- μ X Y :=
355
- { f := 𝟙 _
356
- comm := fun U => by
357
- dsimp
358
- rw [tensor_id, tensor_id, Category.id_comp, Category.comp_id, ← Iso.inv_comp_eq,
359
- ← Category.assoc, ← Category.assoc, ← Iso.comp_inv_eq, Category.assoc, hexagon_reverse,
360
- Category.assoc] }
388
+ comm := fun U => braiding_naturality_left f U }
389
+ ε := { f := 𝟙 _ }
390
+ μ X Y := { f := 𝟙 _ }
361
391
#align category_theory.center.of_braided CategoryTheory.Center.ofBraided
362
392
363
393
end
0 commit comments