For $F$ closed in a metric space $(X,d)$, is the map $d(x,F) = \inf\limits_{y \in F} d(x,y)$ continuous?

Possible Duplicate:
Continuity of the metric function

For $F$ closed in a metric space $(X,d)$, is the map $d(x,F) = \inf\limits_{y \in F} d(x,y)$ continuous?

I think it is, but I’m having a complete mind blank (it’s been a while since I did any analysis).

Any hints would be appreciated.

Solutions Collecting From Web of "For $F$ closed in a metric space $(X,d)$, is the map $d(x,F) = \inf\limits_{y \in F} d(x,y)$ continuous?"

Let $(X,\rho)$ be some metric space. For each $A\subset X$ we define distance from $x$ to $A$ by equality $\rho(x,A)=\inf\{\rho(x,y):y\in A\}$. Since for all $x_1,x_2,y\in X$ we have
$$
\rho(x_1,y)\leq\rho(x_2,y)+\rho(x_1, x_2)
$$
then after taking infimum we get
$$
\rho(x_1,A)\leq\rho(x_2,y)+\rho(x_1, x_2)
$$
then after taking infimum one more time we see
$$
\rho(x_1,A)\leq\rho(x_2,A)+\rho(x_1, x_2)
$$
Similarly we can prove that
$$
\rho(x_2,A)\leq\rho(x_1,A)+\rho(x_1, x_2),
$$
so $|\rho(x_1,A)-\rho(x_2,A)|\leq\rho(x_1, x_2)$. Now for each $\varepsilon>0$ take $\delta=\varepsilon$. Then for all $x_1,x_2\in X$ such that $\rho(x_1,x_2)<
\delta$ we have $|\rho(x_1,A)-\rho(x_2,A)|<\varepsilon$. Thus $\rho(\cdot,A):X\to\mathbb{R}_+$ not only continuous, but Lipschitz continuous with Lipschitz constant 1.

In this proof, closedness of $A$ is unnecessary.

Let $x\in X$, and let $d(x,F)=r$. we want to show that for all $\epsilon\gt 0$ there exists $\delta\gt 0$ such that if $d(x,y)\lt \delta$, then $|d(y,F)-r|\lt\epsilon$.

Let $d(y,F)=s$. Then for every $\gamma\gt 0$ there exists $f_1\in F$ such that $d(x,F)=r\leq d(x,f_1)\lt r+\gamma$. Therefore,
$$d(y,F) \leq d(y,f_1)\leq d(y,x)+d(x,f_1) \lt d(y,x)+r+\gamma$$
so
$$d(y,F)-r \leq d(y,x)+\gamma.$$
On the other hand, $d(x,F) \leq d(x,f_1) \leq d(x,y)+d(y,f_1) \leq d(x,y)+d(y,F)$, so
$$d(y,F) \geq d(x,F)-d(x,y) \geq d(x,F)-d(x,y)-\gamma,$$
hence
$$d(y,F)-r = d(y,F)-d(x,F)\geq -d(x,y)-\gamma.$$
I hope that’s sufficient?