The Yoneda Lemma
A natural transformation out of a hom-functor is determined by where it sends one identity arrow, which is why an object is exactly what it looks like from everywhere else.
The idea
Theorem (The Yoneda lemma).
Let $\mathcal{C}$ be a locally small category, let $A$ be an object of it, and let $X \colon \mathcal{C}^{\mathrm{op}} \to \mathbf{Set}$ be any presheaf. Writing $H_{A} = \mathcal{C}(-,A)$ for the presheaf represented by $A$, the natural transformations from $H_{A}$ to $X$ correspond to the elements of $X(A)$: $[\mathcal{C}^{\mathrm{op}}, \mathbf{Set}](H_{A}, X) \;\cong\; X(A),$ naturally in $A$ and in $X$. The bijection sends a natural transformation $\alpha$ to the single element $\alpha_{A}(1_{A})$, and sends an element $x$ back to the transformation whose component at $B$ is $f \mapsto (Xf)(x)$.
The claim is larger than it first appears. On the left sits a whole family of functions, one component for every object of $\mathcal{C}$ — often more than a set's worth of them — each obeying a naturality square for every arrow. On the right sits one element of one set. The lemma says the family carries no more information than the element.
The consequence the lemma is remembered for is that $H_{A} \cong H_{B}$ forces $A \cong B$. An object is determined, up to isomorphism, by the arrows into it: an object is what it looks like from everywhere else.
Ways to work on it
- Walkthrough. Work through the statement of the Yoneda lemma and how the arrows into an object determine it.
- Proof. Prove the lemma by tracking where the identity arrow goes.
- Practice. Count and construct natural transformations out of hom-functors.
- Hardest. Count natural transformations beyond the basic cases, and find where the lemma's consequence stops applying.
Not sure where to start? Take the ten-question placement test.