Let $(X,d)$ metric space, $S\subseteq X$ | $\forall(x_n)_n\subseteq S$ $\exists ({x_n}_k)_k:{x_n}_k\to \bar x\in X$ as $k\to+\infty$.
Prove that S is precompact i.e. $\bar S$ (closure of S) is compact.
I tried:
$\forall(x_n)\subseteq S\subseteq \bar S\quad \exists({x_n}_k)_k:{x_n}_k\to \bar x\in \bar S$ as $k\to +\infty$ because $\bar S$ is closed.
I can't prove it for $({x_n}_k)\subseteq \mathscr D(S)$ (set of accumulation points of S). Help?
Let $(x_n)_{x\in\Bbb N}$ be a sequence of elements of $\overline S$. For each $n\in\Bbb N$, take $s_n\in S$ such that $d(s_n,x_n)<\frac1n$. The sequence $(s_n)_{n\in\Bbb N}$ has a subsequence $(s_{n_k})_{k\in\Bbb N}$ which converges to some $x\in X$. But $d(x_{n_k},s_{n_k})<\frac1{n_k}$ and therefore $\lim_{k\to\infty}x_{n_k}=x\in\overline S$.