module Cat.Diagram.Colimit.Representable where
Representability of colimitsπ
Since colimits are defined by universal property, we can also phrase the definition in terms of an equivalence between
module _ {o β} {J : Precategory β β} {C : Precategory o β} {Dia : Functor J C} where private module C = Cat.Reasoning C open Functor open _=>_ open Corepresentation open Colimit open is-lan
Let be some diagram in If has a colimit then that means that maps out of are in bijection with a product of maps subject to some conditions.
Lim[C[F-,=]] : Functor C (Sets β) Lim[C[F-,=]] .Fβ c = el (Dia => Const c) Nat-is-set Lim[C[F-,=]] .Fβ f Ξ± = constβΏ f βnt Ξ± Lim[C[F-,=]] .F-id = ext Ξ» _ _ β C.idl _ Lim[C[F-,=]] .F-β _ _ = ext Ξ» _ _ β sym $ C.assoc _ _ _ Hom-into-inj : β {c : C.Ob} (eta : Dia => Const c) β Hom-from C c => Lim[C[F-,=]] Hom-into-inj eta .Ξ· x f = constβΏ f βnt eta Hom-into-inj eta .is-natural x y f = ext Ξ» g _ β sym $ C.assoc _ _ _ representsβis-colimit : β {c : C.Ob} {eta : Dia => Const c} β is-invertibleβΏ (Hom-into-inj eta) β is-colimit Dia c eta representsβis-colimit {c} {eta} nat-inv = colim where module nat-inv = is-invertibleβΏ nat-inv colim : is-colimit Dia c eta colim .Ο {M} Ξ± = !constβΏ (nat-inv.inv .Ξ· _ (to-coconeβΏ Ξ±)) colim .Ο-comm {M} {Ξ±} = ext Ξ» j β unext nat-inv.invl _ _ j colim .Ο-uniq {M} {Ξ±} {Ο'} q = ext Ξ» j β nat-inv.inv .Ξ· _ (to-coconeβΏ β Ξ± β) β‘β¨ ap! q β©β‘ nat-inv.inv .Ξ· _ β to-coconeβΏ ((Ο' β !F) βnt eta) β β‘β¨ ap! trivial! β©β‘ nat-inv.inv .Ξ· _ ((!constβΏ (Ο' .Ξ· tt) β !F) βnt eta) β‘β¨ unext nat-inv.invr _ _ β©β‘ Ο' .Ξ· tt β