Suppose we have a map $f:X\to Y$ and we form the mapping cylinder $M\_f$. Hatcher claims that it is obvious that the pair $(M\_f, X \cup Y)$ satisfies the homotopy extension property. Equivalently we could find a retraction of $M\_f \times I$ to $M\_f\times \{0\} \cup (X \cup Y)\times I$. I don't see how we can get this latter result, however.



Homotopy Extension Property involving mapping cylinder
Neil has given an explicit retraction. But it may be useful to note that you can obtain results like this from a combination of some "easier" facts:


* The pair $(I,\{0,1\})$ has the HEP.
* If $(L,K)$ has the HEP where $K$ and $L$ are locally compact Hausdorf, and if $Z$ is any space, then $(Z\times L, Z\times K)$ has the HEP.
* If $(U,A)$ has the HEP, and $g:A\to B$ is any map, then $(V,B)$ has the HEP, where $V$ is the pushout of $U$ along $g$.


(I'll leave the proofs of these as an exercise; you only need the second one for $(L,K)=(I,\{0,1\})$ anyway.) Then note that $M\_f$ can be obtained from $X\amalg Y$ by gluing it to a copy of $X\times I$ along $X\times \{0,1\}$.


