# graphs and homotopy extension property

If $T$ is a spanning tree of a graph $X$. How to prove that the pair $(X,T)$ has the homotopy extension property, without using the definition of CW complexes? I mean I don't need the general case that any CW pairs $(X,T)$ has the HEP.

If $A\to X$ has the homotopy extension property, and $Y \to Z$ is the pushout along a map $A\to Y$, then $Y\to Z$ has the homotopy extension property. The proof can proceed as follows. Since $I$ is locally compact Hausdorff $Y\times I \to Z \times I$ is the pushout of $A\times I \to X\times I$ along the induced map $A\times I \to Y\times I$. This follows from the exponential law http://ncatlab.org/nlab/show/exponential+law+for+spaces and the universal property of pushouts.
Note also that if $A\to B$ and $B\to X$ have the homotopy extension property, then so does the composition $A\to X$, this follows easily from the definition.
Finally, observe that for a graph $X$ and a spanning tree $T$, $T\to X$ can be obtained as a sequence $T= T_0 \to T_1 \to \cdots \to T_n \to T_{n+1} = X$, where $T_i \to T_{i+1}$ is a pushout of $\{0, 1\} \to I$ along a map $\{0, 1\} \to T_i$.
Thus, it suffices to show that $\{0, 1\} \to I$ has the homotopy extension property. For this it suffices to show that $\{0,1\}\times I \cup I \times \{0\}$ is a retract of $I\times I$. This can be done by a direct formula, or observing that the pair $(I\times I,\{0,1\}\times I \cup I \times \{0\} )$ is homeomorphic to the pair $(I\times I, I\times \{0\}$), and in the latter case the retract is clear.