Let $(X,d)$ be a metric space, $a \in X$, $K \subseteq X$ such that K is compact and $a \notin K$. Show that... I have a question (I guess) regarding my proof below. I have a feeling it's not correct. Would someone kindly verify?
Let $(X,d)$ be a metric space, $a \in X$, $K \subseteq X$ such that $K$ is compact and $a \notin K$. Show that there there exists a neighborhood $V$ of $a$ and an open set $W \supseteq K$ such that $V \cap W = \emptyset$.
Proof. Let $(X,d)$ be a metric space, $a \in X$, $K \subseteq X$ such that $K$ is compact and $a \notin K$.Then, $a \in K^c$. [Note that $K$ compact $\Rightarrow$ $K$ closed $\Rightarrow K^c$ open.] So, $a$ is an interior point of $K^c$. Let $V$ be a neighborhood of $a$, then $N_V(a) \subseteq K^c$. Let $W$ be an open set such that $K \subseteq W$. Now, there are two possible cases:


*

*If $a \in W-K$, then clearly $V \cap W \neq \emptyset$. (Since $W$ contains $a$ and is open, so it also contains $V$.

*If $a \in W^c$, then $a \notin W$. So, we can find a neighborhood $V$ of $a$ such that $V \cap W = \emptyset.\ □$
Thank you for the help!
 A: I think the idea of this proof is OK, but there are a few assumptions you should make explicit. First, you should explain how you can make neighborhoods of $a$ that are small enough to miss $K$. I'm not quite sure I see exactly how the cases work, but I think we can make it work. We need to make some smart choices about how to define the neighborhoods of $a$ and $K$.
We define a useful function $d$ by $d(x) = $ the infimal distance from $x$ to $K$. Now since $K$ is compact, $K$ contains all limit points, as $K$ is closed, so $d(a) > 0$. Now take a disk of radius $d(a)/3$ around $a$ as the neighborhood of $a$. Next, cover $K$ by putting a disk of the same radius over every point. The union of these open sets can be your neighborhood of $K$. The neighborhoods will not intersect by triangle inequality.
Our proof doesn't need compactness, since arbitrary unions of open sets are open, so you can actually scratch this part all together!
A: We need to find a $W$ such that $W\cap V=\emptyset$ in order to complete the proof. To this end we should use the fact that we have a metric, not just a hausdorff topology.
Hence since $V$ is open, there exists some $\varepsilon >0$ such that $B_\varepsilon (a)\subseteq V$, and then $B_{\frac{\varepsilon}{2}} (a)\subseteq\overline{B}_{\frac{\varepsilon}{2}}(a)\subseteq X\setminus K$. Redefine $V=B_{\frac{\varepsilon}{2}} (a)$, and let $W=X\setminus \overline{B}_{\frac{\varepsilon}{2}}(a)$.
