# Relation in distance between a set $A$ and boundary of a set $B$, in this particular case.

In a metric space $$(M,d)$$, I have compact nonempty sets $$A, B$$ and $$C$$ with $$A\subset \operatorname{int} B$$ and $$B \subset \operatorname{int} C$$, where $$\operatorname{int}$$ denotes the interior of a set and $$\partial$$ its boundary. I'm trying to find out if $$d(A,C - \operatorname{int} B) = d(A, \partial B).$$ If this were to be true it would solve a problem I'm working on, but can't prove it nor find a counterexample. It is always true that $$d(A,C - \operatorname{int} B) \leq d(A, \partial B),$$ since $$\partial B \subseteq C- \operatorname{int} B,$$ and the reverse inequality seems true because taking a point in $$C - \operatorname{int} B$$ which is not in the boundary of $$B$$, it would be "further away" from $$A$$ than a point in the boundary of $$B,$$ but I'm thinking geometrically on the plane, and I can't work on the triangle inequality to give me this result.

Is what I'm trying prove to even true? Any hints are appreciated, thanks.

(OBS: the metric space is also a smooth manifold in my problem, if any extra structure helps).

(OBS2: in the original question, $$M$$ could be a topological manifold, since I thought this problem could be solved with topology alone. User @theo-bendit showed this is false in general, but more research made me see this may be true for a smooth manifold, as in this other question When is distance to the boundary always less than that to the exterior? . In not used to work with riemann metrics so I can't be sure).

• Do we have a proof for $d \left( A, C - \text{int } B \right) \leq d \left( A, \partial B \right)$? – Aniruddha Deshmukh Jan 4 at 3:21
• Sure. Since $B \subset C$ and $B$ is compact, so is closed in the metric topology, and $B = int \ B \cup \partial B,$ where the union is disjoint, therefore $\partial B \subseteq C - int \ B.$ Now the result follows since the distance is the infimum of $d$ on $A \times C - int \ B$ and $A \times \partial B \subseteq A \times C - int \ B.$ – Vic Jan 4 at 3:31

Let $$K$$ be the Cantor Middle Third set, and \begin{align*} M &= C = K \cup [100, 103] \\ B &= \left(K \cap \left[0, \frac13\right]\right) \cup [101,102] \\ A &= K \cap \left[0, \frac19\right]. \end{align*} Then, \begin{align*} C \setminus \operatorname{int} B &= \left(K \cap \left[\frac23, 1\right]\right) \cup [100, 101] \cup [102, 103] \\ \partial B &= \{ 101, 102\} \\ d(A, C \setminus \operatorname{int} B) &= \frac59 \\ d(A, \partial B) &= \frac{908}{9}. \end{align*}
• Bear in mind that $M$ is not the real line; in fact it has an open, totally disconnected compact subspace $K$. – Theo Bendit Jan 4 at 3:52
• @Vic The example doesn't work if you take $M = \mathbb{R}$, as $C$ will only have the interior $(100, 103)$. – Theo Bendit Jan 4 at 3:57
• @Vic In fact, the $[100, 103]$ bit was only included to prevent $\partial B = \emptyset$. – Theo Bendit Jan 4 at 3:58