[proofplan]
The forward direction is immediate: $\mathcal{C}$ is compact (closed subset of $[0,1]$), metrizable (subspace of $\mathbb{R}$), perfect (theorem 1199), and totally disconnected (theorem 1200). For the converse, we construct a homeomorphism from any compact, metrizable, perfect, totally disconnected space $X$ to $\mathcal{C}$ by building compatible refining sequences of clopen partitions on both spaces. At each stage, we bisect each partition element into two nonempty clopen pieces (possible by perfectness + total disconnectedness) and match them in a way that defines a bijection on a dense set, then extend to a homeomorphism by completeness.
[/proofplan]
[step:Verify the forward direction]
We verify that $\mathcal{C}$ has all four properties. The Cantor set $\mathcal{C} = \bigcap_{n=0}^{\infty} C_n$ is an intersection of closed subsets of $[0,1]$, hence closed. As a closed subset of the compact space $[0,1]$, it is compact. As a subspace of the metric space $(\mathbb{R}, |\cdot|)$, it is metrizable. By [The Cantor Set is Perfect](/theorems/1199), $\mathcal{C}$ has no isolated points. By [The Cantor Set is Totally Disconnected](/theorems/1200), every connected component of $\mathcal{C}$ is a single point.
[/step]
[step:Establish that a compact metrizable totally disconnected space has a basis of clopen sets]
Let $X$ be a compact metrizable totally disconnected space with metric $d$. We show that $X$ has a basis of clopen (simultaneously closed and open) sets.
Let $x \in X$ and let $U$ be an open neighbourhood of $x$. We must find a clopen set $V$ with $x \in V \subset U$. Since $X$ is totally disconnected, the connected component of $x$ is $\{x\}$. In a compact Hausdorff space, the connected component of a point equals the intersection of all clopen sets containing that point. (This is a standard fact: if $y$ does not belong to the connected component of $x$, then by total disconnectedness there is a clopen separation of $\{x, y\}$, providing a clopen set containing $x$ but not $y$.)
The family of clopen sets containing $x$ is closed under finite intersection (the intersection of two clopen sets is clopen). Their intersection is $\{x\}$, which is contained in $U$. By compactness, the complements of finitely many of these clopen sets cover $X \setminus U$, so a finite intersection $V$ of clopen sets satisfies $x \in V \subset U$.
[guided]
The argument uses a compactness trick. Let $\{K_\alpha\}_{\alpha \in A}$ be the family of all clopen subsets of $X$ containing $x$. We have $\bigcap_\alpha K_\alpha = \{x\} \subset U$. Taking complements, $\{X \setminus K_\alpha\}_\alpha$ covers the compact set $X \setminus U$. Extract a finite subcover: $X \setminus U \subset \bigcup_{i=1}^{N} (X \setminus K_{\alpha_i})$. Then $V := \bigcap_{i=1}^{N} K_{\alpha_i}$ is a finite intersection of clopen sets, hence clopen, and satisfies $x \in V \subset U$.
This argument requires $X$ to be compact and Hausdorff (which follows from metrizability). In non-compact totally disconnected spaces, the conclusion can fail — the rational numbers $\mathbb{Q}$ are totally disconnected and metrizable but not compact, and they still have a clopen basis (being zero-dimensional), though the argument above would not apply directly.
[/guided]
[/step]
[step:Construct compatible refining clopen partitions of $X$ and $\mathcal{C}$]
We build sequences of clopen partitions $\mathcal{P}_n$ of $X$ and $\mathcal{Q}_n$ of $\mathcal{C}$, each with $2^n$ elements, such that:
(i) $\mathcal{P}_{n+1}$ refines $\mathcal{P}_n$: each element of $\mathcal{P}_n$ is partitioned into exactly two nonempty elements of $\mathcal{P}_{n+1}$.
(ii) $\mathcal{Q}_{n+1}$ refines $\mathcal{Q}_n$ in the same way.
(iii) $\max\{\operatorname{diam}(P) : P \in \mathcal{P}_n\} \to 0$ as $n \to \infty$.
(iv) $\max\{\operatorname{diam}(Q) : Q \in \mathcal{Q}_n\} \to 0$ as $n \to \infty$.
**For $\mathcal{C}$**: The natural partitions work. Set $\mathcal{Q}_n := \{I \cap \mathcal{C} : I \text{ is a constituent interval of } C_n\}$. Each $I \cap \mathcal{C}$ is clopen in $\mathcal{C}$ (it is the intersection of $\mathcal{C}$ with a set that is both open and closed relative to the union of constituent intervals). There are $2^n$ such sets, each of diameter at most $3^{-n} \to 0$. Passing from $\mathcal{Q}_n$ to $\mathcal{Q}_{n+1}$ splits each element into exactly two pieces.
**For $X$**: We construct $\mathcal{P}_n$ inductively. Set $\mathcal{P}_0 := \{X\}$. Given $\mathcal{P}_n$ with $2^n$ elements, we split each element $P \in \mathcal{P}_n$ into two nonempty clopen subsets. Since $P$ is a nonempty clopen subset of a compact metrizable perfect totally disconnected space, $P$ inherits all four properties: compactness (closed subset of compact), metrizability (subspace), perfectness (a clopen subset of a perfect space with no isolated points — if $p \in P$ were isolated in $P$, the clopen set $\{p\}$ would make $p$ isolated in $X$, contradicting perfectness), and total disconnectedness (subspace of totally disconnected). Since $P$ has at least two points (it is perfect and nonempty), total disconnectedness provides a nontrivial clopen partition $P = P' \sqcup P''$ with $P', P'' \ne \varnothing$.
To ensure condition (iii), we refine if necessary: if any element $P$ of $\mathcal{P}_n$ has diameter exceeding $1/n$, we choose the splitting so that both halves have diameter strictly less than $\operatorname{diam}(P)$. This is possible because a compact metric space with diameter $> 0$ and a clopen basis can always be split into clopen pieces of strictly smaller diameter (cover $P$ by open balls of radius $\operatorname{diam}(P)/3$, then use the clopen basis to refine this cover into a clopen partition, and group elements into two nonempty subfamilies).
[guided]
The key subtlety is ensuring that the diameters tend to zero. Simply splitting into two nonempty clopen pieces at each stage does not automatically guarantee this — one piece could remain large. The argument works as follows. At each stage, identify all elements of $\mathcal{P}_n$ with diameter $> 1/n$. For each such element $P$, we do not merely split it arbitrarily; instead, we pick a point $x \in P$ and use the clopen basis to find a clopen neighbourhood $V$ of $x$ with $\operatorname{diam}(V) < \operatorname{diam}(P)/2$ and $V \subsetneq P$. Set $P' = V$ and $P'' = P \setminus V$. Both are clopen, both nonempty. After finitely many such refinements (each reducing the maximum diameter by a definite factor), condition (iii) is achieved.
Alternatively, since $X$ is compact and metrizable, for any $\varepsilon > 0$ there exists a finite clopen partition with all elements of diameter less than $\varepsilon$. Starting from such a partition and refining it to be a binary tree gives the construction more directly. The important point is that such finite clopen partitions of arbitrarily small mesh exist for compact, metrizable, totally disconnected spaces.
[/guided]
[/step]
[step:Define the homeomorphism via the nested partitions]
Index the elements of $\mathcal{P}_n$ and $\mathcal{Q}_n$ by binary strings of length $n$: write $\mathcal{P}_n = \{P_\sigma : \sigma \in \{0,1\}^n\}$ and $\mathcal{Q}_n = \{Q_\sigma : \sigma \in \{0,1\}^n\}$, where $P_{\sigma 0}$ and $P_{\sigma 1}$ are the two children of $P_\sigma$, and similarly for $Q_\sigma$.
Define the map $f: X \to \mathcal{C}$ as follows. For $x \in X$, there is a unique infinite binary string $\sigma = (\sigma_1, \sigma_2, \ldots) \in \{0,1\}^{\mathbb{N}}$ such that $x \in P_{(\sigma_1, \ldots, \sigma_n)}$ for every $n$. Similarly, the sets $Q_{(\sigma_1, \ldots, \sigma_n)}$ form a nested sequence of nonempty compact subsets of $\mathcal{C}$ with diameters tending to $0$. By the nested compact set property, $\bigcap_{n=1}^{\infty} Q_{(\sigma_1, \ldots, \sigma_n)}$ is a single point $y \in \mathcal{C}$. Set $f(x) := y$.
**Well-definedness and bijectivity.** The map $f$ is well-defined because the intersection is a single point (diameters tend to $0$). The map is injective: if $f(x_1) = f(x_2)$, then $x_1$ and $x_2$ determine the same binary string $\sigma$, hence $x_1, x_2 \in P_{(\sigma_1, \ldots, \sigma_n)}$ for all $n$, and since $\operatorname{diam}(P_{(\sigma_1, \ldots, \sigma_n)}) \to 0$, we get $x_1 = x_2$. The map is surjective: for any $y \in \mathcal{C}$, there is a unique binary string $\sigma$ with $y \in Q_{(\sigma_1, \ldots, \sigma_n)}$ for all $n$, and the point $x = \bigcap_{n} P_{(\sigma_1, \ldots, \sigma_n)}$ satisfies $f(x) = y$.
**Continuity.** Let $x \in X$ and $\varepsilon > 0$. Choose $N$ such that $\operatorname{diam}(Q_{(\sigma_1, \ldots, \sigma_N)}) < \varepsilon$. The set $P_{(\sigma_1, \ldots, \sigma_N)}$ is a clopen neighbourhood of $x$, and $f(P_{(\sigma_1, \ldots, \sigma_N)}) \subset Q_{(\sigma_1, \ldots, \sigma_N)}$, which has diameter less than $\varepsilon$. Hence $f$ is continuous at $x$.
**$f$ is a homeomorphism.** Since $f$ is a continuous bijection from the compact space $X$ to the Hausdorff space $\mathcal{C}$, a continuous bijection from a compact space to a Hausdorff space is a homeomorphism (the same argument as in the proof of [Homeomorphism with the Product Space](/theorems/1202)).
[/step]