Characterization of compact subsets in the metric space of all complex-valued sequences Here's the statement of the Problem 4 after Section 2.5 in Introductory Functional Analysis With Applications by Erwine Kryszeg: 

Show that for an infinite subset $M$ in the space $s$ to be compact, it is necessary that there are numbers $\gamma_1$, $\gamma_2$, $\ldots$ such that for all $x = (\xi_k(x)) \in M$, we have $\vert\xi_k(x)\vert \leq \gamma_k$. (It can be shown that the condition is also sufficient for the compactness of $M$.) 

What does this condition say? 
How to show this condition to be necessary and sufficient for compactness of the set  $M$? 
I know that $s$ is the metric space consisting of all sequences $x \colon= (\xi_i)$, $y \colon= (\eta_i)$ of complex numbers with the metric $d$ defined as follows: 
$$d(x,y) \colon= \sum_{i=1}^\infty \frac{\vert \xi_i - \eta_i \vert}{2^i(1+ \vert \xi_i - \eta_i \vert)}. $$
 A: The condition says: for every $k$, the $k$th coordinate of $x\in M$ is uniformly bounded (independently of $x$) by some number $\gamma_k$.  Geometrically, this means $M$ is contained in an infinite-dimensional rectangular box with sidelengths $2\gamma_1, 2\gamma_2,\dots$.
The necessity of this condition follows from the fact that the projection onto $k$th coordinate is a continuous function, and a continuous function on a compact set is bounded. 
The sufficiency can be proved as follows: 


*

*Take a sequence of elements  $x_n\in M$

*Use the diagonal trick to obtain a subsequence that converges coordinate-wise.

*Observe that the coordinates with indices $k> N$ can contribute at most $2^{-N}$ to the metric $d$.

*Conclude from 2 and 3 that the subsequence converges in the metric $d$.

A: Let $\xi_n$ a sequence in $M$, we note $(\xi_n)_1$ its first coordinate, now because $|(\xi_n)_1| \leq \gamma_1$ for all $n$, by Bolzano-Weierstrass there is some subsequence $(\xi_{n_k})_1 \to \xi_1$, now take the sequence $(\xi_{n_k})$, by repeating the process there is some subsequence on the second coordinate $(\xi_{{n_k}_j})_2 \to \xi_2, we can repeat again to get the $n$-th coordinate and so on. We have: 
$$\xi_{{n_k}_1}, \xi_{{n_k}_2}, \xi_{{n_k}_2} \dots \to \xi_1  $$
$$\xi_{{{n_k}_j}_1}, \xi_{{{n_k}_j}_2}, \xi_{{{n_k}_j}_2} \dots \to \xi_2  $$
etc.
 Now take the diagonal as subsequence, and rename the index to $n_k$. This sequence $(\xi_{n_k})_j$ converges pointwise to $\xi_j$ and
$$d((\xi_{n_k})_j,\xi_j) \colon= \sum_{j=1}^\infty \frac{\vert (\xi_{n_k})_j - \xi_j \vert}{2^j(1+ \vert (\xi_{n_k})_j - \xi_j \lvert} $$ 
Now fix $\varepsilon > 0$, because the series is majorized by the geometric series of $2^{-j}$ and because the first $N$ converge pointwise there is an $n_k$ such that $$\sum_{j=1}^N \frac{\vert (\xi_{n_k})_j - \xi_j \vert}{2^j(1+ \vert (\xi_{n_k})_j - \xi_j \lvert)} < \varepsilon/2$$
and 
$$\sum_{j=N}^\infty \frac{1}{2^j} < \varepsilon/2$$
We see from this that if $n_k$ is big enough, $d(\xi_{n_k},\xi) < \varepsilon$ and thus $$(\xi_{n_k})_j \underset{n_k \to \infty}{\rightarrow} \xi_j$$
