The Yoneda functor is the Hom Functor curried in one variable:
sending to the Presheaf of “the totality of views of from all possible directions”, and an arrow to the natural transformation with components . Fixing the other variable gives the co-Yoneda functor , (Kittenlab’s , contravariant because of the flip in ).
Sources: DaoFP §9.7 (“Yoneda Embedding”), §9.8, §9.10; Kittenlab Lecture 12; 7 Sketches Exercise 1.66 ().
Theorem. is fully faithful: injective on objects, injective on arrows (faithful), and surjective on hom-sets (full) — an embedding of into its presheaf category, though not surjective on objects.
Proof. Substitute in the Yoneda Lemma: , naturally in . The map sends to post-composition (toNatural f = (f .)) and its inverse applies a natural transformation to the identity (fromNatural alpha = alpha id). Post-composition preserves identities and composition, , hence also isomorphisms: iff .
“The presheaf , like a hologram, encodes the totality of views of ; the Yoneda embedding tells us that when we combine all these individual holograms we get a perfect hologram of the whole category.” The image consists of the representable presheaves, which are dense: every presheaf is a Colimit of representables. being cartesian closed is what allows currying the hom-functor.
#check CategoryTheory.yoneda -- C ⥤ (Cᵒᵖ ⥤ Type v)
#check CategoryTheory.Yoneda.fullyFaithful -- yoneda is fully faithful
#check CategoryTheory.coyoneda -- Cᵒᵖ ⥤ (C ⥤ Type v){-# LANGUAGE RankNTypes #-}
-- DaoFP §9.7: the action of the Yoneda embedding on arrows and its inverse
toNatural :: (x -> y) -> (forall z. (z -> x) -> (z -> y))
toNatural f = (f .)
fromNatural :: (forall z. (z -> x) -> (z -> y)) -> (x -> y)
fromNatural alpha = alpha id