= Solution
Assume first that $Y$ is connected; otherwise the definition is made separately on each connected component. Choose a <regular value> $y\in Y$ and define the <degree modulo two> by
$$
\deg_2(f)=|f^{-1}(y)|\pmod2.
$$
The following course results make this well-defined.
* By <Sard theorem>, regular values are dense, so one can choose $y$.
* By the <preimage theorem>, $f^{-1}(y)$ is a zero-dimensional submanifold because $\dim X=\dim Y$. It is discrete and closed in compact $X$, hence finite.
* The parity is independent of the regular value. Indeed, after choosing a path between two regular values transverse to $f$, its inverse image is a compact one-dimensional manifold whose boundary is the disjoint union of the two fibres. Every compact one-manifold has an even number of boundary points.
The same transverse-preimage argument applied to a smooth homotopy proves homotopy invariance. Consequently the definition depends only on $f$, rather than on the chosen regular value.
Back to article page