Distance between two sets in a metric space is equal to the distance between their closures Let $A,B \subseteq \mathbb{R}^d$ be non-empty sets. Define their distance to be
$$ d(A,B) = \inf \{ ||x-y|| : x \in A, \; \; y \in B \} $$
For any $A,B$, do we have that $d(A,B) = d( \overline{A}, \overline{B} ) $.
Is the following proof correct? 
Proof
Note, you always have $d(A,B)\geq d(\bar{A},\bar{B})$ since the supremum is taken over a bigger set on the right hand side.
If $d(\bar{A},\bar{B}) = d$ then $\exists x_1,x_2,...\in \bar{A}$ and $y_1,y_2,...\in \bar{B}$, for $\epsilon>0$, $\exists N$ such that $d(x_n,y_n)\leq d+\epsilon$ for $n\geq N$
Now each of the $x_i$ are in the $\bar{A}$, this means for each $x_i$, there exists $x_i'\in A$ such that $d(x_i,x_i')<\epsilon$ (In a metric space, the closure is the set of limit point of $A$, so there must be  $d(x_i,x_i')<\epsilon$ with $x_i'\in A$). Similarly there exists $y_i'\in B$ such that $d(y_i,y_i')<\epsilon$. Then
$ d(\bar{A},\bar{B})\geq d(x_i,y_i)-\epsilon\geq  d(x_i',y_i')-3\epsilon \geq d(A,B)-3\epsilon$
where I used $d(x_i,y_i)+d(x_i',x_i)+d(y_i,y_i')\geq d(x_i',y_i')$
but $\epsilon$ is arbitrary... so we are done.

The proof is correct. Just to have a shorter proof of the same fact (the distance between sets is equal to the distance between their closures), here goes: 
Let $\rho = d(A,B)$. The inequality   $d(\overline{A},\overline{B})\le \rho$ holds  because the infimum on the left is over a larger set. In the opposite direction, take any $a\in \overline{A}$ and $b\in \overline{B}$. The goal is to prove $d(a,b)\ge \rho$.
For every $\epsilon>0$ there exist $a'\in A$ and $b'\in B$ such that $d(a,a')<\epsilon$ and $d(b,b')<\epsilon$. By the triangle inequality, 
$\rho \le d(a',b')\le d(a,b)+ 2\epsilon$.
Since $\epsilon$ can be arbitrarily small, $\rho\le d(a,b)$.  
