Homeomorphism between $\prod X_i$ and the Cantor set I've been trying to find a homeomorphism $$\Phi:\prod_{i=1}^\infty X_i \to \{ 0, 1\}^\mathbb{N},$$ where each $X_i$ is a finite set with at least two elements, but have been unable to.  Things I've tried have generally not been surjective, as it is fairly easy to come up with an injective map between the spaces that may or may not be continuous.  For example, if each $X_i$ has cardinality $n_i$, we could determine the first $n_1$ terms of a sequence in the Cantor space by putting $1$ in the index of the value of the element of $X_1$ that is the first coordinate of a sequence $\prod X_i$.  This map would be continuous, since a cylinder set in the Cantor space would have an inverse image that is a cylinder set, but it is not surjective.  Any help would be appreciated!
 A: There is a theorem that every compact, totally disconnected, perfect, metrizable space is homeomorphic to the Cantor set. The 2nd step of the proof, which is all you need, is constructive and so you can write down a formula by following it. A good reference is the book by Moise, "Geometric Topology in Dimensions 2 and 3".
The first step of that proof is to find a "clopen filtration" of the space. This means a sequence $B_1, B_2, B_3, \ldots$ such that each $B_k$ is a "clopen decomposition"---a pairwise disjoint cover of the space by closed-and-open subsets---, each element of each $B_{k+1}$ is a subset of some element of $B_k$, and the union $B_1 \cup B_2 \cup B_3 \cup \cdots$ is a basis for the topology. For your situation, you do not have to work hard to find a clopen filtration: simply define $B_k$ to be the set of point inverse images of the projection to $X_1 \times \cdots \times X_k$.
If each $B_k$ has $2^k$ elements, i.e. if each $X_k$ has 2 elements, you are done of course; let me call this a "binary" clopen filtration. In general, though, the number of elements of $B_k$ is equal to $|X_1| \times |X_2| \times \cdots \times |X_k|$.
The 2nd, constructive step of the proof is to use your given nonbinary clopen filtration to write a different clopen filtration $B'_1,B'_2,B'_3,\ldots$ that is binary. This can be done constructively, by induction. Here is a rough outline.
Using $B_1$ we define $B'_1$: clump the elements of $B_1$ into two disjoint subsets, which is possible because $|X_1| \ge 2$. Let $B'_1$ be the two element clopen cover you get: the two elements of $B'_1$ are the union of clump number 1 of $B_1$ and the union of clump number 2 of $B_1$. 
Proceeding by induction, suppose that $B'_k$ is a clopen cover by $2^k$ sets, each of which is a union of elements of $B_1 \cup \cdots \cup B_k$. We want to define $B'_{k+1}$ by carefully decomposing each element $U \in B'_k$ into two clopens. To do this, first decompose $U$ as coarsely as possible as a disjoint union of elements of the open cover $B_1 \cup \cdots \cup B_k$: start with each element $V \in B_k$, ask whether $U$ contains $V$, and if so put $V$ into the disjoint union; if $U$ does not contain $V$, break $V$ into a disjoint union of elements of $B_{k-1}$, and repeat the question for each of those; continue by downward induction… Next, rewrite this decomposition of $U$ by taking the finest elements, i.e. those which are elements of $B_i$ for minimal value of $i$, and breaking each into its two or more pieces in $B_{i+1}$; this is possible because $|X_{i+1}| \ge 2$. Now, using this decomposition of $U$, break it into two clumps, and make sure that each clump contains each one piece of each of the rewritten decompositions of finest elements in $B_i$. This last step, the messiest part, is needed in order to guarantee that you get a basis for the topology.
That's basically all there is to it. If you want to verify that this is indeed a clopen filtration, you can read the details in Moise's book cited above.
A: I think a direct approach is difficult and at best messy. It is better to use a characterization of the Cantor set and show the two spaces satisfy the conditions.
I believe the Cantor space is the unique compact totally disconnected perfect metric space. 
