In my exam of analysis we ask to proof $\mathbb{Q} \cap (\sqrt{2},\sqrt{3})$ is not compact . i have few questions about this problem . i have a solution for the problem but beside my problem one of my friend said we can use Heine–Borel theorem to solve this problem but i think there should be a flaw in his solution basicly i want to know is my solution correct and is there any flaw in my friedns solution . i will put them below . I would really appreciate if some one help me to find out . Thanks .
My solution :
Define $f:\mathbb{Q} \cap (a,b) \to \mathbb{R}$ , $f(x)= \frac{1}{b-x}$ . Since ${f(x)}^{'}= \frac{1}{{(b-x)}^{2}} > 0$ it is strictly increasing. Now to show this set is a compact set we create a Cover in such way it does not contain any finite sub covering for mentioned set. Set $h(q) = \frac{1}{2^{f(q)}}$ thus $N_{h(q)}(q)$ is a coverin for our set. suppose $q \in \mathbb{Q} \cap (a,b)$ thus $N_{h(q)}(q)=(q- \frac{1}{2^{f(q)}},q+ \frac{1}{2^{f(q)}})$. now again we have $N_{q+ \frac{1}{2^{f(q)}}}(q+ \frac{1}{2^{f(q)}})=(q+ \frac{1}{2^{f(q)}}- {\frac{1}{2^{f(q+ \frac{1}{2^{f(q)}})}}},q+ \frac{1}{2^{f(q)}}+{\frac{1}{2^{f(q+ \frac{1}{2^{f(q)}})}}}) $. now it is suffices to show that :
$$q<q+ \frac{1}{2^{f(q)}}- {\frac{1}{2^{f(q+ \frac{1}{2^{f(q)}})}}}$$
which is equivalent to :
$$0< \frac{1}{2^{f(q)}}- {\frac{1}{2^{f(q+ \frac{1}{2^{f(q)}})}}}$$
which is always true because $f(q)$ is strictly increasing thus $2^{f(q)}<2^{f(q+ \frac{1}{2^{f(q)}})}$ so $\frac{1}{2^{f(q)}} > {\frac{1}{2^{f(q+ \frac{1}{2^{f(q)}})}}}$ or $0< \frac{1}{2^{f(q)}}- {\frac{1}{2^{f(q+ \frac{1}{2^{f(q)}})}}}$. Thus for any rational number $q$ there is an other rational number which does not contain in it's conver so we can not eliminate any of covers thus the mentioned set is not compact .
It is my solution , but my friends solution seems to have flaw. By searching mathexchange i findout his solution to be true but not in the form he says. I mean they way he writed his solution and his reasoning are wrong. By reading This solution i got the reason completly.
My friends solution:
Since $\mathbb{Q} \cap (\sqrt{2},\sqrt{3}) \subset \mathbb{R} $ and since $\mathbb{Q} \cap (\sqrt{2},\sqrt{3})$ is not closed in $\mathbb{R}$ thus by Heine–Borel theorem it is not compact in $R$ and since $\mathbb{Q} \subset \mathbb{R}$ thus it is not compact in $\mathbb{Q}$.
Your friend's solution is fine. If you and to prove that $\mathbb{Q}\cap(a,b)$ is not compact using the definition of compact set, simply consider the cover$$\left\{\mathbb{Q}\cap(a,b)\cap\left(-\infty,b-\frac1n\right)\,\middle|\,n\in\mathbb N\right\},$$which obviously has no finite subcover.