I'm a little embarrassed to ask this one, but it could help for a class I'm teaching, so here goes:


Let $X$ be a metric space. We all know that $X$ admits a **completion**, which is a complete metric space $\hat{X}$ together with an isometric embedding $\iota: X \hookrightarrow \hat{X}$ with dense image. Moreover, one learns that this completion is essentially unique.


From a modern perspective, one would like to realize the completion as satisfying some universal mapping property: this makes precise the "essentially unique" above and gives some functorial properties. But it seems to me that the completion satisfies two different such properties:


1) It is universal with respect to isometric embeddings into complete metric spaces.


2) It is universal with respect to uniformly continuous maps into complete metric spaces. 


Of course 1) is the more obvious one. I gather from some internet research that 2) is supposed to be the "right" choice, and its usefulness is related to the fact that uniformly continuous maps have the extension property (again, I don't quite remember this from my undegraduate days; is it in Rudin's *Principles*, for instance?). However, it seems strange to me that by taking 2), we also get for free that the mapping $\iota$ is an isometric embedding (in particular, from 2) it doesn't even seem completely obvious that it is injective). Certainly one can see this by constructing the completion, but is there a more direct way?


I suspect that this is an instance when the more categorical thinkers have one up on me, and I stand ready to be enlightened.



What is the "right" universal property of the completion of a metric space?
This doesn't quite answer your questions about (2), but one could say the following:
given a metric, there is an underlying uniform structure. We can then form the completion
with respect to this uniform structure, which is universal for uniformly continuous maps into complete uniform spaces. That this map is injective is due to the existence of "enough" complete uniform spaces. (And to show this, one constructs the completion! I am still thinking about alternative, less constructive, approaches, to this.)


But I think now one can relate (2) to (1) via the following lemma:


If $X$ is a uniform space, and $d$ is a metric on $X$ inducing the given uniform structure,
then $d$ extends uniquely to the completion of $X$.


Proof: Something along the lines of: $d$ is uniformly continuous from $X \times X$ to
$\mathbb R$, and so extends.


Thus the universal object for (2) had to also be the universal object for (1).


