The set of points of a convergent sequence in a metric space, together with the limit of the sequence form a compact set. Let $(X, d)$ be a metric space and let $\{x_n\}$ be a convergent sequence in $X$ with limit $x$.
I am having difficulty proving that $A = \{x_n\} \cup \{x\}$ is a (sequentially) compact set.
That is, every sequence $\{y_n\} \subseteq A$ contains a convergent subsequence.
 A: HINT: Let $\sigma=\langle y_k:k\in\Bbb N\rangle$ be a sequence in $A$. 


*

*If there is some $p\in A$ such that $\{k\in\Bbb N:y_k=p\}$ is infinite, show that $\sigma$ has a constant subsequence converging to $p$.


Otherwise, show that there is a subsequence $\langle y_{n_k}:k\in\Bbb N\rangle$ of distinct points of $A$. At most one of these points is $x$; removing it still leaves us with a subsequence of $\sigma$ consisting of distinct points, so we might as well assume that $y_{n_k}\ne x$ for each $k\in\Bbb N$. This means that for each $k\in\Bbb N$ there is a unique $f(k)\in\Bbb N$ such that $y_{n_k}=x_{f(k)}$, so that
$$\langle y_{n_k}:k\in\Bbb N\rangle=\langle x_{f(k)}:k\in\Bbb N\rangle\;.\tag{1}$$
If the sequence $\langle f(k):k\in\Bbb N\rangle$ were increasing, the sequence in $(1)$ would be a subsequence of $\langle x_n:n\in\Bbb N\rangle$ and would therefore converge to $x$. Unfortunately, $\langle f(k):k\in\Bbb N\rangle$ need not be an increasing sequence.


*

*Show that $\langle f(k):k\in\Bbb N\rangle$ has an increasing subsequence $\langle f(k_i):i\in\Bbb N\rangle$. Conclude that $\langle y_{n_{k_i}}:i\in\Bbb N\rangle=\langle x_{f(k_i)}:i\in\Bbb N\rangle$ is a subsequence of $\langle x_n:n\in\Bbb N\rangle$ and therefore converges to $x$.

