[proofplan]
We show that the maps $f_n: C_n(X) \to C_n(Y)$ defined by $\sigma \mapsto f \circ \sigma$ commute with the boundary operators, i.e., $f_{n-1} \circ d_n = d_n \circ f_n$. This follows from the associativity of function composition: precomposing with $f$ (which defines $f_n$) and postcomposing with face inclusions (which defines $d_n$) commute. Once $f_\bullet$ is established as a chain map, the induced maps on homology and cohomology follow from the general algebraic construction for chain maps.
[/proofplan]
[step:Verify that $f_\bullet$ commutes with the boundary operators]
We check $d_n \circ f_n = f_{n-1} \circ d_n$ on each generator $\sigma: \Delta^n \to X$ of $C_n(X)$. By definition, $f_n(\sigma) = f \circ \sigma: \Delta^n \to Y$. Applying the boundary operator $d_n: C_n(Y) \to C_{n-1}(Y)$:
\begin{align*}
d_n(f_n(\sigma)) = d_n(f \circ \sigma) = \sum_{i=0}^{n} (-1)^i \, (f \circ \sigma) \circ \delta_i = \sum_{i=0}^{n} (-1)^i \, f \circ (\sigma \circ \delta_i).
\end{align*}
The last equality uses associativity of function composition: $(f \circ \sigma) \circ \delta_i = f \circ (\sigma \circ \delta_i)$. On the other hand,
\begin{align*}
f_{n-1}(d_n(\sigma)) = f_{n-1}\left(\sum_{i=0}^{n} (-1)^i \, \sigma \circ \delta_i\right) = \sum_{i=0}^{n} (-1)^i \, f \circ (\sigma \circ \delta_i),
\end{align*}
where the second equality uses the fact that $f_{n-1}$ is a homomorphism (it extends linearly from generators) and $f_{n-1}(\sigma \circ \delta_i) = f \circ (\sigma \circ \delta_i)$ by definition. The two expressions are identical, so $d_n \circ f_n = f_{n-1} \circ d_n$.
[guided]
The key observation is that $f_n$ acts by precomposing with $f$ (composition on the left of $\sigma$), while $d_n$ acts by postcomposing with the face inclusions $\delta_i$ (composition on the right of $\sigma$). Associativity of function composition ensures these two operations commute:
\begin{align*}
(f \circ \sigma) \circ \delta_i = f \circ (\sigma \circ \delta_i).
\end{align*}
This is the entire content of the chain map verification. The linearity of $f_n$ (which extends from generators to arbitrary chains by $f_n(\sum n_\sigma \sigma) = \sum n_\sigma (f \circ \sigma)$) ensures the identity extends from generators to all of $C_n(X)$.
[/guided]
[/step]
[step:Conclude that $f_\bullet$ is a chain map and define the induced maps]
Since $d_n \circ f_n = f_{n-1} \circ d_n$ for all $n$, the collection $f_\bullet = (f_n)_{n \ge 0}$ is a chain map from $C_\bullet(X)$ to $C_\bullet(Y)$.
**Induced map on homology.** A chain map sends cycles to cycles and boundaries to boundaries. If $c \in C_n(X)$ satisfies $d_n(c) = 0$, then $d_n(f_n(c)) = f_{n-1}(d_n(c)) = f_{n-1}(0) = 0$, so $f_n(c)$ is a cycle. If $c = d_{n+1}(b)$ for some $b \in C_{n+1}(X)$, then $f_n(c) = f_n(d_{n+1}(b)) = d_{n+1}(f_{n+1}(b))$, so $f_n(c)$ is a boundary. Hence $f_n$ descends to a well-defined homomorphism
\begin{align*}
f_*: H_n(X) &\to H_n(Y) \\
[c] &\mapsto [f_n(c)].
\end{align*}
**Induced map on cohomology.** Dually, the cochain map $f^\#: C^n(Y; R) \to C^n(X; R)$ defined by $f^\#(\varphi) = \varphi \circ f_n$ is a cochain map (it commutes with the coboundary operator by the same associativity argument). This descends to
\begin{align*}
f^*: H^n(Y; R) &\to H^n(X; R) \\
[\varphi] &\mapsto [\varphi \circ f_n].
\end{align*}
[/step]