Homotopy equivalent subspace implies inclusion map is homotopy equivalence

algebraic-topologygeneral-topologyhomotopy-theory

So, I see this question was answered here, but I don't see how this is a counter-example. Also, I'm very confused because the book I'm reading gives the following definition (in Spanish, so I'll translate it):

We say $(A,\tau_A)\subset (X,\tau)$ is a $\textit{weak deformation retract}$ if there exists $r:(X,\tau)\to(A,\tau_A)$ continuous such that $ri\simeq 1_A$ and $ir\simeq 1_X$. That is, if $(X,\tau)$ and $(A,\tau_A)$ are homotopy equivalent.

So, the author is assuming that if these two spaces are homotopy equivalent, the inclusion is a homotopy equivalence, which I don't find obvious and I've been trying to prove it with no luck. Then I found the "counter-example" which I linked, but the author of this book keeps assuming this in the listed examples following the definition, so it wasn't a mistake, the author really takes this for a fact. Can you give me a properly explained counter-example please? Or, if the author of my book is correct, can you give me an idea of the proof?

Thanks in advance!

Best Answer

The textbook is wrong, and the answer you linked to is right. Here's an even simpler example. Let $X$ be an infinite discrete space, and let $A$ be $X$ minus one point. Then $X$ and $A$ are homeomorphic and therefore homotopy equivalent. Bur the inclusion map $i$ is not a homotopy equivalence. Indeed, if $r:X\to A$ is any map and if $p$ is the point in $X-A$, then $i(r(p))\neq p$ and there is no path from $i(r(p))$ to $p$. Therefore, there is no homotopy from $i\circ r$ to the identity map.