module Cat.Functor.Kan.Duality where

Duality for Kan extensionsšŸ”—

Left Kan extensions are dual to right Kan extensions. This is straightforward enough to prove, but does involve some bureaucracy involving opposite categories.

  is-co-lan'ā†’is-ran
    : āˆ€ {G : Functor (C' ^op) (D ^op)} {eta : Functor.op F => G Fāˆ˜ Functor.op p}
    ā†’ is-lan (Functor.op p) (Functor.op F) G eta
    ā†’ is-ran p F (Functor.op G) (co-unitā†’counit eta)
  is-co-lan'ā†’is-ran {G = G} {eta = eta} is-lan = ran where
    module lan = is-lan is-lan

    ran : is-ran p F (Functor.op G) (co-unitā†’counit eta)
    ran .Ļƒ {M = M} Ī± = op (lan.Ļƒ Ī±') where
      unquoteDecl Ī±' = dualise-into Ī±'
        (Functor.op F => Functor.op M Fāˆ˜ Functor.op p)
        Ī±

    ran .Ļƒ-comm = ext (lan.Ļƒ-comm Ī·ā‚š_)
    ran .Ļƒ-uniq {M = M} {Ļƒ' = Ļƒ'} p = ext Ī» x ā†’
      lan.Ļƒ-uniq {Ļƒ' = dualise! Ļƒ'} (reext! p) Ī·ā‚š x