[proofplan]
We show the cup product descends to cohomology in two stages. First, we prove that the cup product of two cocycles is a cocycle, using the Leibniz rule $\delta(\phi \smile \psi) = \delta\phi \smile \psi + (-1)^{|\phi|} \phi \smile \delta\psi$ and the hypothesis $\delta\phi = \delta\psi = 0$. Second, we prove that the cohomology class $[\phi \smile \psi]$ is independent of the choice of cocycle representatives: replacing $\phi$ by $\phi + \delta\alpha$ or $\psi$ by $\psi + \delta\beta$ changes $\phi \smile \psi$ by a coboundary. Bilinearity of the induced map follows from the bilinearity of the cochain-level cup product.
[/proofplan]
[step:Recall the Leibniz rule for the coboundary of a cup product]
Let $R$ be a commutative ring. For cochains $\phi \in C^k(X; R)$ and $\psi \in C^\ell(X; R)$, the cup product $\phi \smile \psi \in C^{k+\ell}(X; R)$ is defined on a singular simplex $\sigma: \Delta^{k+\ell} \to X$ by
\begin{align*}
(\phi \smile \psi)(\sigma) = \phi(\sigma|_{[v_0, \ldots, v_k]}) \cdot \psi(\sigma|_{[v_k, \ldots, v_{k+\ell}]}),
\end{align*}
where $\sigma|_{[v_{i_0}, \ldots, v_{i_m}]}$ denotes the restriction of $\sigma$ to the face spanned by the indicated vertices, and the product on the right is multiplication in $R$.
The coboundary operator $\delta: C^n(X; R) \to C^{n+1}(X; R)$ satisfies the Leibniz rule:
\begin{align*}
\delta(\phi \smile \psi) = \delta\phi \smile \psi + (-1)^k \, \phi \smile \delta\psi.
\end{align*}
This identity is verified by direct computation on a singular $(k + \ell + 1)$-simplex $\sigma: \Delta^{k+\ell+1} \to X$, expanding both sides using the definitions of $\delta$ and $\smile$ and matching terms.
[guided]
The Leibniz rule is the algebraic engine of the proof. It says the coboundary $\delta$ acts on cup products like a graded derivation: it "differentiates" each factor in turn, picking up a sign $(-1)^k$ (the degree of the first factor) when it passes $\phi$ to act on $\psi$.
To verify the Leibniz rule, one expands $\delta(\phi \smile \psi)(\sigma)$ for a singular $(k+\ell+1)$-simplex $\sigma$. By definition,
\begin{align*}
\delta(\phi \smile \psi)(\sigma) = (\phi \smile \psi)(d_{k+\ell+1}\sigma) = \sum_{i=0}^{k+\ell+1} (-1)^i (\phi \smile \psi)(\sigma \circ \delta_i).
\end{align*}
Each term $(\phi \smile \psi)(\sigma \circ \delta_i) = \phi((\sigma \circ \delta_i)|_{[v_0, \ldots, v_k]}) \cdot \psi((\sigma \circ \delta_i)|_{[v_k, \ldots, v_{k+\ell}]})$ involves restricting the $i$-th face of $\sigma$ to its front and back parts. Splitting the sum at $i = k$ and carefully tracking how deleting the $i$-th vertex affects the front $k$-face versus the back $\ell$-face yields the two terms $\delta\phi \smile \psi$ and $(-1)^k \phi \smile \delta\psi$.
[/guided]
[/step]
[step:Show the cup product of cocycles is a cocycle]
Let $\phi \in Z^k(X; R)$ and $\psi \in Z^\ell(X; R)$ be cocycles, meaning $\delta\phi = 0$ and $\delta\psi = 0$. By the Leibniz rule:
\begin{align*}
\delta(\phi \smile \psi) = \delta\phi \smile \psi + (-1)^k \, \phi \smile \delta\psi = 0 \smile \psi + (-1)^k \, \phi \smile 0 = 0.
\end{align*}
Therefore $\phi \smile \psi \in Z^{k+\ell}(X; R)$ is a cocycle.
[/step]
[step:Show the cohomology class $[\phi \smile \psi]$ is independent of the representative of $[\phi]$]
Suppose $\phi' = \phi + \delta\alpha$ for some $\alpha \in C^{k-1}(X; R)$. We compute:
\begin{align*}
\phi' \smile \psi - \phi \smile \psi = (\delta\alpha) \smile \psi.
\end{align*}
By the Leibniz rule applied to $\alpha \in C^{k-1}(X; R)$ and $\psi \in C^\ell(X; R)$:
\begin{align*}
\delta(\alpha \smile \psi) = \delta\alpha \smile \psi + (-1)^{k-1} \, \alpha \smile \delta\psi.
\end{align*}
Since $\delta\psi = 0$ (as $\psi$ is a cocycle), this gives $\delta(\alpha \smile \psi) = \delta\alpha \smile \psi$. Therefore
\begin{align*}
\phi' \smile \psi - \phi \smile \psi = \delta(\alpha \smile \psi),
\end{align*}
which is a coboundary. Hence $[\phi' \smile \psi] = [\phi \smile \psi]$ in $H^{k+\ell}(X; R)$.
[guided]
Why does changing the representative of $[\phi]$ by a coboundary $\delta\alpha$ only change the cup product by a coboundary? The Leibniz rule lets us "absorb" the $\delta$ from $\delta\alpha$ into a total coboundary $\delta(\alpha \smile \psi)$, provided the other factor $\psi$ is a cocycle ($\delta\psi = 0$). If $\psi$ were not a cocycle, the term $(-1)^{k-1} \alpha \smile \delta\psi$ would survive, and the cup product would not be well-defined on cohomology.
This is the precise sense in which the cup product "descends" to cohomology: the cocycle condition $\delta\psi = 0$ is used to ensure that coboundary-modifications of the first factor produce only coboundary-modifications of the product.
[/guided]
[/step]
[step:Show the cohomology class $[\phi \smile \psi]$ is independent of the representative of $[\psi]$]
Suppose $\psi' = \psi + \delta\beta$ for some $\beta \in C^{\ell-1}(X; R)$. We compute:
\begin{align*}
\phi \smile \psi' - \phi \smile \psi = \phi \smile \delta\beta.
\end{align*}
By the Leibniz rule applied to $\phi \in C^k(X; R)$ and $\beta \in C^{\ell-1}(X; R)$:
\begin{align*}
\delta(\phi \smile \beta) = \delta\phi \smile \beta + (-1)^k \, \phi \smile \delta\beta.
\end{align*}
Since $\delta\phi = 0$ (as $\phi$ is a cocycle), this gives $\delta(\phi \smile \beta) = (-1)^k \, \phi \smile \delta\beta$, and hence
\begin{align*}
\phi \smile \delta\beta = (-1)^k \, \delta(\phi \smile \beta) = \delta\bigl((-1)^k \, \phi \smile \beta\bigr).
\end{align*}
This is a coboundary. Hence $[\phi \smile \psi'] = [\phi \smile \psi]$ in $H^{k+\ell}(X; R)$.
[guided]
The argument is symmetric to the previous step. Now we use the cocycle condition on $\phi$ (i.e., $\delta\phi = 0$) to kill the unwanted term $\delta\phi \smile \beta$. The Leibniz rule then expresses $\phi \smile \delta\beta$ as $(-1)^k \delta(\phi \smile \beta)$, which is a coboundary.
The sign $(-1)^k$ is harmless: if $c = \delta\gamma$ is a coboundary, then $(-1)^k c = \delta((-1)^k \gamma)$ is also a coboundary, since $\delta$ is $R$-linear and $(-1)^k \in R$ is a unit.
Note the complementary roles of the two cocycle conditions: in the previous step, $\delta\psi = 0$ was used when modifying $\phi$; here, $\delta\phi = 0$ is used when modifying $\psi$. Both conditions are essential for well-definedness.
[/guided]
[/step]
[step:Conclude that the cup product descends to a well-defined bilinear map on cohomology]
By the previous three steps:
1. If $\phi$ and $\psi$ are cocycles, then $\phi \smile \psi$ is a cocycle.
2. The class $[\phi \smile \psi] \in H^{k+\ell}(X; R)$ depends only on $[\phi]$ and $[\psi]$, not on the choice of cocycle representatives.
Therefore the map
\begin{align*}
\smile: H^k(X; R) \times H^\ell(X; R) &\to H^{k+\ell}(X; R) \\
([\phi], [\psi]) &\mapsto [\phi \smile \psi]
\end{align*}
is well-defined. Bilinearity follows from the bilinearity of the cochain-level cup product: for cocycles $\phi_1, \phi_2 \in Z^k(X; R)$, $\psi \in Z^\ell(X; R)$, and $r \in R$,
\begin{align*}
(\phi_1 + \phi_2) \smile \psi &= \phi_1 \smile \psi + \phi_2 \smile \psi, \\
(r\phi_1) \smile \psi &= r(\phi_1 \smile \psi),
\end{align*}
and similarly in the second variable. These identities hold at the cochain level by the definition of the cup product (which involves $R$-multiplication in each fiber), and passing to cohomology classes preserves them since the quotient map $Z^n \to H^n$ is an $R$-module homomorphism.
[/step]