So assume $(X,d)$ is a metric space with $A \subseteq X$ as a subspace. Show that the function $f: X \rightarrow \mathbb{R}$ defined by $f(x)=\inf\{d(x,a)|a\in A\}$is continuous.
My instinct is to use the definition of continuity for metric spaces. Namesly, given any $\epsilon >0$, there is a $\delta$, such that:
$d(x,y) < \delta \implies d(f(x),f(y))< \epsilon$, can I therefore assume that $\mathbb{R}$ has the usual topology or does that change the nature of what's being asked? Thanks