Characterization of compact sets in complete metric space

I was trying to demonstrate the result as an exercise, and so have refrained from checking against other sources.

The result in question is that a set F⊆XF \subseteq X, where (X,d)(X, d) is a complete metric space, is compact iff FF is totally bounded and closed. Showing compactness implies closed and totally bounded is simple enough. The part I wanted to be sure I hadn’t flubbed is the other direction.

Let F⊆XF \subseteq X be totally bounded, closed, but assume for contradiction that FF is not compact. Then there exists an open cover U={Ui:i∈I}\mathcal{U} = \{ U_{i} : i \in I \} such that no finite sub-class of U\mathcal{U} covers FF. Since FF is totally bounded, there exists a set {x(1)1,…,x(1)N1}⊆F\left\{ x_{1}^{(1)}, \ldots, x_{N_{1}}^{(1)} \right\} \subseteq F such that F⊆N1⋃j=1B(x(1)j,1)⊆N1⋃j=1¯B(x(1)j,1).F \subseteq \bigcup_{j = 1}^{N_1} B \left( x_{j}^{(1)} , 1 \right) \subseteq \bigcup_{j = 1}^{N_1} \overline{B \left( x_{j}^{(1)} , 1 \right)} . Consider the sets {¯B(x(1)j,1)∩F,1≤j≤N1}\left\{ \overline{B \left( x_{j}^{(1)} , 1 \right)} \cap F , 1 \leq j \leq N_{1} \right\}. Then at least one of these sets admits no finite subcover from U\mathcal{U} (otherwise FF would admit finite subcover), so set y1∈{x(1)1,…,x(1)N1}y_{1} \in \left\{ x_{1}^{(1)}, \ldots, x_{N_{1}}^{(1)} \right\} such that ¯B(y1,1)∩F=:E1\overline{B \left( y_1 , 1 \right)} \cap F = : E_{1} admits no finite subcover from U\mathcal{U}.

Now we construct a sequence (yk)k∈N∈FN,(Ek)k∈N∈(P(F))N(y_{k})_{k \in \mathbb{N}} \in F^{\mathbb{N}}, (E_{k})_{k \in \mathbb{N}} \in ( \mathcal{P}(F) )^{\mathbb{N}} as follows: Suppose we’ve constructed the elements y1,…,yk,E1,…,Eky_{1}, \ldots, y_{k}, E_{1}, \ldots, E_{k}. Then EkE_{k} by assumption admits no finite sub-cover from U\mathcal{U}, and moreover is totally bounded, so there exists a family {x(k+1)1,…,x(k+1)Nk+1}⊆Ek\left\{ x_{1}^{(k + 1)}, \ldots, x_{N_{k + 1}}^{(k + 1)} \right\} \subseteq E_{k} such that Ek⊆⋃Nk+1j=1B(x(k+1)j,1k+1)⊆⋃Nk+1j=1¯B(x(k+1)j,1k+1)E_{k} \subseteq \bigcup_{j = 1}^{N_{k + 1}} B \left( x_{j}^{(k + 1)} , \frac{1}{k + 1} \right) \subseteq \bigcup_{j = 1}^{N_{k + 1}} \overline{ B \left( x_{j}^{(k + 1)} , \frac{1}{k + 1} \right)}. Then there exists yk+1∈{x(k+1)1,…,x(k+1)Nk+1}y_{k + 1} \in \left\{ x_{1}^{(k + 1)}, \ldots, x_{N_{k + 1}}^{(k + 1)} \right\} such that ¯B(yk+1,1k+1)∩Ek=:Ek+1\overline{B \left( y_{k + 1} , \frac{1}{k + 1} \right)} \cap E_{k} = : E_{k + 1} admits no finite sub-cover from U\mathcal{U}.

Now consider the sequence (yk)k∈N(y_{k})_{k \in \mathbb{N}}. We claim that the sequence is Cauchy. To see this, fix ϵ>0\epsilon > 0. If K∈NK \in \mathbb{N} such that 1/K<ϵ/21 / K < \epsilon / 2, and k1,k2>Kk_{1}, k_{2} > K, then yk1,yk2∈Eky_{k_{1}} , y_{k_{2}} \in E_{k}, so d(yk1,yk2≤d(yk1,yK)+d(yK,yk2)≤2/K<ϵd(y_{k_{1}} , y_{k_{2}} \leq d(y_{k_{1}}, y_{K}) + d(y_{K}, y_{k_{2}}) \leq 2 / K < \epsilon. Since XX is complete, let y = \lim_{k \to \infty} y_{k}y = \lim_{k \to \infty} y_{k}. Since FF is closed and y_{k} \in Fy_{k} \in F for all kk, we know y \in Fy \in F. Let U \in \mathcal{U}U \in \mathcal{U} such that y \in Uy \in U. Then since we're in a metric space, there exists \delta > 0\delta > 0 such that B(y, \delta) \subseteq UB(y, \delta) \subseteq U. Let K \in \mathbb{N}K \in \mathbb{N} sufficiently large that 1 / K < \delta / 21 / K < \delta / 2. Then if y' \in E_{K}y' \in E_{K}, then d(y', y) \leq d(y', y_{K}) + d(y_{K}, y) \leq 2 / K < \deltad(y', y) \leq d(y', y_{K}) + d(y_{K}, y) \leq 2 / K < \delta, so E_{K} \subseteq B(y, \delta) \subseteq U \in \mathcal{U}E_{K} \subseteq B(y, \delta) \subseteq U \in \mathcal{U}. Thus E_{K}E_{K} admits a finite subcover, contradicting the assumption that it not. Is this right? =================      It is simpler to show that a sequence in a closed totally bounded set has a convergent subsequence. – Mariano Suárez-Álvarez♦ 2 days ago      @bof yes, fixed – AJY 2 days ago      @MarianoSuárez-Álvarez Could you elaborate? – AJY 2 days ago      Suppose you have a sequence in your set. Cover the set with finitely many balls of radius 1. The sequence clearly has a subsequence that is entirely contained in one of the balls. Now cover the set with balls of radius 1/2, Finitely many of them. That subsequence has a subsequence which is entirely contained in one of these, and so on. The use a diagonal argument to construct a subsequence of the original sequence which is Cauchy. Since the space is complete, that subsequence converges, and since your set is closed, the limit is in it. – Mariano Suárez-Álvarez♦ 2 days ago      @MarianoSuárez-Álvarez I see that, but I don't see how to relate that to compactness. – AJY 2 days ago ================= =================