For compact $K$ and open $U \supseteq K$, there exists $\varepsilon>0$ such that $B(K,\varepsilon) \subseteq U$ Let $X$ be a metric space. Let $K$ be a compact subset of $X$ and $U$ an open subset of $X$ containing $K$. I strongly believe and want to prove that there exists $\varepsilon>0$ such that
$$B(K,\varepsilon) = \bigcup_{k \in K}B(k,\varepsilon) \subseteq U$$
What I have tried so far is: I covered $K$
$$K \subseteq \bigcup_{k \in K}B(k,\varepsilon_k) \subseteq U$$
Then there is a finite subcover:
$$K \subseteq \bigcup_{n=1}^NB(k_n,\varepsilon_{k_n}) \subseteq U$$
Taking the minimum of $\varepsilon_{k_n}$'s... But this might not cover $K$.
Am I on the wrong path? Thank you for any help.

What you can do is to show that $\Gamma := \rm{dist}(\cdot, U^c)$ is a continuous (even Lipschitz-continuous) map.
Then $\Gamma$ attains its minimum $\gamma$ on the compact set $K$. We have $\gamma > 0$, because for each $x \in K \subset U$, we have $B_\varepsilon (x) \subset U$ for some $\varepsilon > 0$ and thus $\Gamma(x) \geq \varepsilon$.
Now show that $\varepsilon := \gamma/2$ does what you want.
