Let $f:X \to Y$ continuous map and $M_f:= Y \cup_f X \times I$ the mapping cylider with quotient structure $y \sim (x,0)$ if $y=f(x)$ ("identification with the bottom").
I want to show that $ X $ embedded by canonical incusion $X \cong X \times \{1\} \subset M_f$ is a neighborhood deformation retract (NDR), therefore there exist a $U \subset M_f$ with $X \times \{0\} \subset U$ and a homotopy $H: M_f \times I \to M_f$ such that hold:
$H_0 = id_{M_f}$
$H_i|_X = id_X$
$H_1(U) \subset X$
Ideed, that's clear what happens here geometrically: the open subsets of the shape $(a, 1] \times X$ are shrinked to $X$ so I can take as $U$ the following subset:
$ U := X \times (1/2, 1]$
Define $H$ piecewise as follows:
In $Y \times I$: $(y, t) \to y$
...and in $(X \times I) \times I$: $(x, s, t) \to (x, \min\{1, s(1+t)\})$
Obviously it provides a well defined map which respects $1$ till $3$ (as map between sets).
Now regarding my problem:
Does there exist a (elegant) possibility (prefering univerversal preperties) to see that this map is (globally) continuous.
My ideas:
Till now I could reduce it to following statement:
It would enough to show that the map $\widetilde{H}: M \times I \to M $ with $M:= Y \cup (X \times I)$ (therefore as raw direct sum firstly $M_f$ "without" quotient structure induced by $f$) which is defined piecewise exactly like $H$ as above.
But here occures the same problem as above because I wan't again glue the images of two piecewise defined functions in the sum. It's clear that such method would be succeed if I would map into a product (by universal property because I have maps $A \times B \to A$; resp $A \times B \to B$) but for a map in a sum I haven't such tools.
If I would be able to proof to continuity of $\widetilde{H}$ then I'm ready:
Concatenate $\widetilde{H}$ with canonical projection $pr: M \to M_f$ into the quotient, and consider that Spr \circ \widetilde{H}S factorise over the pullback $(M \times I)_f \cong M_f \times I$. Last isomorphy holds, because the functor $ - \times I$ is a left adjunction so commutatates with colimits (so with quotients /coequilizers).
The only problem which stays unsolved for me:
How to show that $\widetilde{H}: M \times I \to M$ (as defined piecewise like $H$: see above) is continuous?