# Homotopy on $S^{n-1}$ extends to homotopy on $D^n$

I have the following problem:

I have $$\beta:D^n\to Z$$ such that $$\beta\circ i\simeq h$$, where $$i:S^{n-1}\hookrightarrow D^n$$ is the inclusion and $$h:S^{n-1}\to Z$$ some map. Then is there a $$\beta':D^n\to Z$$ with $$\beta\simeq\beta'$$ such that $$\beta'\circ i=h$$?

I've looked for the answer a bit online, and I've understood that this condition is being a cofibration, but I didn't explicitly see the proof that $$i:S^{n-1}\hookrightarrow D^n$$ is a cofibration.

It clearly suffices to show that there exists a retraction $$r : D^n \times I \to D^n \times \{0\} \cup S^{n-1} \times I$$. In fact, the map $$\beta$$ and the homotopy $$\varphi: \beta \circ i \simeq h$$ can be pasted to a continuous $$\phi : D^n \times \{0\} \cup S^{n-1} \times I \to Z$$ and $$\phi \circ r$$ is what you desire.

Define $$r(x,t) = \begin{cases} (\frac{2x}{2-t},0) & \lVert x \rVert \le \frac{2-t}{2} \\ (\frac{x}{\lVert x \rVert},2 - \frac{2-t}{\lVert x \rVert}) & \lVert x \rVert \ge \frac{2-t}{2} \end{cases}$$ This is a well-defined continuous map because

1. $$\lVert \frac{2x}{2-t} \rVert \le 1$$ for $$\lVert x \rVert \le \frac{2-t}{2}$$

2. $$1 \ge t \ge 2 - \frac{2-t}{\lVert x \rVert} \ge 0$$ for $$1 \ge \lVert x \rVert \ge \frac{2-t}{2}$$

3. For $$\lVert x \rVert = \frac{2-t}{2}$$ both parts yield the same value.

For $$t=0$$ we get $$\frac{2-t}{2} = 1$$ and thus $$r(x,0) = (x,0)$$ for all $$x \in D^n$$. For $$x \in S^n$$ we have $$r(x,t) = (x,t)$$. Thus $$r$$ is a retraction.

There is a nice geometric interpretation of $$r$$: For each $$(x,t)$$ consider the line $$L_{x,t}$$ through $$(0,2)$$ and $$(x,t)$$. This line intersects $$D^n \times \{0\} \cup S^{n-1} \times I$$ in a single point $$r(x,t)$$.

Remark:

It is very easy to see that for a closed subspace $$A \subset X$$ the inclusion $$i : A \to X$$ is a cofibration if and only if $$X \times \{0\} \cup A \times I$$ is a retract of $$X \times I$$. See for example Retraction induces Cofibration . This is also true for non-closed $$A \subset X$$, but the proof is sophisticated. See

Strøm, Arne. "Note on cofibrations II." Mathematica Scandinavica 22.1 (1969): 130-142.