[proofplan]
We show $d_{n-1} \circ d_n = 0$ by expanding the double boundary on a generator $\sigma: \Delta^n \to X$ and splitting the resulting double sum into two halves according to whether $i < j$ or $i \ge j$. The [Face Inclusion Relation](/theorems/2231) allows us to re-index one half so that it cancels the other term by term. The cancellation arises because each pair of terms carries opposite signs $(-1)^{i+j}$ and $(-1)^{i+j-1}$.
[/proofplan]
[step:Expand the double boundary on a generator]
It suffices to verify $d_{n-1}(d_n(\sigma)) = 0$ for each generator $\sigma: \Delta^n \to X$ of $C_n(X)$, since $d_{n-1} \circ d_n$ is a homomorphism and the generators span $C_n(X)$. By definition of the boundary operator,
\begin{align*}
d_n(\sigma) = \sum_{j=0}^{n} (-1)^j \, \sigma \circ \delta_j,
\end{align*}
where $\sigma \circ \delta_j: \Delta^{n-1} \to X$ is the $j$-th face of $\sigma$. Applying $d_{n-1}$:
\begin{align*}
d_{n-1}(d_n(\sigma)) = \sum_{i=0}^{n-1} \sum_{j=0}^{n} (-1)^{i+j} \, \sigma \circ \delta_j \circ \delta_i.
\end{align*}
[/step]
[step:Split the double sum into the regions $i < j$ and $i \ge j$]
We partition the index set $\{(i, j) : 0 \le i \le n-1, \, 0 \le j \le n\}$ into two parts:
\begin{align*}
S_1 &= \{(i, j) : i < j\}, \\
S_2 &= \{(i, j) : i \ge j\}.
\end{align*}
This gives
\begin{align*}
d_{n-1}(d_n(\sigma)) = \underbrace{\sum_{(i,j) \in S_1} (-1)^{i+j} \, \sigma \circ \delta_j \circ \delta_i}_{=: \Sigma_1} + \underbrace{\sum_{(i,j) \in S_2} (-1)^{i+j} \, \sigma \circ \delta_j \circ \delta_i}_{=: \Sigma_2}.
\end{align*}
[/step]
[step:Apply the face inclusion relation to $\Sigma_1$ and re-index to cancel with $\Sigma_2$]
For each term in $\Sigma_1$ we have $i < j$, so the [Face Inclusion Relation](/theorems/2231) gives $\delta_j \circ \delta_i = \delta_i \circ \delta_{j-1}$. Substituting:
\begin{align*}
\Sigma_1 = \sum_{\substack{0 \le i \le n-1 \\ i < j \le n}} (-1)^{i+j} \, \sigma \circ \delta_i \circ \delta_{j-1}.
\end{align*}
We re-index by setting $j' = j - 1$. As $j$ ranges over $i + 1 \le j \le n$, the new index $j'$ ranges over $i \le j' \le n - 1$. The sign becomes $(-1)^{i + j' + 1}$:
\begin{align*}
\Sigma_1 = \sum_{\substack{0 \le i \le n-1 \\ i \le j' \le n-1}} (-1)^{i+j'+1} \, \sigma \circ \delta_i \circ \delta_{j'}.
\end{align*}
Now consider $\Sigma_2$. For each term in $\Sigma_2$ we have $i \ge j$, so we write
\begin{align*}
\Sigma_2 = \sum_{\substack{0 \le j \le n \\ j \le i \le n-1}} (-1)^{i+j} \, \sigma \circ \delta_j \circ \delta_i.
\end{align*}
Renaming the dummy indices as $(j, i) \to (i', j')$ (i.e., $i' = j$ and $j' = i$), with $i' \le j'$, $0 \le i' \le n-1$, $i' \le j' \le n-1$:
\begin{align*}
\Sigma_2 = \sum_{\substack{0 \le i' \le n-1 \\ i' \le j' \le n-1}} (-1)^{i'+j'} \, \sigma \circ \delta_{i'} \circ \delta_{j'}.
\end{align*}
Comparing $\Sigma_1$ and $\Sigma_2$ term by term over the same index set $\{(i', j') : 0 \le i' \le n-1, \, i' \le j' \le n-1\}$, each term in $\Sigma_1$ carries a sign $(-1)^{i'+j'+1}$ while the corresponding term in $\Sigma_2$ carries a sign $(-1)^{i'+j'}$, with the same map $\sigma \circ \delta_{i'} \circ \delta_{j'}$. Therefore $\Sigma_1 + \Sigma_2 = 0$.
[guided]
The heart of this proof is a cancellation argument. The double boundary produces a double sum over pairs of face maps, and we need to show that every term cancels with exactly one other term.
The partition into $i < j$ and $i \ge j$ is motivated by the [Face Inclusion Relation](/theorems/2231): $\delta_j \circ \delta_i = \delta_i \circ \delta_{j-1}$ holds only when $i < j$. This relation lets us rewrite $\Sigma_1$ so that its terms involve the same compositions $\delta_a \circ \delta_b$ (with $a \le b$) as $\Sigma_2$.
After the re-indexing $j' = j - 1$ in $\Sigma_1$, both sums run over the same index set $\{(i, j') : i \le j'\}$ and involve the same map $\sigma \circ \delta_i \circ \delta_{j'}$. The only difference is the sign: $\Sigma_1$ contributes $(-1)^{i+j'+1}$ and $\Sigma_2$ contributes $(-1)^{i+j'}$. Since $(-1)^{i+j'+1} = -(-1)^{i+j'}$, every term in $\Sigma_1$ is the negative of the corresponding term in $\Sigma_2$. The sums cancel completely, giving $d_{n-1} \circ d_n = 0$.
[/guided]
[/step]
[step:Conclude $d_{n-1} \circ d_n = 0$]
Since $d_{n-1}(d_n(\sigma)) = \Sigma_1 + \Sigma_2 = 0$ for every generator $\sigma: \Delta^n \to X$, and the boundary maps are homomorphisms, we conclude that $d_{n-1} \circ d_n: C_n(X) \to C_{n-2}(X)$ is the zero homomorphism.
[/step]