Condition for an interval being contained in a subset of $\mathbb{R}$

I'd like some input on this problem. It's a different sort from what I've done before, and it's that sort of problem that (I think) feels so nicely intuitive that it's hard to decide if my proof is rigorous or not. How could it be improved?

"Let $x$ be a real number, $A$ a subset of $\mathbb{R}$, and $\varepsilon$ a positive number. Prove that $(x-\varepsilon, x+\varepsilon) \subset A$ if and only if $d(x,\mathbb{R}\setminus A) \ge \varepsilon$."

$\Rightarrow$ Since $(x-\varepsilon, x+\varepsilon) \subset A$, every member of $(x-\varepsilon, x+\varepsilon)$ is in $A$, so $\mathbb{R} \setminus A$ does not contain any member of $(x-\varepsilon, x+\varepsilon)$ and $d(x,\mathbb{R}\setminus A) \ge \varepsilon$.

$\Leftarrow$ Now suppose that $d(x,\mathbb{R}\setminus A) \ge \varepsilon$. Since $d(x,\mathbb{R}\setminus A) > 0$, $x \in A$. Also since $d(x,\mathbb{R}\setminus A) =\mbox{inf}\{|x-y|\,|\,y \in \mathbb{R} \setminus A \} \ge \varepsilon$, there must exist an interval $(x-\varepsilon, x+\varepsilon) \subset A$.

-
Looks good to me! –  Edward Hughes May 15 '12 at 13:50
It all depends on how precise you want to be. The first implication looks good, but if you want to add some details, then $(\mathbb{R}\setminus A)\cap (x-\varepsilon,x+\varepsilon)=\emptyset$ (as you noticed) implies $|x-y|\geq \varepsilon$ for all $y\in \mathbb{R}\setminus A$, whence by taking infimum it follows that $d(x,\mathbb{R}\setminus A)\geq \varepsilon$.
In the second, you could elaborate more on why exactly this interval is a subset of $A$. You may argue for example by following. Let $y\in (x-\varepsilon,x+\varepsilon)$, whence $|x-y|<\varepsilon$. If $y\notin A$ then $y\in \mathbb{R}\setminus A$, whence $|x-y|\geq d(x,\mathbb{R}\setminus A)\geq \varepsilon$, which is a contradiction since $|x-y|<\varepsilon$. Hence $y\in (x-\varepsilon,x+\varepsilon)$ implies $y\in A$, i.e. $(x-\varepsilon,x+\varepsilon)\subset A$.
The terminology that you used works fine :-) About endpoints, do you mean 'endpoints' of $A$? In that case they may not exist or make sense if $A$ is unbounded or if $A$ is very messy. There is a notion of 'closure' of a set, which you may want to check out unless you're already familiar with it. Speaking of endpoints of an interval is fine though. –  Thomas E. May 16 '12 at 4:11
True, not all sets would have obvious end points. I was just thinking something along the lines of the endpoints of a set corresponding to $\mbox{sup}\{|a-b|\,|\,a,b \in A\}$ But then this would work only for (EDIT: closed) intervals, as you mentioned, and finite sets. But of course the current tools are sufficient for doing these things, and I can be happy with them. –  Alex Petzke May 16 '12 at 12:25