module Cat.Functor.Bifunctor.Duality
  {o₁ h₁ oβ‚‚ hβ‚‚ o₃ h₃ : _}
  {C : Precategory o₁ h₁}
  {D : Precategory oβ‚‚ hβ‚‚}
  {E : Precategory o₃ h₃}
  (F : Bifunctor C D E)
  where

DualityπŸ”—

When considering the opposite functor of a bifunctor, we would prefer to get a bifunctor (see also opposite product category).

bop : Bifunctor (C ^op) (D ^op) (E ^op)
bop = make-bifunctor Ξ» where
  .Fβ‚€   β†’ F.Fβ‚€
  .lmap β†’ F.lmap
  .rmap β†’ F.rmap
  .lmap-id β†’ F.lmap-id
  .rmap-id β†’ F.rmap-id
  .lmap-∘ f g β†’ F.lmap-∘ _ _
  .rmap-∘ f g β†’ F.rmap-∘ _ _
  .lrmap  f g β†’ F.rlmap g f

This is compatible with fixing objects in the following sense:

bop-Left : βˆ€ {d : D.Ob} β†’ Functor.op (F.Left d) ≑ Bifunctor.Left bop d
bop-Left = Functor-path (Ξ» x β†’ refl) (Ξ» f β†’ refl)

bop-Right : βˆ€ {c : C.Ob} β†’ Functor.op (F.Right c) ≑ Bifunctor.Right bop c
bop-Right = Functor-path (Ξ» x β†’ refl) (Ξ» f β†’ refl)