How to show that disjoint closed sets have disjoint open supersets?

For every $x \in S_0$, take an open ball $B(x,\epsilon_x)$ disjoint from $S_1$ and for every $y \in S_1$, take an open ball $B(y,\epsilon_y)$ disjoint from $S_0$. Let $$T_0=\bigcup_{x\in S_0}B(x,\frac{\epsilon_x}{2}) \ \ \ T_1=\bigcup_{y\in S_1}B(y,\frac{\epsilon_y}{2}).$$ Then $T_0$ and $T_1$ are open sets containing $S_0$ and $S_1$, and it's easy to see that they are disjoint.

PS: This argument works for every metric space.


For $S\subseteq\mathbb R^n$ we define the distance from $x$ to $S$ as $$\operatorname d(x,S)=\inf\{\operatorname d(x,y):y\in S\}.$$ It is easy to see that $x\mapsto\operatorname d(x,S)$ is a continuous function, and that $\operatorname d(x,S)\gt0$ if $x\notin\bar S.$

Given disjoint closed sets $S_0,S_1$ the sets $$T_0=\{x:\operatorname d(x,S_0)\lt\operatorname d(x,S_1)\},$$ $$T_1=\{x:\operatorname d(x,S_1)\lt\operatorname d(x,S_0)\}$$ are disjoint open sets with $S_0\subseteq T_0$ and $S_1\subseteq T_1.$

In a few words: points nearer to $S_0$ than $S_1$ go into $T_0,$ points nearer to $S_1$ than $S_0$ go into $T_1.$