## Contractible space as Codomain implies any two maps Homotopic

Recall that a space Y is contractible if the identity map $\text{id}_Y$ is homotopic to a constant map. Let Y be contractible space and let X be any space. Then, for any maps $f,g: X\to Y$, $f\simeq g$.

Proof: Let Y be a contractible space and let X be any space. $\text{id}_Y\simeq c$, where $c$ is a constant map. There exists a map $F: Y\times [0,1]\to Y$ such that $F(y,0)=\text{id}_Y(y)=y$, for $y\in Y$. $F(y,1)=c(y)=b$ for some point $b\in Y$.

Let $f,g: X\to Y$ be any two maps. Consider $G:X\times [0,1]\to Y$ where $G(x,t)=\begin{cases} F(f(x),2t),&\ \ \ \text{for}\ 0\leq t\leq 1/2\\ F(g(x),-2t+2),&\ \ \ \text{for}\ \frac 12

When $t=\frac 12$, $F(f(x),1)=b$, $F(g(x),1)=b$. Therefore G is cts.

$G(x,0)=F(f(x),0)=f(x)$,

$G(x,1)=F(g(x),0)=g(x)$.

Therefore $f\simeq g$.