How can I prove the following:
If $X\supseteq K$ is contractible, then the quotient $X/K$ is homotopy equivalent to $X$?
Since $K$ is contractible, we have a homotopy $H:id_K\!\simeq\!c_{k_0}$ between the identity and the constant map $K\rightarrow\{k_0\}\!\subseteq\!K$. We are trying to find $f:X\rightarrow X/K$ and $g:X/K\rightarrow X$, such that $f\circ g\simeq id_{X/K}$ and $g\circ f\simeq id_X$.
Most probably, $f$ must be the quotient projection, but what about $g$? I thought about defining $g$ as $x\!\in\!X\setminus K\mapsto x$ and $k\!\in\!K\mapsto k_0$, but is this continuous? Probably not. What else then?
Theorem: The fundamental group of a finite graph $X$ is free.
Proof: if $T$ is the maximal (spanning) tree of $X$, and $E$ the set of edges ($1$-cells) not in $T$, then $T$ is contractible and $X$ is homotopy equivalent to $X/T$, which is (homeomorphic to) a bouquet of circles $\bigvee_{i=1}^{|E|}\mathbb{S}^1$. Therefore $\pi_1(X)\cong F_E$, the free group on the set $E$. $\blacksquare$
Are infinite trees also contractible?