Homotopy equivalence iff both spaces are deformation retracts

I'm trying to prove that

$f: X \rightarrow Y$ is a homotopy equivalence $\iff$ $X$, $Y$ are both homeomorphic to a deformation retract of a space $Z$

The $\Leftarrow$ was not a problem. If both are deformation retracts it follows that $Z \simeq X$ and $Z \simeq Y$ and by transitivity $X \simeq Y$.

The first half of $\Rightarrow$ was also not a problem, because using the mapping cylinder $Z_f$ as their common super-space, $X \times I$ can be deformation-retracted down to $Y$ by the homotopy $(x,s,t)\mapsto (x,st)$, i.e. along a vertical line.

Now I'm stuck with the deformation retraction of $Z_f$ onto $X$. For example, do I construct a homotopy from $Z_f$ to $X \times I$ and then to $X$ or directly from $Z_f$ to $X$? I'm also not sure where to use $f \circ g \simeq id_Y$ and $g \circ f \simeq id_X$ and $id_{Z_f} \simeq i \circ r_Y$, where $r_Y$ is the retraction from $Z_f$ onto $Y$.

I'm tempted to do something like this but it doesn't seem to lead anywhere: $i \circ r_Y \simeq id_Y \simeq f \circ g$.

Can someone help me finish this proof? I'd much appreciate any help!

-
I believe this uses obstruction theory. –  Aaron Mazel-Gee Apr 17 '11 at 20:31
@Aaron: Are you sure? I just looked up what it means but what I'm trying to prove doesn't need CW complexes. –  Rudy the Reindeer Apr 17 '11 at 20:42
Ah, you're right. Obstruction theory is supposed to give you a dimension-by-dimension complete obstruction to deforming a CW complex onto a CW subcomplex. You could possibly talk about how any space is weakly homotopy equivalent to a CW complex (and same for a pair), but that shouldn't be needed here. I'd like to say that it follows from the fact that the inclusion $X \hookrightarrow Z_f$ is a weak homotopy equivalence, although that route requires that you be working with CW-complexes too. It probably boils down to the same thing, anyways. –  Aaron Mazel-Gee Apr 17 '11 at 21:32

The key point is that the inclusion of $X$ into the mapping cylinder is a cofibration. It is a general fact that if $A \hookrightarrow B$ is a cofibration and a homotopy equivalence, then $A$ is a deformation retract of $B$. One way to think of this is to use the model structure on topological spaces (due to Strom) where (closed) Hurewicz cofibrations are cofibrations, Hurewicz fibrations are fibrations, and weak equivalences are homotopy equivalences.

So let's prove the following more general fact. Let $A \hookrightarrow B$ be an acyclic cofibration in a (closed) model category, where $B$ is fibrant. Then $B$ "deformation retracts" onto $A$. Let us assume that our model categories have functorial factorizations, so there is always a functorial cylinder object $A \times I$ for $A$.

To see this, let us first show that $B$ retracts onto $A$. By replacing the model category with the model category of objects under $A$, we can assume that $A$ is the initial object $\emptyset$, and $B$ is cofibrant in such a way that $\emptyset \to B$ is a weak equivalence. This we can do by considering the lifting diagram with $\emptyset \to B$ and $\emptyset \to \ast$ (where $\ast$ is the final object). We get a retraction $B \to \emptyset$.

Now we want a "deformation retraction." Let us consider the two maps $B \rightrightarrows B$ given by the identity and the retraction. We want a homotopy between the two. But we can consider the lifting diagram with $B \sqcup B \to B \times I$ (for $B \times I$ a cylinder object) and $B \to \ast$. Since $\emptyset \to B$ is an acyclic cofibration, so is $\emptyset \to B \sqcup B$, and two-out-of-three shows that $\emptyset \to B \times I$ is a weak equivalence too; thus $B \sqcup B \sqcup \emptyset \times I \to B \times I$ is a trivial cofibration. Thus a lifting exists in the diagram, which is the map $B \times I \to B$ that we wanted.

-
Dear Akhil, while I like this answer, I think it is using a bit too highfalutin' language (to use a word I learned from Hovey). AFAIK Matt just started reading Hatcher a few weeks ago... –  t.b. Apr 17 '11 at 20:35
@Theo: Thanks, that's right. I gave him an upvote and started to look up the funny words. "Cofibration" seems to be another way of saying "satisfies the homotopy extension property". Now I try and see if I can understand the rest. –  Rudy the Reindeer Apr 17 '11 at 20:48
@Matt, @Theo: My apologies, I hadn't attempted to verify the OP's background. In fact no model category formalism is needed, though I think the cofibration property is what gets you it. I need to get back to work at the moment, but will try to work out another proof and post it later tonight (if memory serves it's in the first chapter of Spanier's Algebraic topology). –  Akhil Mathew Apr 17 '11 at 20:55
@Akhil: no need to apologise. Seeing a high-level proof is also useful to me. As for my background: there was no way you could've known and I'm surprised at @Theo's good memory : ) –  Rudy the Reindeer Apr 18 '11 at 7:23
@Matt: If you're reading Hatcher, this is at the bottom of page 16. –  Chris Eagle Apr 19 '11 at 8:18

Ok, here is a proof taken from Lee's Introduction to topological manifolds pp. 207:

claim: $X \times [0,1]$ is a deformation retract of $Z_f$

proof:

(DEF) mapping cylinder $Z_f$ If $f: X \rightarrow Y$ is a continuous map then its mapping cylinder $Z_f$ is the space $X \times [0,1] \cup Y / \sim$ where $\sim$ identifies two points $x \in X$ and $y \in Y$ if $f(x) = y$.

(i) Let $r_Y$ be the retraction of $Z_f$ onto $Y$ in $Z_f$, $r_Y:Z_f \rightarrow Z_f$: $$\begin{array}{ccc} [x,s] & \mapsto & [x, 0] \\ [y] & \mapsto & [y] \\ \end{array}$$

(ii) Let $h_1$ be a homotopy from $id_X$ to $r_Y$, $h_1: Z_f \times [0,1] \rightarrow Z_f$: $$\begin{array}{ccc} [x,s], t & \mapsto & [x, s(1-t)] \\ [y], t & \mapsto & [y] \\ \end{array}$$

(iii) Let $F:Y \times [0,1] \rightarrow Y$ be the homotopy from $f\circ g$ to $id_Y$

(iv) Let $G:X \times [0,1] \rightarrow X$ be the homotopy from $g \circ f$ to $id_X$

(v) if $B: Z_f \rightarrow Z_f$ is the map $$\begin{array}{ccc} [x,s] & \mapsto & [g(f(x)),0] \\ [y]& \mapsto & [g(y),0] \\ \end{array}$$

then $h_2:Z_f \times [0,1] \rightarrow Z_f$ is a homotopy from $r_Y$ to $B$: $$\begin{array}{ccc} [x,s], t & \mapsto & [F(f(x), 1-t] \\ [y], t & \mapsto & [F(y, 1 - t)] \\ \end{array}$$

(vi) and if $r_X: Z_f \rightarrow Z_f$ is the retraction of $Z_f$ onto $X$: $$\begin{array}{ccc} [x,s], t & \mapsto & [G(x, s), 1] \\ [y], t & \mapsto & [g(y), 1] \\ \end{array}$$

then $h_3: Z_f \times [0,1] \rightarrow Z_f$ is a homotopy from $B$ to $r_X$: $$\begin{array}{ccc} [x,s], t & \mapsto & [G(x, st), t] \\ [y], t & \mapsto & [G(g(y), t)] \\ \end{array}$$

With $[f(x)] = [x,0]$ (because $[y] = [x,0]$ if $f(x) = y$) one sees that $$r_X \simeq B \simeq r_Y \simeq id_{Z_f}$$ where $B = h_2(.,1) = h_3(.,0)$.

Even given the proof it doesn't seem obvious to me. Particularly frustrating is that I think I'd be able to reconstruct it but it doesn't feel "natural" or intuitive.

-
Matt, I find this incredibly difficult to parse. What exactly are you doing? Maybe it helps your own understanding if you're trying to explain it to me (I'm going to play very stupid and stubborn). As a start, I suggest you give a definition of the mapping cylinder. Then make domain and range of each map explicit and say in words what it's supposed to be and what it does geometrically. –  t.b. Apr 19 '11 at 8:39
@Theo: done! Although, it doesn't seem any more intuitive to me. –  Rudy the Reindeer Apr 21 '11 at 9:59
@Matt- Intuitively the mapping cylinder sort of shows the what the map does for each point in the domain; you can follow the point along the cylinder until you hit its image. Clearly the mapping cylinder deformation retracts to $Y$ (just smash it down!), so the only thing to show is that, in the case of an equivalence, you can deformation retract to the top. –  Dylan Wilson Apr 21 '11 at 10:47
I'll have a closer look at it tomorrow. –  t.b. Apr 21 '11 at 21:49
Here's a first comment: Your definition of the mapping cylinder seems to be messed up a little. It should be of the form $CX \amalg Y / \!\!\sim$, see Hatcher, p.16. Maybe this already clears the confusion a little (together with @Dylan's comment). –  t.b. Apr 22 '11 at 12:40