TITLE: A set $A \subseteq \mathbb{R}$ is closed if and only if every convergent sequence in $\mathbb{R}$ completely contained in $A$ has its limit in $A$
QUESTION [10 upvotes]: Real analysis is a topic I'm unfamiliar with and I'm confused on how to write proofs on them.
In order to prove that:
A set $A \subseteq \mathbb{R}$ is closed (1) $\iff$ Every convergent sequence in $\mathbb{R}$ completely contained in A has its limit in A (2)
The definition of closed I am using is that if A is closed, then $\mathbb{R} \setminus A $ is open (i.e. $\mathbb{R} \setminus A \in \tau$.
I realize that I have to prove both directions.
First, in order to prove that (1) $\implies$ (2):
Let $A \subseteq \mathbb{R}$ be a closed set and let $(x_{n})_{n \in \mathbb{N}}$ be a sequence of reals with $x_{n} \in A$ for every $n \in \mathbb{N}$ converging to $x_{\infty} \in \mathbb{R}$.
From here, I'm not sure on how to continue writing the proof. I am trying to ultimately prove that $x_{\infty} \in A$.

REPLY [2 votes]: Def. $E^{\circ}$ is an open set. $E^-$ is $E^{\circ}$'s closure. The boundary of $E^{\circ}$ is $\hat{E} = E^- - E^{\circ}$.
Our goal is to prove that, if a set $E$ contains every convergent sequence forming by the points in $E$ and its limit, then $E$ is a closed set.
Solution:
Consider $E^-$ and pick up a point $a \in \hat{E}$. We are going to prove that, for any $\sigma > 0$, we can find a $q \in E^{\circ}$ such that $d(a,q) < \sigma$, where $d(x,y)$ is the distance function. We will prove this fact by contradiction.
Assuming there is no $p \in E^{\circ}$ such that $d(p,a) < \sigma$ for some $\sigma > 0$.
Pick up arbitrary two points $b,c \in E^{\circ}$, let $d(a,b) = \sigma + k_1$ and $d(a,c) = \sigma + k_2$, $\sigma > 0$ and $k_1 > k_2 > 0$. By triangle inequality, we have
$d(b,c) + d(c,a) \geq d(b,a)$, i.e. $d(b,c) \geq k_1 - k_2$. That means for any two points $b,c$ in the set $E^{\circ}$, $d(b,c) \geq k_1 - k_2$. Since $b \in E^{\circ}$, $\{y:d(y,b) < r_b \} \subseteq E^{\circ}$ for some $r_b > 0$. Let $c \in \{y:d(y,b) < r_b \}$, we could have $d(b,c) < k_1 - k_2$ hence we reach a contradiction.
And we just proved that for any $\sigma > 0$, there is a point $p \in E^{\circ}$ such that $d(p,a) < \sigma$, i.e. we can always construct a sequence converging to a point in $\hat{E}$, if $E$ is not a closed set, there are some sequences that converge to the points in $\hat{E}$ which are not contained by $E$, but $E$ shall contain limits of convergent sequences forming by its element. Therefore, $E$ must be a closed set.