I have come across one little snippet in my Real Analysis book and I can not get it through. It generally says:
$E\subset [0,1] \subset G$ and $E$ is closed $G$ is open. Define $\delta=\inf\{|x-y|,x\in E \text{ and }y\in G^c \}$, then $\delta>0$.
I know $\delta\ge 0$, but I do not know how to prove $\delta$ could not be $0$.
Thanks.
Assuming $E$ not empty (so $\delta$ exists).
$E$ and $G$ are disjoint closed sets,but $E$ is also compact. If $\delta = 0$ then there is a sequence $(x_n)_n$ in $E$ and a sequence $(y_n)_n$ in $G$ with $\lim_{n\to \infty}|x_n-y_n|=0.$ But since $E$ is compact,there would be a subsequence $(x_{f(n)})_n$ of $(x_n)_n$ converging to a point $x,$ and since $E$ is closed, $x\in E.$ Then $\lim_{n\to \infty}|x-y_{f(n)}|=0,$ implying $x\in \bar G=G,$ a contradiction ( because $x\in E$ and $E\cap G=\phi).$
Note.If $E$ and $G$ are closed,non-compact subsets of $R$, it is possible that $\delta=0.$ E.g. $E=N$ and $G=\{n+2^{-n}:n\in N\}.$