# Compactification of separable metric spaces

Suppose $(X,d)$ is a separable metric space with $d\leq 1$, and let $(x_n)$ and $(x'_n)$ be two dense sequences. Define embeddings $$\varphi,\varphi':X\to[0,1]^\mathbb{N}$$ by putting $\varphi(x)=(d(x,x_n))_{n}$ and $\varphi'(x)=(d(x,x'_n))_{n}$ respectively. Then $\mathcal{X}=\overline{\varphi(X)}$ and $\mathcal{X}'=\overline{\varphi'(X)}$ are two metrizable compactifications of $X$.

It seems to me that $\mathcal{X}$ and $\mathcal{X}'$ always homeomorphic. In order to define a maps $\mathcal{X}\xrightarrow\theta\mathcal{X}'$ and $\mathcal{X}'\xrightarrow{\theta'}\mathcal{X}$ we define $\theta$ on $\varphi(X)$ as $\varphi'\circ\varphi^{-1}$ (I'm cutting corners here), and extend it by uniform continuity (and similarly for $\theta'$). I haven't checked the details, but this will produce (uniformly) continuous maps $\mathcal{X}\xrightarrow\theta\mathcal{X}'$ and $\mathcal{X}'\xrightarrow{\theta'}\mathcal{X}$ satisfying $\theta\circ\varphi=\varphi'$ and $\theta'\circ\varphi'=\varphi$ so that $\theta\circ\theta'$ coïncides with the identity function on the dense subset $\varphi(X)\subset\mathcal{X}$, and $\theta'\circ\theta$ coïncides with the identity function on the dense subset $\varphi'(X)\subset\mathcal{X}'$. And thus we should get that $\theta$ and $\theta'$ are inverse homeomorphisms of one another.

Question : Is the above reasoning sound, and if so, what is the name of this compactification ? Does it have a universal property ? Maybe something similar to the Stone-Cech compactification but in the category of compact metric spaces ?

Neat question! I haven't seen this construction before, but here are some thoughts.

First, I think separability of $X$ (and subsequently metrizability of $\mathcal{X}$) is really a red herring here. For any bounded metric space $(X,d)$, you could construct a compactification in the same way, taking the closure $\mathcal{X}$ of the image of the map $X\to [0,N]^X$ that sends $x$ to the function $d(x,-)$ (where $N$ is some upper bound on the metric). Equivalently, you could just take closure of the image of $X\to [0,N]^Q$ where $Q$ is any dense subset of $X$. In the case that $X$ is separable, you can choose $Q$ to be countable, and so $\mathcal{X}$ will be metrizable, but this is not essential to what is going on here.

Here are some other ways to describe this compactification $\mathcal{X}$. It is the smallest compactification of $X$ to which the function $d(x,-)$ extends continuously for each $x\in X$. Alternatively, it is the spectrum of the closed subalgebra of $C_b(X)$ generated by the functions $d(x,-)$ for each $x\in X$ (these functions form a subspace of $C_b(X)$ which is canonically isometric to $X$).

Note that this compactification is highly sensitive to the choice of metric $d$, and not just how $d$ behaves at small scales. For instance, consider the discrete space $X=\mathbb{N}$ with a metric $d$ such that $d(x,y)$ is always either $1$ or $2$ if $x\neq y$. The points of $\mathcal{X}\setminus X$ correspond to all functions $\mathbb{N}\to\{1,2\}$ that are pointwise accumulation points of the functions $d(x,-)$. So, by choosing $d$ appropriately, you can arrange for $\mathcal{X}\setminus X$ to be any nonempty closed subspaces of $\{1,2\}^\mathbb{N}$. (This takes a bit of work to prove, since you have to be careful about the restriction that $d$ is symmetric. Basically, you can choose $d$ freely "below the diagonal" of $\mathbb{N}\times\mathbb{N}$, and that is enough to control the accumulation points of the functions $d(x,-)$.)

• I think it also may be sensitive to the choice of metric on the Hilbert cube $[0,1]^\mathbb{N}$. – Nate Eldredge Jan 12 '18 at 21:51
• No, you can just use the product topology on $[0,1]^\mathbb{N}$ to define the closure. Of course, if you want to endow the compactification with a metric in the case that $X$ is separable, that metric will depend on what metric you use on $[0,1]^\mathbb{N}$ (and also probably on your choice of countable dense subset). – Eric Wofsey Jan 12 '18 at 21:54
• Thank you for your answer ! Please excuse my taking nearly a week to acknowledge it. Do you think there will be some universal property characterizing $\mathcal{X}$ ? Can you think of criteria that will ensure that $X$ is an open subset of $\mathcal{X}$ ? Could you elaborate your last claim that any closed subset of $\{1,2\}^\mathbb{N}$ can be realized this way ? You are right that the set up is superfluous, and one can work directly with arbitrary dense subsets of $X$, or with $X$ directly. – Olivier Bégassat Jan 17 '18 at 13:21
• I doubt there is any nice universal property. Here's a not-so-nice one: a map $f:X\to Y$ for compact Hausdorff $Y$ extends (uniquely) to $\mathcal{X}$ iff for every $g:Y\to\mathbb{C}$, $g\circ f$ can be uniformly approximated by sums and products of the functions $d(x,-)$ and constant functions. $X$ is open in $\mathcal{X}$ iff $X$ is locally compact; this is true more generally for any compactification (assuming all spaces are Hausdorff). – Eric Wofsey Jan 17 '18 at 18:01
• Given any nonempty closed subset $A\subset\{1,2\}^\mathbb{N}$, there exists a sequence $(s_n)$ of points of $\{1,2\}^\mathbb{N}$ such that the set of accumulation points of $(s_n)$ is exactly $A$. Now define $d(n,m)=s_n(m)$ whenever $n>m$ (which by symmetry determines $d$). For each $n$, then, the function $d(n,-)$ agrees with $s_n$ for its first $n$ inputs, which for $n$ large means that $d(n,-)$ is getting very close to $s_n$. You can then verify that this implies the set of accumulation points the functions $d(n,-)$ is the same as the set of accumulation points of $(s_n)$. – Eric Wofsey Jan 17 '18 at 18:07