Skip to content

Commit 6845e57

Browse files
committed
feat(CategoryTheory/Bicategory/Functor): strictly unitary lax/pseudo functors (#27849)
We define strictly unitary lax/pseudo functors between bicategories. A lax (resp. pseudo-)functor from `C` to `D` is strictly unitary if `F.map(𝟙 X) = 𝟙 (F.obj X)` and if the 2-cell `mapId` is the identity 2-cell induced by this equality. We provide a constructor for those that do not require the `mapId` field. Although this structure is somewhat "evil" from a purely categorical perspective (it mentions non-definitonal equality of objects in a 1-category), these class of functors are of interest: strictly unitary lax functors are part of the definition of the Duskin nerve of a bicategory (which embeds bicategories in the theory of simplicial sets), while strictly unitary pseudofunctors are part of the definition of the 2-nerve of a bicategory, which embeds bicategories into the theory of simplicial categories. This PR is part of an ongoing work that will hopefully culminate with the construction of the Duskin Nerve, as well as a proof of the fact that the Duskin nerve of a locally groupoidal bicategory is a quasicategory.
1 parent 8d4dd98 commit 6845e57

File tree

2 files changed

+355
-0
lines changed

2 files changed

+355
-0
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2090,6 +2090,7 @@ import Mathlib.CategoryTheory.Bicategory.Functor.Oplax
20902090
import Mathlib.CategoryTheory.Bicategory.Functor.Prelax
20912091
import Mathlib.CategoryTheory.Bicategory.Functor.Pseudofunctor
20922092
import Mathlib.CategoryTheory.Bicategory.Functor.Strict
2093+
import Mathlib.CategoryTheory.Bicategory.Functor.StrictlyUnitary
20932094
import Mathlib.CategoryTheory.Bicategory.FunctorBicategory.Oplax
20942095
import Mathlib.CategoryTheory.Bicategory.Grothendieck
20952096
import Mathlib.CategoryTheory.Bicategory.Kan.Adjunction
Lines changed: 354 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,354 @@
1+
/-
2+
Copyright (c) 2025 Robin Carlier. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Robin Carlier
5+
-/
6+
import Mathlib.CategoryTheory.Bicategory.Functor.Pseudofunctor
7+
8+
/-!
9+
# Strictly unitary lax functors and pseudofunctors
10+
11+
In this file, we define strictly unitary Lax functors and
12+
strictly unitary pseudofunctors between bicategories.
13+
14+
A lax functor `F` is said to be *strictly unitary* (sometimes, they are also
15+
called *normal*) if there is an equality `F.obj (𝟙 _) = 𝟙 (F.obj x)` and if the
16+
unit 2-morphism `F.obj (𝟙 _) → 𝟙 (F.obj _)` is the identity 2-morphism induced
17+
by this equality.
18+
19+
A pseudofunctor is called *strictly unitary* (or a *normal homomorphism*) if it
20+
satisfies the same condition (i.e its "underlying" lax functor is strictly
21+
unitary).
22+
23+
## References
24+
- [Kerodon, section 2.2.2.4](https://kerodon.net/tag/008G)
25+
26+
## TODOs
27+
* Define lax-composable (resp. pseudo-composable) arrows as strictly unitary
28+
lax (resp. pseudo-) functors out of `LocallyDiscrete Fin n`.
29+
* Define identity-component oplax natural transformations ("icons") between
30+
strictly unitary pseudofunctors and construct a bicategory structure on
31+
bicategories, strictly unitary pseudofunctors and icons.
32+
* Construct the Duskin of a bicategory using lax-composable arrows
33+
* Construct the 2-nerve of a bicategory using pseudo-composable arrows
34+
35+
-/
36+
37+
namespace CategoryTheory
38+
39+
open Category Bicategory
40+
41+
open Bicategory
42+
43+
universe w₁ w₂ w₃ w₄ v₁ v₂ v₃ v₄ u₁ u₂ u₃ u₄
44+
45+
variable {B : Type u₁} [Bicategory.{w₁, v₁} B]
46+
{C : Type u₂} [Bicategory.{w₂, v₂} C]
47+
{D : Type u₃} [Bicategory.{w₃, v₃} D]
48+
49+
variable (B C)
50+
51+
/-- A strictly unitary lax functor `F` between bicategories `B` and `C` is a
52+
lax functor `F` from `B` to `C` such that the structure 1-cell
53+
`𝟙 (obj X) ⟶ map (𝟙 X)` is in fact an identity 1-cell for every `X : B`. -/
54+
@[kerodon 008R]
55+
structure StrictlyUnitaryLaxFunctor extends LaxFunctor B C where
56+
map_id (X : B) : map (𝟙 X) = 𝟙 (obj X)
57+
mapId_eq_eqToHom (X : B) : (mapId X) = eqToHom (map_id X).symm
58+
59+
/-- A helper structure that bundles the necessary data to
60+
construct a `StrictlyUnitaryLaxFunctor` without specifying the redundant
61+
field `mapId`. -/
62+
structure StrictlyUnitaryLaxFunctorCore where
63+
/-- action on objects -/
64+
obj : B → C
65+
/-- action on 1-morhisms -/
66+
map : ∀ {X Y : B}, (X ⟶ Y) → (obj X ⟶ obj Y)
67+
map_id : ∀ (X : B), map (𝟙 X) = 𝟙 (obj X)
68+
/-- action on 2-morphisms -/
69+
map₂ : ∀ {a b : B} {f g : a ⟶ b}, (f ⟶ g) → (map f ⟶ map g)
70+
map₂_id : ∀ {a b : B} (f : a ⟶ b), map₂ (𝟙 f) = 𝟙 (map f) := by aesop_cat
71+
map₂_comp :
72+
∀ {a b : B} {f g h : a ⟶ b} (η : f ⟶ g) (θ : g ⟶ h),
73+
map₂ (η ≫ θ) = map₂ η ≫ map₂ θ := by
74+
aesop_cat
75+
/-- structure 2-morphism for composition of 1-morphism -/
76+
mapComp : ∀ {a b c : B} (f : a ⟶ b) (g : b ⟶ c),
77+
map f ≫ map g ⟶ map (f ≫ g)
78+
mapComp_naturality_left :
79+
∀ {a b c : B} {f f' : a ⟶ b} (η : f ⟶ f') (g : b ⟶ c),
80+
mapComp f g ≫ map₂ (η ▷ g) = map₂ η ▷ map g ≫ mapComp f' g := by
81+
aesop_cat
82+
mapComp_naturality_right :
83+
∀ {a b c : B} (f : a ⟶ b) {g g' : b ⟶ c} (η : g ⟶ g'),
84+
mapComp f g ≫ map₂ (f ◁ η) = map f ◁ map₂ η ≫ mapComp f g' := by
85+
aesop_cat
86+
map₂_leftUnitor :
87+
∀ {a b : B} (f : a ⟶ b),
88+
map₂ (λ_ f).inv =
89+
(λ_ (map f)).inv ≫ eqToHom (by rw [map_id a]) ≫ mapComp (𝟙 a) f := by
90+
aesop_cat
91+
map₂_rightUnitor :
92+
∀ {a b : B} (f : a ⟶ b),
93+
map₂ (ρ_ f).inv =
94+
(ρ_ (map f)).inv ≫ eqToHom (by rw [map_id b]) ≫ mapComp f (𝟙 b) := by
95+
aesop_cat
96+
map₂_associator :
97+
∀ {a b c d : B} (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d),
98+
mapComp f g ▷ map h ≫ mapComp (f ≫ g) h ≫ map₂ (α_ f g h).hom =
99+
(α_ (map f) (map g) (map h)).hom ≫ map f ◁ mapComp g h ≫
100+
mapComp f (g ≫ h) := by
101+
aesop_cat
102+
103+
namespace StrictlyUnitaryLaxFunctor
104+
105+
variable {B C}
106+
107+
/-- An alternate constructor for strictly unitary lax functors that does not
108+
require the `mapId` fields, and that adapts the `map₂_leftUnitor` and
109+
`map₂_rightUnitor` to the fact that the functor is strictly unitary. -/
110+
@[simps]
111+
def mk' (S : StrictlyUnitaryLaxFunctorCore B C) :
112+
StrictlyUnitaryLaxFunctor B C where
113+
obj := S.obj
114+
map := S.map
115+
map_id := S.map_id
116+
mapId x := eqToHom (S.map_id x).symm
117+
mapId_eq_eqToHom x := rfl
118+
map₂ := S.map₂
119+
map₂_id := S.map₂_id
120+
map₂_comp := S.map₂_comp
121+
mapComp := S.mapComp
122+
mapComp_naturality_left := S.mapComp_naturality_left
123+
mapComp_naturality_right := S.mapComp_naturality_right
124+
map₂_leftUnitor f := by
125+
simpa using S.map₂_leftUnitor f
126+
map₂_rightUnitor f := by
127+
simpa using S.map₂_rightUnitor f
128+
map₂_associator f g h := by
129+
simpa using S.map₂_associator f g h
130+
131+
instance mapId_isIso (F : StrictlyUnitaryLaxFunctor B C) (x : B) :
132+
IsIso (F.mapId x) := by
133+
rw [mapId_eq_eqToHom]
134+
infer_instance
135+
136+
/-- Promote the morphism `F.mapId x : 𝟙 (F.obj x) ⟶ F.map (𝟙 x)`
137+
to an isomorphism when `F` is strictly unitary. -/
138+
@[simps]
139+
def mapIdIso (F : StrictlyUnitaryLaxFunctor B C) (x : B) :
140+
𝟙 (F.obj x) ≅ F.map (𝟙 x) where
141+
hom := F.mapId x
142+
inv := eqToHom (F.map_id x)
143+
hom_inv_id := by simp [F.mapId_eq_eqToHom]
144+
inv_hom_id := by simp [F.mapId_eq_eqToHom]
145+
146+
variable (B) in
147+
/-- The identity `StrictlyUnitaryLaxFunctor`. -/
148+
@[simps!]
149+
def id : StrictlyUnitaryLaxFunctor B B where
150+
__ := LaxFunctor.id B
151+
map_id _ := rfl
152+
mapId_eq_eqToHom _ := rfl
153+
154+
/-- Composition of `StrictlyUnitaryLaxFunctor`. -/
155+
@[simps!]
156+
def comp (F : StrictlyUnitaryLaxFunctor B C)
157+
(G : StrictlyUnitaryLaxFunctor C D) :
158+
StrictlyUnitaryLaxFunctor B D where
159+
__ := LaxFunctor.comp F.toLaxFunctor G.toLaxFunctor
160+
map_id _ := by simp [StrictlyUnitaryLaxFunctor.map_id]
161+
mapId_eq_eqToHom _ := by
162+
simp [StrictlyUnitaryLaxFunctor.mapId_eq_eqToHom,
163+
PrelaxFunctor.map₂_eqToHom]
164+
165+
section
166+
attribute [local ext] StrictlyUnitaryLaxFunctor
167+
168+
/-- Composition of `StrictlyUnitaryLaxFunctor` is strictly right unitary -/
169+
lemma comp_id (F : StrictlyUnitaryLaxFunctor B C) :
170+
F.comp (.id C) = F := by
171+
ext
172+
· simp
173+
all_goals
174+
· rw [heq_iff_eq]
175+
ext
176+
simp
177+
178+
/-- Composition of `StrictlyUnitaryLaxFunctor` is strictly left unitary -/
179+
lemma id_comp (F : StrictlyUnitaryLaxFunctor B C) :
180+
(StrictlyUnitaryLaxFunctor.id B).comp F = F := by
181+
ext
182+
· simp
183+
all_goals
184+
· rw [heq_iff_eq]
185+
ext
186+
simp
187+
188+
/-- Composition of `StrictlyUnitaryLaxFunctor` is strictly associative -/
189+
lemma comp_assoc {E : Type u₄} [Bicategory.{w₄, v₄} E]
190+
(F : StrictlyUnitaryLaxFunctor B C) (G : StrictlyUnitaryLaxFunctor C D)
191+
(H : StrictlyUnitaryLaxFunctor D E) :
192+
(F.comp G).comp H = F.comp (G.comp H) := by
193+
ext
194+
· simp
195+
all_goals
196+
· rw [heq_iff_eq]
197+
ext
198+
simp
199+
200+
end
201+
202+
end StrictlyUnitaryLaxFunctor
203+
204+
/-- A strictly unitary pseudofunctor (sometimes called a "normal homomorphism)
205+
`F` between bicategories `B` and `C` is a lax functor `F` from `B` to `C`
206+
such that the structure isomorphism `map (𝟙 X) ≅ 𝟙 (F.obj X)` is in fact an
207+
identity 1-cell for every `X : B` (in particular, there is an equality
208+
`F.map (𝟙 X) = 𝟙 (F.obj x)`). -/
209+
@[kerodon 008R]
210+
structure StrictlyUnitaryPseudofunctor extends Pseudofunctor B C where
211+
map_id (X : B) : map (𝟙 X) = 𝟙 (obj X)
212+
mapId_eq_eqToIso (X : B) : (mapId X) = eqToIso (map_id X)
213+
214+
/-- A helper structure that bundles the necessary data to
215+
construct a `StrictlyUnitaryPseudofunctor` without specifying the redundant
216+
field `mapId` -/
217+
structure StrictlyUnitaryPseudofunctorCore where
218+
/-- action on objects -/
219+
obj : B → C
220+
/-- action on 1-morphisms -/
221+
map : ∀ {X Y : B}, (X ⟶ Y) → (obj X ⟶ obj Y)
222+
map_id : ∀ (X : B), map (𝟙 X) = 𝟙 (obj X)
223+
/-- action on 2-morphisms -/
224+
map₂ : ∀ {a b : B} {f g : a ⟶ b}, (f ⟶ g) → (map f ⟶ map g)
225+
map₂_id : ∀ {a b : B} (f : a ⟶ b), map₂ (𝟙 f) = 𝟙 (map f) := by aesop_cat
226+
map₂_comp :
227+
∀ {a b : B} {f g h : a ⟶ b} (η : f ⟶ g) (θ : g ⟶ h),
228+
map₂ (η ≫ θ) = map₂ η ≫ map₂ θ := by
229+
aesop_cat
230+
/-- structure 2-isomorphism for composition of 1-morphisms -/
231+
mapComp : ∀ {a b c : B} (f : a ⟶ b) (g : b ⟶ c),
232+
map (f ≫ g) ≅ map f ≫ map g
233+
map₂_whisker_left :
234+
∀ {a b c : B} (f : a ⟶ b) {g h : b ⟶ c} (η : g ⟶ h),
235+
map₂ (f ◁ η) =
236+
(mapComp f g).hom ≫ map f ◁ map₂ η ≫ (mapComp f h).inv := by
237+
aesop_cat
238+
map₂_whisker_right :
239+
∀ {a b c : B} {f g : a ⟶ b} (η : f ⟶ g) (h : b ⟶ c),
240+
map₂ (η ▷ h) =
241+
(mapComp f h).hom ≫ map₂ η ▷ map h ≫ (mapComp g h).inv := by
242+
aesop_cat
243+
map₂_left_unitor :
244+
∀ {a b : B} (f : a ⟶ b),
245+
map₂ (λ_ f).hom =
246+
(mapComp (𝟙 a) f).hom ≫ eqToHom (by rw [map_id a]) ≫
247+
(λ_ (map f)).hom := by
248+
aesop_cat
249+
map₂_right_unitor :
250+
∀ {a b : B} (f : a ⟶ b),
251+
map₂ (ρ_ f).hom =
252+
(mapComp f (𝟙 b)).hom ≫ eqToHom (by rw [map_id b]) ≫
253+
(ρ_ (map f)).hom := by
254+
aesop_cat
255+
map₂_associator :
256+
∀ {a b c d : B} (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d),
257+
map₂ (α_ f g h).hom =
258+
(mapComp (f ≫ g) h).hom ≫ (mapComp f g).hom ▷ map h ≫
259+
(α_ (map f) (map g) (map h)).hom ≫ map f ◁ (mapComp g h).inv ≫
260+
(mapComp f (g ≫ h)).inv := by
261+
aesop_cat
262+
263+
namespace StrictlyUnitaryPseudofunctor
264+
265+
variable {B C}
266+
267+
/-- An alternate constructor for strictly unitary lax functors that does not
268+
require the `mapId` fields, and that adapts the `map₂_leftUnitor` and
269+
`map₂_rightUnitor` to the fact that the functor is strictly unitary. -/
270+
@[simps]
271+
def mk' (S : StrictlyUnitaryPseudofunctorCore B C) :
272+
StrictlyUnitaryPseudofunctor B C where
273+
obj := S.obj
274+
map := S.map
275+
map_id := S.map_id
276+
mapId x := eqToIso (S.map_id x)
277+
mapId_eq_eqToIso x := rfl
278+
map₂ := S.map₂
279+
map₂_id := S.map₂_id
280+
map₂_comp := S.map₂_comp
281+
mapComp := S.mapComp
282+
map₂_left_unitor f := by
283+
simpa using S.map₂_left_unitor f
284+
map₂_right_unitor f := by
285+
simpa using S.map₂_right_unitor f
286+
map₂_associator f g h := by
287+
simpa using S.map₂_associator f g h
288+
map₂_whisker_left f _ _ η := by
289+
simpa using S.map₂_whisker_left f η
290+
map₂_whisker_right η f := by
291+
simpa using S.map₂_whisker_right η f
292+
293+
/-- By forgetting the inverse to `mapComp`, a `StrictlyUnitaryPseudofunctor`
294+
is a `StrictlyUnitaryLaxFunctor`. -/
295+
def toStrictlyUnitaryLaxFunctor (F : StrictlyUnitaryPseudofunctor B C) :
296+
StrictlyUnitaryLaxFunctor B C where
297+
__ := F.toPseudofunctor.toLax
298+
map_id x := by simp [F.map_id]
299+
mapId_eq_eqToHom x := by simp [F.mapId_eq_eqToIso]
300+
301+
section
302+
303+
variable (F : StrictlyUnitaryPseudofunctor B C)
304+
305+
@[simp]
306+
lemma toStrictlyUnitaryLaxFunctor_obj (x : B) :
307+
F.toStrictlyUnitaryLaxFunctor.obj x = F.obj x :=
308+
rfl
309+
310+
@[simp]
311+
lemma toStrictlyUnitaryLaxFunctor_map {x y : B} (f : x ⟶ y) :
312+
F.toStrictlyUnitaryLaxFunctor.map f = F.map f :=
313+
rfl
314+
315+
@[simp]
316+
lemma toStrictlyUnitaryLaxFunctor_map₂ {x y : B} {f g : x ⟶ y} (η : f ⟶ g) :
317+
F.toStrictlyUnitaryLaxFunctor.map₂ η = F.map₂ η :=
318+
rfl
319+
320+
@[simp]
321+
lemma toStrictlyUnitaryLaxFunctor_mapComp {x y z : B} (f : x ⟶ y) (g : y ⟶ z) :
322+
F.toStrictlyUnitaryLaxFunctor.mapComp f g = (F.mapComp f g).inv :=
323+
rfl
324+
325+
@[simp]
326+
lemma toStrictlyUnitaryLaxFunctor_mapId {x : B} :
327+
F.toStrictlyUnitaryLaxFunctor.mapId x = (F.mapId x).inv :=
328+
rfl
329+
330+
variable (B) in
331+
/-- The identity `StrictlyUnitaryPseudofunctor`. -/
332+
@[simps!]
333+
def id : StrictlyUnitaryPseudofunctor B B where
334+
__ := Pseudofunctor.id B
335+
map_id _ := rfl
336+
mapId_eq_eqToIso _ := rfl
337+
338+
/-- Composition of `StrictlyUnitaryPseudofunctor`. -/
339+
@[simps!]
340+
def comp (F : StrictlyUnitaryPseudofunctor B C)
341+
(G : StrictlyUnitaryPseudofunctor C D) :
342+
StrictlyUnitaryPseudofunctor B D where
343+
__ := Pseudofunctor.comp F.toPseudofunctor G.toPseudofunctor
344+
map_id _ := by simp [StrictlyUnitaryPseudofunctor.map_id]
345+
mapId_eq_eqToIso _ := by
346+
ext
347+
simp [StrictlyUnitaryPseudofunctor.mapId_eq_eqToIso,
348+
PrelaxFunctor.map₂_eqToHom]
349+
350+
end
351+
352+
end StrictlyUnitaryPseudofunctor
353+
354+
end CategoryTheory

0 commit comments

Comments
 (0)