module Cat.Instances.Presheaf.Exponentials {β} (C : Precategory β β) where
private module C = Cat C module PSh = Cat (PSh β C) open Lim β C open Binary-products (PSh β C) PSh-products open Functor open _=>_ open _β£_
Exponential objects in presheaf categoriesπ
This module presents a construction of exponential objects in presheaf categories. First, weβll use the Yoneda lemma to divine what the answer should be, and then weβll use that to finish the actual construction. First, fix a pair of presheaves and over some category and suppose that the exponential object exists.
module _ (A B : Functor (C ^op) (Sets β)) (exp : Exponential Cat[ C ^op , Sets β ] PSh-products PSh-terminal A B) where open Exponential exp
The Yoneda lemma says that the value of the assumed exponential object is the set of natural transformations In turn, the universal property of as an exponential tells us that this is equivalent to and this essentially fixes the value of
_ : β x β β B^A .Fβ x β β ((γβ C x ββ A) => B) _ = Ξ» x β β B^A .Fβ x β ββ¨ yo {C = C} B^A , yo-is-equiv _ β©β (γβ C x => B^A) βΛβ¨ Ζ , lambda-is-equiv β©βΛ (γβ C x ββ A) => B ββ
Now that we know what the answer should be, we can fill in the details of the construction, which essentially work out to applying naturality and functoriality.
PSh[_,_] : PSh.Ob PSh[_,_] .Fβ c = el ((γβ C c ββ A) => B) Nat-is-set PSh[_,_] .Fβ f nt .Ξ· i (g , x) = nt .Ξ· i (f C.β g , x) PSh[_,_] .Fβ f nt .is-natural x y g = funext Ξ» (h , z) β nt .Ξ· y (f C.β h C.β g , A.β g z) β‘β¨ ap (nt .Ξ· y) (Ξ£-pathp (C.assoc _ _ _) refl) β©β‘ nt .Ξ· y ((f C.β h) C.β g , A.β g z) β‘β¨ nt .is-natural _ _ _ $β _ β©β‘ B.β g (nt .Ξ· _ (f C.β h , z)) β PSh[_,_] .F-id = ext Ξ» f i g x β ap (f .Ξ· i) (Ξ£-pathp (C.idl _) refl) PSh[_,_] .F-β f g = ext Ξ» h i j x β ap (h .Ξ· i) (Ξ£-pathp (sym (C.assoc _ _ _)) refl)
All that remains is to show that, fixing this construction is functorial in which is essentially symbol shuffling; and to show that this functor is right adjoint to the βproduct with β functor.
PSh-closed : Cartesian-closed (PSh β C) PSh-products PSh-terminal PSh-closed = cc where cat = PSh β C module _ (A : PSh.Ob) where func : Functor (PSh β C) (PSh β C) func .Fβ = PSh[ A ,_] func .Fβ f .Ξ· i g .Ξ· j (h , x) = f .Ξ· _ (g .Ξ· _ (h , x)) func .Fβ f .Ξ· i g .is-natural x y h = funext Ξ» x β ap (f .Ξ· _) (happly (g .is-natural _ _ _) _) β happly (f .is-natural _ _ _) _ func .Fβ nt .is-natural x y f = trivial! func .F-id = trivial! func .F-β f g = trivial! adj : Bifunctor.Left Γ-functor A β£ func adj .unit .Ξ· x .Ξ· i a = NT (Ξ» j (h , b) β x .Fβ h a , b) Ξ» _ _ _ β funext Ξ» _ β Ξ£-pathp (happly (x .F-β _ _) _) refl adj .unit .Ξ· x .is-natural _ _ _ = ext Ξ» _ _ _ _ β sym (x .F-β _ _ Β· _) ,β refl adj .unit .is-natural x y f = ext Ξ» _ _ _ _ _ β sym (f .is-natural _ _ _ $β _) ,β refl adj .counit .Ξ· _ .Ξ· _ x = x .fst .Ξ· _ (C.id , x .snd) adj .counit .Ξ· _ .is-natural x y f = funext Ξ» h β ap (h .fst .Ξ· _) (Ξ£-pathp C.id-comm refl) β happly (h .fst .is-natural _ _ _) _ adj .counit .is-natural x y f = trivial! adj .zig {A} = ext Ξ» x _ _ β happly (F-id A) _ ,β refl adj .zag {A} = ext Ξ» _ x i f g j β x .Ξ· i (C.idr f j , g) cc : Cartesian-closed (PSh β C) PSh-products PSh-terminal cc = product-adjointβcartesian-closed (PSh β C) _ _ func adj