In higher category theory
For a locally small category, every object of induces a presheaf on : the representable presheaf represented by . This assignment extends to a functor from to its category of presheaves. The Yoneda lemma implies that this functor is full and faithful and hence realizes as a full subcategory inside its category of presheaves.
Recall from the discussion at representable presheaf that the presheaf represented by an object of is the functor whose assignment is illustrated by
which sends each object to and each morphism to the function
Moreover, for an morphism in , this induces a natural transformation , whose component on in is illustrated by
For this to be a natural transformation, we need to have the commuting diagram
but this simply means that it doesn’t matter if we first “comb” the strands back to and then comb the strands forward to , or comb the strands forward to first and then comb the strands back to
which follows from associativity of composition of morphisms in .
The Yoneda embedding for a locally small category is the functor
from to the category of presheaves over which is the image of the hom-functor
under the Hom adjunction
in the closed symmetric monoidal category Cat.
Hence sends any object to the representable presheaf which assigns to any other object of the hom-set of morphisms from into :
It follows from the Yoneda lemma that the functor is full and faithful. It is also limit preserving (= continuous functor), but does in general not preserve colimits.
The Yoneda embedding of a small category into the category of presheaves on gives a free cocompletion of .
If the Yoneda embedding of a category has a left adjoint, then that category is called a total category .