Published March 20, 20212 minute read

Today is the day I understood Yoneda’s lemma. Of course I’ve proven it several times before; in a sense the proof is trivial, since there’s only one thing you can do at each stage. But I never felt that I really understood what the lemma was saying, or why it should be true, until something clicked today.

I came upon this realization while reading the book ‘Category Theory for Programmers.’ Although the book’s clarity definitely helped, I have a feeling that my understanding was a gradual process. It’s been a long time in the making. (And as usual in math, obvious in hindsight.)

The fundamental reason the lemma works, and why the hom functor a-^a should be in a sense ‘universal,’ is that the elements of each image xax^a are themselves morphisms f:axf : a \to x. As such, each point fxaf \in x^a contains precisely the information necessary to determine where it should be mapped. Namely, apply the corresponding map F(f)F(f) to an arbitrary base point pF(a)p \in F(a). The fact this map is forced is aesthetically obvious, and enforced by natrality.

This is the same logic used to identify the vector space R2\mathbb{R}^2 with the the 2D plane (a set of points), once a basepoint is fixed. Each vector v\vec{v}acts naturally on the plane by translation, so it’s natural to identify it with the image of the basepoint. From this point of view, it’s quite clear why the 2D plane can be identified with R2\mathbb{R}^2, and why there is exactly one identification corresponding to each possible basepoint in the plane.

[In fact, if you represent the vector space’s group structure as the hom-set of a one-object category, and identify the plane PP with the functor P* \mapsto P mapping vectors (automorphisms on *) to translations (automorphisms on PP), this is Yoneda’s lemma.]