\ie\cf
\newcommand{\eqdef}{\mathbin{\stackrel{\rm def}{=}}}  \newcommand{\R} % real numbers  \newcommand{\N}} % natural numbers  \newcommand{\Z} % integers  \newcommand{\F} % a field  \newcommand{\Q} % the rationals  \newcommand{\C}{\mathbb{C}} % the complexes  \newcommand{\poly}}  \newcommand{\polylog}}  \newcommand{\loglog}}}  \newcommand{\zo}{\{0,1\}}  \newcommand{\suchthat}  \newcommand{\pr}[1]{\Pr\left[#1\right]}  \newcommand{\deffont}{\em}  \newcommand{\getsr}{\mathbin{\stackrel{\mbox{\tiny R}}{\gets}}}  \newcommand{\Exp}{\mathop{\mathrm E}\displaylimits} % expectation  \newcommand{\Var}{\mathop{\mathrm Var}\displaylimits} % variance  \newcommand{\xor}{\oplus}  \newcommand{\GF}{\mathrm{GF}}  \newcommand{\eps}{\varepsilon}  \notag
\no
Next |
| Previous

Yoneda Lemma

100%

Before we move on to the more involved structures in Category Theory, it's worth taking a detour through proving Yoneda's lemma. Roughly speaking, Yoneda's lemma tells us that the information of an object is completely described by its functor of points.

Let \(h_A\) be the functor of points for object \(A\). Thus, for any \(f:C\to D\in\mathfrak C\), \(h_A(f):\Mor(D,A)\to\Mor(C,A)\).

Suppose that for two objects \(A,B\in\mathfrak C\), there are morphisms \(i_C:\Mor(C,A)\to\Mor(C,B)\) for every \(C\in\mathfrak C\) that commute with the morphisms \(h_A(f)\) as defined earlier in the natural way (see diagram below). Thus, there exists \(g:A\to B\) such that \(i_C:u\mapsto g\circ u\) for all \(C\in\mathfrak C\). If \(i_C\) is a bijection for all \(C\), then \(g\) is an isomorphism.


Let \(g=i_A(\id)\). Thus, letting \(D=A\), we transform the diagram to

If we consider the morphism \(\id\in\Mor(A,A)\), the diagram tells us that \(i_C(f)=g\circ f\). If \(i_B\) is a bijection, there exists some \(f:B\to A\) such that \(i_B(f)=\id\). Thus, \(g\circ f=\id\), and this shows that \(g\) is an isomorphism.

This lemma also holds with the arrows in the diagrams above flipped, and with the functor of points replaced with \(\Mor(C,-)\). We'll call this covariant functor \(h^C\).

There exists a natural bijection between the collection of natural transformations \(h^A\to h^B\) and \(\Mor(B,A)\).


A natural transformation \(h^A\to h^B\) needs to assign to each \(C\in\rmC\) a morphism \(m_C:h^A(C)\to h^B(C) = \Mor(A,C)\to\Mor(B,C)\). Clearly, for any \(f\in\Mor(B,A)\), we can let \(m_C=h_C(f)\), as the commutative diagram for natural transformations is satisfied below for any \(r:C\to D\in\rmC\).

This gives us an injection from \(\Mor(B,A)\) to the collection of natural transformations. Lemma 1 gives us an injection in the reverse direction.

We can write a similar lemma about natural transformations between \(h_A\to h_B\) and \(\Mor(A,B)\).

We call any contravariant functor \(F:\rmC\to\textbf{Set}\), representable iff there exists a natural isomorphism \(\epsilon:F\to h_A\) for some \(A\in\mathfrak C\). We call \(A\) the representing object, and it's not hard to see that it is determined up to unique isomorphism by \((F,\epsilon)\).

We call \(\epsilon^{-1}(\id_A)\) the universal object of \(\rmC\).

For a functor \(F:\mathfrak C\to\textbf{Set}\), there exists a bijection between the collection of natural transformations \(h^A\to F\) and \(F(A)\). (This lemma can also be defined for contravariant functors, but the proof is a dual to this proof). This induces a natural isomorphism between the functors \(\Mor(h^{(-)},F)\) and \(F(-)\).


Let \(\phi:h^A\to F\) be a natural transformation. For every \(B\in\mathfrak C\), we have a mapping \(\phi_B:\Mor(A,B)\to F(B)\) such that for any \(f:X\to Y\in\mathfrak C\), the following diagram commutes:

Letting \(X=A\), we know that \(\id\in\Mor(A,A)\). Letting \(g=\phi_A(\id)\) (the universal object), the diagram tells us that for any \(f:A\to Y\in\mathfrak C\), \(\phi_Y(f)=F(f)(g)\).

Thus, \(\phi_Y\) is fully determined by \(g\), meaning that the map \(\phi\mapsto g\) is an injection. Thus, we have an injection from the set of natural transformations of \(h^A\to F\), and the set \(F(A)\).

For the opposite direction, note that for any \(x\in F(A)\), \(B\in\mathfrak C\), \(\phi_B:f\mapsto F(f)(x)\) is an injection. But this is the implication of the first lemma, and thus we are done.

Thus, Yoneda's lemma tells us that given a category, we can produce a category of contravariant functors from the category to Set, with morphisms as natural transformations. And, we have a functor from the original category to the new one which sends any object to its functor of points. And, this mapping is fully faithful.

Top