|
| 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.discrete_category |
| 7 | +import category_theory.bicategory.functor |
| 8 | +import category_theory.bicategory.strict |
| 9 | + |
| 10 | +/-! |
| 11 | +# Locally discrete bicategories |
| 12 | +
|
| 13 | +A category `C` can be promoted to a strict bicategory `locally_discrete C`. The objects and the |
| 14 | +1-morphisms in `locally_discrete C` are the same as the objects and the morphisms, respectively, |
| 15 | +in `C`, and the 2-morphisms in `locally_discrete C` are the equalities between 1-morphisms. In |
| 16 | +other words, the category consisting of the 1-morphisms between each pair of objects `X` and `Y` |
| 17 | +in `locally_discrete C` is defined as the discrete category associated with the type `X ⟶ Y`. |
| 18 | +-/ |
| 19 | + |
| 20 | +namespace category_theory |
| 21 | + |
| 22 | +open bicategory discrete |
| 23 | +open_locale bicategory |
| 24 | + |
| 25 | +universes w₂ v v₁ v₂ u u₁ u₂ |
| 26 | + |
| 27 | +variables (C : Type u) |
| 28 | + |
| 29 | +/-- |
| 30 | +A type alias for promoting any category to a bicategory, |
| 31 | +with the only 2-morphisms being equalities. |
| 32 | +-/ |
| 33 | +def locally_discrete := C |
| 34 | + |
| 35 | +namespace locally_discrete |
| 36 | + |
| 37 | +instance : Π [inhabited C], inhabited (locally_discrete C) := id |
| 38 | + |
| 39 | +instance : Π [category_struct.{v} C], category_struct (locally_discrete C) := id |
| 40 | + |
| 41 | +variables {C} [category_struct.{v} C] |
| 42 | + |
| 43 | +instance (X Y : locally_discrete C) : small_category (X ⟶ Y) := |
| 44 | +category_theory.discrete_category (X ⟶ Y) |
| 45 | + |
| 46 | +end locally_discrete |
| 47 | + |
| 48 | +variables (C) [category.{v} C] |
| 49 | + |
| 50 | +/-- |
| 51 | +The locally discrete bicategory on a category is a bicategory in which the objects and the |
| 52 | +1-morphisms are the same as those in the underlying category, and the 2-morphisms are the |
| 53 | +equalities between 1-morphisms. |
| 54 | +-/ |
| 55 | +instance locally_discrete_bicategory : bicategory (locally_discrete C) := |
| 56 | +{ whisker_left := λ X Y Z f g h η, eq_to_hom (congr_arg2 (≫) rfl (eq_of_hom η)), |
| 57 | + whisker_right := λ X Y Z f g η h, eq_to_hom (congr_arg2 (≫) (eq_of_hom η) rfl), |
| 58 | + associator := λ W X Y Z f g h, eq_to_iso (category.assoc f g h), |
| 59 | + left_unitor := λ X Y f, eq_to_iso (category.id_comp f), |
| 60 | + right_unitor := λ X Y f, eq_to_iso (category.comp_id f) } |
| 61 | + |
| 62 | +/-- A locally discrete bicategory is strict. -/ |
| 63 | +instance locally_discrete_bicategory.strict : strict (locally_discrete C) := { } |
| 64 | + |
| 65 | +variables {I : Type u₁} [category.{v₁} I] {B : Type u₂} [bicategory.{w₂ v₂} B] [strict B] |
| 66 | + |
| 67 | +/-- |
| 68 | +If `B` is a strict bicategory and `I` is a (1-)category, any functor (of 1-categories) `I ⥤ B` can |
| 69 | +be promoted to an oplax functor from `locally_discrete I` to `B`. |
| 70 | +-/ |
| 71 | +@[simps] |
| 72 | +def functor.to_oplax_functor (F : I ⥤ B) : oplax_functor (locally_discrete I) B := |
| 73 | +{ map₂ := λ i j f g η, eq_to_hom (congr_arg _ (eq_of_hom η)), |
| 74 | + map_id := λ i, eq_to_hom (F.map_id i), |
| 75 | + map_comp := λ i j k f g, eq_to_hom (F.map_comp f g), |
| 76 | + .. F } |
| 77 | + |
| 78 | +end category_theory |
0 commit comments