How to show that this set is compact in $\ell^2$ Let $(a_n)_{n}\in\ell^2:=\ell^2(\mathbb{R})$ be a fixed sequence. Consider the subspace $$C=\{(x_n)_{n}\in\ell^2 : |x_n|\le a_n\text{ for all }n\in\mathbb{N}\}.$$
According to the book [Dunford and Schwartz, Linear operators part I, page 453] $C$ is compact in the $\ell^2$-norm, but there is no proof. How can I show that $C$ is indeed compact in $\ell^2$ ?
 A: 
Theorem. Let $p\in[1,+\infty]$ and $M\subset\ell_p$ is bounded subset such that 
  $$
\lim\limits_{N\to\infty}\sup\{\Vert (0,0,\ldots,0,x_N,x_{N+1},\ldots) \Vert_p:x\in M\}=0
$$
  then $M$ is totally bounded.

Proof. Take arbitrary $\varepsilon>0$ then there exist $N\in\mathbb{N}$ such that for all $x\in M$ we have 
$$
\Vert (0,0,\ldots,0,x_N,x_{N+1},\ldots) \Vert_p<\varepsilon/2\tag{1}
$$
Since $M$ is bounded, the set 
$$
M_{reduced}=\{(x_1,x_2,\ldots,x_N,0,0,\ldots):x\in M\}
$$
is bounded. But $M_{reduced}$ is a bounded subset of $\mathbb{R}^N$ so we can find finite $\varepsilon/2$-net $N\subset \ell_p$. This is possible because all norms on finite dimensional spaces are equivalent to euclidean norm, and sets bounded in euclidean norm are always totally bounded. We claim that $N$ is a finite $\varepsilon$-net for $M$. Take arbitrary $x\in M$ and consider $x_{reduced}=(x_1,x_2,\ldots,x_N,0,0\ldots,)\in M_{reduced}$. Then there exist $y\in N$ such that $\Vert x_{reduced}-y\Vert_p<\varepsilon/2$. Then using $(1)$ we get
$$
\Vert x-y\Vert_p\leq\Vert x-x_{reduced}\Vert_p+\Vert x_{reduced}-y\Vert_p<
\Vert (0,0,\ldots,0,x_N,x_{N+1},\ldots) \Vert_p+\varepsilon/2<\varepsilon
$$
Since $x\in M$ is arbitrary, then $N$ is an $\varepsilon$-net for $M$. Since $\varepsilon>0$ is arbitrary and by construction $N$ is finite, then $M$ is totally bounded.

Theorem. Let $1\leq p\leq +\infty$ and $a\in \ell_p \cap c_0$, then the set
  $$
C=\{x\in\ell_p:\;\forall n\in\mathbb{N}\quad|x_n|\leq |a_n|\}
$$
  is compact.

Proof. We need to show that $C$ is complete and totally bounded
1) Completeness. Since $C$ is a subset of complete space $\ell_p$, it is enough to show that $C$ is closed. Consider continuous linear functionals $f_n:\ell_p\to\mathbb{R}:x\mapsto x_n$. Since $|f_n(x)|=|x_n|\leq\Vert x\Vert_p$ for all $x\in\ell_p$, then $f_n$ is continuous and obviously linear. Hence $f_n^{-1}([-a_n,a_n])$ is a closed set as preimage of closed set. Note that
$$
C=\bigcap\limits_{n\in\mathbb{N}}f_n^{-1}([-a_n,a_n])
$$
so $C$ is closed as intersection of closed sets.
2) Total boundedness. From the formula of the norm in $\ell_p$ it follows that for all $x\in C$ we have $\Vert x\Vert_p\leq\Vert a\Vert_p$, so $C$ is bounded. By the same reasonong for all $x\in C$ we have 
$$
\Vert (0,0,\ldots,0,x_N,x_{N+1},\ldots) \Vert_p\leq 
\Vert (0,0,\ldots,0,a_N,a_{N+1},\ldots) \Vert_p 
$$
Hence
$$
\lim\limits_{N\to\infty}\sup\left\{\Vert (0,0,\ldots,0,x_N,x_{N+1},\ldots) \Vert_p:x\in C\right\}\leq
\lim\limits_{N\to\infty}\Vert (0,0,\ldots,0,a_N,a_{N+1},\ldots) \Vert_p=0
$$
Since $a\in\ell_p\cap c_0$ then the last limit is $0$, so 
$$
\lim\limits_{N\to\infty}\sup\left\{\Vert (0,0,\ldots,0,x_N,x_{N+1},\ldots) \Vert_p:x\in C\right\}=0
$$
Thus from previous theorem we see that $C$ is totally bounded.
A: We can use a standard, if lengthy, diagonal sequence argument. I use boldface to denote an element of $C$. Let $\{{\bf x}_n\}_{n=1}^\infty$ be a sequence in $C$. Keep in mind that each term $\bf x_n$ is itself a sequence in $\mathbb R$. We want to show that there is a convergent subsequence of this. To do so, let 
$$C_{ijk}=\left\{{\bf x}\in C : \frac{i-1}{j}a_m\leq |x_m|\leq \frac{i}{j}a_m,\forall m\leq k\right\}$$
and note that for $k,j$ fixed, varying $i$ from $1$ to $j$ gives all of $C$. 
We first build a subsequence such that the first terms converge. Note that since $C=C_{121}\cup C_{221}$, infinitely many terms ${\bf x}_n$ must be in one of the sets $c_{i21}$. Let $\{{\bf x}_n^{(2)}\}_{n=1}^\infty$ be a subsequence of $\{{\bf x}_n\}_{n=1}^\infty$ such that each ${\bf x}_n^{(2)}$ is in the same set $C_{i21}$. We form a subsequence $\{{\bf x}_n^{(3)}\}_{n=1}^\infty$ of $\{{\bf x}_n^{(2)}\}_{n=1}^\infty$ in the same manner, so that each ${\bf x}_n^{(3)}$ is in the same set $C_{i31}$. Continuing in this manner, we get sequences $\{{\bf x}_n^{(j)}\}_{n=1}^\infty$ for all $j$. We then form the diagonal subsequence $\{{\bf y}_n\}_{n=1}^\infty=\{{\bf x}_n^{(n)}\}_{n=1}^\infty$, which has the property that the first terms of the sequences converge.
We can do the same thing to get a subsequence $\{{\bf y}_n^{(2)}\}_{n=1}^\infty$ of $\{{\bf y}_n\}_{n=1}^\infty$ such that the first and second terms converge, by using the sets $C_{ij2}$ instead of $C_{ij1}$. Continuing in this manner, we get sequences $\{{\bf y}_n^{(k)}\}_{n=1}^\infty$ for all $k$, which are such that the first $k$ terms converge. Again we form the diagonal sequence $\{{\bf z}_n\}_{n=1}^\infty=\{{\bf y}_n^{(n)}\}_{n=1}^\infty$. Note that the $k^{th}$ term of $\{{\bf z}_n\}_{n=1}^\infty$ converges for all $k$, say to a limit $L_k$.
Putting this together, let ${\bf L}=\{L_k\}_{k=1}^\infty$. We have
$$\left\|{\bf z}_n-{\bf L}\right\|_2^2=\sum\limits_{k=1}^\infty \left|({\bf z}_n)_k-L_k\right|^2\leq \sum\limits_{k=1}^t \left|({\bf z}_n)_k-L_k\right|^2+\sum\limits_{k=t+1}^\infty |a_k|^2$$
and since $\{a_k\}_{k=1}^\infty\in \ell^2$, for any $\epsilon>0$ we can choose $t$ such that $\sum\limits_{k=t+1}^\infty |a_k|^2<\epsilon/2$. Since $({\bf z}_n)_k\to L_k$ for all $k$, for $n$ sufficiently large we have $\left|({\bf z}_n)_k-L_k\right|^2<\epsilon/2t$. Thus ${\bf z}_n\to \bf L$, hence every sequence in $C$ has a convergent subsequence. It follows that $C$ is compact.
A: Show that $C$ is complete and totally bounded.
Completeness is straightforward, suppose $x_n \in C$ is Cauchy. Then each component is also Cauchy since $|[x_n]_k - [x_m]_k | \leq \|x_n -x_m\|$, hence each component converges to some $\alpha_k$. Furthermore, it is clear that $|\alpha_k| \leq a_n$, so define $\hat{x}$ by $[\hat{x}]_n = \alpha_n$. Clearly, $\hat{x} \in C$, and we just need to show that $x_n \to \hat{x}$. Let $\epsilon > 0$, and choose $N'$ such that $\sum_{k>N'} a_k^2 < \frac{\epsilon}{2}$. Furthermore, we can choose $N>N'$ such that if $n>N$, then $|[x_n]_k - [\hat{x}]_k|^2< \frac{\epsilon}{2N'}$, for all $k \leq N'$. Then, if $n>N$, we have $\|x_n-\hat{x}\|^2 < \sum_{k\leq N'} |[x_n]_k - [\hat{x}]_k|^2 + \frac{\epsilon}{2} \leq \epsilon$. Hence $x_n \to \hat{x}$.
To show total boundedness, we need to find a finite $\epsilon$-net for all $\epsilon>0$. Choose $N'$ such that $\sum_{k>N'} a_k^2 < \frac{\epsilon^2}{2}$. It is clear that since $A=[-a_1,a_1]\times \cdots \times  [-a_{N'},a_{N'}]$ is compact (as a subset of $\mathbb{R}^{N'}$), we can find an $\frac{\epsilon^2}{2}$-net for $A$. Let $E \subset A$ be a $\frac{\epsilon^2}{2}$-net for $A$, then define the set (with slight abuse of notation) $E' = E \times \{0\} \times \{0\} \times \cdots$. The set $E' \subset C$ is finite, and is an $\epsilon$-net for $C$. To see this, choose $x \in C$. Then let $\tilde{x} \in \mathbb{R}^{N'}$ be the first $N'$ components of $x$. Then there exists $\tilde{y} \in E$ such that $\|\tilde{y}-\tilde{x} \| < \frac{\epsilon^2}{2}$. Let $y \in E'$ be the element (again abusing notation slightly) $\tilde{y} \times 0 \times 0 \times \cdots$. Then we have the estimate $\|y-x\|^2 = \sum_{k\leq N'} |[\tilde{y}]_k-[x]_k|^2 + \sum_{k\leq N'} |[x]_k|^2 \leq \frac{\epsilon^2}{2}+ \sum_{k\leq N'} a_n^2 \leq \epsilon^2$.
A: The set $C$ is the image of the compact set $X = [-1,1]^{\mathbb N}$ (with the product topology) under the map $F: X \to \ell^2$, where $F(x)_j = x_j a_j$.  Since the image of a compact Hausdorff space under a continuous map is compact, we just need to show that $F$ is continuous.  Note that $\Vert F(x) - F(y)\Vert^2 = \sum_{j=1}^\infty (x_j - y_j)^2 a_j^2$.  Given $\varepsilon > 0$, there is $N\in\mathbb{N}$ such that $\sum_{j=N+1}^\infty a_j^2 < \varepsilon/8$.  If $x, y \in X$ with 
$|x_j - y_j|^2 < \varepsilon/(2\|a\|^2)$ for $1 \le j \le N$, we have $\Vert F(x) - F(y)\Vert ^2 < \varepsilon$.
A: I just want to mention that the "diagonal argument" mentioned in comments is nothing other than the compactness of $\prod_{i \in \mathbb{N}} [a_i, b_i]$ (or equivalently $[0,1]^\mathbb{N}$), an important (and easier to prove) special case of Tychonoff's theorem.  Essentially all compactness results in infinite-dimensional spaces flow from this fact, so it would be well to become comfortable with it.
This guarantees there is a subsequence $x_{n_k}$ which converges pointwise (i.e. coordinate-wise) to some $x$.  But $|(x_{n_k})_i| \le |a_i|$ with $a_i \in \ell^2$, so by dominated convergence, the convergence also takes place in $\ell^2$.
