# Check my answer: $\Bbb Q$ is neither open nor closed

I have a so easy question. I have done it's answer by myself. I want you to only check my answer please. Does there exist any mistake or the missing?

The set of irrational numbers - $\Bbb Q$ is neither open nor closed.

## Proof:

Assume $\Bbb Q$ were open. There would be a neighborhood of $0$, and so an interval containing $0$ lying entirely within $\Bbb Q$. However, each such interval contains irrational numbers, which is a contradiction.

suppose $\Bbb Q$ were closed. $\Bbb R-\Bbb Q$ is open. There is a neighborhood of $\pi$ and therefore an interval containing $\pi$ lying completely within $\Bbb R-\Bbb Q$ . however again each such interval contains rational numbers, which is a contradiction.

• It is correct; however, if you want your proof to be a bit more formal (some would say "cumbersome"), you can, instead of "an interval containing 0 lying entirely within", say "an open interval containing 0, of the form $(-\epsilon, \epsilon)$ with $\epsilon > 0$". (same thing with the second part). (Because $\{0\}$ is technically an interval) Commented Jun 18, 2013 at 13:20
• That is a valid point, although just "neighborhood" does suffice to convey that really. Commented Jun 18, 2013 at 13:22
• The fact that there's no interval of $\pi$ containing no rationals, and that this proves the rationals are not closed, is related to the fact that a set is dense iff its closure is the entire space. Commented Jun 18, 2013 at 13:24
• You seem to mean rational numbers in the third line, not irrational numbers. Commented Jun 18, 2013 at 14:11

That is fine, yes, though using $\sqrt 2$ instead of $\pi$ would make the proof not rely on knowing the latter was irrational!