[Math] Show that $[0,1] \cap \mathbb{Q}$ is not compact in $[0,1]$

general-topologyreal-analysis

The title said it all. I have come up with a solution, but I cannot figure out some details. Please help me out and comment on my solution. Feel free to leave your own solution so that I can also learn from you.

Show that $[0,1] \cap \mathbb{Q}$ is not compact in $[0,1]$.

Solution:
Let $S =[0,1] \cap \mathbb{Q}$. Note that $S$ is countable.(Is it? If yes, how to prove it rigorously? If not, is the remaining part of my solution still true?) Then we write $S=\{ r_n : n \in \mathbb{N} \}$. We now construct an open cover that does not have a finite subcover. Consider $r_n \in S$, where $r_n \neq 0, 1$, then we define $p = \min \left\{\frac{d(r_{n-1},r_n)}{2}, \frac{d(r_n, r_{n+1})}{2}\right\}$. Then consider $$\left(\bigcup_{r_n \in S, r_n \neq0,1}B(r_n,p)\right)\cup 0\cup 1$$ is an open cover of $S$. But there exists no finite subcover. Thus, $S$ is not compact in $[0,1]$.

Apart from the above question, if I change the metric space from $[0,1]$ to $\mathbb{R}$, can I still make the same conclusion? This confuses me as I did not really consider the metric space in my solution!

Thanks in advance.

Best Answer

Here's an easy solution:

HINT: Compact sets in metric spaces are closed.

Related Question