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$ 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$.
 A: Definition. A set $A \subset \Bbb R$ is closed if $A$ contains all of its limits.
Definition. A point $p \in \Bbb R$ is a limit of $A \subset \Bbb R$ if there exists a sequence $(p_n)$ and $n\in\Bbb N \implies p_n \in A$ and $p_n \to p$. If this is the case, we say $p \in \lim A.$
$(\impliedby)$ Suppose for the sake of contradiction that every convergent sequence in $\Bbb R$ completely contained in $A$ has its limit in $A$, and yet $A$ is not closed. Since $A$ is not closed, there exists $p \in \lim A$ such that there exists a sequence $(p_n)$ and $n \in \Bbb N \implies p_n \in A$, $p_n \to p$ and yet $p \notin A$. This is a contradiction.
A: 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.
A: To prove an if and only if, we need to prove the $\implies$ direction and the $\impliedby$ direction.
For the $\implies$ direction, suppose $A \subseteq \mathbb{R}$ is closed.
We want to prove then that if $\{ x_{n} \}_{n = 1}^{\infty}$ is a sequence of real numbers in $A$ that converges, then its limit is in $A$.  If we call $x$ the limit of this sequence (i.e., $\lim x_n = x$), then by definition of convergence, given $\epsilon > 0$, there exists an  $N$ such that if $n \geq N$ then  $d(x_{n}, x) < \epsilon$ (alternatively, for all $n \geq N$, $x_{n} \in B(x, \epsilon)$).
To show that every convergent sequence contained in $A$ has its limit in $A$, suppose by contradiction that there is a convergent sequence $\{ x_{n} \}_{n = 1}^{\infty}$ in $A$, but its limit, $x$, is in $\mathbb{R} \setminus A$.  Since $A$ is closed, $\mathbb{R} \setminus A$ is open.  Since $x \in \mathbb{R} \setminus A$, and the set is open, we know by definition of open that $\exists \epsilon > 0$ such that $B(x, \epsilon) \subseteq \mathbb{R} \setminus A$.  So we found a ball around $x$ entirely contained in $\mathbb{R} \setminus A$.  But by definition of a convergent sequence, $\exists N$ such that for all $n \geq N$, $x_{n} \in B(x, \epsilon)$.  So there is a point in the sequence after which all terms are in $B(x, \epsilon)$.  But $B(x, \epsilon) \subseteq \mathbb{R} \setminus A$.  Which means there are points of the sequence in $\mathbb{R} \setminus A$.  This contradicts the assumption that the sequence was entirely contained in $A$.  Thus, every convergent real sequence contained in $A$ has its limit in $A$, as desired.
Hopefully you should now have some idea on how to prove the other direction.  Just remember your definitions.
