# Showing $\mathbb{Q} \cap [a,b]$ is an open set in $\mathbb{Q}$ for irrational $a$, $b$.

I came up with this lemma (although not confident enough about it) while solving Baby Rudin. In the chapter "Basic Topology", I attempted to solve question 16, in which $$\mathbb{Q}$$ is regarded as the metric space with the usual metric, whose subset $$E$$ contains rationals $$p$$, such that $$2. The question asks to show that $$E$$ is not compact.

I now take the family of sets $$\mathbb{Q} \cap [- \sqrt{3} +1/(n+4), \sqrt{3} -1/(n+4)]$$ where $$n$$ runs through $$1$$ to $$\infty$$. Clearly, for no finite $$n=m$$, it can cover $$E$$. Hence, we are done.

But, in this process, I wanted to make sure, that the sets $$\mathbb{Q} \cap [- \sqrt{3} +1/(n+4), \sqrt{3} -1/(n+4)]$$ are all open in $$\mathbb{Q}$$.

I just want you to kindly verify the validity of my approach to the problem and the lemma which follows.

LEMMA:

$$\mathbb{Q} \cap [a,b]$$ is an open set in $$\mathbb{Q}$$, where $$a$$, $$b$$ are irrational.

Proof:

We know, the ordered set of rational numbers doesn't have the supremum property.

Hence the set $$P = \{ t \in \mathbb{Q}: a < t < b\}$$ , although bounded, doesn't have the supremum ( and infimum) in $$\mathbb {Q}$$. We now take a very small rational $$\epsilon >0$$, such that $$a< t -\epsilon < t < t + \epsilon < b$$ , hence $$N_{\epsilon}(t) \subset P$$. This is the case for every $$t \in P$$. Hence $$P$$ is open.

Additional Question: Can $$\mathbb{Q}$$ alone be regarded as a discrete metric space, since any subset of it is both open and closed? [If false, please provide counterexample or arguments].

Thank you.

• An alternate approach: Observe that when $a$ and $b$ are irrational, $\mathbb{Q}\cap[a,b]=\mathbb{Q}\cap(a,b)$. – Michael Burr Dec 20 '18 at 15:53
• Can you please check the proof :( – Subhasis Biswas Dec 20 '18 at 15:54
• The converse also holds: for any $a,b\in\Bbb R$ such that $a<b$, $\Bbb{Q}\cap[a,b]$ is an open subset of $\Bbb Q$ if and only if both $a$ and $b$ are irrational numbers. – user593746 Dec 20 '18 at 15:54
• Why is every subset of $\mathbb{Q}$ both open and closed? You haven't shown that. Is $\{0\}$ open? – Michael Burr Dec 20 '18 at 15:54
• Your formula for $\epsilon$ should depend on $a$ and $b$. Something like $\min\{\frac{t-a}2,...\}$. – Michael Burr Dec 20 '18 at 16:03