In metric space, correct me if I am on the wrong way. Let $(X,d)$ be a metric space and let $A \subseteq X$. For $x \in X$, define $d(x,A)$ = inf {$d(x,a):a \in A$}. If $d(x,A) = 0$, $\forall x \in X$. Then which of the following assertions must be true ?

*

*$A$ is compact.


*$A$ is closed.


*$A$ is dense in $X$


*$A = X$
If I take $X = [0,1]$ and $A = (0,1)$ such that $d(x,a) = 0$, $\forall x \in X$
Here $X \neq A$. So option 4 is false.
Also $A = (0,1)$ is open. Hence options 1,2 are false.
I think option 3 must be true. How can prove it?
I konw that $A$ is dense in $X$ if $\bar A = X$
Since $\forall x \in X$, $d(x,a) = 0 \implies x \in A$
So $X \subseteq A$....(1) but $A \subseteq X$....(2) given. Hence from (1) and (2) , we get $\bar A = X$

hint
Let us prove that $$ X=\bar A$$
we know that $ \bar A \subset X$.
let $ x\in X$.
$$d(x,A)=0\implies$$
$$ \inf \{d(x,b) , b\in A\}=\color{red}{0}$$
$$\implies$$
$$ (\forall \epsilon>0)\;(\exists a\in A)\;:\;  d(x,a)<\color{red}{0}+\epsilon$$
$$\implies x\in \bar A$$
