# A metric space is separable if and only if it is homeomorphic to a totally bounded metric space

A metric space is separable if and only if it is homeomorphic to a totally bounded metric space.

I am struggling to prove the "$$\Rightarrow$$" direction. I found here in the forum these two attempts to build the desired homeomorphism:

But I believe that in both cases these functions are not open, hence not homeomorphism.

In the second link the inverse map is continuous: If $$d(x^{j},x_n) \to d(x,x_n)$$ for every $$n$$ then then $$d(x^{j},x)\to 0$$.
Indeed, $$d(x^{j},x)\leq d(x^{j},x_n)+d(x_n,x)$$. First choose $$n$$ such that the second term is less than $$\epsilon /2$$ and then choose $$m$$ such that the first term is less than $$\epsilon /2$$ for $$j \geq m$$.
• Can you please elaborate why does such $m$ exist? May 28 at 5:05
• $d(x^{j},x_n) \to d(x,x_n)$ for the $n$ we have already chosen. SInce the limit here is less than $\epsilon/2$ all terms of the sequence $(d(x^{j},x_n))$ would also be less than $\epsilon/2$ for $j$ sufficiently large. @User31415 May 28 at 5:20