Kerodon

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

5.1.1 The Category of Elements

We begin by describing a special case of the Grothendieck construction, where we can eschew the language of $2$-categories. Throughout this section, we let $\operatorname{Set}$ denote the category of sets.

Construction 5.1.1.1 (The Category of Elements). Let $\operatorname{\mathcal{C}}$ be a category and let $\mathscr {F}: \operatorname{\mathcal{C}}\rightarrow \operatorname{Set}$ be a functor. We define a category $\int _{\operatorname{\mathcal{C}}} \mathscr {F}$ as follows:

  • The objects of $\int _{\operatorname{\mathcal{C}}} \mathscr {F}$ are pairs $(C, x)$, where $C$ is an object of $\operatorname{\mathcal{C}}$ and $x$ is an element of the set $\mathscr {F}(C)$.

  • If $(C,x)$ and $(C', x')$ are objects of $\int _{\operatorname{\mathcal{C}}} \mathscr {F}$, then a morphism from $(C,x)$ to $(C',x')$ in the category $\int _{\operatorname{\mathcal{C}}} \mathscr {F}$ is a morphism $f: C \rightarrow C'$ in the category $\operatorname{\mathcal{C}}$ for which the induced map $\mathscr {F}(f): \mathscr {F}(C) \rightarrow \mathscr {F}(C')$ carries $x$ to $x'$.

  • Composition of morphisms in $\int _{\operatorname{\mathcal{C}}} \mathscr {F}$ is given by composition of morphisms in $\operatorname{\mathcal{C}}$.

We will refer to $\int _{\operatorname{\mathcal{C}}} \mathscr {F}$ as the category of elements of the functor $\mathscr {F}$. Note that the construction $(C,x) \mapsto C$ determines a functor $\int _{\operatorname{\mathcal{C}}} \mathscr {F} \rightarrow \operatorname{\mathcal{C}}$, which we will refer to as the forgetful functor.

Variant 5.1.1.2. Let $\operatorname{\mathcal{C}}$ be a category and let $\mathscr {F}: \operatorname{\mathcal{C}}^{\operatorname{op}} \rightarrow \operatorname{Set}$ be a functor. We define a category $\int ^{\operatorname{\mathcal{C}}} X$ as follows:

  • The objects of $\int ^{\operatorname{\mathcal{C}}} \mathscr {F}$ are pairs $(C, x)$, where $C$ is an object of $\operatorname{\mathcal{C}}$ and $x$ is an element of the set $\mathscr {F}(C)$.

  • If $(C,x)$ and $(C', x')$ are objects of $\int ^{\operatorname{\mathcal{C}}} \mathscr {F}$, then a morphism from $(C,x)$ to $(C',x')$ in the category $\int ^{\operatorname{\mathcal{C}}} \mathscr {F}$ is a morphism $f: C \rightarrow C'$ in the category $\operatorname{\mathcal{C}}$ for which the induced map $\mathscr {F}(f): \mathscr {F}(C') \rightarrow \mathscr {F}(C)$ carries $x'$ to $x'$.

  • Composition of morphisms in $\int ^{\operatorname{\mathcal{C}}} \mathscr {F}$ is given by composition of morphisms in $\operatorname{\mathcal{C}}$.

We will refer to $\int ^{\operatorname{\mathcal{C}}} \mathscr {F}$ as the category of elements of the functor $\mathscr {F}$. Note that the construction $(C,x) \mapsto C$ determines a functor $U: \int ^{\operatorname{\mathcal{C}}} \mathscr {F} \rightarrow \operatorname{\mathcal{C}}$, which we will refer to as the forgetful functor.

Remark 5.1.1.3. Let $\operatorname{\mathcal{C}}$ be a category and let $\mathscr {F}: \operatorname{\mathcal{C}}\rightarrow \operatorname{Set}$ be a functor. Then we have a canonical isomorphism of categories

\[ (\int _{\operatorname{\mathcal{C}}} \mathscr {F})^{\operatorname{op}} \simeq (\int ^{\operatorname{\mathcal{C}}^{\operatorname{op}}} \mathscr {F}), \]

where $\int _{\operatorname{\mathcal{C}}} \mathscr {F}$ is the category of elements introduced in Construction 5.1.1.1 and $\int ^{\operatorname{\mathcal{C}}^{\operatorname{op}}} \mathscr {F}$ is the category of elements introduced in Variant 5.1.1.2.

Example 5.1.1.4. Let $X: \operatorname{{\bf \Delta }}^{\operatorname{op}} \rightarrow \operatorname{Set}$ be a simplicial set. Then the category $\int ^{\operatorname{{\bf \Delta }}} X$ of Variant 5.1.1.2 is the category of simplices of $X$ introduced in Construction 1.1.8.19.

Example 5.1.1.5. Let $\operatorname{\mathcal{C}}$ be a category, let $X$ be an object of $\operatorname{\mathcal{C}}$, and let $h^{X}: \operatorname{\mathcal{C}}\rightarrow \operatorname{Set}$ denote the functor corepresented by $X$ (given on objects by the formula $h^{X}(Y) = \operatorname{Hom}_{\operatorname{\mathcal{C}}}(X,Y)$). Then the category of elements $\int _{\operatorname{\mathcal{C}}} h^{X}$ can be identified with the coslice category $\operatorname{\mathcal{C}}_{X/}$ of Variant 4.3.1.4. Similarly, if $h_{X}: \operatorname{\mathcal{C}}^{\operatorname{op}} \rightarrow \operatorname{Set}$ is the functor represented by $X$ (given on objects by $h_{X}(Y) = \operatorname{Hom}_{\operatorname{\mathcal{C}}}(Y,X)$), then the category of elements $\int ^{\operatorname{\mathcal{C}}} h_{X}$ can be identified with the slice category $\operatorname{\mathcal{C}}_{/X}$.

Remark 5.1.1.6. We define a category $\operatorname{Set}_{\ast }$ as follows:

  • The objects of $\operatorname{Set}_{\ast }$ are pairs $(X,x)$, where $X$ is a set and $x \in X$ is an element.

  • A morphism from $(X,x)$ to $(Y,y)$ in $\operatorname{Set}_{\ast }$ is a function $f: X \rightarrow Y$ satisfying $f(x) = y$.

We will refer to $\operatorname{Set}_{\ast }$ as the category of pointed sets. The construction $(X,x) \mapsto X$ determines a forgetful functor $\operatorname{Set}_{\ast } \rightarrow \operatorname{Set}$.

Let $\operatorname{\mathcal{C}}$ be a category and let $\mathscr {F}: \operatorname{\mathcal{C}}\rightarrow \operatorname{Set}$ be a functor. Then the category of elements $\int _{\operatorname{\mathcal{C}}} \mathscr {F}$ fits into a pullback diagram

\[ \xymatrix@R =50pt@C=50pt{ \int _{\operatorname{\mathcal{C}}} \mathscr {F} \ar [r] \ar [d] & \operatorname{Set}_{\ast } \ar [d] \\ \operatorname{\mathcal{C}}\ar [r]^-{\mathscr {F}} & \operatorname{Set}. } \]

Remark 5.1.1.7. Let $\operatorname{\mathcal{C}}$ be a small category, let $\operatorname{Fun}( \operatorname{\mathcal{C}}^{\operatorname{op}}, \operatorname{Set})$ be the category of set-valued functors on $\operatorname{\mathcal{C}}^{\operatorname{op}}$, and let $h: \operatorname{\mathcal{C}}\rightarrow \operatorname{Fun}( \operatorname{\mathcal{C}}^{\operatorname{op}}, \operatorname{Set})$ be the Yoneda embedding (so that $h$ carries each object $C \in \operatorname{\mathcal{C}}$ to the representable functor $h_{C} = \operatorname{Hom}_{\operatorname{\mathcal{C}}}( \bullet , C)$). For any object $\mathscr {F} \in \operatorname{Fun}( \operatorname{\mathcal{C}}^{\operatorname{op}}, \operatorname{Set})$, the category of elements $\int ^{\operatorname{\mathcal{C}}} \mathscr {F}$ fits into a pullback diagram

\[ \xymatrix@R =50pt@C=50pt{ \int ^{\operatorname{\mathcal{C}}} \mathscr {F} \ar [d] \ar [r] & \operatorname{Fun}(\operatorname{\mathcal{C}}^{\operatorname{op}}, \operatorname{Set})_{/\mathscr {F}} \ar [d] \\ \operatorname{\mathcal{C}}\ar [r]^-{h} & \operatorname{Fun}( \operatorname{\mathcal{C}}^{\operatorname{op}}, \operatorname{Set}). } \]

This is essentially a reformulation of Yoneda's lemma (we will return to this point in ยง).

We now show that, up to isomorphism, every functor $\mathscr {F}: \operatorname{\mathcal{C}}\rightarrow \operatorname{Set}$ can be recovered from the category of elements $\int _{\operatorname{\mathcal{C}}} \mathscr {F}$ (together with the forgetful functor $\int _{\operatorname{\mathcal{C}}} \mathscr {F} \rightarrow \operatorname{\mathcal{C}}$). Let $\operatorname{Cat}$ denote the category of (small) categories.

Proposition 5.1.1.8. Let $\operatorname{\mathcal{C}}$ be a small category. Then:

  • Construction 5.1.1.1 determines a fully faithful functor

    \[ \operatorname{Fun}( \operatorname{\mathcal{C}}, \operatorname{Set}) \rightarrow \operatorname{Cat}_{/\operatorname{\mathcal{C}}} \quad \quad \mathscr {F} \mapsto \int _{\operatorname{\mathcal{C}}} \mathscr {F}. \]
  • Variant 5.1.1.2 determines a fully faithful functor

    \[ \operatorname{Fun}( \operatorname{\mathcal{C}}^{\operatorname{op}}, \operatorname{Set}) \rightarrow \operatorname{Cat}_{/\operatorname{\mathcal{C}}} \quad \quad \mathscr {F} \mapsto \int ^{\operatorname{\mathcal{C}}} \mathscr {F}. \]

Proof. We will prove the first assertion; the second follows by a similar argument. Let $\mathscr {F}$ and $\mathscr {G}$ be functors from $\operatorname{\mathcal{C}}$ to the category of sets, and let $T: (\int _{\operatorname{\mathcal{C}}} \mathscr {F}) \rightarrow (\int _{\operatorname{\mathcal{C}}} \mathscr {G})$ be a functor for which the diagram

\[ \xymatrix@R =50pt@C=50pt{ \int _{\operatorname{\mathcal{C}}} \mathscr {F} \ar [rr]^{T} \ar [dr] & & \int _{\operatorname{\mathcal{C}}} \mathscr {G} \ar [dl] \\ & \operatorname{\mathcal{C}}& } \]

is strictly commutative, where the vertical maps are the forgetful functors. We wish to show that there is a unique natural transformation of functors

\[ f: \mathscr {F} \rightarrow \mathscr {G} \quad \quad \{ f_ C: \mathscr {F}(C) \rightarrow \mathscr {G}(C) \} _{C \in \operatorname{\mathcal{C}}} \]

for which the functor $T$ is given on objects by the construction $T(C,x) = (C, f_ C(x) )$. Note that this requirement uniquely determines the function $f_ C: \mathscr {F}(C) \rightarrow \mathscr {G}(C)$ for each object $C \in \operatorname{\mathcal{C}}$. We must show that the resulting collection $\{ f_ C \} _{C \in \operatorname{\mathcal{C}}}$ is a natural transformation: that is, for every morphism $u: C \rightarrow D$ in the category $\operatorname{\mathcal{C}}$, the diagram of sets

\[ \xymatrix@R =50pt@C=50pt{ \mathscr {F}(C) \ar [r]^-{f_ C} \ar [d]^{\mathscr {F}(u)} & \mathscr {G}(C) \ar [d]^{ \mathscr {G}(u)} \\ \mathscr {F}(D) \ar [r]^-{ f_ D) } & \mathscr {G}(D) } \]

is commutative. Fix an element $x \in \mathscr {F}(C)$, so that $u$ can be regarded as a morphism from $(C, x)$ to $(D,\mathscr {F}(u)(x) )$ in the category $\int _{\operatorname{\mathcal{C}}} \mathscr {F}$. Applying the functor $T$, we deduce that $u$ can also be regarded as a morphism from $(C, f_ C(x))$ to $(D, f_ D( \mathscr {F}(u)(x) ) )$ in the category $\int _{\operatorname{\mathcal{C}}} \mathscr {G}$. It follows that $\mathscr {G}(u)( f_ C(x) ) = f_ D( \mathscr {F}(u)(x) )$, as desired. $\square$