12.1.5 The Yoneda Lemma

Let $\mathcal{F}\colon \smash {\mathcal{C}^{\mathsf{op}}}\to \mathsf{Sets}$ be a presheaf on $\mathcal{C}$.

We have a bijection

\[ \operatorname {\mathrm{Nat}}(h_{A},\mathcal{F}) \cong \mathcal{F}(A), \]

natural in $A\in \operatorname {\mathrm{Obj}}(\mathcal{C})$, determining a natural isomorphism of functors

\[ \operatorname {\mathrm{Nat}}(h_{(-)},\mathcal{F}) \cong \mathcal{F}. \]

The Transformation $\mathrm{ev}\colon \operatorname {\mathrm{Nat}}(h_{(-)},\mathcal{F})\Rightarrow \mathcal{F}$
Let

\[ \mathrm{ev}\colon \operatorname {\mathrm{Nat}}(h_{(-)},\mathcal{F})\Rightarrow \mathcal{F} \]

be the transformation consisting of the collection

\[ \left\{ \mathrm{ev}_{A}\colon \operatorname {\mathrm{Nat}}(h_{A},\mathcal{F})\to \mathcal{F}(A)\right\} _{A\in \operatorname {\mathrm{Obj}}(\mathcal{C})} \]

with

\[ \mathrm{ev}_{A}(\alpha )=\alpha _{A}(\operatorname {\mathrm{id}}_{A}) \]

for each $\alpha \in \operatorname {\mathrm{Nat}}(h_{A},\mathcal{F})$, where $\alpha _{A}$ is the component

\[ \alpha _{A}\colon \operatorname {\mathrm{Hom}}_{\mathcal{C}}(A,A)\to \mathcal{F}(A) \]

of $\alpha $ at $A$.

The Transformation $\xi \colon \mathcal{F}\Rightarrow \operatorname {\mathrm{Nat}}(h_{(-)},\mathcal{F})$
Let

\[ \xi \colon \mathcal{F}\Rightarrow \operatorname {\mathrm{Nat}}(h_{(-)},\mathcal{F}) \]

be the transformation consisting of the collection

\[ \left\{ \xi _{A}\colon \mathcal{F}(A)\to \operatorname {\mathrm{Nat}}(h_{A},\mathcal{F})\right\} _{A\in \operatorname {\mathrm{Obj}}(\mathcal{C})}, \]

where $\xi _{A}$ is the map sending an element $\phi \in \mathcal{F}(A)$ to the transformation

\[ \xi _{A}(\phi )\colon h_{A}\Rightarrow \mathcal{F} \]

(which we will show is natural in a bit) consisting of the collection

\[ \left\{ \xi _{A}(\phi )_{X}\colon h_{A}(X)\to \mathcal{F}(X)\right\} _{X\in \operatorname {\mathrm{Obj}}(\mathcal{C})}, \]

with

\[ \xi _{A}(\phi )_{X}(f)\mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}[\mathcal{F}(f)](\phi ) \]

for each $f\in h_{A}(X)$, where

\[ \mathcal{F}(f)\colon \mathcal{F}(A)\to \mathcal{F}(X) \]

is the image of $f$ by $\mathcal{F}$.

Naturality of $\xi _{A}(\phi )\colon h_{A}\Rightarrow \mathcal{F}$
The transformation

\[ \xi _{A}(\phi )\colon h_{A}\Rightarrow \mathcal{F} \]

is indeed natural, as the diagram

commutes for each morphism $f\colon X\to Y$ of $\mathcal{C}$, acting on elements as
where we have

\[ [\mathcal{F}(f)]([\mathcal{F}(h)](\phi ))=[\mathcal{F}(h\circ f)(\phi )] \]

by the functoriality of $\mathcal{F}$.

Naturality of $\mathrm{ev}\colon \operatorname {\mathrm{Nat}}(h_{(-)},\mathcal{F})\Rightarrow \mathcal{F}$
Let $f\colon X\to Y$ be a morphism of $\mathcal{C}$. We claim the naturality diagram
for $\mathrm{ev}$ at $f$, acting on elements as
commutes. Indeed:

  • We have

    \begin{align*} [\alpha \circ h_{f}]_{X}(\operatorname {\mathrm{id}}_{X}) & \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}[\alpha _{X}\circ h_{f|X}](\operatorname {\mathrm{id}}_{X})\\ & \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}[\alpha _{X}\circ f_{*}](\operatorname {\mathrm{id}}_{X})\\ & \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}\alpha _{X}(f_{*}(\operatorname {\mathrm{id}}_{X}))\\ & \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}\alpha _{X}(f). \end{align*}
  • Applying the naturality diagram

    of $\alpha \colon h_{Y}\Rightarrow \mathcal{F}$ at $f\colon X\to Y$ to the element $\operatorname {\mathrm{id}}_{Y}$ of $h^{Y}_{Y}$, we have
    showing that we have

    \[ [\mathcal{F}(f)](\alpha _{Y}(\operatorname {\mathrm{id}}_{Y})) = \alpha _{X}(f)\mathrlap {.} \]

Thus the naturality diagram for $\mathrm{ev}$ at $f$ commutes, and $\mathrm{ev}$ is natural.

Naturality of $\xi \colon \mathcal{F}\Rightarrow \operatorname {\mathrm{Nat}}(h_{(-)},\mathcal{F})$
Let $f\colon X\to Y$ be a morphism of $\mathcal{C}$. We claim the naturality diagram
for $\xi $ at $f$, acting on elements as
commutes. Indeed, for each $X\in \operatorname {\mathrm{Obj}}(\mathcal{C})$ and each $g\in h^{A}_{X}$, we have

\begin{align*} [\xi _{Y}(\phi )\circ h_{f}]_{X}(g) & \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}[\xi _{Y}(\phi )_{X}\circ h_{f|X}](g)\\ & \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}[\xi _{Y}(\phi )_{X}\circ f_{*}](g)\\ & \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}\xi _{Y}(\phi )_{X}(f_{*}(g))\\ & \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}\xi _{Y}(\phi )_{X}(f\circ g)\\ & \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}[\mathcal{F}(f\circ g)](\phi ) \end{align*}

and

\begin{align*} [\xi _{X}([\mathcal{F}(f)](\phi ))]_{X}(g) & \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}\mathcal{F}(g)([\mathcal{F}(f)](\phi ))\\ & = [\mathcal{F}(f\circ g)](\phi ), \end{align*}

where we have used the functoriality of $\mathcal{F}$. Thus $\xi _{Y}(\phi )\circ h_{f}$ and $\xi _{X}([\mathcal{F}(f)](\phi ))$ are equal, and the naturality diagram for $\xi $ at $f$ above commutes, showing $\xi $ to be natural.

Invertibility I: $\mathrm{ev}\circ \xi =\operatorname {\mathrm{id}}_{\mathcal{F}}$
We claim that $\mathrm{ev}\circ \xi =\operatorname {\mathrm{id}}_{\mathcal{F}}$, i.e. that we have

\[ (\mathrm{ev}\circ \xi )_{A}=\operatorname {\mathrm{id}}_{\mathcal{F}(A)} \]

for each $A\in \operatorname {\mathrm{Obj}}(\mathcal{C})$. Indeed, we have

\begin{align*} [\mathrm{ev}\circ \xi ]_{A}(\phi ) & \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}[\mathrm{ev}_{A}\circ \xi _{A}](\phi )\\ & \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}\mathrm{ev}_{A}(\xi _{A}(\phi ))\\ & \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}\xi _{A}(\phi )_{A}(\operatorname {\mathrm{id}}_{A})\\ & \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}[\mathcal{F}(\operatorname {\mathrm{id}}_{A})](\phi )\\ & = [\operatorname {\mathrm{id}}_{\mathcal{F}(A)}](\phi ) \end{align*}

for each $\phi \in \mathcal{F}(A)$.

Invertibility II: $\xi \circ \mathrm{ev}=\operatorname {\mathrm{id}}_{\operatorname {\mathrm{Nat}}(h_{(-)},\mathcal{F})}$
We claim that $\xi \circ \mathrm{ev}=\operatorname {\mathrm{id}}_{\operatorname {\mathrm{Nat}}(h_{(-)},\mathcal{F})}$, i.e. that we have

\[ (\xi \circ \mathrm{ev})_{A}=\operatorname {\mathrm{id}}_{\operatorname {\mathrm{Nat}}(h_{A},\mathcal{F})} \]

for each $A\in \operatorname {\mathrm{Obj}}(\mathcal{C})$. Indeed:

  • We have

    \begin{align*} [\xi \circ \mathrm{ev}]_{A}(\alpha ) & \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}[\xi _{A}\circ \mathrm{ev}_{A}](\alpha )\\ & \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}\xi _{A}(\mathrm{ev}_{A}(\alpha ))\\ & \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}\xi _{A}(\alpha _{A}(\operatorname {\mathrm{id}}_{A}))\\ \end{align*}

    for each $\alpha \in \operatorname {\mathrm{Nat}}(h_{A},\mathcal{F})$.

  • For each $X\in \operatorname {\mathrm{Obj}}(\mathcal{C})$, we have

    \[ \xi _{A}(\alpha _{A}(\operatorname {\mathrm{id}}_{A}))_{X}=\alpha _{X}, \]

    since we have

    \begin{align*} \xi _{A}(\alpha _{A}(\operatorname {\mathrm{id}}_{A}))_{X}(f) & \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}[\mathcal{F}(f)](\alpha _{A}(\operatorname {\mathrm{id}}_{A}))\\ & \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle (\dagger )}}{=}}}\alpha _{X}(f)\end{align*}

    for each $f\in h_{A}(X)$, where the equality marked with $(\dagger )$ follows from the commutativity of the naturality diagram

    of $\alpha $ at $f\colon A\to X$, which acts on $\operatorname {\mathrm{id}}_{A}$ as

This finishes the proof.


Noticed something off, or have any comments? Feel free to reach out!


You can also use the contact form below: