Gluing $n$-homotopy equivalences

Let $$f:X \rightarrow Y$$ be a map between simplicial complexes. Let $$C$$ and $$C'$$ be subcomplexes of $$Y$$ such that $$Y = C \cup C'$$. Define $$D = f^{-1}(C)$$ and $$D'=f^{-1}(C')$$, so $$D \cap D' = f^{-1}(C \cap C')$$. For some $$n \geq 0$$, assume that $$f$$ restricts to $$n$$-homotopy equivalences $$D \rightarrow C$$ and $$D' \rightarrow C'$$ and $$D \cap D' \rightarrow C \cap C'$$. Question: must $$f$$ be an $$n$$-homotopy equivalence? I assume that the answer is "yes", but it would be great to have a citable reference.

Using Mayer-Vietoris, one can show that $$f$$ induces isomorphisms on homology up to degree $$n$$. Moreover, using Seifert-van Kampen, one can show that $$f$$ induces an isomorphism on $$\pi_1$$ if $$n \geq 1$$. So the result is true if either $$X$$ or $$Y$$ is simply-connected.

• Can't you use Mayer-Vietoris with local coefficients to conclude in the general case? – Denis Nardin Jan 7 at 21:25
• @DenisNardin: Do you know a reference for that (including the relevant version of the Whitehead theorem)? I can't find it in Hatcher. – Alice Jan 7 at 21:40
• mathoverflow.net/questions/124278/… – Denis Nardin Jan 7 at 22:57
• For the Whitehead theorem with local coefficients I don't remember a reference off the top of my head and I'm away from books, but it's pretty much a formal consequence of obstruction theory. Maybe in the book by Mosher and Tangora? – Denis Nardin Jan 7 at 23:02