module Cat.Functor.Kan.Duality where
private
variable
: Level
o ā : Precategory o ā C C' D
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.
module _ (p : Functor C C') (F : Functor C D) where
open Ran
open Lan
open is-ran
open is-lan
open _=>_
co-unitācounit: ā {G : Functor (C' ^op) (D ^op)}
ā Functor.op F => G Fā Functor.op p
ā Functor.op G Fā p => F
co-unitācounit: ā {G : Functor C' D}
ā G Fā p => F
ā Functor.op F => Functor.op G Fā Functor.op p
counitāco-unit: ā {G : Functor (C' ^op) (D ^op)}
ā G Fā Functor.op p => Functor.op F
ā F => Functor.op G Fā p
counitāco-unit: ā {G : Functor C' D}
ā F => G Fā p
ā Functor.op G Fā Functor.op p => Functor.op F
unquoteDef co-unitācounit = define-dualiser co-unitācounit
unquoteDef co-unitācounit = define-dualiser co-unitācounit
unquoteDef counitāco-unit = define-dualiser counitāco-unit
unquoteDef counitāco-unit = define-dualiser counitāco-unit
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)
{G = G} {eta = eta} is-lan = ran where
is-co-lan'āis-ran module lan = is-lan is-lan
: is-ran p F (Functor.op G) (co-unitācounit eta)
ran .Ļ {M = M} Ī± = op (lan.Ļ Ī±') where
ran unquoteDecl Ī±' = dualise-into Ī±'
(Functor.op F => Functor.op M Fā Functor.op p)
Ī±
.Ļ-comm = ext (lan.Ļ-comm Ī·ā_)
ran .Ļ-uniq {M = M} {Ļ' = Ļ'} p = ext Ī» x ā
ran .Ļ-uniq {Ļ' = dualise! Ļ'} (reext! p) Ī·ā x lan
-- This is identical to is-co-lan'āis-ran, but we push the Functor.op
-- into the is-lan, which is what you want when not dealing with Lan.
is-co-lanāis-ran: {G : Functor C' D} {eps : G Fā p => F}
ā is-lan (Functor.op p) (Functor.op F) (Functor.op G) (co-unitācounit eps)
ā is-ran p F G eps
{G = G} {eps} lan = ran where
is-co-lanāis-ran module lan = is-lan lan
: is-ran p F G eps
ran .Ļ {M = M} Ī± = op (lan.Ļ Ī±') where
ran unquoteDecl Ī±' = dualise-into Ī±'
(Functor.op F => Functor.op M Fā Functor.op p)
Ī±.Ļ-comm = ext (lan.Ļ-comm Ī·ā_)
ran .Ļ-uniq {M = M} {Ļ' = Ļ'} p = ext Ī» x ā
ran .Ļ-uniq {Ļ' = dualise! Ļ'} (reext! p) Ī·ā x
lan
is-ranāis-co-lan: ā {Ext : Functor C' D} {eta : Ext Fā p => F}
ā is-ran p F Ext eta
ā is-lan (Functor.op p) (Functor.op F) (Functor.op Ext) (co-unitācounit eta)
{Ext = Ext} is-ran = lan where
is-ranāis-co-lan module ran = is-ran is-ran
: is-lan (Functor.op p) (Functor.op F) (Functor.op Ext) _
lan .Ļ {M = M} Ī± = Ļ' where
lan unquoteDecl Ī±' = dualise-into Ī±' (Functor.op M Fā p => F) Ī±
unquoteDecl Ļ' = dualise-into Ļ' (Functor.op Ext => M) (ran.Ļ Ī±')
.Ļ-comm = ext (ran.Ļ-comm Ī·ā_)
lan .Ļ-uniq {M = M} {Ļ' = Ļ'} p = ext Ī» x ā
lan .Ļ-uniq {Ļ' = dualise! Ļ'} (reext! p) Ī·ā x
ran
: Lan (Functor.op p) (Functor.op F) ā Ran p F
Co-lanāRan .Ext = Functor.op (lan .Ext)
Co-lanāRan lan .eps = co-unitācounit (lan .eta)
Co-lanāRan lan .has-ran = is-co-lan'āis-ran (lan .has-lan)
Co-lanāRan lan
: Ran p F ā Lan (Functor.op p) (Functor.op F)
RanāCo-lan .Ext = Functor.op (ran .Ext)
RanāCo-lan ran .eta = co-unitācounit (ran .eps)
RanāCo-lan ran .has-lan = is-ranāis-co-lan (ran .has-ran)
RanāCo-lan ran
is-co-ran'āis-lan: {G : Functor (C' ^op) (D ^op)} {eps : G Fā Functor.op p => Functor.op F}
ā is-ran (Functor.op p) (Functor.op F) G eps
ā is-lan p F (Functor.op G) (counitāco-unit eps)
{G = G} {eps} is-ran = lan where
is-co-ran'āis-lan module ran = is-ran is-ran
: is-lan p F (Functor.op G) (counitāco-unit eps)
lan .Ļ {M = M} Ī² = op (ran.Ļ Ī²') where
lan unquoteDecl Ī²' = dualise-into Ī²'
(Functor.op M Fā Functor.op p => Functor.op F)
Ī².Ļ-comm = ext (ran.Ļ-comm Ī·ā_)
lan .Ļ-uniq {M = M} {Ļ' = Ļ'} p = ext Ī» x ā
lan .Ļ-uniq {Ļ' = dualise! Ļ'} (reext! p) Ī·ā x
ran
is-co-ranāis-lan: ā {G : Functor C' D} {eta}
ā is-ran (Functor.op p) (Functor.op F) (Functor.op G) (counitāco-unit eta)
ā is-lan p F G eta
{G = G} {eta} is-ran = lan where
is-co-ranāis-lan module ran = is-ran is-ran
: is-lan p F G eta
lan .Ļ {M = M} Ī² = op (ran.Ļ Ī²') where
lan unquoteDecl Ī²' = dualise-into Ī²'
(Functor.op M Fā Functor.op p => Functor.op F)
Ī².Ļ-comm = ext (ran.Ļ-comm Ī·ā_)
lan .Ļ-uniq {M = M} {Ļ' = Ļ'} p = ext Ī» x ā
lan .Ļ-uniq {Ļ' = dualise! Ļ'} (reext! p) Ī·ā x
ran
is-lanāis-co-ran: ā {G : Functor C' D} {eps : F => G Fā p}
ā is-lan p F G eps
ā is-ran (Functor.op p) (Functor.op F) (Functor.op G) (counitāco-unit eps)
{G = G} is-lan = ran where
is-lanāis-co-ran module lan = is-lan is-lan
: is-ran (Functor.op p) (Functor.op F) (Functor.op G) _
ran .Ļ {M = M} Ī² = Ļ' where
ran unquoteDecl Ī²' = dualise-into Ī²' (F => Functor.op M Fā p) Ī²
unquoteDecl Ļ' = dualise-into Ļ' (M => Functor.op G) (lan.Ļ Ī²')
.Ļ-comm = ext (lan.Ļ-comm Ī·ā_)
ran .Ļ-uniq {M = M} {Ļ' = Ļ'} p = ext Ī» x ā
ran .Ļ-uniq {Ļ' = dualise! Ļ'} (reext! p) Ī·ā x
lan
: Ran (Functor.op p) (Functor.op F) ā Lan p F
Co-ranāLan .Ext = Functor.op (ran .Ext)
Co-ranāLan ran .eta = counitāco-unit (ran .eps)
Co-ranāLan ran .has-lan = is-co-ran'āis-lan (ran .has-ran)
Co-ranāLan ran
: Lan p F ā Ran (Functor.op p) (Functor.op F)
LanāCo-ran .Ext = Functor.op (lan .Ext)
LanāCo-ran lan .eps = counitāco-unit (lan .eta)
LanāCo-ran lan .has-ran = is-lanāis-co-ran (lan .has-lan) LanāCo-ran lan