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$.

2022-07-25 20:44:47
Source Share
Answers: 0