Let $X$ be the metric space of bounded sequences of real numbers $ x = (x_n) $ with the metric $ d(x,y) = \sup_n |x_n - y_n| $. Show that the set $$ Y = \{ x = (x_n) \in X \mid |x_n| \leq c_n = \text{ const for all } n \} $$ is compact in $X$ if and only if $ c_n \to 0 $ as $ n \to \infty$.
I tried to prove that $Y$ is compact by showing that $Y$ is complete and totally bounded. For completeness I think I can prove it without the hypothesis $ c_n \to 0 $ as $n \to \infty$ by using the same technique as the proof here, but I'm stuck as to how once can prove that $Y$ is totally bounded. Or is there a better way to prove that $Y$ is compact? Any help is appreciated. Thanks.
Edit: we were only supposed to use the definition of a convergent sequence, so I guess we must prove this either by considering open covers or by showing that an infinite subset must have a limit point.
We can show total bounded in the following way: let $\varepsilon$ be a positive number. Choose $n_0$ such that if $n\geqslant n_0$, then $\left|c_n\right|\lt\varepsilon$. The set $S=\prod_{j=1}^{n_0-1} [-c_j,c_j]$ is compact for the metric $d_{n_0}(x,y) :=\max_{1\leqslant j\leqslant n_0-1}\left|x_j-y_j\right|$. Choose $F\subseteq S$ a finite subset such that $\sup_{x\in S} d_{n_0}\left(x,F\right)\lt \varepsilon$. For each $y\in F$, define $\widetilde y :=(y_1,\dots,y_{n_0-1},0,\dots, 0,\dots )$. Then $\widetilde F:=\left\{\widetilde y, y\in F\right\}$ is finite and the collection of balls centered at the point of $\widetilde F$ and with radius $\varepsilon$ covers $Y$.