Solution (source code)

= Solution

For an $n$-dimensional <singular simplex> $\sigma$ and a degree-$p$ <singular cochain> $\alpha$, use the front-face/back-face convention
$$
\sigma\frown\alpha=\alpha(\sigma|[v_0,\ldots,v_p])\,\sigma|[v_p,\ldots,v_n],
$$
and set it to zero for $p>n$. Extend linearly over $R$. Passing to <homology> classes of cycles and <cohomology> classes of cocycles defines the <cap product> $H_n(X;R)\times H^p(X;R)\to H_{n-p}(X;R)$.

For a continuous map $f$, the <cochain pullback> satisfies $(f^*\alpha)(\tau)=\alpha(f\circ\tau)$, and the induced chain map sends $\sigma$ to $f\circ\sigma$. Since composition commutes with restrictions to faces,
$$
\begin{aligned}
f_*(\sigma\frown f^*\alpha)
&=\alpha(f\circ\sigma|[v_0,\ldots,v_p])\,(f\circ\sigma|[v_p,\ldots,v_n])\\
&=(f\circ\sigma)\frown\alpha.
\end{aligned}
$$
The identity holds on chains, so it descends directly to classes and proves the <naturality of the cap product>: $f_*(x\frown f^*\alpha)=f_*(x)\frown\alpha$. No additional well-definedness verification is required here.