Prove that a set is closed iff it contains all its accumulation points Prove that a set is closed iff it contains all its accumulation points.
I have no clue on how to approach the above problem. At first I would appreciate hints on how to get started in either direction $\Leftarrow$ or $\Rightarrow$.
This is how we have def. an accumulation point:

A point $x \in X$ is called an accumulation point of $A \subset X$ if for every $U \in U_x$ there is $y$ s.t $y \not = x$ with $y \in U \cap A$. Where $U_x =\{ U \in X: U \text{ neighbour of } x \in X\}$

We have def. a closed set to be the complement of an open set.


$A\subset X$ is closed $\implies A$ contains all its accumulation points.

Proof by contradiction:
$A\subset X$ is closed $\implies X\setminus A$ is open.
$X\setminus A$ is open $\implies \forall x \in X\setminus A,  \exists U_x$ such that $\forall y\in U_x\implies y\in X\setminus A$ 
Suppose $x$ is an accumulation of $A$ that is not in $A$
$\forall U\in U_x, \exists y\ne x$ with $y \in U\cap A$
$y \in U\cap A \implies y\notin X\setminus A$ -- Contradiction.

$A\subset X$ contains all of its accumulation points $\implies A$ is closed

The other way -- also by contradiction:
Suppose $A\subset X$ contains all of its accumulation points.
Suppose $X\setminus A$ is not open.
There exists an $x \in X\setminus A$ such that $\forall U\in U_x$ there exists $y \in U$ that is also in $A.$
$x$ is an accumulation point, which contradicts the premise.
${\rm QED}$
