module Cat.Functor.Joint where

Families of functorsπŸ”—

This module generalizes properties of functors (fullness, faithfulness, conservativity, etc.) to families of functors For the rest of this section we will fix a family of functors

Swap : Functor K Cat[ C , D ] β†’ Functor C Cat[ K , D ]
Swap F .Fβ‚€ c .Fβ‚€ k = F .Fβ‚€ k .Fβ‚€ c
Swap F .Fβ‚€ c .F₁ f = F .F₁ f .Ξ· c
Swap F .Fβ‚€ c .F-id = F .F-id Ξ·β‚š c
Swap F .Fβ‚€ c .F-∘ f g = F .F-∘ f g Ξ·β‚š c
Swap F .F₁ f .Ξ· k = F .Fβ‚€ k .F₁ f
Swap F .F₁ f .is-natural x y g = sym (F .F₁ g .is-natural _ _ f)
Swap F .F-id = ext Ξ» k β†’ F .Fβ‚€ k .F-id
Swap F .F-∘ f g = ext Ξ» k β†’ F .Fβ‚€ k .F-∘ f g

module _
  {oc β„“c od β„“d}
  {C : Precategory oc β„“c}
  {D : Precategory od β„“d}
  where
  private
    module C = Cat.Reasoning C
    module D = Cat.Reasoning D

A family of functors is jointly faithful when: - For any if for every then

  is-jointly-faithful : (Idx β†’ Functor C D) β†’ Type _
  is-jointly-faithful Fα΅’ =
    βˆ€ {x y} {f g : C.Hom x y} β†’ (βˆ€ i β†’ Fα΅’ i .F₁ f ≑ Fα΅’ i .F₁ g) β†’ f ≑ g

The canonical example of a family of jointly faithful functors are the family of hom-functors indexed by objects of this is a restatment of the coyoneda lemma.

Note that every functor induces a family of functors via the mapping on objects: this family is jointly faithful precisely when is faithful.

  swap-faithful→jointly-faithful
    : (F : Functor K Cat[ C , D ])
    β†’ is-faithful (Swap F)
    β†’ is-jointly-faithful (F .Fβ‚€)
  swap-faithful→jointly-faithful F faithful p = faithful (ext p)

  jointly-faithful→swap-faithful
    : (F : Functor K Cat[ C , D ])
    β†’ is-jointly-faithful (F .Fβ‚€)
    β†’ is-faithful (Swap F)
  jointly-faithfulβ†’swap-faithful F joint p = joint (Ξ» i β†’ p Ξ·β‚š i)

Jointly conservative functorsπŸ”—

A family of functors is jointly conservative when: - For if is an iso for every then is an iso.

  is-jointly-conservative : (Idx β†’ Functor C D) β†’ Type _
  is-jointly-conservative Fα΅’ =
    βˆ€ {x y} {f : C.Hom x y} β†’ (βˆ€ i β†’ D.is-invertible (Fα΅’ i .F₁ f)) β†’ C.is-invertible f

We can also rephrase joint-conservativity as a property of a diagram

  swap-conservative→jointly-conservative
    : (F : Functor K Cat[ C , D ])
    β†’ is-conservative (Swap F)
    β†’ is-jointly-conservative (F .Fβ‚€)
  swap-conservative→jointly-conservative F reflect-iso isos =
    reflect-iso (invertibleβ†’invertibleⁿ (Swap F .F₁ _) isos)

  jointly-conservative→swap-conservative
    : (F : Functor K Cat[ C , D ])
    β†’ is-jointly-conservative (F .Fβ‚€)
    β†’ is-conservative (Swap F)
  jointly-conservative→swap-conservative F reflect-iso isos =
    reflect-iso (Ξ» i β†’ is-invertibleⁿ→is-invertible isos i)

Jointly full functorsπŸ”—

A diagram of functors is jointly full when the functor is full. Explicitly, is jointly full if a family of morphisms that is natural in implies the mere existence of a with

Note that joint fullness must be a property of a diagram of functors, due to the naturality constraint. This

  is-jointly-full : Functor K Cat[ C , D ] β†’ Type _
  is-jointly-full F = is-full (Swap F)

  jointly-full-fibre
    : βˆ€ {x y}
    β†’ (F : Functor K Cat[ C , D ])
    β†’ is-jointly-full F
    β†’ (gα΅’ : βˆ€ i β†’ D.Hom (F .Fβ‚€ i .Fβ‚€ x) (F .Fβ‚€ i .Fβ‚€ y))
    β†’ (βˆ€ {i j} (f : K.Hom i j) β†’ gα΅’ j D.∘ F .F₁ f .Ξ· x ≑ F .F₁ f .Ξ· y D.∘ gα΅’ i)
    β†’ βˆƒ[ f ∈ C.Hom x y ] (βˆ€ i β†’ F .Fβ‚€ i .F₁ f ≑ gα΅’ i)
  jointly-full-fibre F joint-full gα΅’ gα΅’-nat =
    βˆ₯-βˆ₯-map (Ξ£-mapβ‚‚ Ξ» p i β†’ p Ξ·β‚š i) (joint-full (NT gα΅’ Ξ» i j f β†’ gα΅’-nat f))

Jointly fully faithful functorsπŸ”—

A diagram of functors is jointly fully faithful when the functor is fully faithful. Explicitly, is jointly faully faithful if there is an equivalence of natural transformations and morphisms

  is-jointly-fully-faithful : Functor K Cat[ C , D ] β†’ Type _
  is-jointly-fully-faithful F = is-fully-faithful (Swap F)

If a diagram of functors is jointly fully and jointly faithful, then it is jointly fully faithful.

  jointly-full+jointly-faithful→jointly-ff
    : (F : Functor K Cat[ C , D ])
    β†’ is-jointly-full F
    β†’ is-jointly-faithful (F .Fβ‚€)
    β†’ is-jointly-fully-faithful F
  jointly-full+jointly-faithful→jointly-ff F full faithful {x} {y} .is-eqv α =
    is-propβˆ™β†’is-contr img-is-prop $
    βˆ₯-βˆ₯-elim (Ξ» _ β†’ img-is-prop) (Ξ£-mapβ‚‚ (Ξ» p β†’ ext p)) $
    jointly-full-fibre F full (Ξ» i β†’ Ξ± .Ξ· i) (Ξ» f β†’ Ξ± .is-natural _ _ f)
    where
      img-is-prop : is-prop (Ξ£[ f ∈ C.Hom x y ] (Swap F .F₁ f ≑ Ξ±))
      img-is-prop (f , p) (g , q) =
        Ξ£-prop-path (Ξ» f β†’ Nat-is-set (Swap F .F₁ f) Ξ±)
          (faithful (Ξ» i β†’ p Ξ·β‚š i βˆ™ sym (q Ξ·β‚š i)))