Rudin exercise 2.18 I am trying to solve problem 2.18 from Rudin's Priciples of Mathematical Analysis. The question asks whether there is a nonempty perfect set in R that contains no rationals. My attempt:
''Let P be such a subset of real numbers and p be a point of this set. As rational numbers are dense in real numbers there exists a rational q in R such that q is in the epsilon neighborhood of p(i.e. $d(p,q)<\epsilon$).  Also as P is perfect: the point p is a limit point of P. Hence there exists a sequence $ {p_n} $, consisting of the points from P, converging to p. So for sufficiently large n, $d(p_n,p)<\epsilon$. But from the triangle inequality for large n's again $d(p_n,q)\leq d(p_n,p)+d(p,q)<2\epsilon$. Therefore $q$ is another limit point of P implying that q is a point of P, from the definition of the perfect set. But we assumed that P is a perfect set with no rational points.'' I deduced that no such set exists but I checked the answers and read that there is such a set. That means there is a flaw in my argument but I still couldn't figured it out.
 A: I'll write the whole answer from scratch because what i said before wasnt correct. There is a flaw in your argument. What you showed is that if you pick an $\epsilon>0$ then you can find a rational number $q$ and point $p_n\in P$ such that $d(p_n,q)<\epsilon$. This is of course true since rationals are dense in $\mathbb{R}$ but this argument doesnt mean that $q$ is a limit point of $P$. To show that this particular fixed $q$ is a limit point, you need to show that for $\epsilon>0$ there is some $p\in P$ such that $d(q,p)<\epsilon$ and of course $q\neq p$. Meaning, that you have to find $p_n's$ that are $\epsilon>0$ close to $q$ independently of $q$.
Let me right down again the definition of the perfect set and give some examples (also of a perfect set that does not contains and rationals)

A set $P$ is called perfect if it is closed and if every point $p\in P$ is a limit point of $P$. This is equivalent to $P=P'$.

$1)$ Consider the set $A=\{\sqrt{2}\}\cup \{\sqrt{2}+1/n:\, n\in \mathbb{N}\}$. Then $A$ is closed and $A'=\{\sqrt{2}\}$. Meaning that $A$ is not a perfect set. Since, rationals are dense, we can find rationals arbitrary close every point of $A$, but $\mathbb{Q}\cap A=\emptyset$ and in particular, $A'\cap \mathbb{Q}=\emptyset$.
The previous example shows that you can use the argument that you tried but you cant conclude that $\mathbb{Q}\subseteq A'$.
Hint: Now, in order to find an example of a perfect set that it does not contain any rationals try to modify a well known perfect set. The example is the following:

 Consider the Cantor set $C$. We know that $C$ is perfect and it does not contains any intervals. If we pick any $\alpha \in \mathbb{R}$, then the set $\alpha+C$ is closed and perfect. In order to have $(\alpha +C)\cap \mathbb{Q}=\emptyset$ we need to pick some $\alpha \in \mathbb{R}\setminus (\mathbb{Q}-C)$. So, we need to show that $\mathbb{Q}-C\neq \mathbb{R}$. If $\mathbb{R}=\mathbb{Q}-C$ then writing $\mathbb{Q}-C=\bigcup_{n=1}^{\infty}q_n-C$ where $\{q_n:\, n\in \mathbb{N}\}$ is an enumeration of the rationals, we conclude by Baire's catergory theorem that some of the $q_n-C$ must have a non empty interior. This means that $C$ must have a non empty interior which cant be true.

