## What does Yoneda’s Lemma mean?

As I promised, today I’ll try to explain what Yoneda’s Lemma really *does* for us.

First off, let’s think about functions of two variables. To be very explicit, think of the function defined by . We can turn this into a function of one variable that returns another function. Specifically, if we write for the set of functions from the natural numbers to themselves, we can write , where . That is, is the function that sends to . This method of “Currying” (named for Haskell Curry) a function should be familiar if you’ve worked with functional programming languages like LISP, ML, or Haskell. There’s really a lot to be said about it in general, and I’ll get back to exploring it in more depth another time.

Anyhow, a similar statement goes for functors of more than one variable. Since such functors are “functorial in each variable”, we can stick an object into all but one slot and be left with a functor of the last slot. The thing is, this assignment is *itself* functorial.

Let’s focus on a functor . Then for any object we have a functor . Now when we change the object by applying a morphism we get a natural transformation . It should have components . The clear choice is , and indeed this is natural since the morphisms from commute with those from .

Now, strictly speaking this may not be a functor since we only know that is a category when at least one of and is small, but the general idea should be clear.

Now to the situation at hand: we know that any category comes equipped with a functor . We apply this Currying operation on each slot to get two “functors” and . Of course, the targets are only sure to be categories when (and thus as well) is small, but we’ll gloss over that point. What the Yoneda Lemma says is that *these functors are fully faithful!*

To see this, notice that sends an object to the covariant functor , while sends an object to the contravariant functor . Since the objects of and are the same, I hope that using for both won’t be too confusing.

Now let’s take the statement of the (covariant) Yoneda Lemma and apply it to the functor for some object . It says that . But notice that is — the set of morphisms from to in the functor category . Now since is a functor from to , it acts on the hom sets, sending to . And the Yoneda Lemma tells us that this is a bijection — the functor is fully faithful!

And the same argument goes through for . Now we apply the contravariant Yoneda Lemma to see that . The functor induces a bijection on each hom set, so it’s fully faithful too!

Now remember what the point of fully faithful functors is: they’re all about full subcategories. This means that any (small) category can be seen as a full subcategory of . And full subcategories are nice because they just restrict the objects we’re interested in without throwing out any morphisms between those objects. So, the objects of any category can be seen as a special kind of contravariant -valued functor on that category.

And now: which contravariant -valued functors on a category are so special that they constitute objects of under this embedding? Well, as usual in category theory we’re interested in things up to isomorphism, so we should ask, “What contravariant set-valued functors are (naturally) isomorphic to one in the image of ?”

These are just the representable functors.

The representable, contravariant, -valued functors on a category constitute a full subcategory of all contravariant -valued functors on , which is equivalent to the category itself.

And *that’s* why Yoneda’s Lemma is so amazing.

Shouldn’t the requirement in par 4 by that $\mathcal C$ and therefore $\mathcal C^{\bf op}$ be locally small? (c.f. the ‘size worries’ paragraph Tom Leinster’s The Yoneda Lemma: What’s it All About.

How much trouble do reasonably adequate math grad students have with this thing? I’ve read it described as ‘the hardest trivial thing in mathematics’, which makes me feel better about having so much trouble with it. This and its predecessor post are however a very helpful presentation, perhaps due to having a ‘clean plot line’ without a lot of extraneous stuff

Comment by MathOutsider | October 2, 2007 |

The lack of a preview or edit comment feature on wordpress is really getting to me, here’s an attempt to fix the link:

The Yoneda Lemma: What’s it All About. Well might as well try to get the latex right too, for once:

Comment by MathOutsider | October 2, 2007 |

what does Sub-categories mean!!!!!!

☺

Comment by michelle | October 9, 2007 |

michelle: I mentioned that in my post on full and faithful functors.

Comment by John Armstrong | October 9, 2007 |

MathOutsider: The average graduate student in algebra, algebraic topology, or algebraic geometry can understand the content of the Yoneda Lemma. To them, it is a generalization of Cayley’s theory for groups and the fact that a left R-module M is isomorphic to Hom(R, M) (viewed as an R-module).

On the other hand, unless the study is able to take a course that specifically covers category theory, they are unlikely to be taught the Yoneda Lemma in any particular course.

Comment by Marceau | November 10, 2007 |

Marceau, I’m not so sure that’s the case. Maybe I would have said that back when I was in graduate school, but as I’ve seen more and more graduate students I really have to revise that “average” statement. Particularly the applied mathematics students who don’t really have as thorough a background in algebra would have a huge problem with understanding Yoneda without an explicit explanation.

Comment by John Armstrong | November 10, 2007 |

[…] http://unapologetic.wordpress.com/2007/06/07/what-does-yonedas-lemma-mean/ […]

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 |

\mathrm{Nat}(h_A,h_B)$ – I guess this is a latex error…

Comment by gvaerg | December 28, 2010 |

No, I just left off the “$latex” opening. good catch.

Comment by John Armstrong | December 28, 2010 |

“we only know that \mathcal{C}^\mathcal{B} is a functor”

Shouldn’t this be “is a category”?

Comment by gvaerg | February 19, 2011 |

I’ve probably missed something obvious, but I can’t see why we have that y is fully faithfull follows from the fact that there _exists_ a natural isomorphism between Hom(A, B) and Hom(y A, y B), why does this say anything about how y acts on Hom(A, B)?

Comment by noteventime | May 17, 2011 |

The point is that ‘s action on the hom spaces actually is the natural isomorphism. It’s not just that the two are naturally isomorphic, but that the isomorphism is given in this particular way.

Comment by John Armstrong | May 17, 2011 |

So the fact doesn’t follow from the statement of the Yoneda lemma so much as the specific isomorphism in this particular proof?

If this is the case I find the presentation given here, and in most other places, somewhat strange, since they seem to imply that the fact follows from the statement of the Yoneda lemma (which I’ve never seen stating isomorphism explicitly).

The introductory chapter of “Introduction to higher order categorical logic” is the only place I’ve seen this made explicit.

Comment by noteventime | May 18, 2011 |

Yes, the traditional statement just asserts existence, but the proof is very explicit. You have a point that some people may be confused (evidently you have been) but that’s part of why I go into the meaning and highlight the upshot of the proof.

Comment by John Armstrong | May 18, 2011 |

[…] Unapologetic mathematician […]

Pingback by Le lemme de Yoneda et l’opération spirituelle | L'horreur islamique | May 5, 2013 |