Yoneda Lemma, Riehl’s Category Theory in Context

category-theoryyoneda-lemma

Riehl writes about the Yoneda Lemma:
"For any functor $F: C \rightarrow Set$, whose domain is locally small and for $c \in C, \exists$ bijection $Hom(C(c,-),F) \cong Fc$. Moreover, this correspondence is natural in both $c$ and $F$."

I wanted to ask about the bolded statement – what does it mean that the correspondence is "natural in $c$ and $F$"? She has defined natural in the terms of a natural isomorphism, or a natural transformation, but not in terms of a particular object of a category ($c$ here) or "in" a functor ($F$ here). I cannot find this phrasing online either. What am I missing?

Best Answer

When we say a bijection is natural, we mean it is natural in the sense of a natural transformation between functors. This almost always means that the square we get by changing the inputs to our bijection will commute, and with time you'll start to intuitively know what the square is and what naturality means.

For us, we have an isomorphism from $\text{Hom}(yc,F) \cong Fc$, where $y$ is the (covariant) yoneda embedding. If you like, this means we have two functors from $C \to \mathsf{Set}$, namely $\text{Hom}(y-,F)$ and $F$. Then "naturality in $c$" is saying that these two functors are naturally isomorphic.

Recall an isomorphism in $\mathsf{Set}$ is a bijection. So the fact that $\text{Hom}(yc,F) \cong Fc$ for each $c$ individually is already saying something interesting. But the fact that this isomorphism is natural means that if $f : c \to d$ is an arrow in $C$, then we get a commutative square

a commutative square

Intuitively, "naturality in $c$" means that these isomorphisms play nicely when we move between objects of $C$. If you have a programming background, you might see this as a kind of polymorphic isomorphism, in the sense that the same definition works uniformly for every object of $C$. See here for more, if this sounds like it might help.

With this in mind, can you guess what it means that these isomorphisms are also natural in $F$? Again, it will mean that two functors are naturally isomorphic, but now these functors will be $[C,\text{Set}] \to \mathsf{Set}$. You should try to draw the square yourself to get familiar working out what naturality means (most authors will leave it to you to figure out for yourself), but I'll include an answer under the fold:

Before we held $F$ fixed and allowed $c$ to vary. Now we'll hold $c$ fixed and vary $F$. Then we have functors $\text{Hom}(yc,-)$ and $(-)c$, where this second functor takes in $F$ as an input and applies it to $c$. Then naturality is saying these two functors are naturally isomorphic in the sense that for any arrow $\theta : F \to G$, the following square commutes:
another commutative square

As an aside, in this post we checked naturality in each variable separately. But you could also think of functors in two variables $\text{Hom}(y-,-) : C \times [C,\mathsf{Set}] \to \mathsf{Set}$ and $\text{ap} : C \times [C, \mathsf{Set}] \to \mathsf{Set}$, where $\text{ap}(c,F) = Fc$. If you're familiar with the subtletlies around separate and joint continuity, you might worry that naturality in $c$ and $F$ separately is different from naturality from the pair $(c,F)$.

Thankfully, this is not the case, and the notions of "separate" and "joint" naturality in multiple variables agree. See here, for instance.


I hope this helps ^_^

Related Question