Continuity of metric I recently came across this definition:
Let $(X,d)$ be a metric space and $A$ be a nonempty subset of $X$. For each $x\in X$ we define a distance from $x$ to $A$ by the equation
$d(x,A)=\inf\{d(x,a) | a\in A\}$
I would guess that such a function will be continuous. But is there an easy and rigorous way to prove it?
 A: Hint
$d(x,A)=\inf\{d(x,a):a\in A\}\le \inf\{d(x,y):y\in A\}+\inf\{d(y,a):a\in A\}$
so  $d(x,A)=\inf\{d(x,a):a\in A\}\le \inf\{d(x,y):y\in A\}+ d(y,A)$
so $d(x,A)-  d(y,A)\le \inf\{d(x,y):y\in A\}<d(x,y)$
A: May be this solution is not easy, but you can prove that the distance is indeed Lispchitz.
Let $\varepsilon >0$, and let $x,y \in X$. By the infimum definition, we have  that there exists $z_x,z_y\in A$ such that
$$
d(z_x,x)\leq d(x,A)+\varepsilon\ \  \wedge\ \ d(z_y,y)\leq d(y,A)+\varepsilon
$$
then
\begin{align*}
d(x,A) &\leq d(x,z_y)\\
&\leq d(x,y)+d(y,z_y)\\
&\leq d(x,y) +d(y,A)+\varepsilon  
\end{align*}
So, we have that:
$$
d(x,A)-d(y,A)\leq d(x,y)+\varepsilon
$$
changing the roles of $x$ and $y$, we get:
$$
d(y,A)-d(x,A)\leq d(x,y)+\varepsilon
$$
then
$$
|d(x,A)-d(y,A)|\leq d(x,y)+\varepsilon
$$
And taking $\varepsilon \to 0$, we have that $d(\cdot,A)$ is Lipschitz, then is continuous.
A: Let $U, V$ be subsets of a metric space $M$. Let $\{x_i\}$ be a sequence in $U$ and $\{y_i\}$ be a sequence in $V$.
For a function to be continuous, whenever $D(x_i, x_0) < \delta$ for any $\delta > 0$ and $N_\delta(x_0) \subset U$ we have an appropriate $D(f(x_i), y_0) < \epsilon$ for any $\epsilon > 0$ and $f(N_\delta(x)) \subset N_\epsilon(y_0) \subset V$.
We can also define uniform continuity by proving $f$ to be continuous not just at $x_0, y_0$, but any point in the set.
Can you prove continuity using the epsilon-delta definition?
