Given that a topological space $X$ is path connected, I need to show that $X$ is simply connected iff every continuous $f:S^1 \rightarrow X$ has a continuous extension to the unit disc. My professor explained to me the proof of the $\leftarrow$ direction but I didn't quite understand it:
$\Leftarrow$: Suppose that every continuous map from $S^1$ to $X$ has a continuous extension to the unit disc $D$. Let $x_0 \in X$ and let $\sigma$ be a loop at $x_0$. We need to show that $\sigma \simeq x_0$.
Let $\phi:I \rightarrow S^1$ be given by $\phi(s) = e^{2\pi{}is}$, and let $\bar{\sigma}: S^1 \rightarrow X$ be given by $\bar{\sigma}(e^{2\pi{}is}) = \sigma(s)$. We have that $\bar{\sigma} \circ \phi = \sigma$. Also, $\bar{\sigma}$ is a continuous map from $S^1$ to $X$, so there is a continuous function $\bar{F}: D \rightarrow X$ with $\bar{F}|_{S^1} = \bar{\sigma}$. Finally, let $\Phi:I \times I \rightarrow D$ be the map $\Phi(s, t) = te^{2\pi{}is}$. Our homotopy from $x_0$ to $\sigma$ is given by $F = \bar{F} \circ \Phi$.
It is not clear to me why this is a homotopy. Obviously $F(s, 1)$ = $\bar{F}(e^{2\pi{}is}) = \bar{\sigma}(e^{2\pi{}is}) = \sigma(s)$ as desired, but we also need $F(s, 1) = F(0, t) = F(1, t) = x_0$, and it's not clear to me why this should be the case. Any help is appreciated, thank you.
So indeed $F(s,1)=\bar{F}(\Phi(s,1))=\bar{F}(e^{2\pi is})=\bar{\sigma}(e^{2\pi is})=\sigma(s)$.
But now you need to show that $F(s,0)=F(0,t)=F(1,t)=x_0$. So we calculate: $F(s,0)=\bar{F}(0)$ (meaning $F$ is a free homotopy between $\sigma$ and constant $\bar{F}(0)$) and $F(0,t)=F(1,t)=\bar{F}(t)$ (which is not quite enough for it to be a path homotopy). Note that $t\in[0,1]$ and we treat the interval $[0,1]$ as a subset of the complex plane $\mathbb{C}$, formally $[0,1]\times\{0\}$.
Warning: be aware that in general the existance of a free homotopy need not imply the existance of a based homotopy. We need to do some work in this particular case.
So the question is: can we choose $\bar{F}$ in such a way that $\bar{F}(t)=x_0$ for all $t\in[0,1]\subseteq\mathbb{C}$? We know that $\bar{F}(1)=x_0$ because $\bar{\sigma}(1)=\sigma(0)=x_0$.
So lets ask another question: does there exist a continuous function $\Psi:D\to D$ such that $\Psi(z)=z$ for $z\in S^1$ and $\Psi(t)=1$ for $t\in[0,1]$? If such function exists then you simply modify $\bar{F}$ by taking $\bar{F}\circ\Psi$.
And indeed since $S^1\cup[0,1]$ is closed and $\Psi$ restricted to that subset is continuous then such function exists by the (generalized) Tietze extension theorem (together with the fact that $D$ is a retract of $\mathbb{R}^2$). There might be an explicit formula but I just couldn't figure it out.