Suppose $(X,d)$ is a metric space, $w \in X$ amd $A \subseteq X$.
$\partial A$ refers to the set of boundary points of the set $A$ defined as $\{ x \in X~|~ \operatorname{dist}(x,A)= 0 = \operatorname{dist}(x,A^c) \}$.
The distance function is defined as: $ \operatorname{dist}(w,A) = \inf \{d(w,a)\mid a \in A \}$
Property A : Suppose $X$ is a set with the a totally ordering $<$. Suppose $z \in X$ and $A \subseteq X $.Then, if $\inf A$ exists, then $z \le \inf A \iff z \le a ~\forall~ a \in A $
The solution for proving that $ \operatorname{dist}(w,A) \le \operatorname{dist}(w, \partial A)$ is as follows:
If $\partial A = \phi,$ then $\operatorname{dist}(w,\partial A) = \infty$ and the result holds. Otherwise, let us consider $z \in \partial A$. $\\$ And, by definition: $ \operatorname{dist}(z,A)=0\\ \operatorname{dist}(w,A) \le d(w,a) ~\forall a \in A \\d(w,a) \le d(w,z)+d(z,a)$
Using Property A: $d(w,a) \le \operatorname{dist}(w,\partial A) +dist(z,a) = \operatorname{dist}(w,\partial A) $ which yields the required result.
Point of Confusion: Can't we prove the other way inequality in a similar manner as well?
\begin{align} \operatorname{dist}(w,\partial A) &\le d(w,z)\quad\forall z \in \partial A \\ &\le d(w,a)+d(a,z)\quad\forall a \in A \end{align} Since the above inequality is valid for all $z $ and for all $a$, thus, using Property A:
$ \operatorname{dist}(w,\partial A) \le \operatorname{dist}(w,A) + \operatorname{dist}(z,A)$ where $ \operatorname{dist}(z,A) = 0$.
Hence, the required result. I know the latter inequality is incorrect ( A counter example being a solid sphere with $w$ being the center of the sphere in the set of real numbers. )
But what went wrong with the proof? And what's the difference between the proofs for the $1st$ and $2nd$ inequality?
Any inputs will be really appreciated. Thanks a lot!
The "proof" for the first inequality is already incorrect.
is wrong. We have $\operatorname{dist}(w,\partial A) \leqslant d(w,z)$ and $\operatorname{dist}(z,A) \leqslant d(z,a)$, but generically these inequalities are strict.
A correct way to finish the proof of $\operatorname{dist}(w,A) \leqslant \operatorname{dist}(w,\partial A)$ from the - valid for all $a\in A$ and $z \in \partial A$ - inequality $$\operatorname{dist}(w,A) \leqslant d(w,a) \leqslant d(w,z) + d(z,a)$$ is to pick a sequence $(a_n)$ in $A$ with $d(z,a_n) \to 0$. (Such a sequence exists for all $z \in \partial A$.). Then we obtain the inequality $$\operatorname{dist}(w,A) \leqslant \lim_{n \to \infty} d(w,z) + d(z,a_n) = d(w,z)\,,$$ valid for all $z \in \partial A$. Taking the infimum over $z \in \partial A$ then yields $\operatorname{dist}(w,A) \leqslant \operatorname{dist}(w,\partial A)$.
In the same way, in the attempt at the second inequality, we have $$d(w,a) + d(a,z) \geqslant \operatorname{dist}(w,A) + \operatorname{dist}(z,A)\,,$$ and that points in the wrong way, from $X \leqslant S$ and $S \geqslant Y$ we cannot conclude any ordering relation between $X$ and $Y$.
Additionally, the attempt ignores the problem of $\partial A = \varnothing$, it assumes that there is a $z \in \partial A$ to use. And then there's the mistake that Kenny Lau already pointed out, there is no reason to suppose $$\inf_{a \in A} \bigl(d(w,a) + d(a,z)\bigr) = \inf_{a\in A} d(w,a) + \inf_{a\in A} d(a,z)\,.$$ In general the left hand side is strictly larger than the right.