# The forgetful functor from a category of elements strictly creates limits and connected colimits

This will be an exercise (3.4.iii) from the book "Category Theory in Context" by Emily Riehl.

First, let me fix notation.

Let $$F\colon\mathsf{C}\to\mathsf{Set}$$ be a set-valued functor. Its category of elements $$\int F$$ has pairs $$(X,a)$$ where $$a \in F(X)$$ as objects and morphisms $$f\colon X\to Y$$ (more precisely, triples $$((X,a),(Y,b),f\colon X\to Y)$$) so that $$F(f)(a) = b$$ as morphisms between objects $$(X,a)$$ and $$(Y,b)$$. There is a canonical forgetful functor $$\prod\colon\int F\to \mathsf{C}$$ which maps a pair $$(X,a)$$ to $$X$$ and $$f$$ to itself.

A functor $$F\colon\mathsf{C}\to\mathsf{D}$$ strictly creates (co)limits if for any diagram $$D\colon\mathsf{J}\to\mathsf{C}$$ and for any (co)limit (co)cone $$\lambda\colon A\Rightarrow FD$$ there is a unique (co)cone $$\mu\colon X\Rightarrow D$$ so that the image of $$\mu$$ under $$F$$ is $$\lambda$$ and, moreover, this $$\mu$$ is also a (co)limit (co)cone.

A category $$\mathsf{C}$$ is connected if for any its objects $$X$$ and $$Y$$ there is a finite sequence $$X_1,...,X_n$$ of objects of $$\mathsf{C}$$ so that $$X_1 = X$$, $$X_n = Y$$ and for any $$1 \leq k < n$$ at least one of the sets $$\mathsf{Hom_C}(X_k,X_{k+1})$$ and $$\mathsf{Hom_C}(X_{k+1},X_k)$$ is nonempty.

Previous in the book it has been established that the forgetful functor $$\prod\colon\int\mathsf{Hom_C}(X,-)\to\mathsf{C}$$ strictly creates limits and connected colimits. The exercise in question is regarded as generalization of this result. Note that the fact about $$\prod\colon\int\mathsf{Hom_C}(X,-)\to\mathsf{C}$$ has been proved in the previous paragraph, and this paragraph with the exercise 3.4.iii is mostly about "representable nature of limits and colimits", which, in turn, is mostly about how Yoneda embeddings $$\mathsf{C}\to\mathsf{Set^{C^{op}}}$$ preserve and reflect limits and how hom-functors also preserve limits. I have assumed that this should play a role in a proof of this exercise. Here it is:

Show that for any $$F\colon\mathsf{C}\to\mathsf{Set}$$, the forgetful functor $$\prod\colon\int F\to \mathsf{C}$$ strictly creates all limits that $$\mathsf{C}$$ admits and $$F$$ preserves, and strictly creates all connected colimits that $$\mathsf{C}$$ admits.

To be honest, I have zero ideas regarding this exercise (the ones I had led nowhere).

A diagram $$(X, a) : \mathsf{J} \to \int F$$ consists of a diagram $$X = \Pi \cdot (X, a) : \mathsf{J} \to \mathsf{C}$$ along with a cone $$a : * \to F\cdot X$$ in $$\mathsf{Set}$$. Suppose that $$X : \mathsf{J} \to \int F \to \mathsf{C}$$ has a limit cone $$\eta : \lim X \to X$$ and that $$F(\eta) : F(\lim X) \to F \cdot X$$ is also a limit cone.
We'll show that if $$\eta$$ has a lift then the lift is unique. Suppose that $$\eta$$ lifts to a cone $$\tilde{\eta} : z \to (X, a)$$. Since $$\Pi$$ acts as the identity on arrows we must have $$\tilde{\eta}_{j} = \eta_{j}$$ for all $$j$$ in $$\mathsf{J}$$. So we must have $$\Pi(z) = \lim X$$, meaning that $$z$$ is of the form $$(\lim X, x)$$, where $$x$$ is an element of $$F(\lim X)$$. Since $$\tilde{\eta} : (\lim X, x) \to (X, a)$$ is a cone in $$\int F$$ we must have $$F(\eta_{j})(x) = a_{j}$$ for all $$j \in \mathsf{J}$$. And since $$F(\eta)$$ is a limit cone there is a unique element $$x$$ of $$F(\lim X)$$ satisfying these equations, so there is at most one lift of $$\eta : \lim X \to X$$ to a cone in $$\int F$$.
So now to show that $$\Pi$$ strictly creates limits we just have to check that this $$\tilde{\eta} : (\lim X, x) \to (X, a)$$ is a cone in $$\int F$$ and that it is limiting. I'll leave it to you to do the checking.