Does $|d(x,z)-d(y,z)|\leq d(x,y)$ implies $|\inf_{z\in A}d(x,z)-\inf_{z\in A}d(y,z)|\leq d(x,y)$? I'm studying the solution of this exercise (the solution is posted there). I've had problems trying to repeat part $a)$.
My question is as follows, let $(S,d)$ be a metric space, $\emptyset \neq A\subset S$. Take $x, y \in S$, and $z\in A$. Suppose we have $$|d(x,z)-d(y,z)|\leq d(x,y),$$ for all $z\in A$. Can we conclude that $|\inf_{z\in A}d(x,z)-\inf_{z\in A}d(y,z)|\leq d(x,y)$? My intuitive answer is yes, but as I had my doubts I tried to write this conclusion in a more specific way, but I couldn't do it.
I tried something like, if we have $x\leq a$ and $y\leq b$ then conclude that $$|x-y|\leq |a-b|$$ If we take $x$ and $y$ as the infima we will conclude what I want, but the above inequality is not always true ($a=b$ can be an example).

And I'm stuck there. Don't know if I'm missing something so I decided to ask here for any help/advice. Thanks in advance.
 A: Yes, in fact there is a stronger statement (*) as well. If an inequality holds for every element $z\in A$, you can take the infimum over $A$ on both sides and preserve the inequality (although taking the $\inf$ or $\sup$ may turn a strict inequality into a non-strict inequality, e.g. $<$ may turn to $\leq$ by applying this operation). So for your case,
\begin{align}
\inf_{z\in A}d(x,y) = d(x,y)&\geq \inf_{z\in A} |d(x,z) - d(z,y)| \\
&=|\inf_{z\in A} (d(x,z)-d(z,y))|\\
&\geq|\inf_{z\in A}d(x,z)-\sup_{z\in A}d(z,y)| \tag{*} \\
&\geq |\inf_{z\in A}d(x,z)-\inf_{z\in A}d(z,y)|
\end{align}
The first equality comes from the fact that $z$ appears nowhere in the expression $\inf_{z\in A} d(x,y)$. The first inequality follows from the original statement. The second equality follows from continuity of $|\cdot|$. $(*)$ is an inequality since we are breaking one $\inf$ into two. Note also that for any $C\subset \mathbb{R}$, $\inf -C = -\sup C$.
A: I’ll use the notation from the linked page.
Suppose that $|f_A(x)-f_A(y)|>d(x,y)$, say
$$|f_A(x)-f_A(y)|-d(x,y)=\epsilon>0\;.$$
There are $z_x,z_y\in A$ such that $d(x,z_x)<\frac{\epsilon}2$ and $d(y,z_y)<\frac{\epsilon}2$. But then
$$\big||d(x,z_x)-d(y,z_y)|-|f_A(x)-f_A(y)|\big|<\frac{\epsilon}2+\frac{\epsilon}2=\epsilon\;,$$
so $|d(x,z_x)-d(y,z_y)|-d(x,y)>0$, i.e., $|d(x,z_x)-d(y,z_y)|>d(x,y)$, which is impossible.
A: For any $z\in A$
$$
\inf_{a\in A}d(x,a)\leq d(x,z)\leq d(x,y)+d(y,z)
$$
Thus
$$
\inf_{a\in A}d(x,a)- d(x,y)\leq d(y,z)
$$
which means that
$$
\inf_{a\in A}d(x,a)- d(x,y)\leq \inf_{z\in A}d(y,z)
$$
That is
$$d(x,A)-d(y,A)\leq d(x,y)$$
for all $x,y$ where $d(w,A)=\inf_{a\in A}d(w,a)$ for any $w$. Inverting the roles of $x$ and $y$ you get
$$ d(y,A)-d(x,A)\leq d(y,x)=d(x,y)$$
The rest should be easy.
