[proofplan]
We show $\overline{A} = \{ x \in X : \operatorname{dist}(x, A) = 0 \}$ by proving both inclusions. A point $x$ satisfies $\operatorname{dist}(x, A) = 0$ if and only if every open ball $B(x, r)$ meets $A$, which is exactly the [Neighbourhood Characterisation of Closure](/theorems/1005) in the metric space setting.
[/proofplan]
[step:Show $\overline{A} \subset \{ x \in X : \operatorname{dist}(x, A) = 0 \}$]
Let $x \in \overline{A}$. For every $\varepsilon > 0$, the open ball $B(x, \varepsilon)$ is an open neighbourhood of $x$. By the [Neighbourhood Characterisation of Closure](/theorems/1005), $B(x, \varepsilon) \cap A \neq \varnothing$, so there exists $a \in A$ with $d(x, a) < \varepsilon$. Since $\operatorname{dist}(x, A) = \inf_{a \in A} d(x, a)$, we have $0 \leq \operatorname{dist}(x, A) < \varepsilon$. As $\varepsilon > 0$ was arbitrary, $\operatorname{dist}(x, A) = 0$.
[guided]
Let $x \in \overline{A}$. We show $\operatorname{dist}(x, A) = 0$ by verifying that $\operatorname{dist}(x, A) < \varepsilon$ for every $\varepsilon > 0$.
Fix $\varepsilon > 0$. The open ball $B(x, \varepsilon) = \{ y \in X : d(x, y) < \varepsilon \}$ is open in $(X, d)$ and contains $x$. By the [Neighbourhood Characterisation of Closure](/theorems/1005), $B(x, \varepsilon) \cap A \neq \varnothing$, so we may choose $a \in A$ with $d(x, a) < \varepsilon$. By definition of infimum,
\begin{align*}
\operatorname{dist}(x, A) = \inf_{a' \in A} d(x, a') \leq d(x, a) < \varepsilon.
\end{align*}
Since $\operatorname{dist}(x, A) \geq 0$ (as an infimum of nonnegative values) and $\operatorname{dist}(x, A) < \varepsilon$ for all $\varepsilon > 0$, we conclude $\operatorname{dist}(x, A) = 0$.
[/guided]
[/step]
[step:Show $\{ x \in X : \operatorname{dist}(x, A) = 0 \} \subset \overline{A}$]
Let $x \in X$ with $\operatorname{dist}(x, A) = 0$. Let $U \in \tau$ be any open set containing $x$. Since $U$ is open in the metric topology, there exists $r > 0$ with $B(x, r) \subset U$. Since $\operatorname{dist}(x, A) = 0 < r$, the infimum $\inf_{a \in A} d(x, a) < r$, so there exists $a \in A$ with $d(x, a) < r$, giving $a \in B(x, r) \subset U$. Hence $U \cap A \neq \varnothing$. By the [Neighbourhood Characterisation of Closure](/theorems/1005), $x \in \overline{A}$.
[guided]
Let $x \in X$ satisfy $\operatorname{dist}(x, A) = 0$. We verify the neighbourhood condition from the [Neighbourhood Characterisation of Closure](/theorems/1005).
Let $U$ be any open set containing $x$. Since $(X, d)$ is a metric space, every open set is a union of open balls, so there exists $r > 0$ with $B(x, r) \subset U$. We claim $B(x, r) \cap A \neq \varnothing$.
Since $\operatorname{dist}(x, A) = \inf_{a \in A} d(x, a) = 0$ and $r > 0$, the infimum is strictly less than $r$. By the characterisation of infimum, there exists $a \in A$ with $d(x, a) < r$, hence $a \in B(x, r) \subset U$. Therefore $U \cap A \neq \varnothing$.
Since $U$ was an arbitrary open neighbourhood of $x$, the [Neighbourhood Characterisation of Closure](/theorems/1005) gives $x \in \overline{A}$.
[/guided]
[/step]