Lemma 5.12.12. Let $X$ be a topological space. Assume

1. $X$ is quasi-compact,

2. $X$ has a basis for the topology consisting of quasi-compact opens, and

3. the intersection of two quasi-compact opens is quasi-compact.

For a subset $T \subset X$ the following are equivalent:

1. $T$ is an intersection of open and closed subsets of $X$, and

2. $T$ is closed in $X$ and is a union of connected components of $X$.

Proof. It is clear that (a) implies (b). Assume (b). Let $x \in X$, $x \not\in T$. Let $x \in C \subset X$ be the connected component of $X$ containing $x$. By Lemma 5.12.10 we see that $C = \bigcap V_\alpha$ is the intersection of all open and closed subsets $V_\alpha$ of $X$ which contain $C$. In particular, any pairwise intersection $V_\alpha \cap V_\beta$ occurs as a $V_\alpha$. As $T$ is a union of connected components of $X$ we see that $C \cap T = \emptyset$. Hence $T \cap \bigcap V_\alpha = \emptyset$. Since $T$ is quasi-compact as a closed subset of a quasi-compact space (see Lemma 5.12.3) we deduce that $T \cap V_\alpha = \emptyset$ for some $\alpha$, see Lemma 5.12.6. For this $\alpha$ we see that $U_\alpha = X \setminus V_\alpha$ is an open and closed subset of $X$ which contains $T$ and not $x$. The lemma follows. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).