TITLE: Completion as a functor between topological rings
QUESTION [12 upvotes]: In the following all rings are assumed to be commutative and unitary.
Preliminaries:
For any topological ring $R$ we can form its completion $\widehat{R}$ by taking all Cauchy sequences modulo null sequences. This is again a ring and we can consider completion as a functor $\textbf{RingTop} \to \textbf{Ring}$.
If $R$ is even a linear topological ring - i.e. it admits a fundamental system of neighborhoods of 0 consisting of ideals, say $R \supseteq I_1 \supseteq I_2 \supseteq \dots$ - then $\widehat{R}$ carries a canonical linear topology given by $\widehat{R} \supseteq \widehat{I_1} \supseteq \widehat{I_2} \supseteq \dots$ which turns completion into a functor $\textbf{LRingTop} \to \textbf{LRingTop}$ between linear topological rings.
Question:
Is it possible to spare linearity and turn completion into a functor $\textbf{RingTop} \to \textbf{RingTop}$ in a canonical way which covers the above considerations and additionally has $\widehat{\mathbb{Q}} \cong \mathbb{R}$ as special case?
If not: is there a counterexample which illustrates the difficulties in defining a canonical topology on $\widehat{R}$ which turns completion into a functor in the non-linear case?
Thanks for any help!

REPLY [6 votes]: Separated completions are available more generally for uniform spaces, a reference is Bourbaki's Topologie générale, Chapter II, Paragraph 3. Here are some details:
Let $X$ be a uniform space. If $V$ is an entourage of $X$, then a subset $A \subseteq X$ is called small of order $V$ when $A \times A \subseteq V$. A filter on $X$ is called a Cauchy filter if it contains a small set of order $V$ for every entourage $V$. Cauchy filters which are minimal with respect to $\subseteq$ constitute a set $\widehat{X}$, which actually carries a uniform structure. A fundamental system of entourages is given by those sets of minimal Cauchy filters which contain a given small set of order $V$, where $V$ is an entourage on $X$. Then $X \mapsto \widehat{X}$ is a functor which is left adjoint to the functor from separated complete uniform spaces to uniform spaces.
The completion is compatible with products, so that it restricts to the completion of uniform algebraic structures. The case of topological abelian groups (which admit a canonical uniform structure) is treated in loc. cit., Chapter III, Paragraph 3. This can also be applied to topological rings.