Bounded and closed but not compact in rational numbers I'm sorry if topic repeated. I solved this problem. And I want to know is my solution true?
Regard $\mathbb{Q}$, the set of all rational numbers, as a metric space, with $d(p,q)=|p-q|$. 
Let $E=\{p\in \mathbb{Q}: 2<p^2<3\}$. Show that $E$ is closed and bounded in $\mathbb{Q}$, but $E$ is not compact. Is $E$ open in $\mathbb{Q}$?
Proof:
Boundness: It easy to check that $E$ is bounded. Because $E\subset B_2(0)=\{z\in \mathbb{Q}:d(z,0)<2\}$ - open ball in $\mathbb{Q}$. 
Closed: Also $E$ is closed because $E^c=\{p\in \mathbb{Q}: p^2<2\quad  \text{or} \quad p^2>3 \}$ is open set. Because if $z\in E^c$ then $z\in \mathbb{Q}\cap \{z: z^2<2\}$ or $z\in \mathbb{Q}\cap \{z: z^2>3\}$. And for both cases $\exists n\in \mathbb{N}$ s.t. $(z+1/n)^2<2$ or $(z-1/n)^2>3$ because both inequalities are solvable for large $n$. Taking $n$ so large we got $N_{1/n}(z)\subset E^c$ where $N_{1/n}(z)=\{q\in \mathbb{Q}: d(q,z)<1/n\}$. So $E^c$ is open in $\mathbb{Q}$. Therefore $E$ is closed in $\mathbb{Q}$.
Compactness: We'll prove that $E$ is not compact in $\mathbb{Q}$. It means that exists some open cover of $E$ which contains no finite subcover. Let $$G_n=\{\mathbb{Q}\cap [-\sqrt{3}, -\sqrt{2}-\frac{1}{n}]\}\cup \{\mathbb{Q} \cap [\sqrt{2}, \sqrt{3}-\frac{1}{n}]\}$$ for $n\geqslant 4$. It's easy to verify that $\{G_n\}$ is an open of $E$. But it contains no finite subcover. Therefore, $E$ is not compact in $\mathbb{Q}$.
Openess: Set $E$ is open. If $z\in E$ then $z\in \mathbb{Q}$ and $2<z^2<3$. Then exists $n$ so large s.t. $2<(z-1/n)^2<(z+1/n)^2<3$. Hence $N_{1/n}(z)\subset E$. 
 A: In general, a metric space is compact iff it is complete and totally bounded. So it suffices to show that $E$ is not complete (considered as a subspace of $\mathbb Q$). 
Since $\sup E=\sqrt 3$, $\mathbb Q$ is dense in $\mathbb R$, and $E$ contains every rational number $p$ with $\sqrt2<p<\sqrt3$, we can construct a sequence $\{p_n\}$ of elements in $E$ such that $\sqrt 3 -p_n<\frac1n$ for each $n$. Therefore $p_n\to\sqrt3$ (in $\mathbb R$), so in the induced metric on $\mathbb Q$, $\{p_n\}$ is still a Cauchy sequence. But $\{p_n\}$ has no limit in $E$, so $E$ is not complete.
A: Yes, your solution is correct.
A: I also have one interesting question. 
We know that: A set $K$ in $\mathbb{R}^n$ is compact iff $K$ is closed and bounded.
But this example shows that our set $E$ is closed and bounded but NOT compact. It's really confused me. I show that $E$ is not compact. Where is problem?
It must be compact because $E=\{p\in \mathbb{Q}:2<p^2<3\}\subset \mathbb{Q}\subset \mathbb{R^1}$.
Can anyone exlain me this paradox?
I would be thankful.
