# A characterization of open sets

Let $(M,d)$ be a metric space. Then a set $A\subset M$ is open if, and only if, $A \cap \overline X \subset \overline {A \cap X}$ for every $X\subset M$.

This is a problem from metric spaces, but I think that it only requires topology. I don't know how to do it.

-

Suppose first that $A$ is open. Let $X\subseteq M$, and suppose that $x\in A\cap\operatorname{cl}X$. Let $U$ be any open set containing $x$; then $A\cap U$ is an open neighborhood of $x$, and $x\in\operatorname{cl}X$, so $U\cap X\ne\varnothing$. Thus, $U\cap(A\cap X)\ne\varnothing$, and since $U$ was an arbitrary open set containing $x$, we conclude that $x\in\operatorname{cl}(A\cap X)$. Finally, $x$ was an arbitrary element of $A\cap\operatorname{cl}X$, so $A\cap\operatorname{cl}\subseteq\operatorname{cl}(A\cap X)$. This proves the ($\Rightarrow$) direction.

Here's a hint for the ($\Leftarrow$) direction: suppose that $A$ is not open, let $X=M\setminus A$, and show that $A\cap\operatorname{cl}X\nsubseteq\operatorname{cl}(A\cap X)$. (This is pretty easy to do.)

-

Suppose $A$ is open, let $X\subseteq M$, and let $a\notin \overline{A\cap X}$. Therefore, there exists an open set $U$ such that $x\in U$ and $U\cap (A\cap X)=\varnothing$. If $a\in A$, then $(U\cap A)$ is an open set that contains $a$, and whose intersection with $X$ is empty, so $a\notin \overline{X}$, hence $a\notin A\cap\overline{X}$. If $a\notin A$, then $a\notin A\cap\overline{X}$. Thus, we have shown that $$M-\overline{A\cap X} \subseteq M-(A\cap \overline{X}).$$ Taking complements proves the desired inclusion.

Conversely, suppose that for every $X\subseteq M$, we have $A\cap\overline{X}\subseteq \overline{A\cap X}$. We wish to show that $A$ is open. Let $X=M-A$. Then $A\cap\overline{X} \subseteq \overline{A\cap X} = \overline{A\cap(M-A)}=\varnothing$, so $\overline{X}\subseteq M-A = X$. Therefore, $X$ is closed.

-

Since $M$ is a metric space, we can argue using sequences:

Suppose $A$ is open, $X\subseteq M$, and let $a\in A\cap \overline{X}$. Then since $a\in \overline{X}$, there is a sequence $(x_n)$ in $X$ with $x_n\rightarrow a$. But, as $a\in A$ and $A$ is open, $(x_n)$ is eventually in $A$. Thus, there is a sequence (a tail of $(x_n)$) in $A\cap X$ that converges to $a$. Thus $a\in\overline{A\cap X}$. Since $a$ was an arbitrary element of $A\cap \overline X$ we have $A\cap \overline{X}\subseteq\overline{A\cap X}$.

Now suppose that $A$ is not open. Then there is an $a\in A$ and a sequence $(x_n)$ converging to $a$ with $x_n\in A^C$ for each $n$ ($A$ is open iff whenever $z_n\rightarrow z\in A$, then $(z_n)$ is eventually in $A$). Set $X=\{\,x_1,x_2,\ldots\,\}$. Then $a\in A\cap \overline{X}$. But $A\cap X=\emptyset$; and so $a\notin \overline {A\cap X}$. Thus $A\cap \overline{X}\not\subseteq\overline{A\cap X}$.

The arguments in the other answers are better of course, as they show the result holds for any topological space.

I'm not sure that $M$ being metric would lead to a simpler proof...

-