Straight-line homotopy from a simplicial approximation (source code)

= Straight-line homotopy from a simplicial approximation

If $g$ simplicially approximates $f$, then $f(x)$ and $|g|(x)$ lie in a common simplex for every $x$. The affine formula
$$
H(x,t)=(1-t)f(x)+t|g|(x)
$$
therefore remains in the realization and gives a homotopy from $f$ to $|g|$.