Distance between compact subsets of open sets If $G$ is an open set and $K$ a compact set with $K\subset G$, show that there is a $\delta>0$ such that $\{x:\textrm{dist}(x,K)<\delta\}\subset G.$
 A: Suppose this was not true, and let $(X,d)$ be the metric space. Then for all $\delta$, there exists a $x\in X\backslash G$, such that $\textrm{dist}(x,K)<\delta$.
Let $\delta_n$ be decreasing sequence of postive real numbers converging to $0$.
Then there exists a sequence $x_n$ such that each $x_n\in X\backslash G$ and $\textrm{dist}(x_n,K)<\delta_n.$
As $K$ is compact and thus closed, for each $n$ consider $y_n\in K$ such that $$d(x_n,y_n)=\min\{d(x_n,y):y\in K\}.$$
By compactness of $K$, the sequence $y_n$ has a convergent subsequence $y_{n_k}$. Let $x\in X$ such that $y_{n_k}\rightarrow x$; as $K$ is closed $x\in K$.
Now, observe that $d(x_n,y_{n_k})\rightarrow 0$. Indeed, this follows from the fact that $\textrm{dist}(x_n,K)<\delta_n\rightarrow 0$ and the definition of $y_n$.
So, $$d(x_n,x)\leq d(x,y_{n_k})+d(x_n,y_{n_k})\rightarrow 0,$$ and thus $$d(x_n,x)\rightarrow 0.$$
But, $x\in K\subset G,$ and $G$ is open and so, there exists an $r>0$ such that $B(x,r)\subset G.$ So, there must occur a $N$ such that $x_n\in G,$ for all $n\geq N,$ a contradiction to our assumption.
Hence our claim must be true.
