# Is $\mathbb{R}\cup\{-\infty,+\infty\}$ the categorical co-completion of $\mathbb{Q}$

Seeing $$\mathbb{Q}$$ as an ordered set, the colimit of a diagram $$D:\mathcal{I} \to \mathbb{Q}$$, when it exists, is just $$\operatorname{colim}D \cong \operatorname{sup}_iD(i)$$.

It seems to me that given any diagram $$D:\mathbb{Q} \to \mathcal{E}$$ into a cocomplete category $$\mathcal{E}$$, it extends to a functor $$L:\mathbb{R}\cup\{-\infty,+\infty\} \to \mathcal{E}$$ given by $$L(r)=\operatorname{colim}\{D(q):q \leq r, q\in \mathbb{Q}\}\in \mathcal{E}$$.

This establishes $$\mathbb{R}\cup\{-\infty,+\infty\}$$ as the free co-completion of $$\mathbb{Q}$$. Moreover, we obtain the density result asserting that every real number is the sup of all smaller rational numbers as a corollary of the fact that every presheaf is a colimit of representables.

Proof: $$L$$ is a functor preserving colimits and extending $$D$$ by construction. Given another $$L'$$ with these properties, since every $$r$$ is the colimit (= sup) of all its smaller rational numbers, it must be $$L \cong L'$$.

Am I stating something wrong here? I just thought about it, and it seems a nice and elementary example, but I have not seen it stated anywhere, which is very strange, and makes me suspect I am missing something and there's something wrong?

• Perhaps this answer answers your question? Commented Jun 9, 2023 at 15:49
• @varkor not really. I mean the linked post in the question seems to say what I am saying, and the answer given does not convince me at all that it's wrong... Commented Jun 9, 2023 at 15:54

## 2 Answers

The extension $$L$$ you describe does not preserve colimits in general. For instance, let $$\mathcal{E}$$ be the poset $$\{0,1\}$$ and let $$D$$ send the negative rationals to $$0$$ and the nonnegative rationals to $$1$$. Then your extension $$L$$ will send $$[-\infty,0)$$ to $$0$$ and $$[0,\infty]$$ to $$1$$. This does not preserve colimits because $$\sup [-\infty,0)=0$$.

• Note this shows $[-\infty,\infty]$ isn't even the free cocompletion as a poset, let alone as a category. Commented Jun 9, 2023 at 17:31

The free cocompletion of any category is its category of presheaves. The category of presheaves on $$\mathbb Q$$ is the category of families of sets, contravariantly indexed by rational numbers. This is a lot bigger than $$\mathbb R,$$ in particular, it's not a small category (neither is any category of presheaves on a nonempty category.) The Yoneda embedding of $$\mathbb Q$$ into its presheaf category also fails to preserve coproducts of pairs: the coproduct of the presheaves represented by $$1/3$$ and $$1/2$$ has two elements in its values at any rational $$x\le 1/3,$$ so it's not equal to the presheaf represented by $$1/2=1/3\vee 1/2.$$ This behavior is impossible in any poset, which gives an example of a cocontinuous functor out of $$\mathbb Q$$ which cannot be cocontinuously extended to any poset containing $$\mathbb Q.$$

As discussed at the question Varkor linked in the comments, $$[-\infty,\infty]$$ is the Dedekind-Macneille completion of $$\mathbb Q$$ as a poset, a far more restrictive kind of cocompletion than the free cocompletion as a category. Intermediate is the free cocompletion of $$\mathbb Q$$ as a poset, its poset of downward-closed sets, which the linked question originally confused with $$[-\infty,\infty].$$