Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit c3d8782

Browse files
committed
feat(category_theory/bicategory/functor_bicategory): bicategory structure on oplax functors (#11405)
This PR defines a bicategory structure on the oplax functors between bicategories.
1 parent da164c6 commit c3d8782

File tree

1 file changed

+110
-0
lines changed

1 file changed

+110
-0
lines changed
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
/-
2+
Copyright (c) 2022 Yuma Mizuno. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Yuma Mizuno
5+
-/
6+
import category_theory.bicategory.natural_transformation
7+
8+
/-!
9+
# The bicategory of oplax functors between two bicategories
10+
11+
Given bicategories `B` and `C`, we give a bicategory structure on `oplax_functor B C` whose
12+
* objects are oplax functors,
13+
* 1-morphisms are oplax natural transformations, and
14+
* 2-morphisms are modifications.
15+
-/
16+
17+
namespace category_theory
18+
19+
open category bicategory
20+
open_locale bicategory
21+
22+
universes w₁ w₂ v₁ v₂ u₁ u₂
23+
24+
variables {B : Type u₁} [bicategory.{w₁ v₁} B] {C : Type u₂} [bicategory.{w₂ v₂} C]
25+
variables {F G H I : oplax_functor B C}
26+
27+
namespace oplax_nat_trans
28+
29+
/-- Left whiskering of an oplax natural transformation and a modification. -/
30+
@[simps]
31+
def whisker_left (η : F ⟶ G) {θ ι : G ⟶ H} (Γ : θ ⟶ ι) : η ≫ θ ⟶ η ≫ ι :=
32+
{ app := λ a, η.app a ◁ Γ.app a,
33+
naturality' := λ a b f, by
34+
{ dsimp,
35+
simp only [assoc],
36+
rw [associator_inv_naturality_right_assoc, whisker_exchange_assoc,
37+
associator_naturality_right_assoc, Γ.whisker_left_naturality_assoc,
38+
associator_inv_naturality_middle] } }
39+
40+
/-- Right whiskering of an oplax natural transformation and a modification. -/
41+
@[simps]
42+
def whisker_right {η θ : F ⟶ G} (Γ : η ⟶ θ) (ι : G ⟶ H) : η ≫ ι ⟶ θ ≫ ι :=
43+
{ app := λ a, Γ.app a ▷ ι.app a,
44+
naturality' := λ a b f, by
45+
{ dsimp,
46+
simp only [assoc],
47+
rw [associator_inv_naturality_middle_assoc, Γ.whisker_right_naturality_assoc,
48+
associator_naturality_left_assoc, ←whisker_exchange_assoc,
49+
associator_inv_naturality_left] } }
50+
51+
/-- Associator for the vertical composition of oplax natural transformations. -/
52+
@[simps]
53+
def associator (η : F ⟶ G) (θ : G ⟶ H) (ι : H ⟶ I) : (η ≫ θ) ≫ ι ≅ η ≫ (θ ≫ ι) :=
54+
modification_iso.of_components (λ a, α_ (η.app a) (θ.app a) (ι.app a))
55+
begin
56+
intros a b f,
57+
dsimp,
58+
simp only [whisker_right_comp, whisker_left_comp, assoc],
59+
rw [←pentagon_inv_inv_hom_hom_inv_assoc, ←associator_naturality_left_assoc,
60+
pentagon_hom_hom_inv_hom_hom_assoc, ←associator_naturality_middle_assoc,
61+
←pentagon_inv_hom_hom_hom_hom_assoc, ←associator_naturality_right_assoc,
62+
pentagon_hom_inv_inv_inv_hom]
63+
end
64+
65+
/-- Left unitor for the vertical composition of oplax natural transformations. -/
66+
@[simps]
67+
def left_unitor (η : F ⟶ G) : 𝟙 F ≫ η ≅ η :=
68+
modification_iso.of_components (λ a, λ_ (η.app a))
69+
begin
70+
intros a b f,
71+
dsimp,
72+
simp only [triangle_assoc_comp_right_assoc, whisker_right_comp, assoc, whisker_exchange_assoc],
73+
rw [←left_unitor_comp, left_unitor_naturality, left_unitor_comp],
74+
simp only [iso.hom_inv_id_assoc, inv_hom_whisker_right_assoc, assoc, whisker_exchange_assoc]
75+
end
76+
77+
/-- Right unitor for the vertical composition of oplax natural transformations. -/
78+
@[simps]
79+
def right_unitor (η : F ⟶ G) : η ≫ 𝟙 G ≅ η :=
80+
modification_iso.of_components (λ a, ρ_ (η.app a))
81+
begin
82+
intros a b f,
83+
dsimp,
84+
simp only [triangle_assoc_comp_left_inv, inv_hom_whisker_right_assoc, whisker_exchange,
85+
assoc, whisker_left_comp],
86+
rw [←right_unitor_comp, right_unitor_naturality, right_unitor_comp],
87+
simp only [iso.inv_hom_id_assoc, assoc]
88+
end
89+
90+
end oplax_nat_trans
91+
92+
variables (B C)
93+
94+
/-- A bicategory structure on the oplax functors between bicategories. -/
95+
@[simps]
96+
instance oplax_functor.bicategory : bicategory (oplax_functor B C) :=
97+
{ whisker_left := λ F G H η _ _ Γ, oplax_nat_trans.whisker_left η Γ,
98+
whisker_right := λ F G H _ _ Γ η, oplax_nat_trans.whisker_right Γ η,
99+
associator := λ F G H I, oplax_nat_trans.associator,
100+
left_unitor := λ F G, oplax_nat_trans.left_unitor,
101+
right_unitor := λ F G, oplax_nat_trans.right_unitor,
102+
associator_naturality_left' := by { intros, ext, apply associator_naturality_left },
103+
associator_naturality_middle' := by { intros, ext, apply associator_naturality_middle },
104+
associator_naturality_right' := by { intros, ext, apply associator_naturality_right },
105+
left_unitor_naturality' := by { intros, ext, apply left_unitor_naturality },
106+
right_unitor_naturality' := by { intros, ext, apply right_unitor_naturality },
107+
pentagon' := by { intros, ext, apply pentagon },
108+
triangle' := by { intros, ext, apply triangle } }
109+
110+
end category_theory

0 commit comments

Comments
 (0)