Solution (source code)

= Solution

The <closure> $\overline A$ is the smallest <closed subset> of $M$ containing $A$, equivalently the intersection of all such closed subsets. In a <metric space> it is characterized by
$$
\boxed{x\in\overline A\iff B(x,r)\cap A\ne\varnothing\text{ for every }r>0.}
$$
If some ball misses $A$, its centre lies outside a closed superset of $A$; conversely the complement of any closed superset is an open neighbourhood disjoint from $A$. This verifies the equivalence of the two descriptions.