The first and second corollary below are well-known category theory lemmas. We give a slightly different argument than usual (i.e. we took a trivial result and changed it into something much more complicated).
Here is a lovely little definition:
Definition. Given a small diagram
of sets, write
for the small category with
![Rendered by QuickLaTeX.com \[\operatorname{ob}\left( \bigcup D \right) = \bigcup_{i \in \operatorname{ob} \mathcal I} D(i),\]](https://lovelylittlelemmas.rjprojects.net/wp-content/ql-cache/quicklatex.com-4e02977ba08ed15e4450c4cd2138fbb5_l3.svg)
and morphisms
![Rendered by QuickLaTeX.com \[\operatorname{Mor}\big(a_i,b_j\big) = \left\{f \in \operatorname{Mor}(i,j)\ \Big|\ D(f)(a_i) = b_j\right\}\]](https://lovelylittlelemmas.rjprojects.net/wp-content/ql-cache/quicklatex.com-ac14539cfc0c404b51a2d52826838078_l3.svg)
for
and
(where
), with composition induced by composition of maps
.
Note that by the Yoneda lemma, this category is isomorphic (not just equivalent!) to
, where
is the Yoneda embedding. Indeed,
are in bijection with natural transformations
, and morphisms
correspond to a morphism
rendering commutative the associated diagram
![Rendered by QuickLaTeX.com \[\begin{array}{ccccc}h_j\!\!\!\! & & \!\!\!\!\!\!\stackrel{- \circ f}\longrightarrow\!\!\!\!\!\! & & \!\!\!\!h_i \\ & \!\!\!\!\searrow\!\!\!\!\!\!\!\! & & \!\!\!\!\!\!\!\!\swarrow\!\!\!\! \\ & & D.\! & & \end{array}\]](https://lovelylittlelemmas.rjprojects.net/wp-content/ql-cache/quicklatex.com-731d5060fb714ed0de5f98b47ad27942_l3.svg)
Example 1. If
, then a diagram
is a pair of sets
with parallel arrows
. Then
looks like a ‘bipartite preorder’ where every source object has outgoing valence
:
![Rendered by QuickLaTeX.com \[\begin{array}{ccc}s_1 & \to & t_1 \\ & \searrow\!\!\!\!\!\!\nearrow & \\ s_2 & & t_2 \\ & \searrow & \\ \vdots & & \vdots \end{array}\]](https://lovelylittlelemmas.rjprojects.net/wp-content/ql-cache/quicklatex.com-3dad4905bde74cc465592974829af771_l3.svg)
Example 2. Given a set
, write
for the discrete category on
, i.e.
and
![Rendered by QuickLaTeX.com \[\operatorname{Mor}(a,b) = \begin{cases}\{\mathbf{1}_a\}, & a = b, \\ \varnothing, & \text{else}.\end{cases}\]](https://lovelylittlelemmas.rjprojects.net/wp-content/ql-cache/quicklatex.com-17fb2a0014459208d7a6901c497bf20c_l3.svg)
If
is itself a discrete category, then
is just a collection
of sets, and
![Rendered by QuickLaTeX.com \[\bigcup D = \left(\bigcup \mathbf S\right)^{\operatorname{disc}}.\]](https://lovelylittlelemmas.rjprojects.net/wp-content/ql-cache/quicklatex.com-f1e076751a68f543e7ce61d8115d3104_l3.svg)
Remark. Giving a functor
is the same thing as giving functors
and natural transformations
![Rendered by QuickLaTeX.com \[F(f) \colon F(i) \to F(j) \circ D(f)^{\operatorname{disc}}\]](https://lovelylittlelemmas.rjprojects.net/wp-content/ql-cache/quicklatex.com-f0896565bef68248ec2c6edea41de7bf_l3.svg)
of functors
for all
in
, such that
![Rendered by QuickLaTeX.com \[F(g \circ f) = \left(F(g) \star \mathbf 1_{D(f)^{\operatorname{disc}}}\right) \circ F(f)\]](https://lovelylittlelemmas.rjprojects.net/wp-content/ql-cache/quicklatex.com-aa33453a1e48d3640e794fabebbe53ee_l3.svg)
for all
in
(where
denotes horizontal composition of natural transformations, as in Tag 003G).
Example 3. Let
be a small category, and consider the diagram
given by the source and target maps
. Then we have a functor
![Rendered by QuickLaTeX.com \[F \colon \bigcup D_{\mathcal I} \to \mathcal I\]](https://lovelylittlelemmas.rjprojects.net/wp-content/ql-cache/quicklatex.com-3e483eb78491fab528458d329c6ba5bf_l3.svg)
given on objects by

and on morphisms by

In terms of the remark above, it is given by the functors
taking
to
and the natural inclusion
, along with the natural transformations

We can now formulate the main result.
Lemma. Let
be a small category. Then the functor
of Example 3 is cofinal.
Recall that a functor
is cofinal if for all
, the comma category
is nonemptry and connected. See also Tag 04E6 for a concrete translation of this definition.
Proof. Let
. Since
, the identity
gives the object
in
, showing nonemptyness. For connectedness, it suffices to connect any
(i.e.
) to the identity
) (i.e.
). If
, then the commutative diagram
![Rendered by QuickLaTeX.com \[\begin{array}{ccccccc}i & = & i & = & i & = & i \\ \!\!\!\!\!{\tiny f}\downarrow & & \!\!\!\!\!\!\!\!{\tiny xf}\downarrow & & || & & || \\ s(x) & \overset x\to & t(x) & \overset{xf}\leftarrow & i & = & i \\ || & & || & & || & & || \\ F(x) & \underset{F(t)}\to & F(t(x)) & \underset{F(t)}\leftarrow & F(xf) & \underset{F(s)}\to & F(i) \end{array}\]](https://lovelylittlelemmas.rjprojects.net/wp-content/ql-cache/quicklatex.com-caaecb51ac719235cf94092a10723a35_l3.svg)
gives a zigzag
![Rendered by QuickLaTeX.com \[(x,f) \stackrel t\to (t(x),xf) \stackrel t\leftarrow (xf,\mathbf 1_i) \stackrel s\to (i,\mathbf 1_i)\]](https://lovelylittlelemmas.rjprojects.net/wp-content/ql-cache/quicklatex.com-c3f77cd18c51fc6622a2624a89dae66b_l3.svg)
of morphisms in
connecting
to
. If instead
, we can skip the first step, and the diagram
![Rendered by QuickLaTeX.com \[\begin{array}{ccccccc} i & = & i & = & i \\ \!\!\!\!\!\!{\tiny f}\downarrow & & || & & || \\ x & \overset{f}\leftarrow & i & = & i \\ || & & || & & || \\ F(x) & \underset{F(t)}\leftarrow & F(f) & \underset{F(s)}\to & F(i) \end{array}\]](https://lovelylittlelemmas.rjprojects.net/wp-content/ql-cache/quicklatex.com-aad38941200d66f927b4def003a3f3dc_l3.svg)
gives a zigzag
![Rendered by QuickLaTeX.com \[(x,f) \stackrel t\leftarrow (f,\mathbf 1_i) \stackrel s\to (i,\mathbf 1_i)\]](https://lovelylittlelemmas.rjprojects.net/wp-content/ql-cache/quicklatex.com-ab3078445ca3e9365f5f8d92a62e9e69_l3.svg)
connecting
to
. 
Corollary 1. Let
be a small diagram in a category
with small products. Then there is a canonical isomorphism
![Rendered by QuickLaTeX.com \[\lim_{\leftarrow} D = \operatorname{Eq}\left( \prod_{i \in \operatorname{ob}(\mathcal I)} D(i) \rightrightarrows \prod_{f \in \operatorname{ar}(\mathcal I)} D(s(i)) \right),\]](https://lovelylittlelemmas.rjprojects.net/wp-content/ql-cache/quicklatex.com-d609cfd948a2aa341c851ecf9e4cc46f_l3.svg)
provided that either side exists.
Proof. By the lemma, the functor
![Rendered by QuickLaTeX.com \[F \colon \left(\bigcup D_{\mathcal I}\right)^{\operatorname{op}} \to \mathcal I^{\operatorname{op}}\]](https://lovelylittlelemmas.rjprojects.net/wp-content/ql-cache/quicklatex.com-eec3b4e4e5469015b07f734ef12f7ec1_l3.svg)
is initial. Hence by Tag 002R, the natural morphism
![Rendered by QuickLaTeX.com \[\lim_{\leftarrow} D \to \lim_{\leftarrow} D \circ F\]](https://lovelylittlelemmas.rjprojects.net/wp-content/ql-cache/quicklatex.com-865826a3461ad8a09252e292df098c52_l3.svg)
is an isomorphism if either side exists. But
is a category as in Example 1, and it’s easy to see that the limit over a diagram
is computed as the equaliser of a pair of arrows between the products. 
Of course this is not an improvement of the traditional proof, because the “it’s easy to see” step at the end is very close to the same statement as the corollary in the special case where
is of the form
for some
. But it’s fun to move the argument almost entirely away from limits and into the index category.
Corollary 2. Let
be a category that has small products and equalisers of parallel pairs of arrows. Then
is (small) complete. 