Distance to a set I have a question concerning to the following problem. Let $(X,d)$ be a metric set. For every subset $T \subset X$ we define a mapping
\begin{equation}
d_T : X \rightarrow R , d_T(x) := inf\{d(x,y) | y \in T\}
\end{equation}
where $R$ is the set of real numbers.
(1) Now I would like to show, that
\begin{equation}
\bar{T} = \{ x | d_T(x) = 0 \}
\end{equation}
I think it is obvious but I don't know how to write it down. 
(2) Furthermore I would like to show, that $d_T$ is continous. But I don not have a good approach.
I hope you can help me to understand the problem.
 A: If $d_T(x)=0$ and $x\notin T$ then for any $\epsilon>0$ there exists $y\in T$ such that $d(x,y)<\epsilon.$ (In other case, it would be  $d(x,y)\ge \epsilon$ contradicting the fact that $\inf\{d(x,y);y\in T\}=0.)$ So, for any $\epsilon>0$ it is $B(x,\epsilon)\cap T\ne \emptyset.$ That, is $x\in \overline{T}.$ This shows that, $\{x\in X; d_T(x)=0\}\subset \overline{T}.$ Conversely, if $x\in \overline{T}$ then for any $\epsilon >0$ it is $B(x,\epsilon)\cap T\ne \emptyset.$ That is, there exists $z\in T$ such that $d(x,z)<\epsilon.$ So, $$d_T(x)=\inf\{d(x,y);y\in T\}\le d(x,z)<\epsilon.$$ Since $\epsilon$ is arbitrary we have $d_T(x)=0.$
To show continuity argue by contradiction. Assume there exists $x_0\in X$ and $\epsilon>0$ such that for any $\delta>0$ there exists $x\in X$ satisfying $d(x,x_0)<\delta$ and $|d_T(x)-d_T(x_0)|\ge \epsilon.$ Assume without lost of generality that $d_T(x_0)<d_T(x).$ Now, there exists $y\in T$ such that $d_T(x_0)> d(x,y)-\epsilon.$ So 
$$d(x,y)-\epsilon<d_T(x_0)<d_T(x)\le d(x,y), $$ from where
$$\epsilon \le d_T(x)-d_T(x_0)<d(x,y)-(d(x,y)-\epsilon)=\epsilon,$$ which gives a contradiction. The same argument works if $d_T(x)<d_T(x_0).$
