TITLE: Compact subset in T2 space is closed
QUESTION [2 upvotes]: I can't understand this proof: let $(X,\tau)$ be $T2$ and $Y\subset X$ be compact then $Y$ is closed. Choose $y\in Y,x\in X-Y$ then $\exists A,B\in \tau$ such that $x\in A,y\in B,A\cap B=\emptyset$. Now there is an indexing: $A=A_y,B=B_y\rightarrow A^*=A_{y_1}\cap..\cap A_{y_n},B^*=B_{y_1}\cup..\cup B_{y_n}$ open sets such that $A^*\cap B^*=\emptyset$. Because $x\in A^*$ and $Y\subset B^*$ it follows $A^*\subset X-Y$. I think it uses $Y$ is compact so if $\mathcal B$ is an open cover of $Y$ then $\exists \{B_1,..,B_n\}$ finite open subcover and $y_i\in B_i\equiv B_{y_i}$, $x$ is fixed but it is probably wrong. I understand why $x\in A^*$ and $A^*, B^*$ are open sets.

REPLY [1 votes]: The idea is to show that $X-Y$ is open, so to find an open neighborhood $U$ of $x$ such that $U\cap Y=\emptyset$.
We can do it by first obtaining an open cover of $Y$, from which we can extract a finite subcover, by compactness.
I'll deliberately use a different notation, so you can compare the two proofs (actually they're the same).
For every $y\in Y$, choose an open neighborhood $U_y$ of $x$ and an open neighborhood $V_y$ of $y$ such that $U_y\cap V_y=\emptyset$ (here we use $\mathrm{T}_2$).
Since $\{V_y:y\in Y\}$ is an open cover of $Y$, there are $y_1,\dots,y_n\in Y$ such that
$$
Y\subseteq V_{y_1}\cup V_{y_2}\cup\dots\cup V_{y_n}
$$
Now take
$$
U=U_{y_1}\cap U_{y_2}\cap\dots\cap U_{y_n}
$$
which is an open neighborhood of $x$. Suppose $z\in U\cap Y$. Then $z\in V_{y_i}$, for some $i$. But, by definition, $z\in U_{y_i}$, which is a contradiction.
Hence $U\cap Y=\emptyset$ and we're done.
{"set_name": "stack_exchange", "score": 2, "question_id": 4291936}