# Density theorem (category theory)

In category theory, a branch of mathematics, the density theorem states that every presheaf of sets is a colimit of representable presheaves in a canonical way.[1]

For example, by definition, a simplicial set is a presheaf on the simplex category Δ and a representable simplicial set is exactly of the form ${\displaystyle \Delta ^{n}=\operatorname {Hom} (-,[n])}$ (called the standard n-simplex) so the theorem says: for each simplicial set X,

${\displaystyle X\simeq \varinjlim \Delta ^{n}}$

where the colim runs over an index category determined by X.

## Proof

Let F be a presheaf on a category C; i.e., an object of the functor category ${\displaystyle {\widehat {C}}=\mathbf {Fct} (C^{\text{op}},\mathbf {Set} )}$. As an index category over which a colimit will run, let I be the category of elements of F: it is the category where

1. an object is a pair ${\displaystyle (U,x)}$ consisting of an object U in C and an element ${\displaystyle x\in F(U)}$,
2. a morphism ${\displaystyle (U,x)\to (V,y)}$ consists of a morphism ${\displaystyle u:U\to V}$ in C such that ${\displaystyle (Fu)(y)=x.}$

It comes with the forgetful functor ${\displaystyle p:I\to C}$.

Now, we claim F is the colimit of the diagram (i.e., a functor)

${\displaystyle I{\overset {p}{\to }}C\to {\widehat {C}}}$

where the second arrow is the Yoneda embedding: ${\displaystyle U\mapsto h_{U}=\operatorname {Hom} (-,U)}$. Let f denote this diagram. To show the colimit of f is F, we need to show: for every presheaf G on C, there is a natural bijection:

${\displaystyle \operatorname {Hom} _{\widehat {C}}(F,G)\simeq \operatorname {Hom} (f,\Delta _{G})}$

where ${\displaystyle \Delta _{G}}$ is the constant functor with value G and Hom on the right means the set of natural transformations. This is because the universal property of a colimit amounts to saying ${\displaystyle \varinjlim -}$ is the left adjoint to the diagonal functor ${\displaystyle \Delta _{-}.}$

For this end, let ${\displaystyle \alpha :f\to \Delta _{G}}$ be a natural transformation. It is a family of morphisms indexed by the objects in I:

${\displaystyle \alpha _{U,x}:f(U,x)=h_{U}\to \Delta _{G}(U,x)=G}$

that satisfies the property: for each morphism ${\displaystyle (U,x)\to (V,y),u:U\to V}$ in I, ${\displaystyle \alpha _{V,y}\circ h_{u}=\alpha _{U,x}}$ (since ${\displaystyle f((U,x)\to (V,y))=h_{u}.}$)

The Yoneda lemma says there is a natural bijection ${\displaystyle G(U)\simeq \operatorname {Hom} (h_{U},G)}$. Under this bijection, ${\displaystyle \alpha _{U,x}}$ corresponds to a unique element ${\displaystyle g_{U,x}\in G(U)}$. We have:

${\displaystyle (Gu)(g_{V,y})=g_{U,x}}$

because, according to the Yoneda lemma, ${\displaystyle Gu:G(V)\to G(U)}$ corresponds to ${\displaystyle -\circ h_{u}:\operatorname {Hom} (h_{V},G)\to \operatorname {Hom} (h_{U},G).}$

Now, for each object U in C, let ${\displaystyle \theta _{U}:F(U)\to G(U)}$ be the function given by ${\displaystyle \theta _{U}(x)=g_{U,x}}$. This determines the natural transformation ${\displaystyle \theta :F\to G}$; indeed, for each morphism ${\displaystyle (U,x)\to (V,y),u:U\to V}$ in I, we have:

${\displaystyle (Gu\circ \theta _{V})(y)=(Gu)(g_{V,y})=g_{U,x}=(\theta _{U}\circ Fu)(y),}$

since ${\displaystyle (Fu)(y)=x}$. Clearly, the construction ${\displaystyle \alpha \mapsto \theta }$ is reversible. Hence, ${\displaystyle \alpha \mapsto \theta }$ is the requisite natural bijection.

## Notes

1. ^ Mac Lane, Ch III, § 7, Theorem 1.