Colimits of presheaves and the density theorem

Jeffery Mensah • September 30, 2025∼1000 words

The goal of this short note is to show how to compute the limit or colimit of a diagram of presheaves, and prove that every presheaf can be written as the colimit of representable presheaves, a result known as the density theorem.

Limits and colimits of presheaves

Let II and D\mathscr{D} be categories. Recall that a limit cone of a diagram F∈[I,D]F \in [I, \mathscr{D}] is the same thing as a universal morphism from the diagonal functor

Δ ⁣:D→[I,D];Y⟼Δ(i↦Y)\Delta \colon \mathscr{D} \to [I, \mathscr{D}]; \quad \quad Y \overset{\Delta}{\longmapsto} (i \mapsto Y)

to FF. If a limit exists for each diagram, then they may be assembled into a right adjoint lim⁡ID ⁣:[I,D]→D\lim_I^{\mathscr{D}} \colon [I, \mathscr{D}] \to \mathscr{D} to Δ\Delta. This functor takes a diagram to the apex of its limiting cone in a functorial way. The rest of the cone can be recovered from the counit ϵ\epsilon of the adjunction Δ⊣lim⁡I\Delta \dashv \lim_I: for each diagram FF, its limiting cone is (lim⁡IF,ϵF)(\lim_I F, \epsilon_F). We call such a functor a limit functor, which is unique up to natural isomorphism if it exists.

To compute the limit or colimit of a diagram of presheaves, we make use the fact that a diagram of presheaves is equivalent to a presheaf of diagrams, and then compute limits objectwise. This equivalence is a consequence of general fact related to currying, which we state without proof.

Proposition. Let A,B, C\mathscr{A}, \mathscr{B}, \,\mathscr{C} be categories. Then there exists an isomorphism of categories

[A,[B,C]]→swapA,B[B,[A,C]][\mathscr{A}, [\mathscr{B, C}]] \xrightarrow{\mathrm{swap}_{\mathscr{A}, \mathscr{B}}} [\mathscr{B}, [\mathscr{A}, \mathscr{C}]]

given by [swapA,BF](Y)(X)=F(X)(Y)[\mathrm{swap}_{\mathscr{A}, \mathscr{B}} F](Y)(X) = F(X)(Y) for all X∈AX \in \mathscr{A} and Y∈BY \in \mathscr{B}.

Using this isomorphism, limits and colimits of diagrams of presheaves may be computed as follows.

Theorem. Let C\mathscr{C} be a category. The category of presheaves [Cop,Set][\mathscr{C}^{\mathrm{op}}, \mathbf{Set}] is complete, and for every small category II, the limit functor is given by

lim⁡I[Cop,Set]F=(lim⁡ISet)∗F~{\lim}_I^{[\mathscr{C}^\mathrm{op}, \mathbf{Set}]} \mathcal{F} = ({\lim}_{I}^{\mathbf{Set}})_* \widetilde{\mathcal{F}}

where F~=swapI,CopF\widetilde{\mathcal{F}} = \mathrm{swap}_{I, \mathscr{C}^\mathrm{op}} \mathcal{F}.

Proof. It suffices to show that lim⁡I[Cop,Set]{\lim}_I^{[\mathscr{C}^\mathrm{op}, \mathbf{Set}]} is the right adjoint to the diagonal functor Δ′ ⁣:[Cop,Set]→[I,[Cop,Set]]\Delta' \colon [\mathscr{C}^\mathrm{op}, \mathbf{Set}] \to [I, [\mathscr{C}^\mathrm{op}, \mathbf{Set}]]. Since Δ′=Δ∗∘swap−1\Delta' = \Delta_* \circ \mathrm{swap}^{-1}, an adjunction exists if and only if Δ∗⊣(lim⁡ISet)∗\Delta_* \dashv (\lim_I^{\mathbf{Set}})_*. Now, there exists a natural isomorphism

Θ ⁣:Hom[I,Set](Δ[−],−)⟶≅HomSet(−,lim⁡ISet[−])\Theta \colon \mathrm{Hom}_{[I, \mathbf{Set}]} (\Delta [-], -) \overset{\cong}{\longrightarrow} \mathrm{Hom}_{\mathbf{Set}} (-, {\lim}_I^{\mathbf{Set}}[-])

via the adjunction Δ⊣lim⁡ISet\Delta \dashv \lim_I^{\mathbf{Set}}, which may be used to construct isomorphisms

Θ^G,F~ ⁣:Hom[Cop,[I,Set]](Δ∗G,F~)⟶Hom[Cop,Set](G,(lim⁡ISet)∗F~);Θ^G,F~(ϕ)X=ΘG(X),F~(X)(ϕX).\widehat{\Theta}_{\mathcal{G}, \widetilde{\mathcal{F}}} \colon \mathrm{Hom}_{[\mathscr{C}^{\mathrm{op}}, [I, \mathbf{Set}]]} (\Delta_*\mathcal{G}, \widetilde{\mathcal{F}}) \longrightarrow \mathrm{Hom}_{[\mathscr{C}^{\mathrm{op}}, \mathbf{Set}]} (\mathcal{G}, ({\lim}_I^{\mathbf{Set}})_*\widetilde{\mathcal{F}}); \quad \quad \widehat{\Theta}_{\mathcal{G}, \widetilde{\mathcal{F}}}(\phi)_X = \Theta_{\mathcal{G}(X), \widetilde{\mathcal{F}}(X)}(\phi_X).

This map is well-defined: if ϕ∈Hom[Cop,[I,Set]](Δ∗G,F~)\phi \in \mathrm{Hom}_{[\mathscr{C}^\mathrm{op}, [I, \mathbf{Set}]]}(\Delta_* \mathcal{G}, \widetilde{\mathcal{F}}) and ψ ⁣:X→Y\psi \colon X \to Y is a morphism in C\mathscr{C}, then the diagram

commutes, so by naturality of Θ\Theta, we have

Θ^G,F~(ϕ)X∘G(ψ)=ΘG(Y),F~(X)(ϕX∘[Δ∗G](ψ))=ΘG(Y),F~(X)(F~(ψ)∘ϕY)=F~(ψ)∘Θ^G,F~(ϕ)Y.\widehat{\Theta}_{\mathcal{G}, \widetilde{\mathcal{F}}}(\phi)_X \circ \mathcal{G} (\psi) = \Theta_{\mathcal{G}(Y), \widetilde{\mathcal{F}}(X)}(\phi_X \circ [\Delta_* \mathcal{G}](\psi)) = \Theta_{\mathcal{G}(Y), \widetilde{\mathcal{F}}(X)}(\widetilde{\mathcal{F}}(\psi) \circ \phi_Y) = \widetilde{\mathcal{F}}(\psi) \circ \widehat{\Theta}_{\mathcal{G}, \widetilde{\mathcal{F}}}(\phi)_Y.

Furthermore, these isomorphisms assemble into a natural isomorphism. Indeed, given f ⁣:F~→F~′f \colon \widetilde{\mathcal{F}} \to \widetilde{\mathcal{F}}', we have

Θ^G,F~′(f∗ϕ)X=Θ^G,F~′(f∘ϕ)X=ΘG(X),F~′(X)(fX∘ϕX)=(fX)∗[ΘG(X),F~(X)(ϕX)]=(fX)∗[Θ^G,F~(ϕ)X],\widehat{\Theta}_{\mathcal{G}, \widetilde{\mathcal{F}}'}(f_* \phi)_X = \widehat{\Theta}_{\mathcal{G}, \widetilde{\mathcal{F}}'}(f \circ \phi)_X = \Theta_{\mathcal{G}(X), \widetilde{\mathcal{F}}'(X)}(f_X \circ \phi_X) = (f_X)_* \big[\Theta_{\mathcal{G}(X), \widetilde{\mathcal{F}}(X)}(\phi_X)\big] = (f_X)_*\big[\widehat{\Theta}_{\mathcal{G}, \widetilde{\mathcal{F}}}(\phi)_X\big],

and given g ⁣:G′→Gg \colon \mathcal{G}' \to \mathcal{G}, we have

Θ^G′,F~(g∗ϕ)X=Θ^G′,F~(ϕ∘Δ∗g)X=ΘG′(X),F~(X)(ϕX∘ΔgX)=(gX)∗[ΘG(X),F~(X)(ϕX)]=(gX)∗[Θ^G,F~(ϕ)X].\widehat{\Theta}_{\mathcal{G}', \widetilde{\mathcal{F}}}(g^* \phi)_X = \widehat{\Theta}_{\mathcal{G}', \widetilde{\mathcal{F}}}(\phi \circ \Delta_* g)_X = \Theta_{\mathcal{G}'(X), \widetilde{\mathcal{F}}(X)}(\phi_X \circ \Delta g_X) = (g_X)^*\big[\Theta_{\mathcal{G}(X), \widetilde{\mathcal{F}}(X)}(\phi_X)\big] = (g_X)^* \big[\widehat{\Theta}_{\mathcal{G}, \widetilde{\mathcal{F}}}(\phi)_X\big].

It follows that there is an adjunction Δ′⊣lim⁡I[Cop,Set]\Delta' \dashv \lim_I^{[\mathscr{C}^\mathrm{op}, \mathbf{Set}]}.

■\blacksquare

The exact same argument may be carried out for colimits. As such, we state the analogous dual result without proof.

Theorem. Let C\mathscr{C} be a category. The category of presheaves [Cop,Set][\mathscr{C}^{\mathrm{op}}, \mathbf{Set}] is cocomplete, and for every small category II, the colimit functor is given by

colimI[Cop,Set]F=(colimISet)∗F~{\mathrm{colim}}_I^{[\mathscr{C}^\mathrm{op}, \mathbf{Set}]} \mathcal{F} = ({\mathrm{colim}}_{I}^{\mathbf{Set}})_* \widetilde{\mathcal{F}}

where F~=swapI,CopF\widetilde{\mathcal{F}} = \mathrm{swap}_{I, \mathscr{C}^\mathrm{op}} \mathcal{F}.

Proof. Use the adjunction colimISet⊣Δ{\mathrm{colim}}_{I}^{\mathbf{Set}} \dashv \Delta to show that (colimISet)∗⊣Δ∗({\mathrm{colim}}_{I}^{\mathbf{Set}})_* \dashv \Delta_*.

■\blacksquare

The density theorem

Let C\mathscr{C} be a category and let F ⁣:Cop→Set\mathcal{F} \colon \mathscr{C}^\mathrm{op} \to \mathbf{Set} be a presheaf of sets on C\mathscr{C}. The Yoneda lemma implies that there exists an isomorphism of presheaves

Hom[Cop,Set]( ⁣よ[−],F)≅F,\mathrm{Hom}_{[\mathscr{C}^{\mathrm{op}}, \mathbf{Set}]}(\!\text{よ}[-], \mathcal{F}) \cong \mathcal{F},

where よ ⁣:C→[Cop,Set]\hspace{-1pt}\text{よ} \colon \mathscr{C} \to [\mathscr{C}^{\mathrm{op}}, \mathbf{Set}] is the Yoneda embedding. In particular, morphisms from よ\hspace{-1pt}\text{よ} to F\mathcal{F} correspond to sections of F\mathcal{F}. As such, we call the comma category ( ⁣よ↓F)(\!\text{よ} \downarrow \mathcal{F}) the category of elements of F\mathcal{F}, which we also denote by ∫CF\int_{\mathscr{C}} \mathcal{F}. The category of elements comes equipped with a canonical projection

π ⁣:∫CF→C;(X, ϕ ⁣:よ(X)→F)⟼πX\pi \colon \int_{\mathscr{C}} \mathcal{F} \to \mathscr{C}; \quad \quad (X,\, \phi \colon \hspace{-3pt}\text{よ}(X) \to \mathcal{F}) \overset{\pi}{\longmapsto} X

which may be interpreted as taking a section down to the object it lies over. Roughly speaking, the density theorem states that every presheaf F\mathcal{F} can be recovered as a colimit over ∫CF\int_{\mathscr{C}} \mathcal{F} of presheaves represented by these projections.

Theorem. Let C\mathscr{C} be a category and F ⁣:Cop→Set\mathcal{F} \colon \mathscr{C}^{\mathrm{op}} \to \mathbf{Set} be a presheaf of sets. Then there exists a presheaf isomorphism

F ≅ colim⁡∫CF ( ⁣よ∘π),\mathcal{F} \, \cong \, \underset{{\int_\mathscr{C} \mathcal{F}}}{\operatorname{colim}} \, (\!\text{よ} \circ \pi),

where π ⁣: ⁣∫CF→C\pi \colon \!\int_\mathscr{C} \mathcal{F} \to \mathscr{C} is the canonical projection map.

Proof. For each (X,ϕ)∈∫CF(X, \phi) \in \int_{\mathscr{C}} \mathcal{F}, let ρX,ϕ=ϕ\rho_{X, \phi} = \phi; we show that (F,ρ)(\mathcal{F}, \rho) is a universal cocone under  ⁣よ∘π\!\text{よ} \circ \pi. By the Yoneda lemma, there exists a natural isomorphism of profunctors

Θ ⁣:Hom[Cop,Set]( ⁣よ[−],−)≅⟨−,−⟩,\Theta \colon \mathrm{Hom}_{[\mathscr{C}^{\mathrm{op}}, \mathbf{Set}]}(\!\text{よ}[-], -) \cong \langle -, - \rangle,

where ⟨−,−⟩ ⁣:Cop×[Cop,Set]→Set\langle -, - \rangle \colon \mathscr{C}^{\mathrm{op}} \hspace{-1pt} \times \hspace{-1pt} [\mathscr{C}^\mathrm{op}, \mathbf{Set}] \to \mathbf{Set} is the canonical pairing. A cocone (G,σ)(\mathcal{G}, \sigma) under  ⁣よ∘π\!\text{よ} \circ \pi defines, for X∈CX\hspace{-1pt} \in \hspace{-1pt} \mathscr{C}, a map

σX ⁣:Hom[Cop,Set]( ⁣よ(X),F)→Hom[Cop,Set]( ⁣よ(X),G);σX(ϕ)=σX,ϕ.\sigma_X \colon \mathrm{Hom}_{[\mathscr{C}^{\mathrm{op}}, \mathbf{Set}]}(\!\text{よ}(X), \mathcal{F}) \to \mathrm{Hom}_{[\mathscr{C}^{\mathrm{op}}, \mathbf{Set}]}(\!\text{よ}(X), \mathcal{G}); \quad \quad \sigma_X(\phi) = \sigma_{X, \phi}.

By definition, a presheaf morphism ψ ⁣:F→G\psi \colon \hspace{-0.4pt} \mathcal{F} \to \mathcal{G} which induces a morphism of cocones must satisfy Hom( ⁣よ(X),ψ)=σX\mathrm{Hom}(\!\text{よ}(X), \hspace{-0.2pt}\psi) \hspace{-0.2pt} = \hspace{-0.2pt} \sigma_X. Since Θ\Theta is natural, the diagram

commutes, which determines each component of ψ\psi, since ψX\psi_X is just the pushforward ⟨X,ψ⟩\langle X, \psi \rangle. It follows that

ψX=ΘX,G−1∘σX∘ΘX,F.\begin{equation*} \psi_X = \Theta_{X, \mathcal{G}}^{-1} \circ \sigma_X \circ \Theta_{X, \mathcal{F}}. \tag{$\star$} \end{equation*}

It remains to show that such a presheaf morphism ψ\psi exists. Note that a morphism f ⁣:Y→Xf \colon Y \to X in C\mathscr{C} induces a morphism f ⁣:(Y,ϕ∘ ⁣よ(f))→(X,ϕ)f \colon (Y, \phi \circ \!\text{よ}(f)) \to (X, \phi) in the comma category, which implies

σY(ϕ∘ ⁣よ(f))=σX(ϕ)∘よ(f)\sigma_{Y}(\phi \circ \!\text{よ}(f)) = \sigma_{X}(\phi) \circ \text{よ}(f)

as (G,σ)(\mathcal{G}, \sigma) is a cocone under  ⁣よ∘π\!\text{よ} \circ \pi. It follows that σ\sigma is natural when viewed as a map Hom( ⁣よ[−],F)→Hom( ⁣よ[−],G)\mathrm{Hom}(\!\text{よ}[-], \mathcal{F}) \to \mathrm{Hom}(\!\text{よ}[-], \mathcal{G}). Furthermore, Θ\Theta is already natural in the first argument, so the formula (⋆)(\star) indeed defines a morphism of presheaves.

■\blacksquare