Mapping cylinder cofibration Let $f:X\to Y$ be a continuous map, and let $M_f = (X\times I) \sqcup Y)/(x,0)\sim f(x)$ be its mapping cylinder.
Then the inclusion $X\to M_f$ is a cofibration.
My attempt:
Using the following theorem from Bredon seems like the most promising route:

1.5. Theorem. Assume that $A \subset X$ is closed and that there exist a neighbourhood $U$ of $A$ and a map $\phi : X \to I$, such that:
  
  
*
  
*$A = \phi ^{-1} (0)$;
  
*$\phi (X \setminus U) = \{ 1 \}$;
  
*$U$ deforms to $A$ through $X$ with $A$ fixed. That is, there is a map $H : U \times I \to X$ such that $H(a,t) = a \ \forall a \in A$, $H(u,0) = u$, and $H(u,1) \in A \ \forall u \in U$.
  
  
  Then the inclusion $A \hookrightarrow X$ is a cofibration. The converse also holds.

Let us define a map $$\phi: M_f \to I, \quad (x,t)\mapsto \min(1,2-2t);\,\, y\mapsto 1$$
Then $\phi^{-1}(0) = X \times \{1\}$. Let $U$ be the upper half of the mapping cylinder. Then $\phi(U^c) = \{1\}$. Also, $X\times \{1\}$ is a strong deformation retract of $U$ I think.
So, by the theorem, the inclusion $X\to M_f$ is a cofibration.
I'm not sure if I'm on the right track. Is there a better way to do this? Is my way correct?
 A: As the OP was asking for it, here's a rigorous argument as to why $X\times\{1\}$ is a deformation retract of $U$.
The set $U$ is $X\times\left(\frac12,1\right]$, and its product topology makes it a subspace of $M_f$ since it is open and consists of entire equivalence classes. One possible map $U\times I\to M_f$ deforming $U$ onto $X\times\{1\}$ would be
$$(x,s,t)\mapsto (x,t+(1-t)s)$$
as a map $U\times I\to X\times I\to M_f$ or, I you like, a map $U\times I\to U\hookrightarrow M_f$
A: I'm not sure if it couldn't be shortened. Please, correct me if I'm wrong.
All we have to show is that this inclusion allows us to extend homotopies.
Sorry, I don't know how to draw diagrams; it would be easier, but it's late now.
So we have homotopy $F: X \to P(Y)$ (the cocylinder to $Y$) and $i: X \to Z(X)$ (the cylinder of $X$) together with $f: Z(X) \to Y$ and $p: P(Y) \to Y$
and want to construct $F': Z(X) --> P(Y)$ in such a way that the appropriate diagram would be commutative. But this is easy (I suppose), because $i$ is a homotopy equivalence, so we can take its inverse $j$ and take $F'=Fj$ and it would be fine. Right?
Take care!
