Separable metrizable space as dense subset of a compact metrizable space

metric-spacespolish-spaces

Recall that a Polish space is a separable completely metrizable topological space.
The following is a classical result:

Every separable metrizable space la homeomorphic to a subspace of the Hilbert cube $[0,1]^\Bbb{N}$. In particular, the Polish spaces are, up to homeomorphism, exactly the $G_\delta$ subspace of the Hilbert space.

As a consequence, it is stated that every separable metrizable (resp. Polish) space $X$ can be embedded as a dense (resp. $G_\delta$) subset of a compact metrizable space.

I don't understand how to deduce the above conclusion.
The key idea in the proof of the above classical result is that the map $x\mapsto (d(x,x_n))$ from $X$ to $[0,1]^\Bbb{N}$ is a topological embedding, where $\{x_n\}$ is an enumeration of a dense subset of $X$ itself.

Let $f$ be such an embedding.
To prove that $f(X)$ is dense in the Hilbert cube, I have to show that for fixed $(t_n)\in [0,1]^\Bbb{N}$ and nhood $U=(t_1-\epsilon,t_1+\epsilon)\times\dots\times (t_n-\epsilon,t_n+\epsilon)\times[0,1]^{\Bbb{N}-m}$ $\epsilon >0$ there exists $x\in X$ s.t. $\lvert d(x,x_1)-t_1\rvert<\epsilon,\dots,\lvert d(x,x_n)-t_n\rvert<\epsilon$.

As far as I understand, there is no hope to find such an $x\in X$ in general.

What am I missing?

Best Answer

You cannot prove that the range of your map is dense. [ Consider the case of a finite metric space]. But what is true is the closure of the range of this map is a compact metric space and the range is dense in this space.

Related Question