2

I want to generalize this problem: Prove that $\mathbb{R}\setminus \mathbb{Z}$ is open in $\mathbb{R}$.

Let $\mathbb{R}^2 \setminus\mathbb{Z}^2 =\{(x,y)\in \mathbb{R}^2 \mid x \not\in\mathbb{Z}, y\not\in \mathbb{Z}\}.$ Is $\mathbb{R}^2 \setminus\mathbb{Z}^2$ open in $\mathbb{R}^2$?

My attempt: In the problem link I have proved that $\mathbb{R}\setminus \mathbb{Z}$ is open in $\mathbb{R}$. To prove it, I have shown that for each $x\in \mathbb{R}\setminus \mathbb{Z}$ there exists $r>0$ such that $(x-r, x+r)\subset \mathbb{R}\setminus\mathbb{Z}$. Hence $\mathbb{R}\setminus \mathbb{Z}$ is open in $\mathbb{R}$.

Similarly, we can show that for each $y\in \mathbb{R}\setminus\mathbb{Z}$ (considering the $y$ axis) there exists $s>0$ such that $(x-s, x+s)\subset \mathbb{R}\setminus\mathbb{Z}$.

Therefore choose $r^\prime = \frac{1}{2}(\text{min}\{r,s\})$. Let $d$ be the Euclidean metric on $\mathbb{R}^2$. Now for each $(x,y) \in \mathbb{R}^2 \setminus\mathbb{Z}^2$ there exist $r^\prime>0$ such that $B_d((x,y), r^\prime) \subset \mathbb{R}^2 \setminus\mathbb{Z}^2$. So $\mathbb{R}^2 \setminus\mathbb{Z}^2$ is open in $\mathbb{R}^2$.

Is my proof correct?

user1234
  • 286

1 Answers1

6

Another approach that I think is easier (as I made at the other post). Take $$ f: \mathbb{R}^2 \rightarrow \mathbb{R}, \\ \ f(x,y) = \sin(\pi x)^2 + \sin(\pi y)^2. $$ Since $f$ is continuous and that $\mathbb{Z}^2=f^{-1}(\{0\})$ it implies that $\mathbb{Z}^2$ is closed in $\mathbb{R}^2$ in the usual topology. So it's complement, $\mathbb{R}^2\setminus\mathbb{Z}^2$ is open.

However, your solution is perfect!

PD: Another option: $A,B\subset X$ closed implies that $A\times B$ is closed in $X\times X$