# Yoneda's Lemma and Limits

The context of this question is section 12 of the chapter on Categories of the Stacks Project.

Let $M:I \rightarrow C$ be a diagram and suppose that $\lim_i M_i$ exists. Then $Mor_C(W,\lim_i M_i) = \lim_i Mor_C(W,M_i)$. It is mentioned that "By the Yoneda lemma this formula completely determines the limit".

What does the above phrase mean? We supposed that $\lim_i M_i$ exists and it is also unique up to isomorphism by its universal property. Where does Yoneda's lemma come into play?

-

Yoneda's lemma tells you that if an object of $C$ represents a functor $F:C^{opp}\rightarrow\mathbf{Set}$, then the object (more correctly the pair consisting of the object and a natural isomorphism between its $\mathrm{Hom}$ functor $h_X$ and $F$) is unique up to unique isomorphism. In pretty much every situation I can think of, definitions given in terms of some universal mapping property (like a limit) can also be phrased in terms of representability of a functor. The formula $\mathrm{Hom}_C(W,\lim_iM_i)=\lim_i\mathrm{Hom}_C(W,M_i)$ means precisely that for all objects $W$, the arrow $\mathrm{Hom}_C(W,\lim_iM_i)\rightarrow\lim_i\mathrm{Hom}_C(W,M_i)$ induced by the canonical maps $\lim_iM_i\rightarrow M_j$ together with the universal mapping property of the limit in the category of sets, is bijective. It can also be interpreted as saying that the object $\lim_iM_i$ represents the functor $F:W\rightsquigarrow\lim_i\mathrm{Hom}_C(W,M_i)$ on $C^{opp}$. When interpreted this way, we see that, by Yoneda's lemma, the formula determines $\lim_iM_i$ (together with the relevant data, namely the maps $\lim_iM_i\rightarrow M_j$ which can be recovered from the natural bijections between $\mathrm{Hom}$ sets) up to canonical isomorphism. In this case the data of the natural isomorphism between $h_{\lim_iM_i}$ and $F$ is given by the morphisms $\lim_iM_i\rightarrow M_j$.
EDIT: This is an answer to the question asked by the OP in the comments. Yoneda says that the functor $X\rightsquigarrow h_X$ from $C$ to $\mathrm{Fun}(C^{opp},\mathbf{Set})$ is fully faithful. So, in particular, if $M=\lim_iM_i$, then for any $j\in I$, the map $\mathrm{Hom}_C(M,M_j)\rightarrow\mathrm{Hom}_{\mathrm{Fun}(C^{opp},\mathbf{Set})}(h_M,h_{M_j})$ is bijective. If $M$ represents the functor $F$ defined above, then by composing the natural isomorphism $h_M\cong F$ with the natural transformation from $F=\lim_i\mathrm{Hom}_C(-,M_i)$ to $\mathrm{Hom}_C(-,M_j)$ (which exists by definition of the limit in the category of set valued functors on $C^{opp}$), we get a morphism $h_M\rightarrow h_{M_j}$. By Yoneda this correponds to a unique morphism $M\rightarrow M_j$. This is the projection map in the definition of the universal property for $M$.