module Cat.Functor.Adjoint.Representable {o ℓ} {C : Precategory o ℓ} where
Adjoints in terms of representability🔗
Building upon our characterisation of adjoints as Hom isomorphisms, we now investigate the relationship between adjoint functors and representable functors.
In this section, we show that for a functor to be a right adjoint is equivalent to the functor having a representing object for all .
The forward direction follows directly from the natural isomorphism , which exhibits as a representing object.
right-adjoint→objectwise-rep: ∀ d → Corepresentation (Hom-from D d F∘ R)
.corep = L .F₀ d
right-adjoint→objectwise-rep d .corepresents =
right-adjoint→objectwise-rep d
adjunct-hom-iso-from L⊣R d ni⁻¹
left-adjoint→objectwise-rep: ∀ c → Corepresentation (Hom-into C c F∘ Functor.op L)
.corep = R .F₀ c
left-adjoint→objectwise-rep c .corepresents =
left-adjoint→objectwise-rep c
adjunct-hom-iso-into L⊣R c(sym (Hom-from-op _)) ∘ni path→iso
The other direction should be more surprising: if we only have a family of objects representing the functors , why should we expect them to assemble into a functor ?
We answer the question indirectly1: what is a sufficient
condition for
to have a left adjoint? Well, by our characterisation in terms of universal
morphisms, it should be enough to have initial objects for
each comma
category
.
But we have also established
that a
(covariant) functor into
is representable if and only if its category
of elements has an initial object.
Now we simply observe that the comma category and the category of elements of are exactly the same: both are made out of pairs of an object and a map , with the morphisms between them obtained in the obvious way from morphisms in .
private
: ∀ d → d ↙ R ≡ ∫ C (Hom-from D d F∘ R) ↙≡∫
The proof is by obnoxious data repackaging, so we hide it away.
= Precategory-path F F-is-precat-iso where
↙≡∫ d open is-precat-iso
: Functor (d ↙ R) (∫ C (Hom-from D d F∘ R))
F .F₀ m = elem (m .↓Obj.y) (m .↓Obj.map)
F .F₁ f = elem-hom (f .↓Hom.β) (sym (f .↓Hom.sq) ∙ D.idr _)
F .F-id = Element-hom-path _ _ refl
F .F-∘ f g = Element-hom-path _ _ refl
F
: is-precat-iso F
F-is-precat-iso .has-is-iso = is-iso→is-equiv is where
F-is-precat-iso : is-iso (F .F₀)
is .is-iso.inv e = ↓obj (e .Element.section)
is .is-iso.rinv e = refl
is .is-iso.linv o = ↓Obj-path _ _ refl refl refl
is .has-is-ff = is-iso→is-equiv is where
F-is-precat-iso : is-iso (F .F₁)
is .is-iso.inv h = ↓hom (D.idr _ ∙ sym (h .Element-hom.commute))
is .is-iso.rinv h = Element-hom-path _ _ refl
is .is-iso.linv h = ↓Hom-path _ _ refl refl is
: ∀ d → Universal-morphism d R
objectwise-rep→universal-maps = subst Initial (sym (↙≡∫ d))
objectwise-rep→universal-maps d (corepresentation→initial-element (corep d))
: Functor D C
objectwise-rep→L = universal-maps→L R objectwise-rep→universal-maps
objectwise-rep→L
: objectwise-rep→L ⊣ R
objectwise-rep→L⊣R = universal-maps→L⊣R R objectwise-rep→universal-maps objectwise-rep→L⊣R
Right adjoints into Sets are representable🔗
For functors into , we can go one step further: under certain conditions, being a right adjoint is equivalent to being representable.
Indeed, if has a left adjoint , then is automatically represented by , the image of the singleton set by , because we have .
open Terminal (Sets-terminal {ℓ})
: Corepresentation R
right-adjoint→corepresentable .corep = L .F₀ top
right-adjoint→corepresentable .corepresents =
right-adjoint→corepresentable (λ _ → equiv→iso (Π-⊤-eqv e⁻¹)) (λ _ → refl)
iso→isoⁿ ∘ni adjunct-hom-iso-from L⊣R top ni⁻¹
Going the other way, if we assume that is copowered over (in other words, that it admits -small indexed coproducts), then any functor with representing object has a left adjoint given by taking copowers of : for any set , we have .
private
open Copowers (λ _ → copowered)
: ∀ X → Corepresentation (Hom-from (Sets ℓ) X F∘ R)
Hom[X,R-]-rep .corep = X ⊗ R-corep .corep
Hom[X,R-]-rep X .corepresents =
Hom[X,R-]-rep X (R-corep .corepresents)
F∘-iso-r
∘ni copower-hom-iso ni⁻¹
: Functor (Sets ℓ) C
corepresentable→L = objectwise-rep→L Hom[X,R-]-rep
corepresentable→L
: corepresentable→L ⊣ R
corepresentable→L⊣R = objectwise-rep→L⊣R Hom[X,R-]-rep corepresentable→L⊣R