module Cat.Functor.Dense where

Dense subcategoriesπŸ”—

A subcategory of a locally category (hence a fully faithful functor is called dense if objects of are generated under colimits by those of in a certain canonical way. In particular, any functor and object can be put into a diagram

where is the projection functor from the corresponding comma category, in such a way that the object is the nadir of a cocone over

  dense-cocone : βˆ€ d β†’ F F∘ Dom F (const! d) => Const d
  dense-cocone d .Ξ· x = x .map
  dense-cocone d .is-natural _ _ f = f .sq

  is-dense : Type _
  is-dense = βˆ€ d β†’ is-colimit {J = F β†˜ d} (F F∘ Dom _ _) d (dense-cocone d)

The functor is called dense if this cocone is colimiting for every The importance of density is that, for a dense functor the induced nerve functor is fully faithful.

  is-dense→nerve-is-ff : is-dense → is-fully-faithful (Nerve F)
  is-dense→nerve-is-ff is-dense = is-iso→is-equiv $ iso inv invr invl where
    module is-dense d = is-colimit (is-dense d)

    inv : βˆ€ {x y} β†’ (Nerve F .Fβ‚€ x => Nerve F .Fβ‚€ y) β†’ D.Hom x y
    inv nt =
      is-dense.universal _
        (Ξ» j β†’ nt .Ξ· _ (j .map))
        Ξ» f β†’ sym (nt .is-natural _ _ _ $β‚š _) βˆ™ ap (nt .Ξ· _) (f .sq βˆ™ D.idl _)

    invr : βˆ€ {x y} (f : Nerve F .Fβ‚€ x => Nerve F .Fβ‚€ y) β†’ Nerve F .F₁ (inv f) ≑ f
    invr f = ext Ξ» x i β†’ is-dense.factors _ {j = ↓obj i} _ _

    invl : βˆ€ {x y} (f : D.Hom x y) β†’ inv (Nerve F .F₁ f) ≑ f
    invl f = sym $ is-dense.unique _ _ _ f (Ξ» _ β†’ refl)

Another way of putting this is that probes by a dense subcategory are enough to tell morphisms (and so objects) in the ambient category apart.

  dense→separating
    : is-dense
    β†’ {X Y : D.Ob} {f g : D.Hom X Y}
    β†’ (βˆ€ {Z} (h : D.Hom (F.β‚€ Z) X) β†’ f D.∘ h ≑ g D.∘ h)
    β†’ f ≑ g
  dense→separating dense h =
    fully-faithful→faithful {F = Nerve F} (is-dense→nerve-is-ff dense) $
      ext Ξ» x g β†’ h g