# Proof that $X$ contractible $\iff \forall f:X \rightarrow Y$ : $f \cong const.$

I'm reading Hatcher and I did exercise 10 on page 19. Can you tell me if my answer is correct? Many thanks for your help!

Claim: $X$ contractible $\Leftrightarrow \forall$ arbitrary maps $f:X \rightarrow Y$, $Y$ arbitrary, $f \cong const.$

Proof:

$\implies$

Given the homotopy $H: I \times X \rightarrow X$, $H(0,x) = id_X$, $H(1,x) = id_{ \{ \ast \}}$ and an arbitrary map $f: X \rightarrow Y$ construct a homotopy $H^\prime: I \times X \rightarrow Y$, $H^\prime(0,x) = f(x)$, $H^\prime(1,x)=const_{y_0 \in Y}$ as follows:

$H^\prime (t,x) := f(H(t,x))$.

Note that even though not stated in the exercise, $f$ is assumed to be continuous. (At least I think that's the case)

$\impliedby$

Given $\forall f:X \rightarrow Y$: $f \cong const.$ we pick $Y := X$ then $f:X \rightarrow X$ $\cong const_{x_0} \forall f$. Now pick $f := id_X$.

Second part of question:

Claim: $X$ contractible $\iff \forall f: Y \rightarrow X$: $f \cong const_X$

Proof:

$\implies$

Define $H^\prime(t,x) := H(t, f(x))$.

$\impliedby$

Choose $Y:=X$ and $f:=id_X$.

-
LaTeX tip: try using P \iff Q ($P \iff Q$) instead of P \Leftrightarrow Q ($P \Leftrightarrow Q$). It's faster to type and notice the difference in spacing. Also consider using its companion commands P \implies Q ($P \implies Q$) and Q \impliedby P ($Q \impliedby P$). –  kahen Mar 10 '11 at 9:26
@kahen: thanks! will do. –  Rudy the Reindeer Mar 10 '11 at 9:29

This looks basically right, although to nitpick I might argue that you should either write that $H(0,-)=id_X$ and $H(1,-)=const._*$ (both as maps $X\rightarrow X$) or you should write that $H(0,x)=x$ and $H(1,x)=*$ for all $x\in X$.

Also, I think I can confidently say that you can assume every map in any topology book is assumed to be continuous. Similarly, any function of groups can generally be assumed to be a homomorphism, etc. The fancy way of saying this here is that we're working in the category of topological spaces, whose morphisms are continuous maps.

-
On page 1 of Hatchers Algebraic Topology you find the sentence: To avoid overusing the word ‘continuous’ we adopt the convention that maps between spaces are always assumed to be continuous unless otherwise stated. –  drhab Sep 24 '13 at 9:05