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?