I need help with the following proof, which my professor added for practice (but not as homework). I am completely lost here.
Let $A$ be a nonempty subset of a metric space $X$. Define $d(\cdot ,A) : X \to [0,\infty)$ by $$d(x,A) = \inf\{d(x,a) : a \in A\}.$$
Prove that $d(\cdot,A)$ is continuous.
Now there are some things that I do know.
The definition of continuous:Suppose X,Y are metric spaces, a ∈ X and f : X → Y. The function f is continuous at a if for every ε>0there is a δ>0such that if dX(a,x) < δ, then dY (f(a),f(x)) < ε. If f is continuous at every point a ∈ X, then f is said to be continuous.
The following theorem:A function f : X → Y is continuous if and only if f−1(U) ⊂ X is open for every open set U ⊂ Y .