Existence of an open set which contains a compact subset

general-topology

In general metric space $X$, we know compactness implies boundedness and closedness(the other way around it's not always true).

If there exist a proper compact subset $E$ of $X$ and a point $x\in E^c$, we can easily form an open set $U$ s.t. $E\subsetneq U\subsetneq \bar{U}\subsetneq X$. (The construction of $U$ is similar to the step of finding a finite subcover in the proof of that compactness implies closedness.)

But if our space $X$ now is only locally compact and Hausdorff and $E\subsetneq X$, $E$ being compact, can we still have the existence of such an $U$, i.e. can we still find an open set $U$ s.t. $E\subsetneq U\subsetneq \bar{U}\subsetneq X$?


Edit: I have proved the claim is true whenever $X$ is a locally compact Hausdorff connected space. For details please refer to my post.


Second edit: As @Henno commented, a connected metric space need not be locally compact at all.(cf. Michael's Answer in this post). The local compactness remains necessary as a separate assumption.

Best Answer

For $X$ connected and LCH (locally compact Hausdorff ) we do have the strict inclusions you crave.

First we have $K \subseteq U \subseteq \overline{U} \subseteq V$ by the standard results for any $K$ compact and open $V$ around it, where I do assume $V \neq X$. (If you know $K$ has a compact neighbourhood $N$ inside $V$, then taking $U=\operatorname{int}(N)$ is enough for the first fact, which also shows we can assume $\overline{U}$ is also compact).

So the condition of connectedness then implies all these inclusions are strict or else we would have a non-trivial clopen subset of $X$ which cannot be ($K$ is compact and hence closed so cannot equal the open set $U$, etc.).

The only trivialities to avoid are $V=X$ and $K=\emptyset$, really. Use a modified argument if you need to cover these cases as well.

As a follow up to the comments: suppose $E$ is compact in an LCH space $X$, there is some $ f \in C_c(X)$ that is $1$ on $E$: this is trivial if $X= E$ and so $X$ is compact too as the constant function with value $1$ then works. So assume $E \neq X$ wlog.

Then let $\alpha X$ be the one-point conpactification of $X$ which is compact Hausdorff and so normal and we always have some point $\infty \in \alpha X \setminus E$. ( take the conpactifying point if $X$ is not compact and any point not in $E$ otherwise) As $E$ is closed and $\alpha X$ is normal we have open neighbourhoods $U$ of $E$ and $V$ of $\infty$ that have disjoint closures. We can then define a Urysohn function $f$ that is $1$ on $E$ and $0$ on $\overline{V}$ and this function is as required (when we restrict it back to $X$ in the non-compact case of course); the support of $f$ is a subset of the compact $X \setminus V$.