module Cat.Functor.Kan.Global
{o ℓ o' ℓ' o'' ℓ''}
{C : Precategory o ℓ}
{C' : Precategory o' ℓ'}
{D : Precategory o'' ℓ''}
(p : Functor C C')
where
Global Kan extensions🔗
Recall that a left Kan extension of along is a universal solution to extending to a functor In particularly happy cases (e.g. when is small and is cocomplete), the left Kan extension along exists for any When this happens, the assignment extends to a functor, which we call a global Kan extension.
private
module D = Cat.Reasoning D
module C = Cat.Reasoning C
module C' = Cat.Reasoning C'
module _ (has-lan : (G : Functor C D) → Lan p G) where
: Functor Cat[ C , D ] Cat[ C' , D ]
Lan-functor .F₀ G = has-lan G .Ext
Lan-functor .F₁ {x} {y} θ =
Lan-functor .σ (has-lan y .eta ∘nt θ)
has-lan x .F-id {x} = has-lan x .σ-uniq (ext λ _ → D.id-comm)
Lan-functor .F-∘ {x} {y} {z} f g =
Lan-functor .σ-uniq $ ext λ a → sym $
has-lan x .pullr (has-lan x .σ-comm ηₚ a)
D.extendl (has-lan y .σ-comm ηₚ a) ∙ D
Functoriality follows, essentially, from the fact that left Kan extensions are universal: we can map between them in a functorial way using only the defining natural transformations in the diagram, without appealing to the details of a particular computation. Moreover, the left Kan extension functor itself has a universal property: it is a left adjoint to the precomposition functor
: Lan-functor ⊣ precompose p
Lan⊣precompose = hom-iso→adjoints f (is-iso→is-equiv eqv) natural where
Lan⊣precompose : ∀ {x : Functor C D} {y : Functor C' D} → has-lan x .Ext => y → x => y F∘ p
f {x} {y} θ = (θ ◂ p) ∘nt has-lan x .eta
f
open is-iso
: ∀ {x} {y} → is-iso (f {x} {y})
eqv {x} {y} .inv θ = has-lan _ .σ θ
eqv {x} {y} .rinv θ = has-lan x .σ-comm
eqv {x} {y} .linv θ = has-lan _ .σ-uniq refl
eqv
: hom-iso-natural {L = Lan-functor} {precompose p} f
natural {b = b} g h x = ext λ a →
natural .pullr (D.pullr (has-lan _ .σ-comm ηₚ a))
D._∘_ refl (D.pushr refl) ∙ ap₂ D
And, since adjoints are unique, if has any left adjoint, then its values generate Kan extensions:
adjoint-precompose→Lan: (F : Functor Cat[ C , D ] Cat[ C' , D ])
→ (adj : F ⊣ precompose p)
→ (G : Functor C D)
→ is-lan p G (F .F₀ G) (adj ._⊣_.unit .η G)
= extn where
adjoint-precompose→Lan F adj G open Lan
open is-lan
module adj = _⊣_ adj
: is-lan p G _ _
extn .σ α = R-adjunct adj α
extn .σ-comm {M = M} {α = α} = ext λ a →
extn .pullr (sym (adj.unit .is-natural _ _ _) ηₚ a)
D.cancell (adj.zag ηₚ a)
∙ D.σ-uniq x = Equiv.injective (_ , L-adjunct-is-equiv adj)
extn (L-R-adjunct adj _ ∙ x)
This in turn implies that adjoints are Kan extensions.