Prove (or confute): distance between a point and a set

general-topologymetric-spacessequences-and-series

Let $X$ be a metric space, $x\in X$ and $A\subset X$. We define: $$d(x,A)=\operatorname{inf}\{ d(x,a)\mid a\in A\}.$$ Prove or confute: There exists always $v\in\bar{A}$ such that $d(x,A)=d(x,v)$

I have some problem with this. I know that the closure of $A$ is the set of the point $x$ such that $d(x,A)=0$, but I don't know if this help nor how to use it. If $x\in A$ (or in the closure) it is clear that the equation holds. If $x\notin A$, then $d(x,A)=\operatorname{inf}\{ d(x,a)\mid a\in A\}$. This implies that, if $d(x,A)= d$, then there exists $\{a_{n}\}\subset A$ such that $d(x,a_{n})\rightarrow d$, hence there exists $v$ such that $a_{n}\rightarrow v$ and so $v\in\bar{A}$. This should work because every metric space is one-countable.

Can anyone help me? Thanks before!

Best Answer

Here is another counterexample that I think is a bit simpler than the other answer, although it is perfectly fine. Consider the metric space $X = (-1,1) \cup \{2\}$ endowed with the metric $d(x,y) = |x-y|$. Let $x=2$ and $A=(-1,1)$. Then $d(x,A) = 1$, but since $\bar{A}=A$, there is no such $v\in \bar{A}$ with $d(x,v)=d(x,A)$.