[proofplan]
Given distinct $x, y \in \mathcal{C}$, we find a removed open interval of $[0,1] \setminus \mathcal{C}$ that separates them. This interval lies between $x$ and $y$ in $\mathbb{R}$ and partitions $\mathcal{C}$ into two clopen subsets in the subspace topology, one containing $x$ and the other containing $y$.
[/proofplan]
[step:Locate a removed interval between $x$ and $y$]
Let $x, y \in \mathcal{C}$ with $x < y$. Write their ternary expansions using digits in $\{0, 2\}$, as guaranteed by the [Ternary Characterisation of the Cantor Set](/theorems/1196):
\begin{align*}
x = \sum_{k=1}^{\infty} \frac{a_k}{3^k}, \qquad y = \sum_{k=1}^{\infty} \frac{c_k}{3^k}, \qquad a_k, c_k \in \{0, 2\}.
\end{align*}
Since $x \ne y$, there exists a smallest index $m \in \mathbb{N}$ at which $a_m \ne c_m$. Because $x < y$ and the two expansions agree for $k < m$, we must have $a_m < c_m$, hence $a_m = 0$ and $c_m = 2$.
[guided]
The ordering of real numbers in terms of ternary expansions works digit by digit: $x < y$ if and only if, at the first index $m$ where $a_m \ne c_m$, we have $a_m < c_m$. Since the digits are restricted to $\{0, 2\}$, the only possibility is $a_m = 0$ and $c_m = 2$. There is no ambiguity from alternative representations because, as established in the proof of [Ternary Characterisation](/theorems/1196), each point of $\mathcal{C}$ has a unique $\{0,2\}$-ternary expansion.
[/guided]
[/step]
[step:Construct the separating interval from stage $m$ of the construction]
Consider the constituent interval of $C_{m-1}$ to which both $x$ and $y$ belong (they agree in digits $1$ through $m-1$). This interval is
\begin{align*}
I = \left[\sum_{k=1}^{m-1} \frac{a_k}{3^k}, \; \sum_{k=1}^{m-1} \frac{a_k}{3^k} + 3^{-(m-1)}\right].
\end{align*}
At stage $m$, the open middle third of $I$ is removed. This middle third is
\begin{align*}
J := \left(\sum_{k=1}^{m-1} \frac{a_k}{3^k} + \frac{1}{3^m}, \; \sum_{k=1}^{m-1} \frac{a_k}{3^k} + \frac{2}{3^m}\right).
\end{align*}
Since $a_m = 0$, the point $x$ satisfies $x \le \sum_{k=1}^{m-1} a_k/3^k + 0/3^m + \sum_{k=m+1}^{\infty} 2/3^k = \sum_{k=1}^{m-1} a_k/3^k + 3^{-m}$, which is the left endpoint of $J$. Since $c_m = 2$, the point $y$ satisfies $y \ge \sum_{k=1}^{m-1} a_k/3^k + 2/3^m$, which is the right endpoint of $J$. Therefore $x < \inf J \le \sup J < y$, and $J \subset (x, y)$.
Since $J$ is a removed interval, $J \cap \mathcal{C} = \varnothing$.
[guided]
The point of this step is to find a "gap" in $\mathcal{C}$ between $x$ and $y$. The removed intervals of the Cantor set construction are exactly the gaps of $\mathcal{C}$ in $[0,1]$, and we have identified one (namely $J$) that sits between $x$ and $y$. The key computation: since $a_m = 0$, all remaining digits of $x$ (for $k > m$) contribute at most $\sum_{k=m+1}^{\infty} 2/3^k = 3^{-m}$, so $x \le \sum_{k=1}^{m-1} a_k/3^k + 3^{-m}$, which is the left endpoint of $J$. Similarly, $c_m = 2$ forces $y \ge \sum_{k=1}^{m-1} a_k/3^k + 2 \cdot 3^{-m}$, the right endpoint of $J$.
[/guided]
[/step]
[step:Partition $\mathcal{C}$ into two clopen sets separating $x$ and $y$]
Pick any point $p \in J$ (for instance, the midpoint of $J$). Since $J \cap \mathcal{C} = \varnothing$, we can partition $\mathcal{C}$ as
\begin{align*}
U := \mathcal{C} \cap (-\infty, p) = \mathcal{C} \cap (-\infty, p], \qquad V := \mathcal{C} \cap (p, \infty) = \mathcal{C} \cap [p, \infty).
\end{align*}
The equalities $\mathcal{C} \cap (-\infty, p) = \mathcal{C} \cap (-\infty, p]$ and $\mathcal{C} \cap (p, \infty) = \mathcal{C} \cap [p, \infty)$ hold because $p \notin \mathcal{C}$. Each set is both open and closed in the subspace topology on $\mathcal{C}$ (being simultaneously the intersection of $\mathcal{C}$ with an open set and with a closed set in $\mathbb{R}$).
Since $x < p < y$, we have $x \in U$ and $y \in V$. Moreover, $U \cap V = \varnothing$ and $U \cup V = \mathcal{C}$. This demonstrates that no connected subset of $\mathcal{C}$ contains two distinct points, so $\mathcal{C}$ is totally disconnected.
[/step]