module Cat.Bi.Instances.Discrete {o } (C : Precategory o ) where

Locally discrete bicategories🔗

Let be a precategory. We can define a prebicategory by letting the hom-1-categories of be the discrete categories on the Hom-sets of

private
  BHom : C.Ob  C.Ob  Precategory _ _
  BHom x y = Disc! (C.Hom x y)

  Bcompose :  {x y z}  Bifunctor (BHom y z) (BHom x y) (BHom x z)
  Bcompose = make-bifunctor λ where
    .F₀ A B  A C.∘ B
    .lmap  apᵢ (C._∘ _)
    .rmap  apᵢ (_ C.∘_)
    .lmap-id     refl
    .rmap-id     refl
    .lmap-∘ f g  prop!
    .rmap-∘ f g  prop!
    .lrmap  f g  prop!

Locally-discrete : Prebicategory o  
Locally-discrete .Ob  = C.Ob
Locally-discrete .Hom = BHom
Locally-discrete .id  = C.id
Locally-discrete .compose = Bcompose
Locally-discrete .unitor-l = to-natural-iso ni where
  ni : make-natural-iso _ _
  ni .make-natural-iso.eta x = Id≃path.from $ sym (C.idl x)
  ni .make-natural-iso.inv x = Id≃path.from $ C.idl x
  ni .make-natural-iso.eta∘inv x = prop!
  ni .make-natural-iso.inv∘eta x = prop!
  ni .make-natural-iso.natural x y f = prop!
Locally-discrete .unitor-r = to-natural-iso ni where
  ni : make-natural-iso _ _
  ni .make-natural-iso.eta x = Id≃path.from $ sym (C.idr x)
  ni .make-natural-iso.inv x = Id≃path.from $ C.idr x
  ni .make-natural-iso.eta∘inv x = prop!
  ni .make-natural-iso.inv∘eta x = prop!
  ni .make-natural-iso.natural x y f = prop!
Locally-discrete .associator = to-natural-iso ni where
  ni : make-natural-iso _ _
  ni .make-natural-iso.eta x = Id≃path.from $ sym (C.assoc _ _ _)
  ni .make-natural-iso.inv x = Id≃path.from $ C.assoc _ _ _
  ni .make-natural-iso.eta∘inv x = prop!
  ni .make-natural-iso.inv∘eta x = prop!
  ni .make-natural-iso.natural x y f = prop!
Locally-discrete .triangle f g = prop!
Locally-discrete .pentagon f g h i = prop!