# Two spaces homotopy equivalent to eachother, attaching maps, Algebraic Topology.

I have a question regarding algebraic topology with which I was hoping someone could help me with. I've managed to show the following:

If $f,g:S^{n-1} \to X$ are homotopic maps, then $X\sqcup_fD^n$ and $X\sqcup_gD^n$ are homotopy equivalent. I showed this by showing they were both deformation retracts of the same space, $Y=X\sqcup_F(D^n\times I)$ where $F$ is my homotopy between maps $f$ and $g$.

I feel like this result could help me with the following question:

Let $f:S^{n-1} \to X$ be a map and $g:X \to Y$ be a homotopy equivalence. Show that $X\sqcup_fD^n\simeq Y\sqcup_{f\circ g}D^n$.

Could I do this similarly as with my original problem. Since if $g$ is a homotopy equivalence between $X$ and $Y$, this tells me that $X\simeq Y$, so they are deformation retracts of a larger space, say Z.

Would I then show $X\sqcup_f D^n$ and $Y\sqcup_{f\circ g}D^n$ are deformation retracts of some larger space $W=Z\sqcup_f (D^n\times I)$? If I retract $Z$ to $X$ and $(D^n\times I)$ to $(D^n\times${$0$}$) \cup (S^{n-1}\times I)$, is it valid for me to apply my map $g$ and yield that $Y\sqcup_{f\circ g}D^n$ is a deformation retract of my larger space $W$?

• I'd like to point our a common terminology mistake. Spaces are "homotopy equivalent;" maps are "homotopic." Jun 8, 2013 at 17:36
• Yes, thank you. I'll edit that now!
– Alex
Jun 9, 2013 at 11:12
• The following is relevant:mathoverflow.net/questions/96071/… Mar 17, 2016 at 15:01

Note that $(D^n,S^{n-1})$ has the homotopy extension property (HEP). The salient point of my proof is a retraction of $B\times I\times I$ onto $(A\times I\times I)\ \cup\ (B\times\{0\}\times I)\ \cup\ (B\times I\times\{0\}),$ whenever $(B,A)$ has the HEP.
For $(s,t)\in I\times I$ let $s^*(s,t)=||(s,t)-d(s,t)||/||(1,1)-d(s,t)||$. Let $r$ be the retraction of $B\times I$ onto $A\times I\ \cup\ X\times\{0\}$ with coordinates $(r_x,r_s)$, and let $d:I\times I\ \longrightarrow\ I\times\{0\}\ \cup\ \{0\}\times I$ be a retraction. Now define $R:B\times I\times I\ \longrightarrow\ (A\times I\times I)\ \cup\ (B\times\{0\}\times I)\ \cup\ (B\times I\times\{0\})$, $(x,s,t)\mapsto(r_x(x,s^*),\ \ d(s,t)+r_s(x,s^*)\cdot[(1,1)-d(s,t)])$. It is not difficult to prove that $R$ is a well-defined retraction.
Two spaces are homotopy equivalent iff they are strong deformation retracts of a larger space, and this larger space can be chosen to be the mapping cylinder $M(g)=Y\cup X\times I$, where $(x,1)\sim g(x)$. Then you can glue $B\times I$ in a canonical way, by the map $f\times\text{Id}_I$. There are maps $X\times0\xleftarrow{\ \ r\ \ }M(f)\xrightarrow{g\circ p_X}Y$ where $r$ is a deformation retraction, meaning there is a $k:M(f)\times I\to M(f),\ k(-,1)=r,\ k(-,0)=\text{Id}_{M(f)}$, a homotopy from $r$ to the identity. The map $g\circ p_X$ is a retraction homotopic to the identity via the map $h$ such that $h(x,s,t)=(x,t+s-ts)$.
Let us define a map $K:(M(f)\cup_{f\times Id} B\times I)\times I\ \longrightarrow\ M(f)\cup_{f\times Id}B\times I$ whose restriction onto $B\times I\times I$ is defined in the following way: We have shown that $B\times I\times I$ retracts onto $A\times I\times I\ \cup\ B\times(\{0\}\times I\cup I\times\{0\})$ A map on the first term is given by $k\circ(f\times\text{Id}_I\times\text{Id}_I)$, and one on the second term by $(b,s,t)\mapsto(b,s)$. They coincide on the common domain, and so they induce a map $K':B\times I\times I\to M(f)\cup_{f\times Id}B\times I$. We then combine $K'$ with $k$ on the cylinder to obtain $K$. One can then check that this is a deformation retraction onto $X\times\{0\}\cup_{f\times 0}B\times\{0\}$.
What is left is to find a deformation retraction onto $Y\cup_{gf}B$. But this one can even be explicitly written down, and the formula is practically the same as for $h$.