# Which part of my proof is wrong( $[0,1]\cap \mathbb{Q}$ is not compact in $\mathbb{Q}$)

We know that $[0,1]$ is compact in $\mathbb{R}$, then for an arbitrary open cover, $O_i,\; i \in \{1,2,...\}$, there exists a finite subcover, $O_{i_k},\; k=\{1,2,...,n\}$ such that $[0,1] \subset \bigcup_{k=1}^nO_{i_k}$. Since for each $Q_{i_k}$ is open in $\mathbb{R}$, $O_{i_k}\cap \mathbb{Q}$ is open in $\mathbb{Q}$. Now, \begin{align*} [0,1] \subset \bigcup_{k=1}^nO_{i_k} \Rightarrow [0,1]\cap \mathbb{Q} &\subset \left(\bigcup_{k=1}^nO_{i_k}\right)\cap \mathbb{Q} \\ & = \bigcup^n_{k=1}(O_{i_k}\cap\mathbb{Q}) \end{align*} Since $O_{i_k}\cap\mathbb{Q}$ is open in $\mathbb{Q}$ and we have a finite union of them, $[0,1]\cap \mathbb{Q}$ is compact in $\mathbb{Q}$.

But Clearly, it is not compact when I checked the answer, meaning that I made a mistake somewhere. Can anyone please fix it?

Thanks

Hint: $$[0, 1]\cap \Bbb Q = \big([0, \frac1\pi) \cup (\frac1\pi, 1]\big)\cap \Bbb Q$$ where $[0, 1/\pi) \cup (1/\pi, 1]$ clearly isn't compact.
Your mistake is to assume that a collection of open sets in $\Bbb R$ that covers $[0,1]\cap \Bbb Q$ must cover $[0,1]$.
• @Arther But I started the proof from defining open coverings that cover $[0,1]$ and they covers $[0,1]\cap\mathbb{Q}$...? – user1292919 Apr 4 '16 at 8:52
• @user1292919 But that means you are not considering all possible open covers of $[0,1]\cap \Bbb Q$; you are only considering the ones that happen to cover the entire $[0,1]$. To show that a set is compact, you need to show something about all open covers, not just the nice ones. – Arthur Apr 4 '16 at 8:53