Lemma 5.12. (Whitehead theorem with local coefficients)

Let \(f\colon X\to Y\) be a map of animae which induces isomorphisms on \(\pi_0\) and \(\pi_1\). If \(f\) induces an isomorphism on cohomology with every local system of abelian groups on \(Y\), then \(f\) is an isomorphism.

Proof
The claim may be checked componentwise, so suppose \(X\) and \(Y\) are connected and put \(G=\pi_1(Y)\iso\pi_1(X)\). Choose CW models and lift \(f\) to a \(G\)-equivariant map of universal covers. Let \(Q_*\) be the mapping cone of the induced map of cellular chain complexes over \(\mathbb Z[G]\). The hypothesis says that
\[H^*\!\operatorname{Hom}_{\mathbb Z[G]}(Q_*,M)=0\]
for every \(\mathbb Z[G]\)-module \(M\).We claim that \(Q_*\) is acyclic. Otherwise, let \(q\) be the least degree for which \(H_q(Q_*)\) is nonzero, and choose an injective \(\mathbb Z[G]\)-module \(I\) receiving a nonzero map from \(H_q(Q_*)\). The universal coefficient spectral sequence for the complex of projective \(\mathbb Z[G]\)-modules \(Q_*\) degenerates for the coefficient module \(I\) and gives
\[H^q\!\operatorname{Hom}_{\mathbb Z[G]}(Q_*,I) \iso \operatorname{Hom}_{\mathbb Z[G]}(H_q(Q_*),I)\neq 0,\]
contradicting the hypothesis. Thus the map of universal covers is a homology isomorphism. Since both universal covers are simply connected, the relative Hurewicz theorem implies that it is a homotopy equivalence. The original map \(f\) is therefore an isomorphism of animae.