[proofplan]
We prove graded commutativity $\alpha \smile \beta = (-1)^{k\ell} \beta \smile \alpha$ in $H^*(X; R)$ using a vertex-reversal chain map $\rho: C_\bullet(X) \to C_\bullet(X)$ that reverses the vertex ordering of each simplex. The proof has three stages: (1) show $\rho$ is a chain map, (2) construct a chain homotopy from $\rho$ to the identity via a twisted prism construction, and (3) compute that the dual map $\rho^*$ converts $\phi \smile \psi$ into $(-1)^{k\ell} \psi \smile \phi$ at the cochain level. Since $\rho$ is chain homotopic to the identity, $\rho^*$ acts as the identity on cohomology, yielding the result.
[/proofplan]
[step:Define the vertex-reversal chain map $\rho$]
Define the vertex-reversal map $\rho_n: C_n(X) \to C_n(X)$ on generators by
\begin{align*}
\rho_n(\sigma) = \varepsilon_n \cdot \sigma|_{[v_n, v_{n-1}, \ldots, v_0]},
\end{align*}
where $\sigma: \Delta^n \to X$ is a singular $n$-simplex with vertices $v_0, \ldots, v_n$ and $\varepsilon_n = (-1)^{n(n+1)/2}$ is the sign of the permutation $(0, 1, \ldots, n) \mapsto (n, n-1, \ldots, 0)$. This permutation is a product of $n + (n-1) + \cdots + 1 = n(n+1)/2$ transpositions, hence its sign is $(-1)^{n(n+1)/2}$.
[guided]
The vertex-reversal map is motivated by the desire to swap the roles of the front and back faces in the cup product. Recall that $(\phi \smile \psi)(\sigma)$ uses the front $k$-face $\sigma|_{[v_0,\ldots,v_k]}$ and the back $\ell$-face $\sigma|_{[v_k,\ldots,v_{k+\ell}]}$. If we reverse the vertex ordering, the "front" of the reversed simplex becomes the old "back" and vice versa. The sign $\varepsilon_n$ is chosen so that $\rho$ is a chain map — without it, $\rho$ would fail to commute with the boundary operator.
[/guided]
[/step]
[step:Verify that $\rho$ is a chain map]
We must check that $d_n \circ \rho_n = \rho_{n-1} \circ d_n$. On a generator $\sigma: \Delta^n \to X$, the $i$-th face of the reversed simplex $\sigma|_{[v_n,\ldots,v_0]}$ omits the $i$-th vertex of the reversed list, which is $v_{n-i}$. Therefore
\begin{align*}
d_n\bigl(\sigma|_{[v_n, \ldots, v_0]}\bigr) = \sum_{i=0}^{n} (-1)^i \sigma|_{[v_n, \ldots, \hat{v}_{n-i}, \ldots, v_0]}.
\end{align*}
Re-indexing with $j = n - i$:
\begin{align*}
d_n\bigl(\sigma|_{[v_n, \ldots, v_0]}\bigr) = \sum_{j=0}^{n} (-1)^{n-j} \sigma|_{[v_n, \ldots, \hat{v}_j, \ldots, v_0]}.
\end{align*}
Each term $\sigma|_{[v_n,\ldots,\hat{v}_j,\ldots,v_0]}$ is the reversal of the $j$-th face $\sigma|_{[v_0,\ldots,\hat{v}_j,\ldots,v_n]}$, which has $n-1$ vertices. Therefore
\begin{align*}
d_n(\varepsilon_n \sigma|_{[v_n,\ldots,v_0]}) &= \varepsilon_n \sum_{j=0}^{n} (-1)^{n-j} \sigma|_{[v_n,\ldots,\hat{v}_j,\ldots,v_0]}.
\end{align*}
On the other hand,
\begin{align*}
\rho_{n-1}(d_n(\sigma)) &= \sum_{j=0}^{n} (-1)^j \rho_{n-1}(\sigma|_{[v_0,\ldots,\hat{v}_j,\ldots,v_n]}) = \sum_{j=0}^{n} (-1)^j \varepsilon_{n-1} \sigma|_{[v_n,\ldots,\hat{v}_j,\ldots,v_0]}.
\end{align*}
For these to be equal, we need $\varepsilon_n (-1)^{n-j} = \varepsilon_{n-1} (-1)^j$ for each $j$. This is equivalent to $\varepsilon_n (-1)^n = \varepsilon_{n-1}$, i.e., $(-1)^{n(n+1)/2} \cdot (-1)^n = (-1)^{(n-1)n/2}$. Since $n(n+1)/2 + n = n(n+1)/2 + 2n/2 = n(n+3)/2$ and $(n-1)n/2 = (n^2-n)/2$, we verify: $n(n+3)/2 - (n^2-n)/2 = (n^2+3n-n^2+n)/2 = 2n$, which is even. So $(-1)^{n(n+3)/2} = (-1)^{(n^2-n)/2}$, confirming the identity. Therefore $\rho$ is a chain map.
[/step]
[step:Construct a chain homotopy from $\rho$ to the identity via the twisted prism]
Define the **twisted prism operator** $P_n \in C_{n+1}([0,1] \times \Delta^n)$ by
\begin{align*}
P_n = \sum_{i=0}^{n} (-1)^i \varepsilon_{n-i}\, [v_0, \ldots, v_i, w_n, \ldots, w_i],
\end{align*}
where $v_0, \ldots, v_n$ are the vertices of $\{0\} \times \Delta^n$ and $w_0, \ldots, w_n$ are the vertices of $\{1\} \times \Delta^n$. Each $[v_0, \ldots, v_i, w_n, \ldots, w_i]$ is an $(n+1)$-simplex in $[0,1] \times \Delta^n$.
Let $\pi: [0,1] \times \Delta^n \to \Delta^n$ be the projection. For a singular $n$-simplex $\sigma: \Delta^n \to X$, define the chain homotopy
\begin{align*}
F_n(\sigma) = (\sigma \circ \pi)_\#(P_n) \in C_{n+1}(X).
\end{align*}
The boundary of $P_n$ satisfies
\begin{align*}
d(P_n) = \varepsilon_n [w_n, \ldots, w_0] - [v_0, \ldots, v_n] - \sum_{j=0}^{n} (-1)^j (\operatorname{id}_{[0,1]} \times \delta_j)_\#(P_{n-1}),
\end{align*}
where $\delta_j: \Delta^{n-1} \to \Delta^n$ is the $j$-th face map. Pushing forward by $\sigma \circ \pi$, the first term gives $\rho_n(\sigma)$, the second gives $\sigma$, and the sum gives $F_{n-1}(d_n(\sigma))$. This yields
\begin{align*}
d_{n+1}(F_n(\sigma)) + F_{n-1}(d_n(\sigma)) = \rho_n(\sigma) - \sigma,
\end{align*}
which is the chain homotopy relation $d \circ F + F \circ d = \rho - \operatorname{id}$.
[guided]
The twisted prism $P_n$ is a modification of the standard prism operator used for homotopy invariance. The standard prism decomposes $[0,1] \times \Delta^n$ into $(n+1)$-simplices $[v_0,\ldots,v_i,w_i,\ldots,w_n]$; the twisted prism replaces $w_i,\ldots,w_n$ by $w_n,\ldots,w_i$ (reversing the $w$-vertices) and includes the sign $\varepsilon_{n-i}$ to compensate for the reversal.
Why this particular twist? On the $\{1\}$-face of $[0,1] \times \Delta^n$, the standard prism gives the identity, but the twisted prism gives the reversed simplex $[w_n,\ldots,w_0]$ with sign $\varepsilon_n$ — which is exactly $\rho_n$. On the $\{0\}$-face, both give the identity $[v_0,\ldots,v_n]$. So the boundary computation yields $\rho - \operatorname{id}$ rather than $\operatorname{id} - \operatorname{id} = 0$.
The verification of the boundary formula is a combinatorial computation that tracks how the boundary of each $(n+1)$-simplex $[v_0,\ldots,v_i,w_n,\ldots,w_i]$ decomposes into faces. The faces from omitting a $v$-vertex contribute to the LHS prism terms, the faces from omitting a $w$-vertex contribute to the RHS prism terms, and the face at the $v$-$w$ boundary (omitting the junction between $v_i$ and $w_n$) contribute the "lateral" faces that assemble into the homotopy.
[/guided]
[/step]
[step:Compute the effect of $\rho^*$ on cup products]
Let $\phi \in C^k(X; R)$ and $\psi \in C^\ell(X; R)$, and let $\sigma: \Delta^{k+\ell} \to X$ be a singular $(k+\ell)$-simplex. We compute $\rho^*(\psi \smile \phi)$ and relate it to $\phi \smile \psi$.
First, $(\rho^*\phi)(\sigma) = \phi(\rho_{k}(\sigma)) = \varepsilon_k \phi(\sigma|_{[v_k,\ldots,v_0]})$ and similarly $(\rho^*\psi)(\sigma) = \varepsilon_\ell \psi(\sigma|_{[v_\ell,\ldots,v_0]})$.
Now compute $\rho^*(\psi \smile \phi)$ on $\sigma$:
\begin{align*}
\rho^*(\psi \smile \phi)(\sigma) &= (\psi \smile \phi)(\rho_{k+\ell}(\sigma)) = (\psi \smile \phi)(\varepsilon_{k+\ell} \cdot \sigma|_{[v_{k+\ell},\ldots,v_0]}) \\
&= \varepsilon_{k+\ell} \cdot \psi(\sigma|_{[v_{k+\ell},\ldots,v_\ell]}) \cdot \phi(\sigma|_{[v_\ell,\ldots,v_0]}).
\end{align*}
On the other hand, $(\rho^*\phi \smile \rho^*\psi)(\sigma)$ uses the front $k$-face and back $\ell$-face of $\sigma$:
\begin{align*}
(\rho^*\phi \smile \rho^*\psi)(\sigma) &= (\rho^*\phi)(\sigma|_{[v_0,\ldots,v_k]}) \cdot (\rho^*\psi)(\sigma|_{[v_k,\ldots,v_{k+\ell}]}) \\
&= \varepsilon_k \phi(\sigma|_{[v_k,\ldots,v_0]}) \cdot \varepsilon_\ell \psi(\sigma|_{[v_{k+\ell},\ldots,v_k]}).
\end{align*}
Comparing the two expressions:
\begin{align*}
\rho^*(\psi \smile \phi)(\sigma) = \varepsilon_{k+\ell} \varepsilon_k^{-1} \varepsilon_\ell^{-1} \cdot (\rho^*\phi \smile \rho^*\psi)(\sigma).
\end{align*}
Since $\varepsilon_n = (-1)^{n(n+1)/2}$ and $\varepsilon_n^{-1} = \varepsilon_n$ (as $\varepsilon_n^2 = 1$), we compute
\begin{align*}
\varepsilon_{k+\ell} \varepsilon_k \varepsilon_\ell = (-1)^{(k+\ell)(k+\ell+1)/2 + k(k+1)/2 + \ell(\ell+1)/2}.
\end{align*}
The exponent is $\frac{1}{2}[(k+\ell)(k+\ell+1) + k(k+1) + \ell(\ell+1)] = \frac{1}{2}[k^2+2k\ell+\ell^2+k+\ell+k^2+k+\ell^2+\ell] = \frac{1}{2}[2k^2+2\ell^2+2k\ell+2k+2\ell] = k^2+\ell^2+k\ell+k+\ell$. Modulo 2, $k^2 \equiv k$ and $\ell^2 \equiv \ell$, so the exponent is $\equiv k + \ell + k\ell + k + \ell = k\ell \pmod{2}$. Therefore $\varepsilon_{k+\ell} \varepsilon_k \varepsilon_\ell = (-1)^{k\ell}$.
[/step]
[step:Conclude graded commutativity on cohomology]
Since $\rho$ is chain homotopic to the identity (by the chain homotopy $F$ constructed above), the dual map $\rho^*: C^*(X; R) \to C^*(X; R)$ is cochain homotopic to the identity. By the theorem that [Chain Homotopic Maps Induce Equal Maps on Homology](/theorems/1923) (applied dually), $\rho^*$ induces the identity on cohomology: for any cocycle $\phi$, $[\rho^*\phi] = [\phi]$ in $H^*(X; R)$.
Let $\alpha = [\phi] \in H^k(X; R)$ and $\beta = [\psi] \in H^\ell(X; R)$. Since $\rho^*$ acts as the identity on cohomology:
\begin{align*}
\alpha \smile \beta &= [\phi \smile \psi] = [\rho^*\phi \smile \rho^*\psi].
\end{align*}
From the computation in the previous step, $\rho^*(\psi \smile \phi) = (-1)^{k\ell} (\rho^*\phi \smile \rho^*\psi)$ at the cochain level. Therefore
\begin{align*}
[\rho^*\phi \smile \rho^*\psi] = (-1)^{k\ell} [\rho^*(\psi \smile \phi)] = (-1)^{k\ell} [\psi \smile \phi] = (-1)^{k\ell} \beta \smile \alpha,
\end{align*}
where the second equality uses $[\rho^*(\psi \smile \phi)] = [\psi \smile \phi]$ since $\rho^*$ is the identity on cohomology. Combining:
\begin{align*}
\alpha \smile \beta = (-1)^{k\ell} \beta \smile \alpha.
\end{align*}
[/step]