TITLE: Homotopy equivalences preserving structure
QUESTION [5 upvotes]: Suppose I have $X=X_1\cup X_2\cup…\cup X_n$ and $f:X \to Y$ where $Y$ has a similar decomposition.
Suppose I know that 
$f | X_{i_1}\cap…\cap X_{i_r} \to Y_{i_1}\cap…\cap Y_{i_r}$ is a homotopy equivalence for each nonempty intersection. Suppose that the spaces are nice enough that we have the homotopy extension property wherever we want it.
Then $f$ has a homotopy inverse preserving all of this structure and the homotopies themselves preserve the structure.
The isn't hard to prove by piecing together strong deformation retractions in mapping cylinders, but I'd rather just point to a reference. 
For anyone who hasn't seen this stuff before, the base case is that if $f:(X,A) \to (Y,B)$ is a map such that $f:X \to Y $ and $f|:A \to B$ are homotopy equivalences, then $f$ is a homotopy equivalence of pairs. The proof is to form the mapping cylinder, squash the mapping cylinder of f| to it's top, keeping the whole top fixed, and then squash the rest. Of course, all of the spaces should be nice enough for the homotopy extension theorem to be available.

REPLY [2 votes]: I think an answer is in 
tom Dieck, Tammo
Partitions of unity in homotopy theory. 
Composito Math. 23 (1971), 159–167. 
With regard to the result on pairs given by Steve, it could be  useful to note that the book Topology and Groupoids gives a result in 7.4.2(Addendum) which gives control over the homotopies involved. The utility of this is that it gives a key to one proof of a gluing theorem for homotopy equivalences, which was first given in the 1968 edition of this book and is applied by tom Dieck in his paper. The Addendum is  as  follows: 
We are dealing with the situation $f:(X,X^0) \to (Y,Y^0)$ where each pair has the HEP. 
Let $g^{0} :Y_{0} \to X_{0}$ be any homotopy inverse of $f^{0}$ and let 
$ H^0: f^0g^0 \simeq 1, K^0: g^0f^0 \simeq 1$ be homotopies. Then $g^0$ extends to a homotopy inverse $g$ of $f$ such that the homotopy $fg \simeq 1 $ extends $H^0$ while the homotopy $gf \simeq 1$ extends the sum 
$$
K^{0} + g^{0}H^{0}f^{0} - g^{0}f^{0}K^{0}
$$
of the homotopies
$$
g^{0}f^{0} = g^{0}f^{0}1_{X_{0}} \simeq g^{0}f^{0}g^{0}f^{0}
\simeq g^{0}1_{Y_{0}}f^{0} \simeq 1_{X_{0}}
$$
determined by $H^0,K^0$. 
I do not know of a counterexample to the idea of avoiding the kind of "conjugation" given above (though it has been given in the dual situation). The argument derives from the categorical result that if $a,b, c$ are morphisms in a category such that $ab, bc$ are defined and are isomorphisms, then $a,b,c$ are isomorphisms. 
Note that this Addendum easily gives a gluing theorem for $n$ subspaces with a common intersection. 
I'll add that the idea for this result came from generalising the proof that a homotopy equivalence of spaces (not necessarily base point preserving) induces an isomorphism of homotopy groups. 
My memory is that another paper relevant to the question, but to which I do not have easy access,  is 
Spanier, E. H.; Whitehead, J. H. C.
The theory of carriers and S-theory. Algebraic geometry and topology. A symposium in honor of S. Lefschetz, pp. 330–360. Princeton University Press, Princeton, N.J., 1957. 
particularly the work on carriers.