Solution (source code)

= Solution

If $A$ is open and contains $a$, there is an epsilon ball at $a$ contained in it. This ball is exactly $B_d(a,\varepsilon)$ by the equality of balls proved above. Conversely such a ball supplies a neighborhood at $a$, and all other points of $A$ have their singleton neighborhoods inside $A$. Thus the stated ball condition is necessary and sufficient.