The Yoneda Lemma is one of the few βtheoremsβ one learns in a first course on category theory and it is an invaluable tool.
Suppose we have a locally small category , then for any two objects there is a set of maps from to , denoted . We can make this into a functor by forgetting about the domain. We define the following functor:
,
such thatΒ andΒ . Given any map , . We can go further however, by removing our choice of . We define a functor
,
where and , where is a natural transformation. For any , the component of is a function such that for any map , .
The functor is known as the Yoneda embedding. It comes hand in hand with the Yoneda Lemma.
Yoneda lemma
Let be a locally small category. ThenΒ
,
naturally in and .
There are many discussions on the importance of Yoneda, however we shall skip over them and instead look at the Yoneda embedding. This functor can only really be called an embedding if it is both full and faithful. This is a trivial result of the Yoneda lemma, however it is not necessary to invoke the lemma and it can be proven without it.
Yoneda embedding is full and faithful
Let , and let be a natural transformation. We need to find a map such that . Looking at the component of gives us a function
.
We apply this to the identity map on to get a map . I claim that this is the required map. For notation, we shall call it . It is the case that if and only if each component is equal, that is for all objects . Choosing an arbitrary , as bothΒ Β and are functions, they are equal if and only if they take the same values on the same inputs. Recall the domains and codomains of the functions:
.
Take an arbitrary map . Then . We need to show that this is . This follows from the naturality of . Indeed, for naturality gives us the following commutative square:
These functions take the following on :
This says that . This means and are equal as functions, which means that . which by our reasoning above shows that , hence is full.
For faithfulness, again fix and consider two natural transformations . Supposing , we need to show that . As , . These are both functions, so we apply them to giving us , therefore , proving faithfulness.
Despite not explicitly using the Yoneda lemma, everything we have done is used in the proof of it. There is one more result that helps capture the idea behind the proof for Yoneda.
Yoneda embedding is injective on isomorphism classes
Suppose for two objects that . This means that we have two natural isomorphisms:
which are inverses to each other. By reasoning from above, we a map and . For notation, we shall call and . Again from above, we see that . Substituting for gives that . As and are inverses, their components are mutual inverses. This means , so . A similar argument shows that , hence and are isomorphisms. Therefore, .
The results from this post are from Chapter 4 of Tom Leinsterβs Basic Category Theory textbook, which can be found here.