# $\mathbb{Q}$ is not open, is not closed, but is the countable union of closed sets.

I want to prove that $\mathbb{Q}$ (the set of rational numbers) is not open, is not closed, but is the countable union of closed sets. I tried to show that $\mathbb{Q}$ doesn't contain all of its limit points which would imply not closed. However, I am not able to prove the other two things. I need little help to prove this. Thanks.

-

Since any neighborhood $(q - \epsilon, q + \epsilon)$ of a rational $q$ contains irrationals, $\mathbb{Q}$ has no internal points. This implies that $\mathbb{Q}$ is not open. Since every irrational number is the limit of a sequence of rationals, $\mathbb{Q}$ is not closed (for a set to be closed it should contain all of its limit points). Since every one-point-set $\{x\} \subset \mathbb{R}$ is closed, and since $\mathbb{Q}$ is countable, we have that

$$\mathbb{Q} = \bigcup_{p\in \mathbb{Q}} \{p\}$$ is a countable union of closed sets.

-
Thank you very much – monalisa Apr 18 '13 at 20:01

$\Bbb Q$ is not closed because it is dense, and if a set is both dense and closed then it is equal to the whole space (in this case, $\Bbb R$).

$\Bbb Q$ is not open either because open sets are either empty, or contain an interval which makes them uncountable; but $\Bbb Q$ is countably infinite so it is neither empty nor uncountable.

Lastly $\Bbb Q$ is the countable union of singletons, all of which are closed.

Interestingly enough, $\Bbb Q$ cannot be written as an intersection of countably many open sets.

-
very interesting answer for me – srijan Apr 18 '13 at 19:43
Thanks for the answer. – monalisa Apr 18 '13 at 20:01
@Asaf : your last observation is interesting. Can you provide a reference or a proof sketch? – Stefan Smith Apr 18 '13 at 23:01
@Stefan: Equally we can prove that the irrationals are not the countable union of closed sets; and indeed if they were, then by Baire's category theorem at least one of the closed sets would have to have a non-empty interior and therefore it would contain a rational number. – Asaf Karagila Apr 18 '13 at 23:05

Hint

$$r\in\mathbb{Q},\quad\forall \epsilon>0, (r-\epsilon,r+\epsilon)\not\subset\mathbb{Q}$$ $$x\in\mathbb{R}\setminus\mathbb{Q},\quad\forall \epsilon>0, (x-\epsilon,x+\epsilon)\not\subset\mathbb{R}\setminus\mathbb{Q}$$ $$\displaystyle\mathbb{Q}=\bigcup_{r\in\mathbb{Q}}\{r\}$$

-