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.
For example, by definition, a simplicial set is a presheaf on the simplex category Δ and a representable simplicial set is exactly of the form
\Deltan=\operatorname{Hom}(-,[n])
X\simeq\varinjlim\Deltan
\widehat{C}=Fct(Cop,Set)
(U,x)
x\inF(U)
(U,x)\to(V,y)
u:U\toV
(Fu)(y)=x.
p:I\toC
Then F is the colimit of the diagram (i.e., a functor)
I\overset{p}\toC\to\widehat{C}
U\mapstohU=\operatorname{Hom}(-,U)
Let f denote the above diagram. To show the colimit of f is F, we need to show: for every presheaf G on C, there is a natural bijection:
\operatorname{Hom}\widehat{C
\DeltaG
\varinjlim-
\Delta-.
For this end, let
\alpha:f\to\DeltaG
\alphaU,:f(U,x)=hU\to\DeltaG(U,x)=G
(U,x)\to(V,y),u:U\toV
\alphaV,\circhu=\alphaU,
f((U,x)\to(V,y))=hu.
The Yoneda lemma says there is a natural bijection
G(U)\simeq\operatorname{Hom}(hU,G)
\alphaU,
gU,\inG(U)
(Gu)(gV,)=gU,
Gu:G(V)\toG(U)
-\circhu:\operatorname{Hom}(hV,G)\to\operatorname{Hom}(hU,G).
Now, for each object U in C, let
\thetaU:F(U)\toG(U)
\thetaU(x)=gU,
\theta:F\toG
(U,x)\to(V,y),u:U\toV
(Gu\circ\thetaV)(y)=(Gu)(gV,)=gU,=(\thetaU\circFu)(y),
(Fu)(y)=x
\alpha\mapsto\theta
\alpha\mapsto\theta