Let $A \subset \mathbb{R}^n$ be a non empty set, and for $x \in \mathbb{R^n}$ let $$d(x,A) := inf\{ ||x-y||_2 : y \in A \}$$
be the distance between x and the set A.
Prove that:
$d(.,A): \mathbb{R^n} \rightarrow \mathbb{R} \ \ \ x \mapsto d(x,A)$ is (Lipschitz) continous.
$d(x,A) = 0 \iff x \in \bar{A}$ ( The set of adherent points for A )
I have already proven 1) using the triangle inequality but i'm struggling with the second question, so far the only idea i have is $d(x,A) = 0 \implies x \in A \implies x \in \bar{A}$ but it seems too easy to be correct and i still got no clue for the opposite way $\impliedby$
Thanks in advance!
For the forward implication, note that as $d(.,A)$ is a continuous function and ${0}$ is a closed set then $d(.,A)^{-1} ({0})$ is closed. $d(.,A)^{-1} ({0})$ also certainly contains A, so we must have that it contains $\bar{A}$ by definition of closure.
For the reverse implication, note that $\bar{A}=A\cup A'$ where $A'$ is the set of limit points of A. If $x\in A$ then $d(x,A)=0$ certainly. If $x\in A'$ then for all $\epsilon >0$ we may choose some $a \in A$ with $\left\lVert x-a\right\rVert_{2}<\epsilon$, and so $d(x,A)=0$.