## Yoneda’s Lemma

Okay, time to roll up our sleeves and get into one of the bits that makes category theory so immensely tweaky: Yoneda’s Lemma.

First, let’s lay out a bit of notation. Given a category and an object we’ll use to denote the covariant functor represented by and to denote the contravariant one. That is, and .

Now given a covariant functor , we’re interested in the set of natural transformations . Note that not all of these are natural isomorphisms. Indeed, may not be representable at all. Still, there can be natural transformations going in one direction.

The Yoneda Lemma is this: there is a bijection between and .

Seriously.

And the proof is actually pretty clear too. One direction leaps out when you think of it a bit. A natural transformation has components , sending morphisms of to elements of certain sets. Now, given *any* category and *any* object, what morphism do we know to exist for certain? The identity on ! So take and stick it into and we get an element . The really amazing bit is that *this element completely determines the natural transformation!*

So let’s start with a category , an object , a functor , and an element . From this data we’re going to build the unique natural transformation so that . We must specify functions so that for every arrow in we satisfy the naturality condition. For now, let’s focus on the naturality squares for morphisms , and we’ll show that the other ones follow. This square is:

where the horizontal arrows are and , respectively. Now this square must commute no matter what we start with in the upper-left corner, but let’s see what happens when we start with . Around the upper right this gets sent to , and then down to . Around the lower left we first send to , which then gets sent to . So, in order for these chosen naturality squares to commute for this specific starting value we must define so that .

Now I say that these definitions serve to make all the naturality squares commute. Let be any arrow in and write out the square:

Now, starting with we send it right to , and then down to . On the other side we send down to , and then right to . And thus the square commutes.

So, for every natural transformation we have an element , for every element we have a natural transformation , and these two functions are clearly inverses of each other.

Almost identically, there’s a contravariant Yoneda Lemma, saying that for every *contravariant* functor . You can verify that you’ve understood the proof I’ve given above by adapting it to the proof of the contravariant version.

There’s a lot here, and although it’s very elegant it may not be clear why it’s so interesting. I’ll come back tomorrow to try explaining what the Yoneda Lemma *means*.

[…] does Yoneda’s Lemma mean? As I promised, today I’ll try to explain what Yoneda’s Lemma really does for […]

Pingback by What does Yoneda’s Lemma mean? « The Unapologetic Mathematician | June 7, 2007 |

[…] language and it looks pretty. So what? Hold on tight, because now I’m going to hit it with Yoneda’s Lemma (and its […]

Pingback by Groups and group actions — categorically « The Unapologetic Mathematician | June 8, 2007 |

[…] Weak Yoneda Lemma The Yoneda Lemma is so intimately tied in with such fundamental concepts as representability, universality, limits, […]

Pingback by The Weak Yoneda Lemma « The Unapologetic Mathematician | September 3, 2007 |

A question about Yoneda’s Lemma:

You gave good motivation of the importance of Yoneda’s lemma by using it to deduce that the Yoneda map of a category C into Set^C is fully faithfull. However that result only seems to use a special case of Yoneda’s lemma, where both contravariant functors from C to Set are representable. Why is the general version of Yoneda’s lemma important?

dan

Comment by Dan | October 8, 2007 |

(after moving a comment over here.. there’s gotta be a better way of doing that)

Well, that’s just one application. In general, Yoneda tells us a lot about representable functors, both covariant and contravariant. One thing it tells us is that any two representations of a functor are given by isomorphic objects.

There’s really a lot more to it, the more you look. I tried to construct some sort of category analogue of bimodules over rings a while back, and all the associativities I needed turned out to be applications of Yoneda’s Lemma. It never really went anywhere, and I don’t remember where I put the notes, but I might dig it out for a post sometime.

Comment by John Armstrong | October 8, 2007 |

thank you

can you give me an example about Yonedas Lemma

Comment by heshamtorkmanee | April 24, 2008 |

[…] https://unapologetic.wordpress.com/2007/06/06/yonedas-lemma/ […]

Pingback by Construction de la loi de création de Wronski par la méthode critique : théorie et technie « La recherche de la Vérité | November 29, 2010 |