Cantor set closedness?

Let C be a standard contor set defined in a closed interval [0,1].

it's bounded, and by def it's the intersection of closed sets, consequently C is compact.

but what's wrong with my process? My argument is as below with trinary digit expansion

let $$x = 0.a_1a_2.. a_{n-1}a_na_{n+1}...$$ ($$a_i = 0$$ or $$2$$, $$a_n = 1$$ only) then $$x \notin C$$.

Let's define $$y = 0.b_1b_2...b_{n-1}b_{n}b_{n+1}..$$ ($$b_i=a_i, \; i) ($$b_i = 2 - a_i, \; i>n$$) ($$b_n = 0$$ or $$2$$) then $$y \in C$$.

d(x,y) then goes to zero. it means, i can find an element of $$C$$ which is arbitrarily close to x. then x is a limit point of $$C$$ but $$x \notin C$$ ?

+) about x and y's trinary digit expansion following nth one,

there are no repeating patterns (not $$000..$$, $$222..$$ something like that)

• There isn't a single $x$ and $y$. You have a (potential) sequence $x_n$ of elements not in $C$, and a sequence $y_n$ of elements in $C$, and $d(x_n,y_n)\to 0$ as $n\to \infty$. But this isn't a problem: you can have a sequence of points not in a closed set that converge to a point in the closed set. (Though you did not really specify $y_n$, as you never told us what its $n$th digit is, and you did not consider the possibility that $x_n$ could lie in $C$, if there is a tail of $0$s after the $1$...) Oct 3, 2023 at 1:55
• Your $x$ and $y$ depend on $n$. There is (perhaps) one (actually infinitely many, but fine, pick one) $x$ when the $1$ is in the first position. Then a different $x$ when it is in the second position, etc. If you fix the value of $n$ so that $x$ is a single fixed number, then it is not true that $d(x,y)$ approaches $0$. If $x$ and $y$ are fixed, then their distance is fixed, and doesn't "go to" anything. Oct 3, 2023 at 2:58
• @PaulSinclair: $x$ is defined to have a $1$ in the $n$th position "only", meaning no other position has a digit $1$. Oct 3, 2023 at 22:59