Isolated points of compact subset of the rationals Does there exist a compact, nonempty  subset of the rationals without isolated points ?
My motivation was the following: If so one could define a map $f$ from the set of all compact subsets of the rationals to itself that sends $K$ to $K\setminus Is(K)$ where $Is(K)$ denotes the set of all isolated points of $K$. Since $Is(K)$ is an open subset of $K$ the result is again compact. Then we can define $f^n$ for any ordinal number $n$ via $f^{n+1}=f\circ f^n$ and via $f^n:=\bigcap_{m\le n} f^m$ in the limit case. If every compact set has an isolated point it follows that for every $K$ there is a (smallest) ordinal $n$ such that $f^n(K)=\emptyset$. So we could measure the complexity of compact subsets of $Q$ with ordinal numbers.
 A: A compact metric space is complete. Let $X$ be a complete metric space without isolated points. Since points are not isolated, they are nowhere dense. If $X$ were countable, it would be a countable union of nowhere dense subsets, contradicting the Baire category theorem.
It follows that a compact subset of $\mathbb{Q}$ must have isolated points.
This is essentially the same argument as given on the Wikipedia page here (second paragraph).

Your construction of a “measure of complexity” of the compact subsets of $\mathbb{Q}$ is a special case of the Cantor–Bendixson rank. Indeed it turns out that starting from a compact subset of $\mathbb{Q}$ the only possibility is that the process of throwing away the isolated points must terminate at the empty set.

Let me mention that the set of all compact subsets of $\mathbb{Q}$ has quite a complex structure. It can be naturally considered as a subset of the compact metric space $2^\mathbb{Q}$ in which it can be shown to be $\Pi^{1}_1$-complete, see e.g. this article. In particular, it is not a Borel set inside $2^{\mathbb{Q}}$. Thus it is a set of the same complexity as the set of everywhere differentiable functions inside $C[0,1])$ by a theorem of Mazurkiewicz.
Finally, let me point you to this thread here in which compact subsets of $\mathbb{Q}$ were discussed.
