Why is this set of continued fractions perfect? Would somebody please explain why the set of continued fractions in this answer
https://math.stackexchange.com/a/1067/20873
i.e. "the set of all irrationals with continued fractions consisting only of 1's and 2's in any arrangement" is a perfect set? Thank you.
(I do know the definition of a perfect set, but this is the first time I've come across infinite continued fractions in this context, and I don't know much about their properties either.)
 A: Almost forgot that I’ve asked this question. Here’s how I did it using GEdgar’s hints:
Let the set of continued fractions described be $X$. There are no isolated points in $X$, for if $x \in X$ and $$x = a_0 + \frac{1}{a_1 + \frac{1}{a_2 + \dotso}}$$ where $a_i \in \{1,2\}$, define the sequence $x_n$ for $n>0$ by replacing $a_n$ in the expansion of $x$ with $1$ if $a_n = 2$, $2$ if $a_n = 1$. Then, denoting the denominator of the $n$-th convergent of $x$ by $q_n$, and using the determinant formula, $|x_n - x| < \frac{1}{q_n q_{n-1}}$. So $x_n \to x$.
$X$ is compact, hence closed and bounded: Let $C$ denote the standard (ternary) Cantor set, and define $f:C\to X$ by $0.b_0 b_1 \dotso _3$ (in ternary) $\mapsto$ $x$ where $a_n = 1$ if $b_n = 0$, $a_n = 2$ if $b_n = 2$. This is continuous because given $y:=0.b_0 b_1 \dotso _3$ (in ternary) $\in C$ and a $\frac{1}{q_n q_{n-1}}$ of $f(y)$ (see above), if we let $\delta = 3^{-n-2}$ then $( z\in C$ and $|z-y| < \delta )$ $\implies$ $| f(z) - f(y) | < \frac{1}{q_n q_{n-1}}$.
Feel free to improve this answer.
