TITLE: Cantor cubes are universal for totally disconnected compact Hausdorff spaces
QUESTION [9 upvotes]: Can anyone tell me how to show that a totally disconnected compact Hausdorff space is homeomorphic to a closed subspace of a product of discrete two-point spaces? I cannot think of a known example of such space, so I am not able to proceed through my intuition.

REPLY [11 votes]: HINT: For each clopen set $H\subseteq X$ the function 
$$f_H:X\to\{0,1\}:x\mapsto\begin{cases}
1,&\text{if }x\in H\\
0,&\text{if }x\notin H
\end{cases}$$
is a continuous function from $X$ to the discrete two-point space. Let $\mathscr{H}$ be the set of all clopen subsets of $X$, and for each $H\in\mathscr{H}$ let $D_H$ be a copy of the discrete two-point space. Define a map
$$\varphi:X\to\prod_{H\in\mathscr{H}}D_H:x\mapsto\langle f_H(x):H\in\mathscr{H}\rangle\;,$$
and show that $\varphi$ is a homeomorphism of $X$ onto $\varphi[X]$.