Binary Sequences as Ternary Coordinates
The middle-thirds Cantor set is built by repeatedly retaining the left and right thirds of each interval. At each step, a point that remains has made a choice: left or right. An infinite list of these choices is a binary sequence. We will make this correspondence precise and show that it preserves the topology, not just the set of points.
Let \(D=\{0,1\}\) have the discrete topology, in which every subset is open, and let \(X=D^{\mathbb{N}}\) have the product topology. Thus a point \(a\in X\) is a sequence \(a=(a_1,a_2,\ldots)\) with each \(a_n\in\{0,1\}\). A basic open set in \(X\) specifies the values of finitely many coordinates and leaves all other coordinates unrestricted.
Here is how prefix cylinders relate to the product topology. If a basic open set specifies coordinates in a finite set \(F\subseteq\mathbb{N}\), take any point \(a\) in that set. If \(F\) is nonempty, let \(n\) be its largest specified index. The prefix cylinder determined by \(a_1,\ldots,a_n\) contains \(a\) and is contained in the given basic open set: it agrees with every specified coordinate. If \(F\) is empty, the basic open set is \(X\). Thus prefix cylinders form a basis. The direction of containment matters: a finite-coordinate open set need not itself fit inside one prefix cylinder.
The Map and Its Basic Properties
For a binary sequence \(a\), use its entries as ternary digits \(0\) and \(2\):
The series converges because its terms are nonnegative and are bounded term by term by the convergent geometric series \(\sum_{n=1}^{\infty}2/3^n=1\). The target will be \(C\), with the subspace topology inherited from \(\mathbb{R}\). To analyze the map, for a word \(w=(w_1,\ldots,w_n)\) define \(s(w)=\sum_{i=1}^n 2w_i/3^i\) and \(I_w=[s(w),s(w)+3^{-n}]\). At stage \(n\), these are exactly the retained intervals. Indeed, if \(I_w\) has length \(3^{-n}\), its two retained thirds are \(I_{(w,0)}\) and \(I_{(w,1)}\), each of length \(3^{-(n+1)}\), with the second beginning \(2\cdot3^{-(n+1)}\) to the right of \(s(w)\).
Proof. We first show that \(f(a)\in C\). For every \(n\), the contribution from terms after \(n\) is between \(0\) and \(\sum_{k=n+1}^{\infty}2/3^k=3^{-n}\). Therefore \(f(a)\in I_{(a_1,\ldots,a_n)}\) for every \(n\). These intervals are retained at stage \(n\), so \(f(a)\in C_n\) for all \(n\), and hence \(f(a)\in C\).
To prove injectivity, let \(a\ne b\), and let \(k\) be their first differing index. Suppose, after interchanging the names if necessary, that \(a_k=1\) and \(b_k=0\). Their series differ by \(2/3^k\) at that coordinate. The total possible opposing contribution from all later coordinates is at most \(\sum_{n=k+1}^{\infty}2/3^n=1/3^k\). Thus \(f(a)-f(b)\ge 2/3^k-1/3^k=1/3^k>0\). In particular \(f(a)\ne f(b)\).
For surjectivity, take \(x\in C\). At each stage \(n\), \(x\) belongs to a retained interval \(I_w\) of length \(3^{-n}\). The retained intervals at a fixed stage are pairwise disjoint: each pair has a positive gap between it, created when the middle third is removed. So this interval is unique. The interval containing \(x\) at stage \(n+1\) lies inside the unique interval containing \(x\) at stage \(n\), and is one of its two retained thirds. Consequently these choices define a single infinite sequence \(a\), with \(x\in I_{(a_1,\ldots,a_n)}\) for every \(n\). Writing \(s_n=\sum_{i=1}^n2a_i/3^i\), this membership gives \(0\le x-s_n\le3^{-n}\). Also \(f(a)-s_n\) is between \(0\) and \(3^{-n}\). Since both quantities tend to zero, \(x=f(a)\).
For continuity, let \(a\in X\) and \(\varepsilon>0\). Choose \(N\) such that \(3^{-N}<\varepsilon\). Every \(b\in[(a_1,\ldots,a_N)]\) agrees with \(a\) in its first \(N\) coordinates, so \(\lvert f(a)-f(b)\rvert\le\sum_{n=N+1}^{\infty}2/3^n=3^{-N}<\varepsilon\). This prefix cylinder is an open neighborhood of \(a\), proving continuity.
Finally, we prove continuity of the inverse. For each word \(w\) of length \(n\), the bijection and the interval construction give \(f([w])=C\cap I_w\): sequences with prefix \(w\) map into \(I_w\), and a point of \(C\cap I_w\) has the unique sequence whose first \(n\) entries are \(w\). If \(n\ge1\), the finitely many stage-\(n\) intervals are disjoint and separated by positive gaps. There is therefore an open interval \(J_w\) containing \(I_w\) that meets no other stage-\(n\) interval. It follows that \(C\cap I_w=C\cap J_w\), which is open in the subspace \(C\). For the empty word, \(f([w])=C\), also open in \(C\). Since prefix cylinders form a basis, the inverse image under \(f^{-1}:C\to X\) of every basis open set is open in \(C\); hence \(f^{-1}\) is continuous. This proves the theorem. \(\square\)
Worked Example: The Image of a Prefix Cylinder
Take the word \(w=(1,0,1)\). Its left endpoint is calculated from its three entries: \(s(w)=2/3+0/9+2/27=18/27+2/27=20/27\). Its interval has length \(3^{-3}=1/27\), so \(I_w=[20/27,21/27]\). The cylinder \([(1,0,1)]\) consists of all sequences beginning \(1,0,1\). Their remaining terms range from zero to \(\sum_{n=4}^{\infty}2/3^n=1/27\), so their images lie in this interval. Conversely, a Cantor-set point in this stage-three interval has that unique stage-three prefix. Therefore the image of the cylinder is exactly \(C\cap[20/27,21/27]\).
Check: the prefix sum is the lower endpoint \(20/27\), and taking every later digit to be \(1\) adds \(1/27\), giving the upper endpoint \(21/27\), as required.
Worked Example: Distinguishing Two Sequences
Let \(a=(1,0,0,0,\ldots)\) and \(b=(0,1,1,1,\ldots)\). For \(a\), only the first term is nonzero, so \(f(a)=2/3\). For \(b\), \(f(b)=2/9+\sum_{n=3}^{\infty}2/3^n=2/9+1/9=1/3\), where the tail is \( (2/27)/(1-1/3)=1/9\). Thus \(f(a)-f(b)=2/3-1/3=1/3\). These sequences first differ at index \(1\), and the injectivity estimate gives a difference of at least \(1/3^1=1/3\). The computed values attain that bound, so this is also a check of the estimate.
Worked Example: A Quantitative Continuity Check
Consider \(a=(0,1,0,1,0,1,\ldots)\). Its nonzero entries are at the even indices, and \(f(a)=2/9+2/81+2/729+\cdots=(2/9)/(1-1/9)=1/4\). Let \(b\) be any sequence agreeing with \(a\) in its first four entries. The first four terms of \(f(a)\) and \(f(b)\) cancel in their difference. The remaining terms give \(\lvert f(a)-f(b)\rvert\le\sum_{n=5}^{\infty}2/3^n=(2/243)/(1-1/3)=1/81\). So every point of this prefix cylinder maps within \(1/81\) of \(1/4\). For example, if \(b\) has all later entries zero, then \(f(b)=2/9+2/81=20/81\), and \(\lvert f(a)-f(b)\rvert=\lvert 1/4-20/81\rvert=\lvert81/324-80/324\rvert=1/324\le1/81\), as the bound predicts.
A Common Pitfall and Why the Topology Matters
Common pitfall. A finite-coordinate basic open set is not necessarily contained in a prefix cylinder. For example, \(U=\{a\in X:a_2=0\}\) allows either value of \(a_1\). It cannot be contained in any one prefix cylinder of length at least two, since such a cylinder fixes \(a_1\); nor can a length-one prefix cylinder be contained in \(U\), since it leaves \(a_2\) unrestricted. The correct basis argument starts with a point \(a\in U\), takes its own prefix through coordinate \(2\), and obtains \([(a_1,a_2)]\subseteq U\). That cylinder contains \(a\) and fixes \(a_2=0\), which is exactly what the basis refinement requires.
There is a related numerical mistake to avoid: using the binary entries directly as ternary digits does not give the map to the Cantor set used here. For the sequence \((1,0,0,\ldots)\), that mistaken rule gives \(1/3\), whereas the defined map gives \(2/3\). The Cantor construction retains the left and right thirds, whose ternary digits are \(0\) and \(2\); that is why the series uses \(2a_n/3^n\). The homeomorphism makes each left-or-right choice a coordinate and shows that agreement on a long prefix forces the corresponding points to be close. The same prefix cylinders also give the neighborhoods needed to understand the inverse correspondence.
Check Your Understanding
Use the interval and cylinder descriptions to check your reasoning.
- Compute \(f(a)\) when \(a=(0,0,1,0,0,\ldots)\), and identify the stage-three interval containing it.
- For a prefix of length \(n\), what is the largest possible contribution to \(f(a)\) from coordinates after \(n\)?
- Why does the first differing coordinate of two binary sequences guarantee that their images are distinct?
- Explain why a point \(x\in C\) determines a compatible choice of retained interval at every stage.
- For \(U=\{a\in X:a_3=1\}\) and \(a\in U\), give a prefix cylinder containing \(a\) and contained in \(U\).