CW complex which is a union of contractible subcomplexes with contractible intersection is contractible Im trying to show that if X is a CW complex, A,B $\subset $X are contractible sub complexes with contractible intersection and $X=A\cup B$, then X is contractible.
We can say that X/A$\cap$B is homotopy equivalent to X since (X,A$\cap$B) satisfies the homotopy extension property and $A\cap B$ is contractible. Now we have $A/A\cap B \cup B/A\cap B=X/A\cap B$ and as before $A/A\cap B$ and $B/A\cap B$ are homotopy equivalent to $A$ and $B$ respectively which are contractible. In general we can't say that if $A\simeq X$, $B \simeq Y$ then $A\cup B \simeq X\cup Y$ and even if it was true we could have that $A$ and $B$ are homotopy equivalent to different points.
Are there mistakes so far ? Any idea on how to proceed if not ?
Thanks for your help
 A: You forget to mention that $X = A \cup B$, otherwise it is not true.
You correctly state that if $(Z,C)$ has the homotopy extension property and $C$ is contractible, then $Z \simeq Z/C$. Thus

*

*$X \simeq X/A$.


*We shall show that the map $J : B/(A \cap B) \to X/A, J([b]) = [b]$, is a homeomorphism. Therefore we get $X/A \approx B/(A \cap B) \simeq B$. Hence $X$ is contractible.
Let us now prove that $J$ is a homeomorphism.
Let $p : B \to B/(A \cap B)$ and $q : X \to X/A$ denote the quotients maps. The inclusion $j : B \to X$ has the property $qj = Jp$, thus $J$ is a  continuous map.
Le us write $* = p(A \cap B) \in  B/(A \cap B)$ and $* = q(A) \in X/A$. These points are closed because $p^{-1}(*) = A \cap B$ and $q^{-1}(*) = A$ are closed. The maps $p' : B' = B \setminus (A \cap B) \stackrel{p}{\to} B/(A \cap B) \setminus *$ and $q' : X' = A \setminus A \stackrel{q}{\to}  X/A \setminus *$ are homeomorphisms, thus we may regard $B'$ as an open subspace of $B/(A \cap B)$ such that $B' \cup \{*\} = B$ and $X'$ as an open subspace of $X/A$ such that $X' \cup \{*\} = X$.
We have $X' = (A \cup B) \setminus A = B \setminus A =  B'$, thus $J$ is a bijection. It maps the open subspace $B'$ of $B/(A \cap B)$ homeomorphically onto the open subspace $X'$ of $X/A$. Thus it is an open map at all points of $B'$. It remains to show that $J$ is open at $*$, i.e. that each open neighborhood $U$ of $*$ is mapped onto an open neighborhood of $*$ in $X/A$. Let $U' = U \cap B'$. The set $p^{-1}(U)$ is an open neighborhood of $A \cap B$ in $B$ which has the form $p^{-1}(U) = (A \cap B) \cup U'$. We have $q^{-1}(J(U)) =   A \cup U'$. This set is open in $X$ because $X \setminus (A \cup U')  = (X \setminus A) \setminus U' = X' \setminus U' = B' \setminus U' = B \setminus ((A \cap B) \cup U') = B \setminus p^{-1}(U)$ which is closed in $B$ and thus closed in $X$ (recall that $B$ is a subcomplex of $X$, hence closed in $X$).
