# Rudin exercise 2.18: perfect set with only irrational numbers. [duplicate]

This question already has an answer here:

I am trying to solve exercise number 2.18 in Rudin. The question is the following:

"Is there a nonempty perfect set in R1 that contains no rational numbers"?

My solution is basically to construct a set E that contains all irrational (to be more specific: non-rational) numbers between sqrt(2) and sqrt(3), both included. And then the proof that this is perfect proceeds similarly to question 2.17 (since every irrational number can be written as a series of infinite decimals with no repeats).

Am I missing something? I don't see why I should construct a set similar to the cantor set. Thank you for your help.

## marked as duplicate by Niels J. Diepeveen, Henno Brandsma general-topology StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Apr 2 '17 at 13:15

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

• Yes, to be perfect requires closed. – William Elliot Apr 2 '17 at 1:50
• The set of all irrational numbers is not closed. Any rational number has a sequence of irrationals converging to that rational. So if you just remove all the rationals, what you will have can't be perfect. – Alfred Yerger Apr 2 '17 at 1:55
• In 2.17 how did you prove the set of numbers containing only 4 and 7 in its decimal expansion was closed? Every other point must have a neighborhood containing no such point. But that isn't so with the set of rationals. In contrast Every neighborhood of a rational number must contain irrational points. That's the exact opposite. – fleablood Apr 2 '17 at 2:26
• Fwiw I "cheated" when I first did the question. I took the set E in 2.17 and shifted it by an irrational number containing only 0s and 1s. Thus the new set contains numbers with only 4s,7s,5, and 8s, be never in a repeating periodic cycle so no rationals. But, that really avoids learning anything. – fleablood Apr 2 '17 at 2:36
• Thank you all. My confusion is that I forgot there are rational numbers within the interval on the real axis, and yes obviously every neighborhood of such rational numbers would have to contain an irrational number. – G Ch Apr 2 '17 at 2:42

## 1 Answer

It's not really Rudin's style, but there are lots of general topological arguments based on the topological structure of the irrationals and the Cantor set, to see that such a set exists.

One way is to prove that the Cantor set is unique topologically: if $X$ is a compact, totally disconnected (i.e. no connected subset has more than one point), metric space without isolated points, then $X$ is homeomorphic to the standard "middle third" Cantor set $C \subset [0,1]$. Such an $X$ is also called "a Cantor set". They're clearly perfect if embedded in $\mathbb{R}$ (being compact $X$ will be a closed subset and it has no isolated points).

This is a nice topological argument (not using decimal expansions etc.) to see that $\{0,1\}^\mathbb{N} \simeq C$, and also $\prod_n F_n \simeq C$, where all $F_n$ are finite discrete spaces.

It also implies that $C \times C \simeq C$: if $X$ is a Cantor set, so is $X \times X$: still compact metric; still totally disconnected (if $A \subseteq X \times X$ is connected, so are $\pi_1[A]$ and $\pi_2[A]$, so these are singletons and hence so is $A$) and still no isolated points, (if $\{(x,y)\}$ were open, so would $\pi_1[\{(x,y)\}] = \{x\}$ be, which is false, etc.). So the characterisation says that $C \times C \simeq C$.

We can also reach the same conclusion if you already know that $C \simeq \{0,1\}^\mathbb{N}$ without the characterisation (Using the ternary expansion argument) because it' s clear that $\{0,1\}^I \times \{0,1\}^J \simeq \{0,1\}^{I \cup J}$ (disjoint union), and $\{0,1\}^I$ is just homeomorpic to $\{0,1\}^\mathbb{N}$ whenever $I$ is countably infinite (powers only depend on the cardinality of the index set).

So once you have convinced yourself that $C \times C \simeq C$, it's easy: Clearly $\{x\} \times C \simeq C$ (for $x \in C$ as a subspace of $C \times C$), so the product shows us that a Cantor set is an uncountable disjoint union of homeomorphic copies of the Cantor set. As subsets of $\mathbb{R}$, only countably many of these disjoint copies can contain any rational number. So uncountably many consist of irartional numbers only. And such a Cantor set is what's wanted.