Let $(X, d)$ be a compact metric space. We know that if $U$ is an open set in $X$, $p\in U$ and $x_n\to p$ as $n\to \infty $, then $x_n\in U$ for every $n>N$ for some $N>0$.
In my research I need to show that a non-empty set $U$ is an open set in $X$.
Is it true if I show the following:
If for every $p\in U$ and every sequence $x_n\to p$, then we have $x_n\in U$ for every $n>N$ for some $N>0$
Please help me to know it.
Yes, while this is not true in general for an arbitrary topological space, it is true for metric spaces. Under the stated condition, you can show that for any $\ p\in U\ $ there is a positive integer $\ r_p\ $ such that the open ball $\ B\left(p, \frac{1}{r_p}\right)\ $$= \left\{x\in X\,\left\vert\,d(x,p) <\frac{1}{r_p}\right.\right\}\ $ is a subset of $\ U\ $. The proof of this by contradiction is not difficult, and it follows that $\ U\ = \bigcup_\limits{p\in U}B\left(p, \frac{1}{r_p}\right)\ $, being a union of open balls, must be open.