[proofplan]
We construct a countable dense subset by taking the union of finite $1/n$-nets over all $n \in \mathbb{N}$. Total boundedness supplies each finite net; the countable union of finite sets is countable; and for any point $x$ and tolerance $\varepsilon > 0$, choosing $n$ with $1/n < \varepsilon$ places a net point within distance $\varepsilon$ of $x$.
[/proofplan]
custom_env
admin
[step:Construct a countable set from finite $1/n$-nets]
Let $(M, d)$ be a totally bounded metric space. For each $n \in \mathbb{N}$, the definition of total boundedness with $\varepsilon = 1/n$ provides a finite set $F_n \subset M$ such that
\begin{align*}
M \subset \bigcup_{x \in F_n} B(x, 1/n).
\end{align*}
Define $D := \bigcup_{n=1}^\infty F_n$. Since each $F_n$ is finite, $D$ is a countable union of finite sets, hence countable.
[/step]
custom_env
admin
[step:Verify that $D$ is dense in $M$]Let $x \in M$ and $\varepsilon > 0$. By the Archimedean property of $\mathbb{R}$, there exists $n \in \mathbb{N}$ with $1/n < \varepsilon$. Since $M \subset \bigcup_{y \in F_n} B(y, 1/n)$, there exists $y \in F_n$ with $d(x, y) < 1/n < \varepsilon$. Since $F_n \subset D$, we have $y \in D \cap B(x, \varepsilon)$, so $B(x, \varepsilon) \cap D \neq \varnothing$.
Since $x \in M$ and $\varepsilon > 0$ were arbitrary, every open ball in $M$ meets $D$, which means $D$ is dense in $M$. Therefore $(M, d)$ is separable.[/step]
custom_env
admin
[guided]Let $(M, d)$ be totally bounded. We build a countable dense subset directly from the finite approximations that total boundedness guarantees.
**Construction.** For each $n \in \mathbb{N}$, total boundedness with $\varepsilon = 1/n$ yields a finite set $F_n \subset M$ satisfying $M \subset \bigcup_{x \in F_n} B(x, 1/n)$. Set $D := \bigcup_{n=1}^\infty F_n$.
**Countability.** Each $F_n$ is finite, so $|F_n| < \infty$. A countable union of finite sets is countable (this follows from the fact that $\mathbb{N} \times \mathbb{N}$ is countable, since we can inject $D$ into $\mathbb{N} \times \mathbb{N}$ by mapping each element of $F_n$ to the pair $(n, k)$ where $k$ is its index within $F_n$). Hence $D$ is countable.
**Density.** Let $x \in M$ and $\varepsilon > 0$. Choose $n \in \mathbb{N}$ with $1/n < \varepsilon$. Since $x \in M \subset \bigcup_{y \in F_n} B(y, 1/n)$, there exists $y \in F_n \subset D$ with $d(x, y) < 1/n < \varepsilon$. Thus $y \in D \cap B(x, \varepsilon)$, proving that every open ball in $M$ intersects $D$.
The proof is constructive and reveals the quantitative content: if $|F_n|$ denotes the size of the $1/n$-net, then $|D| \le \sum_{n=1}^\infty |F_n|$, and the rate of growth of these net sizes is precisely the covering number $\mathcal{N}(M, 1/n)$. The argument also highlights that the converse fails: the rationals $\mathbb{Q}$ provide a countable dense subset of $\mathbb{R}$, but $\mathbb{R}$ is not totally bounded.[/guided]