The set of integers is not open or is open

A set $U\subset \mathbb R$ is open if and only if for every $x\in U$, there exists some $\epsilon > 0$ such that $(x-\epsilon, x+\epsilon)$ is a subset of $U$.

For $U=\mathbb Z$, this is clearly not the case:

  • Take $x=0$
  • Take any $\epsilon > 0$.
  • Then, $\min\{x+\frac\epsilon2, x+\frac12\}$ is an element of $(x-\epsilon, x+\epsilon)$, but it is not an element of $\mathbb Z$.
  • Therefore, $(x-\epsilon, x+\epsilon)$ is not a subset of $\mathbb Z$ for any value of $\epsilon$
  • Therefore, $\mathbb Z$ is not open.

$\mathbb{Z}$ is not open in $\mathbb{R}$.

One way to see this is that given any $n\in \mathbb{Z}$ we have for every $\epsilon>0$ that $(n-\epsilon, n+\epsilon)$ is not contained in $\mathbb{Z}$.