$X\times X\simeq X$ implies $X$ is contractible? I've seen claimed in several papers that, given a space $X$, if $map(S^0,X)$ is homotopy equivalent to $map(*,X)$, then $X$ is contractible. I don't know why this is so.
It is clear to me that $map(S^0,X)\simeq X\times X$ and $map(*,X)\simeq X$ and the homotopy equivalence $X\times X\simeq X$ induced by $map(S^0,X)\simeq map(*,X)$ is simply a projection -say, onto the first factor. So the questions boils down to prove that $X\times X\simeq X$ (given by the projection) implies $X\simeq *$. I'm not sure how to prove this fact.
My idea is to replace $X$ by $X\times *$ and consider the homotopy equivalence $X\times X\simeq X\times *$ given by $(x,y)\mapsto (x,*)$. From this I'd like to prove that its components are homotopy equivalences.
I've seen this question asking precisely if the components of a homotopy equivalence are homotopy equivalence but it doesn't have an accepted answer (and the existent answer doesn't satisfy me because since we don't know exactly what is $G$, I don't see how the equalities of compositions follow).
 A: I'll give it a try, although I'm not topologist.
The projection $pr_1: X \times X \rightarrow X$ is a homotopy equivalence, which means that there is a map $(f, g): X\rightarrow X\times X$, sending $x$ to $(f(x), g(x))$, such that the compositions with $pr_1$ are homotopy equivalent to identity maps.
So we have $\Phi = (f, g)\circ pr_1$ which sends $(x, y)$ to $(f(x), g(x))$, and we know that it's homotopy equivalent to $\operatorname{Id}_{X\times X}$.
This means that there is a continuous map $h:X\times X\times [0, 1]\rightarrow X\times X$, such that $h(x, y, 0) = (x, y)$ and $h(x, y, 1) = (f(x), g(x))$.
Now pick any point $x\in X$ and define a map $u:X\times[0, 1]\rightarrow X$ such that $u(y, t) = pr_2\circ h(x, y, t)$. We have then $u(y, 0) = y$ and $u(y, 1) = g(x)$.
Therefore the identity map on $X$ is homotopy equivalent to the constant map sending any point to $g(x)$, and we are done.
A: This is only true assuming $X$ is nonempty.  Suppose $X$ is nonempty and the first projection $p:X\times X\to X$ is a homotopy equivalence, with homotopy inverse $f:X\to X\times X$.  Fix a point $a\in X$ and let $i:X\to X\times X$ be the map $i(x)=(x,a)$.  Since $pi=1_X$, $f=fpi\simeq 1_{X\times X}i=i$, so in fact $i$ is a homotopy inverse to $p$.
Let $H:X\times X\times I\to X\times X$ be a homotopy from the identity to $ip$, so $H(x,y,0)=(x,y)$ and $H(x,y,1)=(x,a)$.  Now simply observe that if we define $h:X\times I\to X$ by $h(x,t)=q(H(x,x,t))$ where $q:X\times X\to X$ is the second projection, then $q$ is a homotopy from the identity map on $X$ to the constant map with value $a$.  Thus $X$ is contractible.
