[Math] Prove that totally bounded metric space is separable

general-topologymetric-spacesseparable-spaces

I'm reading the proof that says every totally bounded metric space is separable. The proof goes like this:

Let $n$ be a positive integer. Then there exists $x_{n1},…x_{nm}$ such that the open balls with centers at $x_{nj}$ and radii $\frac{1}{n}$ cover $X$. The family of all these points is then a countable subset of $X$. Moreover, for each $x\in X$ and each integer $n$, there is an $x_{nj}$ such that $d(x,x_{nj})<\frac{1}{n}$. Consequently, these points are dense in $X$.

I get the picture of this proof. Basically it's saying that, take any point $x\in X$. No matter how small $\epsilon>0$ is, we can always use balls with radius $\epsilon$ to cover the whole space, so consequently $x$ has to be within $\epsilon$ from some point. But aren't we supposed to first construct a set, then argue that the set would be dense no matter what $\epsilon$ we choose? I feel like in this proof, we first pick $\epsilon$ and then construct a set.

Best Answer

For each $n \in \mathbb{Z}_{> 0}$, we take balls $B^n_1, \ldots, B^n_{n_m}$ of radius $1/n$ with centers $x^n_1, \ldots, x^n_{m_n}$ as you have described. Call the collection of centers $\mathcal{C}_n = \{x^n_1, \ldots, x^n_{m_n}\}$. Then $\mathcal{C} = \bigcup_{n \geq 1} \mathcal{C}_n$ is a countable union of finite sets, hence is itself countable. We claim this is a countable dense subset. To show this, your proof should start with: "Given $\epsilon > 0$, choose $n$ such that $1/n < \epsilon$, and consider the centers of the balls $x^n_1, \ldots, x^n_{m_n} \in \mathcal{C}_n$." Do you see how this implies that $\mathcal{C}$ is dense? Note that we defined $\mathcal{C}$ before we ever mentioned $\epsilon$.

Related Question