Mendelson, Introduction to Topology, p.52
$(8)$. Let $A$ be a non-empty subset of a metric space $(X,d)$. Let $x\in X$. Prove that $d(x,A)=0$ if, and only if, every nieghborhood $V$ of $x$ contains a point of $A$.
DEFINITION Given a subset $A$ of a metric space $X$, and $x\in X$, the distance of $x$ to $A$ is defined as:
$d(x,A)=\inf\{d(x,a):a\in A\}$
COROLLARY 5.9 Let $(X,d)$ be a metric space, $a\in X$ and $A$ a non-empty subset of $X$. Then there is a sequence $\{a_n\}$ of points of $A$ such that $\lim \; d(a,a_n)=d(a,A)$
PROOF
$(\Rightarrow)$ Suppose every neighborhood of $x$ contains a point of $A$. We must prove that $\inf\{d(x,a):a\in A\}=0$ But since every neighborhood of $x$ contains a point of $A$, then there is a sequence of points $\{a_n\}$ of $A$ such that $\lim \;a_n=x$. It follows that $\lim \; d(x,a_n)=0$, and since $\{a_n\}\subset A$, $\inf\{d(x,a):a\in A\}=0$ since $d(x,a)\geq 0$ for any $a,x$.
$(\Leftarrow)$ Suppose $d(x,A)=0$. It follows by 5.9 that there is a sequence of points $\{a_n\}$ in $A$ such that $\lim \; d(x,a_n)=0$. But given a point $a\in X$, the function $f:X\to \Bbb R\;/\;f(x)=d(x,a)$ is continuous (just take $\epsilon =\delta$). Thus $\lim \; d(x,a_n)= d(x,\lim \;a_n)=0$. But $d(x,a)=0\iff x=a$, so $\lim \;a_n=x$. This means that for any neighborhood $V$ of $x$ there exists an $N$ such that $a_n \in V$ whenever $n>N$, so every neighborhood of $x$ contains some $a\in A$.
Is this alright? Is there any gap or circularity I'm missing?