Consider $\mathbb Q$ with the subspace topology.
I read on planet math website that every compact subset in this space has empty interior and then I tried to prove it. Please could someone tell me if my proof is correct?
Let $K$ be compact in $\mathbb Q$ with the subspace topology of $\mathbb R$. By contradiction assume it contained an open set $O\subseteq K$. By the definition of the subspace topology there exists an open set $V\subseteq \mathbb R$ such that $O = V \cap \mathbb Q$.
Now let $q \in O \subseteq V$. Since $V$ is open there exists an open ball $B$ such that $q \in B \subseteq V$. Let this ball be small enough so that it is also contained in $[m,M]$ where $M=\max K$ and $m = \min K$. Note that then $B \cap \mathbb Q\subseteq K$
The ball $B$ contains an irratinal $r$. Since the irrationals are dense in the reals we can find a sequence of rationals in this ball converging to $r$. This sequence is contained in $K$. Hence $r$ is a limit point of $K$. Since $K$ is closed, $r \in K$, a contradiction.