I would like to prove the following basic fact related to the fundamental group:
A loop $\gamma : [0,1] \rightarrow X$ is null homotopic if and only if it can be extended to a continuous function of the disk $D^2$.
Can you tell me if this is correct:
I'll use the following fact (without proof):
$(*)$ If $X$ is a cell complex and $A$ is a subcomplex and $(X,A)$ has the homotopy extension property and $A$ is contractible and $q:X \rightarrow X/A$ is the projection into the quotient space then $q$ is a homotopy equivalence.
$\implies$ Let $\gamma $ be homotopic to the constant function $c$, i.e. there exists a homotopy $h_t: [0,1] \times [0,1] \rightarrow X$ with $h_0 = \gamma$ and $h_1 = x_0$. To make $h_t$ into a function from $D^2$ rather than $I \times I$ one can quotient $I \times I$ by the relation that identifies points in the set $A := \{0 \} \times I \cup I \times \{1\} \cup \{1\} \times I$ which is part of the border of the square $I \times I$. $I \times I / A$ is homeomorphic to $D^2$ and by $(*)$, homotopy equivalent to $I \times I$. Furthermore, its border after quotienting is homeomorphic to $S^1$. Now instead of viewing $\gamma $ as a function from $[0,1]$ with $\gamma(0) = \gamma(1) = x_0$ one can equivalently view it as a function from $S^1 = [0,1] / \{0,1\}$. If $q:I \times I \rightarrow I \times I / A$ is the quotient map then the function $h_t \circ q^{-1} : I \times I / A \rightarrow I \times I \rightarrow X$ is a function from $D^2$ to $X$ with the desired property that restricted to $S^1$ it coincides with $\gamma$.
$\Longleftarrow$ Let $\Gamma : D^2 \rightarrow X$ be a function that coincides with $\gamma$ on $S^1$. $D^2$ is contractible, i.e. there exists a homotopy $h_t : I \times D^2 \rightarrow X$ such that $h_0 = id_{D^2}$ and $h_1 = id_*$. Then $\Gamma \circ h_t$ is a homotopy $\gamma \simeq c$.
I would be very grateful if you not only could check this for mistakes but also tell me if there is a shorter or better way of doing something. Thanks!