# a map with contractible domain must be nullhomotopic

Let $f:X\to Y$ be a map between top spaces $X$ and $Y$. Is the following true?

If $X$ is contractible then $f$ must be nullhomotopic.

Here is an argument:

Since $X$ is contractile then $id_X\simeq c$ where $c:X\to X;x\mapsto *_X$. Let $H_t:X\to X$ be this homotopy, that is, $H_0=id_X$ and $H_1=c$. then the map $G_t:X\to Y; x\mapsto f\circ H_t(x)$ is a homotopy between $f$ and $c':X\to Y; x\to *_Y$.

I don't see what is wrong with this argument since it can't be true knowing that $I$ is contractible hence all loops are nullhomotopic which implies that all fundamental groups are trivial!!

-
A loop has a circle $S^1$ as domain , not $I$. So homotopy theory is not trivial, after all... – Georges Elencwajg Feb 29 '12 at 12:02
yes but this is the same thing as a map with domain $I$ sending $1$ and $0$ to the basepoint. So yes it is a map with domain $I$ – palio Feb 29 '12 at 12:39
This was my original thought as well, and then I realised what you said about maps from $S^1$ being special kinds of maps from $I$ and didn't have time to think it through to ineff's conclusion below. Thinking of loops as maps from $S^1$ means you don't have to put extra conditions on the map and also means you can avoid relative homotopy. – Matthew Pressland Feb 29 '12 at 13:00

Your proof is correct and also your conclusion is correct too, because every loop is homotopic to the null path as continuous function. The point is that the homotopy that you have created is a homotopy of continuous functions but not a homotopy of paths because it doesn't fix the starting and the ending point during the deformation of the path. To do that you should have used a homotopy relative to the set $\{0,1\} \subset [0,1]$, and an homotopy of this type doesn't exists.