Let $M$ be a metric space and $A\subseteq M$ and let $A'$ be the set of all limit points.
Prove: $A'$ is closed
Now I saw the following proof but I did not manage to understand:
Let $a\in M,x_n\to a$ when $x_n\in A'$ we will prove that $a\in A'$
Let $U$ be an open neighborhood of $a$ so $U$ contains points from $\{x_n\}\subseteq A'$, if we will take one of them let say $b=x_{n_0}$ so $U$ is also an open neighborhood of $b$ and therefore contains an infinite number of points of $A$ so $a\in A'$
I can not see what it has proved that $A'$ is closed
(It is not "trivial". To prove closeness of $A'$, you have to show that $A'$ contains all limit points of $A'$, not only the limit points of $A$.)
Using the limit point definition of closeness:
Let $a\in (A')'$ and $x_n\in A'$ converges to $a$. As $x_n$ is a limit point of $A$, there exists a $y_n\in A$ with $d(x_n, y_n) < 1/n$. Using the triangle inequality we obtain $y_n\to a$. That is, $a$ is a limit point $A$ and $A'$ is closed.
Using the open complement definition:
Let $b\in M\setminus A'$. Thus, there exists some neighborhood $U$ of $b$ which is disjoint with $A$.
Let $\delta$ be the infimum of $d(x,b)$ over $x\in U \cap A'$. If it is positive, we are done (why?). If $\delta = 0$, then there exists $x_n\in A'$ with $x_n\to b$ (why?). Using the triangle inequality trick from above, we obtain a sequence $y_n\in A$ with $y_n\to b$. A contradiction.