module Cat.Functor.Adjoint.AFT where

The adjoint functor theoremπŸ”—

The adjoint functor theorem states a sufficient condition for a continuous functor from a locally small, complete category to have a left adjoint.

In an ideal world, this would always be the case: we want to compute an initial object in the comma category for each Generalising from the case of partial orders, where a bottom element is the intersection of everything in the poset, we might try to find as the limit of the identity functor on Furthermore, each of these comma categories are complete, by completeness of and continuity of so this functor should have a limit!

Unfortunately, the only categories which can be shown to admit arbitrary limits indexed by themselves are the preorders; The existence of a large-complete non-preorder would contradict excluded middle, which we neither assume nor reject. Therefore, we’re left with the task of finding a condition on the functor which ensures that we can compute the limit of using only small data. The result is a technical device called a solution set.

A solution set (for with respect to is a set together with an family of objects and morphisms which commute in the sense that, for every and there exists a and which satisfy

  record Solution-set (Y : ⌞ D ⌟) : Type (o βŠ” lsuc β„“) where
    field
      {index}    : Type β„“
      has-is-set : is-set index

      dom    : index β†’ ⌞ C ⌟
      map    : βˆ€ i β†’ D.Hom Y (F.β‚€ (dom i))
      factor : βˆ€ {X'} (h : D.Hom Y (F.β‚€ X')) β†’ βˆƒ[ i ∈ index ] (Ξ£[ t ∈ C.Hom (dom i) X' ] (h ≑ F.₁ t D.∘ map i))

Put another way, has a solution set with respect to if the comma category has a weakly initial family of objects, given by the and their domains, with the complicated factoring condition corresponding to weak initiality.

  module _ {X} (S :  Solution-set X) where
    solution-setβ†’family : S .index β†’ ⌞ X ↙ F ⌟
    solution-set→family i .x = tt
    solution-set→family i .y = S .dom i
    solution-set→family i .map = S .map i

    solution-set→family-is-weak-initial
      : is-weak-initial-fam (X ↙ F) solution-setβ†’family
    solution-set→family-is-weak-initial Y = do
      (i , t , p) ← S .factor (Y .map)
      pure (i , ↓hom (D.elimr refl βˆ™ p))

Then, we can put together the adjoint functor theorem, by showing that the sea has risen above it:

  • Since is small-complete and is small-continuous, then each comma category is small-complete, by limits in comma categories;
  • Each has a weakly initial family, and all small equalisers, so they all have initial objects;
  • An initial object for is exactly a universal morphism into and if admits all universal maps, then it has a left adjoint.
  solution-set→left-adjoint
    : is-complete β„“ β„“ C
    β†’ is-continuous β„“ β„“ F
    β†’ (βˆ€ y β†’ Solution-set y)
    β†’ Ξ£[ G ∈ Functor D C ] G ⊣ F
  solution-set→left-adjoint c-compl F-cont ss =
    _ , universal-maps→left-adjoint init where module _ x where
    instance
      H-Level-ix : βˆ€ {n} β†’ H-Level (ss x .index) (2 + n)
      H-Level-ix = basic-instance 2 (ss x .has-is-set)

    init : Initial (x ↙ F)
    init = is-complete-weak-initialβ†’initial (x ↙ F)
      (solution-set→family (ss x))
      (comma-is-complete F c-compl F-cont)
      (solution-set→family-is-weak-initial (ss x))