Kerodon

$\Newextarrow{\xRightarrow}{5,5}{0x21D2}$ $\newcommand\empty{}$
$\Newextarrow{\xhookrightarrow}{10,10}{0x21AA}$

8.2.1 Yoneda's Lemma

Let $\operatorname{\mathcal{C}}$ be a category. Every object $X \in \operatorname{\mathcal{C}}$ determines a corepresentable functor $h^{X}: \operatorname{\mathcal{C}}\rightarrow \operatorname{Set}$, given on objects by the formula $h^{X}(Y) = \operatorname{Hom}_{\operatorname{\mathcal{C}}}(X,Y)$. This functor can be characterized by a universal mapping property:

Proposition 8.2.1.1 (Yoneda's Lemma, Strong Form). Let $\operatorname{\mathcal{C}}$ be a category containing an object $X$. For every functor $\mathscr {F}: \operatorname{\mathcal{C}}\rightarrow \operatorname{Set}$, evaluation on the identity morphism $\operatorname{id}_{X} \in h^{X}(X)$ induces a bijection

\[ \operatorname{Hom}_{ \operatorname{Fun}( \operatorname{\mathcal{C}}, \operatorname{Set}) }( h^{X}, \mathscr {F} ) \rightarrow \mathscr {F}(X). \]

Proof. Fix an element $x \in \mathscr {F}(X)$. We wish to show that there is a unique natural transformation $\alpha : h^{X} \rightarrow \mathscr {F}$ which carries $\operatorname{id}_{X} \in h^{X}(X)$ to the element $x \in \mathscr {F}(X)$.

For any object $Y \in \operatorname{\mathcal{C}}$, every element $f \in h^{X}(Y) \in \operatorname{Hom}_{\operatorname{\mathcal{C}}}(X,Y)$ can be obtained by evaluating the function $h^{X}(f): h^{X}(X) \rightarrow h^{X}(Y)$ on the object $\operatorname{id}_{X}$. It follows that, if $\alpha : h^{X} \rightarrow \mathscr {F}$ is a natural transformation satisfying $\alpha _{X}( \operatorname{id}_ X ) = x$, then it must satisfy the identity

\[ \alpha _{Y}(f) = \alpha _{Y}( h^{X}(f)(\operatorname{id}_ X) ) = \mathscr {F}(f)( h_ X( \operatorname{id}_ X ) ) = \mathscr {F}(f)(x). \]

This proves uniqueness. To establish existence, it will suffice to show that the collection of functions

\[ \alpha _{Y}: \operatorname{Hom}_{\operatorname{\mathcal{C}}}(X,Y) \rightarrow \mathscr {F}(Y) \quad \quad f \mapsto \mathscr {F}(f)(x) \]

determine a natural transformation from $h^{X}$ to $\mathscr {F}$. In other words, we must show that for each morphism $g: Y \rightarrow Z$ in $\operatorname{\mathcal{C}}$, the diagram of sets

\[ \xymatrix@C =50pt@R=50pt{ \operatorname{Hom}_{\operatorname{\mathcal{C}}}(X,Y) \ar [d]^{ \alpha _{Y} } \ar [r]^-{ g \circ } & \operatorname{Hom}_{\operatorname{\mathcal{C}}}(X,Z) \ar [d]^{ \alpha _ Z} \\ \mathscr {F}(Y) \ar [r]^-{ \mathscr {F}(g) } & \mathscr {F}(Z) } \]

is commutative. This follows from the observation that, for every morphism $f: X \rightarrow Y$ of $\operatorname{\mathcal{C}}$, we have an equality $\mathscr {F}( g \circ f)(x) = (\mathscr {F}(g) \circ \mathscr {F}(f))(x)$ in the set $\mathscr {F}(Z)$. $\square$

Our goal in this section is prove a generalization of Yoneda's lemma, where we replace $\operatorname{\mathcal{C}}$ by an $\infty $-category and $\operatorname{Set}$ by the $\infty $-category $\operatorname{\mathcal{S}}$ of spaces (Proposition 8.2.1.3). In the $\infty $-categorical setting, the proof is more subtle: to construct a natural transformation $\alpha $ between functors $\mathscr {F}, \mathscr {G}: \operatorname{\mathcal{C}}\rightarrow \operatorname{\mathcal{S}}$, it is not enough to specify a collection of morphisms $\{ \alpha _{Y}: \mathscr {G}(Y) \rightarrow \mathscr {F}(Y) \} _{ Y \in \operatorname{\mathcal{C}}}$ and to verify a compatibility condition. To address this difficulty, we will use the formalism of Kan extensions developed in §7.3 (see Lemma 8.2.1.7).

Notation 8.2.1.2. Let $\operatorname{\mathcal{S}}$ denote the $\infty $-category of spaces (Construction 5.5.1.1). Let $\operatorname{\mathcal{C}}$ be an $\infty $-category and suppose we are given a pair of functors $\mathscr {F}, \mathscr {G}: \operatorname{\mathcal{C}}\rightarrow \operatorname{\mathcal{S}}$. Fix an object $X \in \operatorname{\mathcal{C}}$ and a vertex $\eta \in \mathscr {F}(X)$. We then obtain a comparison morphism

\begin{eqnarray*} \operatorname{Hom}_{\operatorname{Fun}(\operatorname{\mathcal{C}}, \operatorname{\mathcal{S}}) }( \mathscr {F}, \mathscr {G} ) & \xrightarrow { \operatorname{ev}_{X} } & \operatorname{Hom}_{\operatorname{\mathcal{S}}}( \mathscr {F}(X), \mathscr {G}(X) ) \\ & \xrightarrow { \circ [\eta ] } & \operatorname{Hom}_{\operatorname{\mathcal{S}}}( \Delta ^0, \mathscr {G}(X) ) \\ & \simeq & \mathscr {G}(X) \end{eqnarray*}

in the homotopy category $\mathrm{h} \mathit{\operatorname{Kan}}$, where the first map is given by evaluation on the object $X$, the second by the composition law of Notation 4.6.8.15, and the third is (the inverse of) the homotopy equivalence of Remark 5.5.1.5.

Proposition 8.2.1.3 ($\infty $-Categorical Yoneda Lemma). Let $\operatorname{\mathcal{C}}$ be an $\infty $-category containing an object $X$, let $\mathscr {F}: \operatorname{\mathcal{C}}\rightarrow \operatorname{\mathcal{S}}$ be a functor, and let $\eta \in \mathscr {F}(X)$ be a vertex which exhibits the functor $\mathscr {F}$ as corepresented by $X$ (see Definition 5.6.6.1). Then, for every functor $\mathscr {G}: \operatorname{\mathcal{C}}\rightarrow \operatorname{\mathcal{S}}$, the comparison map

\[ \operatorname{Hom}_{ \operatorname{Fun}(\operatorname{\mathcal{C}}, \operatorname{\mathcal{S}}) }( \mathscr {F}, \mathscr {G} ) \rightarrow \mathscr {G}(X) \]

of Notation 8.2.1.2 is an isomorphism in the homotopy category $\mathrm{h} \mathit{\operatorname{Kan}}$.

Remark 8.2.1.4. In the special case where $\operatorname{\mathcal{C}}$ is (the nerve of) an ordinary category and $\mathscr {G}$ is a set-valued functor, Proposition 8.2.1.3 reduces to Proposition 8.2.1.1.

Remark 8.2.1.5. Let $\operatorname{\mathcal{C}}$ be a small $\infty $-category and let $X$ be an object of $\operatorname{\mathcal{C}}$. In §5.6.6, we showed that there exists a functor $\mathscr {F}: \operatorname{\mathcal{C}}\rightarrow \operatorname{\mathcal{S}}$ which is corepresented by $X$, and that $\mathscr {F}$ is uniquely determined up to isomorphism (Theorem 5.6.6.14). Proposition 8.2.1.3 can be regarded as a more refined version of this uniqueness assertion: the functor $\mathscr {F}$ is characterized, up to isomorphism, by the requirement that it corepresents the evaluation functor

\[ \operatorname{ev}_{X}: \operatorname{Fun}( \operatorname{\mathcal{C}}, \operatorname{\mathcal{S}}) \rightarrow \operatorname{\mathcal{S}}\quad \quad \mathscr {G} \mapsto \mathscr {G}(X). \]

Corollary 8.2.1.6. Let $\operatorname{\mathcal{C}}$ be an $\infty $-category containing an object $X$. Suppose that, for every object $Y \in \operatorname{\mathcal{C}}$, the Kan complex $\operatorname{Hom}_{\operatorname{\mathcal{C}}}(X,Y)$ is essentially small (this condition is satisfied, for example, if $\operatorname{\mathcal{C}}$ is small). Let $\mathscr {F}: \operatorname{\mathcal{C}}\rightarrow \operatorname{\mathcal{S}}$ be a functor, and let $\eta $ be a vertex of the Kan complex $\mathscr {F}(X)$. The following conditions are equivalent:

$(1)$

The vertex $\eta $ exhibits the functor $\mathscr {F}$ as corepresented by $X$, in the sense of Definition 5.6.6.1.

$(2)$

For every functor $\mathscr {G}: \operatorname{\mathcal{C}}\rightarrow \operatorname{\mathcal{S}}$, the comparison map of Notation 8.2.1.2 is a homotopy equivalence $\operatorname{Hom}_{ \operatorname{Fun}(\operatorname{\mathcal{C}}, \operatorname{\mathcal{S}}) }( \mathscr {F}, \mathscr {G} ) \rightarrow \mathscr {G}(X)$.

$(3)$

For every functor $\mathscr {F}: \operatorname{\mathcal{C}}\rightarrow \operatorname{\mathcal{S}}$, the comparison map of Notation 8.2.1.2 induces a bijection $\pi _0(\operatorname{Hom}_{ \operatorname{Fun}(\operatorname{\mathcal{C}}, \operatorname{\mathcal{S}}) }( \mathscr {F}, \mathscr {G} )) \rightarrow \pi _0(\mathscr {G}(X))$.

Proof. The implication $(1) \Rightarrow (2)$ follows from Proposition 8.2.1.3, and the implication $(2) \Rightarrow (3)$ is immediate. We will complete the proof by showing that $(3)$ implies $(1)$. Our assumption that the morphism space $\operatorname{Hom}_{\operatorname{\mathcal{C}}}(X,Y)$ is essentially small for each $Y \in \operatorname{\mathcal{C}}$ guarantees that there exists a functor $\mathscr {F}: \operatorname{\mathcal{C}}\rightarrow \operatorname{\mathcal{S}}$ and a vertex $\eta ' \in \mathscr {F}'(X)$ which exhibits $\mathscr {F}'$ as corepresented by $X$ (see Theorem 5.6.6.14). Applying assumption $(3)$, we deduce that there exists a natural transformation $\alpha : \mathscr {F}' \rightarrow \mathscr {F}$ such that $\alpha _{X}( \eta ' )$ and $\eta $ lie in the same connected component of $\mathscr {F}'$. Since the pair $(\mathscr {F}', \eta ')$ also satisfies condition $(3)$, composition with $\alpha $ induces a bijection $\pi _0( \operatorname{Hom}_{\operatorname{Fun}(\operatorname{\mathcal{C}}, \operatorname{\mathcal{S}}) }( \mathscr {F}, \mathscr {G} ) ) \rightarrow \pi _0( \operatorname{Hom}_{\operatorname{Fun}(\operatorname{\mathcal{C}}, \operatorname{\mathcal{S}}) }( \mathscr {F}', \mathscr {G} ) )$ for each object $\mathscr {G} \in \operatorname{Fun}( \operatorname{\mathcal{C}}, \operatorname{\mathcal{S}})$. It follows that $\alpha $ is an isomorphism. Applying Remark 5.6.6.4, we deduce that $\alpha _{X}(\eta ') \in \mathscr {F}(X)$ exhibits the functor $\mathscr {F}$ as corepresented by $X$. Since $\eta $ and $\alpha _{X}(\eta )$ belong to the same connected component of $\mathscr {F}(X)$, it follows that $\eta $ has the same property (Remark 5.6.6.3). $\square$

Proposition 8.2.1.3 is an easy consequence of the following:

Lemma 8.2.1.7. Let $\operatorname{\mathcal{C}}$ be an $\infty $-category containing an object $X$, let $\mathscr {F}: \operatorname{\mathcal{C}}\rightarrow \operatorname{\mathcal{S}}$ be a functor, and let $\eta \in \mathscr {F}(X)$ be a vertex. The following conditions are equivalent:

$(1)$

The vertex $\eta $ exhibits $\mathscr {F}$ as corepresented by the object $X$, in the sense of Definition 5.6.6.1.

$(2)$

Let $\iota : \{ X\} \hookrightarrow \operatorname{\mathcal{C}}$ denote the inclusion map and let $\mathscr {F}_0: \{ X\} \rightarrow \operatorname{\mathcal{S}}$ denote the constant functor taking the value $\Delta ^0$, so that $\eta $ can be regarded as a natural transformation from $\mathscr {F}_0$ to the composite functor $\mathscr {F} \circ \iota $. Then $\eta $ exhibits $\mathscr {F}$ as a left Kan extension of $\mathscr {F}_0$ along $\iota $, in the sense of Variant 7.3.1.5.

Proof. Fix an object $Y \in \operatorname{\mathcal{C}}$ and set $M = \operatorname{Hom}_{\operatorname{\mathcal{C}}}(X,Y)$. For every Kan complex $K$, let $\underline{K}_{M}$ denote the constant functor $M \rightarrow \operatorname{\mathcal{S}}$ taking the value $K$, so that the functor $\mathscr {F}$ determines a natural transformation $\gamma : \underline{ \mathscr {F}(X) }_{M} \rightarrow \underline{ \mathscr {F}(Y) }_{M}$. We will show that the following pair of conditions is equivalent:

$(1_ Y)$

The composite map

\[ \operatorname{Hom}_{\operatorname{\mathcal{C}}}(X,Y) \rightarrow \operatorname{Hom}_{\operatorname{\mathcal{S}}}( \mathscr {F}(X), \mathscr {F}(Y) ) \xrightarrow { \circ [\eta ] } \operatorname{Hom}_{\operatorname{\mathcal{S}}}( \Delta ^0, \mathscr {F}(Y) ) \]

is a homotopy equivalence of Kan complexes.

$(2_ Y)$

The composite natural transformation

\[ \underline{ \Delta ^0 }_{M} \xrightarrow {\eta } \underline{ \mathscr {F}(X) }_{M} \xrightarrow {\gamma } \underline{ \mathscr {F}(Y) }_{M} \]

exhibits $\mathscr {F}(Y)$ as a colimit of the constant diagram $\underline{ \Delta ^0 }|_{M}$ in the $\infty $-category $\operatorname{\mathcal{S}}$.

The equivalence of $(1_ Y)$ and $(2_ Y)$ is a special case of Proposition 7.6.2.9 (see Example 7.6.2.11). Lemma 8.2.1.7 follows by allowing the object $Y \in \operatorname{\mathcal{C}}$ to vary. $\square$