# distance of set problem

$$\Omega$$ is open subset of $$\mathbb{R}^n$$.let $$A\subset \Omega$$ be the compact subset of $$\mathbb{R}^n$$.

Prove distance $$d(\partial \Omega,A)>0$$

My proof,assume $$d(\partial \Omega,A) = \inf_{x\in A}d(\partial\Omega,x) = 0$$,so exist a sequence $$(x_n)\in A$$ such that $$d(\partial \Omega,x_n) <\frac{1}{n}$$ .Now since $$A$$ is bounded,it exist convergence subsequence, $$x_{n_k}\to x\in A$$(since $$A$$ is closed.)

So by continunity of distance function we have $$d(\partial\Omega,x) = 0$$ which implies $$x\in \partial\Omega$$ (since $$\partial \Omega$$ is closed).Which is contradiction since no intersection of $$\partial\Omega$$ and $$A$$ due to $$\Omega$$ is open.

The question is I use assumption that $$A$$ is bounded set to construct the sequence,but in fact this bounded condition seems not necessary,so how to prove if we only assume $$A$$ is closed subset of $$\mathbb{R}^n$$ that contains in $$\Omega$$?

This is false if we drop compactness: Let $$\Omega=\bigcup (2n,2n+1)$$ and $$A=\{2n+\frac 1 n: n \geq 1\}$$. Then $$A$$ is a closed subset of the open set $$\Omega$$ and $$d(\partial \Omega, A) \leq |2n-(2n+\frac 1n) |=\frac 1n$$ for all $$,n$$. So $$d(\partial \Omega, A)=0$$