module Cat.Functor.Kan.Adjoint where
Adjoints are Kan extensionsđ
One way to think about Kan extensions is that, when they exist, they allow us to âcomposeâ two functors when one of them is going the wrong way: given a span
we get a âcompositeâ With this perspective in mind, itâs reasonable to expect that, if has an inverse the composite we get should be the actual composite
In fact, we can do better: if
only has a right adjoint
(which we can think of as a directed inverse), then the induced precomposite adjunction
means that left (global) Kan extensions along
are given by precomposition with
(and, dually, right Kan extensions along
are given by precomposition with
module _ {F : Functor C D} {G : Functor D C} (FâŁG : F ⣠G) where adjointâis-lan : (H : Functor C E) â is-lan F H (H Fâ G) (precomposite-adjunction FâŁG .unit .η H) adjointâis-lan = adjoint-precomposeâLan F (precompose G) (precomposite-adjunction FâŁG)
A more common way to say this is that
is the absolute
left Kan extension of
along the identity; this is essentially a reformulation of the above
fact:
adjointâis-lan-id : is-lan F Id G (FâŁG .unit) adjointâis-lan-id = transport (λ i â is-lan F Id (Fâ-idl i) (fixNT i)) (adjointâis-lan Id) where fixNT : PathP (λ i â Id => Fâ-idl {F = G} i Fâ F) _ _ fixNT = Nat-pathp refl (λ i â Fâ-idl i Fâ F) (λ _ â refl) adjointâis-absolute-lan : is-absolute-lan adjointâis-lan-id adjointâis-absolute-lan H = transport (λ i â is-lan F (Fâ-idr (~ i)) (H Fâ G) (fixNT (~ i))) (adjointâis-lan H) where fixNT : PathP (λ i â Fâ-idr {F = H} i => (H Fâ G) Fâ F) _ _ fixNT = Nat-pathp Fâ-idr refl (λ _ â refl)
The dual statement is obtained by⊠duality, this time using the
counit
of the precomposite
adjunction:
module _ {F : Functor C D} {G : Functor D C} (FâŁG : F ⣠G) where adjointâis-ran : (H : Functor D E) â is-ran G H (H Fâ F) (precomposite-adjunction FâŁG .counit .η H) adjointâis-ran H = transport (λ i â is-ran G H (fixF i) (fixNT i)) (is-co-lan'âis-ran G H (adjointâis-lan (opposite-adjunction FâŁG) (Functor.op H))) where fixF : Functor.op (Functor.op H Fâ Functor.op F) ⥠H Fâ F fixF = Functor-path (λ _ â refl) (λ _ â refl) fixNT : PathP (λ i â fixF i Fâ G => H) _ _ fixNT = Nat-pathp (λ i â fixF i Fâ G) refl (λ _ â refl)
Even more dually, we can flip the span above to get a cospan of functors, giving rise to the theory of Kan lifts. We then get analogous statements: left (resp. right) adjoints are absolute left (resp. right) Kan lifts along the identity.