Prove that if $A,B$ are closed and disjoint in a metric space, then they are contained in disjoint neighborhoods [duplicate]

Yesterday, I asked the question: Prove that if $A,B$ are closed then, $\exists\;U,V$ open sets such that $U\cap V= \emptyset$.

Here is the correct question: prove that if $A,B$ are closed sets in a metric space such that $A\cap B= \emptyset$, there exists $U,V$ open sets such that $A\subset U$, $B\subset V$, and $U\cap V= \emptyset$.

I am thinking of going by contradiction, that is: $\forall\; U,V$ open sets such that $A\subset U$, $B\subset V$, and $U\cap V\neq \emptyset$.

Let $U,V$ open. Then, $\exists\;r_1,r_2$ such that $B(x,r_1)\subset U$ and $B(x,r_2)\subset V.$ I got stuck here!

I'm thinking of using the properties of $T^4-$space but I can't find out a proof! Any solution or reference related to metric spaces?

marked as duplicate by gt6989b, user7530, zipirovich, José Carlos Santos, NamasteAug 10 '18 at 0:29

• What is the space? Is the space metric space? – Lev Ban Aug 9 '18 at 19:01
• @LevBan since he's dealing with balls I guess it is – Yagger Aug 9 '18 at 19:03

Sets $A, B$ are called completely separated iff there are disjoint open sets $U,V$ with $A\subset U$ and $B\subset V.$ The definition of a normal ($T_4$) space is a $T_1$ space in which every disjoint pair of closed sets is completely separated. It appears you are trying to prove that a metric space is a normal space.

Let $(X,d)$ be a metric space and let $A,B$ be a disjoint pair of closed subsets of $X.$ For each $a\in A,$ let $r_a>0$ such that $B (a,r_a)\cap B=\emptyset.$ For each $b\in B$ let $s_b>0$ such that $B(b,s_b)\cap A=\emptyset.$

Let $U=\cup_{a\in A}B(a,\frac {1}{2}r_a).$ Let $V=\cup_{b\in B}B(b,\frac {1}{2}s_b).$

The reason $U\cap V=\emptyset$ is that if we suppose $c\in U\cap V$ then there exist $a\in A$ and $b\in B$ such that $d(c,a)<\frac{1}{2}r_a$ and $d(c,b)<\frac {1}{2}s_b.$ But by the def'n of $r_a$ and of $s_b,$ and by the triangle inequality, $$r_a\leq d(a,b)\leq d(a,c)+d(c,b)<\frac {1}{2}r_a+\frac {1}{2}s_b$$

$$s_b\leq d(a,b)\leq d(a,c)+d(c,b)<\frac {1}{2}r_a+\frac {1}{2}s_b.$$ Adding the far left and far right expressions in the two lines above gives $r_a+s_b<r_a+s_b,$ an absurdity. So $c\in U\cap V$ cannot exist.

We can also do this last part by noting that since $d(a,b)\geq r_a$ and $d(a,b)\geq s_b,$ we have $d(a,b)\geq \max (r_a,s_b).$ But $d(a,b)\leq d(a,c)+d(c,b)<(r_a+s_b)/2.$ It would be absurd for real numbers $r,s$ that $\max(r,s)$ is $less$ than their average $(r+s)/2.$

• My 3rd sentence was based on the original version of the Q which was a little unclear. – DanielWainfleet Aug 10 '18 at 13:17

Let

$$f(X,d) \longrightarrow [0,1] \\ x \mapsto \frac{d(x,A)}{d(x,A) + d(x,B)}$$

Note that $f$ is continuous, because $d(\cdot,A)$ is, and that it is in fact well defined, because $d(x,A) + d(x,B) = 0$ if and only if $d(x,A) = 0$ and $d(x,B) = 0$ which cannot happen because it would imply $x \in \overline{A} \cap \overline{B} = A \cap B = \emptyset$. Now,

$$f(x) = 0 \iff d(x,A) = 0\iff x \in \overline{A} = A$$

and

$$f(x) = 1 \iff d(x,A) = d(x,A) + d(x,B) \iff d(x,B) = 0 \iff x \in B$$

Thus, $A = f^{-1}(\{0\})$ and $B = f^{-1}(\{1\})$. Now you can for example take $U = f^{-1}[0,\frac{1}{4})$ and $V = f^{-1}(\frac{3}{4},1]$ as the desired open sets: these are open because the are preimages of open sets of $[0,1]$ and $f$ is continuous, and they are disjoint and contain each closed set by construction.

If you our space is metric space, $X$, let's define

$f_S(x)=dist(x,S)=\inf_{y\in S}|x-y|$ and note that, for each closed set $S$, it is a continuous function on the space.

Let $U=\left\{x\in X: f_A(x) < f_B(x) \right\}=(f_A-f_B)^{-1}((-\infty,0))$

and $V=\left\{x\in X : f_B(x)<f_A(x) \right\}=(f_A-f_B)^{-1}(0,\infty)$.

And clearly, $A\subset U$ and $B\subset V$.

Also, since $f_A-f_B$ are continuous function and $(0,\infty)$ and $(-\infty,0)$ are open in $\mathbb{R}$, $U$ and $V$ are open and disjoint.

Claim. $f_S(x)$ is continuous on $X$ for each closed set $S$.

Proof) Let $\epsilon>0$ and $x,y\in X$ be given. Observe that, with out loss of generality, letting $f_S(x)-f_S(y)\geq 0$, there exists $a\in S$,

$f_S(x)-f_S(y)=\inf_{z\in S}|x-z|-\inf_{z\in S}|y-z| \leq \inf_{z\in S}|x-z|-|y-a|+\epsilon\leq |x-a|-|y-a|+\epsilon \leq |x-y|+\epsilon.$

Since $\epsilon>0$ is arbitrary, we get $|f_S(x)-f_S(y)|<|x-y|$, so $f_S$ is Lipschitz continuous.

Since $A$ and $B$ are disjoint, we can place an open ball $\mathcal B_a$ at each $a \in A$ such that $B \cap \overline{\mathcal B_a} = \varnothing$ (the bar denotes the closure). Then $\bigcup \mathcal B_a$ is an open neighbourhood of $A$. Because metric spaces are paracompact, we can choose a locally finite subcover of $A$. So assume the cover $\{\mathcal B_a \}_{a\in A}$ is already locally finite.

Let $b \in B$. Then there exists an open neighbourhood $U$ of $b$ such that $U$ only intersects finitely many of the $\mathcal B_a$. Let's suppose it intersects $\mathcal B_a^1, \dots \mathcal B_a^n$. Then $U \setminus (\overline{\mathcal B_a^1} \cup \dots \cup \overline{\mathcal B_a^n})$ is an open set containing $b$. Thus we can choose an open ball $\mathcal B_b$ such that $b \in \mathcal B_b \subseteq U \setminus (\overline{\mathcal B_a^1} \cup \dots \cup \overline{\mathcal B_a^n})$. Note that $\mathcal B_b$ is disjoint from $\bigcup \mathcal B_a$. Choosing $\mathcal B_b$ in this manner for each $b\in B$ yields an open neighbourhood for $\bigcup \mathcal B_b$ of $B$ that is disjoint from $\bigcup \mathcal B_a$.

Thus, $\bigcup \mathcal B_a$ and $\bigcup \mathcal B_b$ are disjoint open neighbourhoods of $A$ and $B$ respectively.