@@ -34,8 +34,6 @@ namespace CategoryTheory
3434
3535open Category Bicategory
3636
37- open Bicategory
38-
3937universe w₁ w₂ w₃ v₁ v₂ v₃ u₁ u₂ u₃
4038
4139variable {B : Type u₁} [Bicategory.{w₁, v₁} B] {C : Type u₂} [Bicategory.{w₂, v₂} C]
@@ -79,6 +77,11 @@ structure Pseudofunctor (B : Type u₁) [Bicategory.{w₁, v₁} B] (C : Type u
7977 map₂ (ρ_ f).hom = (mapComp f (𝟙 b)).hom ≫ map f ◁ (mapId b).hom ≫ (ρ_ (map f)).hom := by
8078 cat_disch
8179
80+ /-- Notation for a pseudofunctor between bicategories. -/
81+ -- Given similar precedence as ⥤ (26).
82+ -- For example, `C × D ⥤ E` should parse as `(C × D) ⥤ E` not `C × (D ⥤ E)`.
83+ scoped [CategoryTheory.Bicategory] infixr :26 " ⥤ᵖ " => Pseudofunctor -- type as \func\^p
84+
8285initialize_simps_projections Pseudofunctor (+toPrelaxFunctor, -obj, -map, -map₂)
8386
8487namespace Pseudofunctor
@@ -102,7 +105,7 @@ attribute [nolint docBlame] CategoryTheory.Pseudofunctor.mapId
102105 CategoryTheory.Pseudofunctor.map₂_left_unitor
103106 CategoryTheory.Pseudofunctor.map₂_right_unitor
104107
105- variable (F : Pseudofunctor B C)
108+ variable (F : B ⥤ᵖ C)
106109
107110/-- The oplax functor associated with a pseudofunctor. -/
108111@[simps]
@@ -111,7 +114,7 @@ def toOplax : OplaxFunctor B C where
111114 mapId := fun a => (F.mapId a).hom
112115 mapComp := fun f g => (F.mapComp f g).hom
113116
114- instance hasCoeToOplax : Coe (Pseudofunctor B C) (OplaxFunctor B C) :=
117+ instance hasCoeToOplax : Coe (B ⥤ᵖ C) (OplaxFunctor B C) :=
115118 ⟨toOplax⟩
116119
117120/-- The Lax functor associated with a pseudofunctor. -/
@@ -127,22 +130,22 @@ def toLax : LaxFunctor B C where
127130 rw [← F.map₂Iso_inv, eq_inv_comp, comp_inv_eq]
128131 simp
129132
130- instance hasCoeToLax : Coe (Pseudofunctor B C) (LaxFunctor B C) :=
133+ instance hasCoeToLax : Coe (B ⥤ᵖ C) (LaxFunctor B C) :=
131134 ⟨toLax⟩
132135
133136/-- The identity pseudofunctor. -/
134137@[simps]
135- def id (B : Type u₁) [Bicategory.{w₁, v₁} B] : Pseudofunctor B B where
138+ def id (B : Type u₁) [Bicategory.{w₁, v₁} B] : B ⥤ᵖ B where
136139 toPrelaxFunctor := PrelaxFunctor.id B
137140 mapId := fun a => Iso.refl (𝟙 a)
138141 mapComp := fun f g => Iso.refl (f ≫ g)
139142
140- instance : Inhabited (Pseudofunctor B B) :=
143+ instance : Inhabited (B ⥤ᵖ B) :=
141144 ⟨id B⟩
142145
143146/-- Composition of pseudofunctors. -/
144147@[simps]
145- def comp (F : Pseudofunctor B C) (G : Pseudofunctor C D) : Pseudofunctor B D where
148+ def comp (F : B ⥤ᵖ C) (G : C ⥤ᵖ D) : B ⥤ᵖ D where
146149 toPrelaxFunctor := F.toPrelaxFunctor.comp G.toPrelaxFunctor
147150 mapId := fun a => G.map₂Iso (F.mapId a) ≪≫ G.mapId (F.obj a)
148151 mapComp := fun f g => (G.map₂Iso (F.mapComp f g)) ≪≫ G.mapComp (F.map f) (F.map g)
@@ -155,7 +158,7 @@ def comp (F : Pseudofunctor B C) (G : Pseudofunctor C D) : Pseudofunctor B D whe
155158
156159section
157160
158- variable (F : Pseudofunctor B C) {a b : B}
161+ variable (F : B ⥤ᵖ C) {a b : B}
159162
160163@[to_app (attr := reassoc)]
161164lemma mapComp_assoc_right_hom {c d : B} (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d) :
288291
289292/-- Construct a pseudofunctor from an oplax functor whose `mapId` and `mapComp` are isomorphisms. -/
290293@[simps]
291- def mkOfOplax (F : OplaxFunctor B C) (F' : F.PseudoCore) : Pseudofunctor B C where
294+ def mkOfOplax (F : OplaxFunctor B C) (F' : F.PseudoCore) : B ⥤ᵖ C where
292295 toPrelaxFunctor := F.toPrelaxFunctor
293296 mapId := F'.mapIdIso
294297 mapComp := F'.mapCompIso
@@ -306,7 +309,7 @@ def mkOfOplax (F : OplaxFunctor B C) (F' : F.PseudoCore) : Pseudofunctor B C whe
306309/-- Construct a pseudofunctor from an oplax functor whose `mapId` and `mapComp` are isomorphisms. -/
307310@[simps!]
308311noncomputable def mkOfOplax' (F : OplaxFunctor B C) [∀ a, IsIso (F.mapId a)]
309- [∀ {a b c} (f : a ⟶ b) (g : b ⟶ c), IsIso (F.mapComp f g)] : Pseudofunctor B C where
312+ [∀ {a b c} (f : a ⟶ b) (g : b ⟶ c), IsIso (F.mapComp f g)] : B ⥤ᵖ C where
310313 toPrelaxFunctor := F.toPrelaxFunctor
311314 mapId := fun a => asIso (F.mapId a)
312315 mapComp := fun f g => asIso (F.mapComp f g)
@@ -324,7 +327,7 @@ noncomputable def mkOfOplax' (F : OplaxFunctor B C) [∀ a, IsIso (F.mapId a)]
324327
325328/-- Construct a pseudofunctor from a lax functor whose `mapId` and `mapComp` are isomorphisms. -/
326329@[simps]
327- def mkOfLax (F : LaxFunctor B C) (F' : F.PseudoCore) : Pseudofunctor B C where
330+ def mkOfLax (F : LaxFunctor B C) (F' : F.PseudoCore) : B ⥤ᵖ C where
328331 toPrelaxFunctor := F.toPrelaxFunctor
329332 mapId := F'.mapIdIso
330333 mapComp := F'.mapCompIso
@@ -343,7 +346,7 @@ def mkOfLax (F : LaxFunctor B C) (F' : F.PseudoCore) : Pseudofunctor B C where
343346/-- Construct a pseudofunctor from a lax functor whose `mapId` and `mapComp` are isomorphisms. -/
344347@[simps!]
345348noncomputable def mkOfLax' (F : LaxFunctor B C) [∀ a, IsIso (F.mapId a)]
346- [∀ {a b c} (f : a ⟶ b) (g : b ⟶ c), IsIso (F.mapComp f g)] : Pseudofunctor B C :=
349+ [∀ {a b c} (f : a ⟶ b) (g : b ⟶ c), IsIso (F.mapComp f g)] : B ⥤ᵖ C :=
347350 mkOfLax F
348351 { mapIdIso := fun a => (asIso (F.mapId a)).symm
349352 mapCompIso := fun f g => (asIso (F.mapComp f g)).symm }
0 commit comments