I already asked about the interpretation of this problem here. Now I would like to ask about the solution. The problem is
Let $A\subseteq X$ be a contractible space. Let $a_0\in A$. Is the embedding $f: X\setminus A\to X\setminus\{a_0\}$ a homotopy equivalence?
I'm not very bright, and this is very difficult for me. I think I've solved this problem though:
Let $X=[0,1]\cup\{2\},\, A=[0,1],\,a_0=0.$ Then $X\setminus A=\{2\}$ and $X\setminus\{a_0\}=(0,1]\cup\{2\}.$ There is exactly one function $g:(0,1]\cup\{2\}\to \{2\}$ so I only have to check if $f\circ g$ and $g\circ f$ are homotopic to the appropriate identity functions. $g\circ f=\mathrm{id}_{\{2\}}$, so this one is OK. I have to check if $f\circ g$ is homotopic to $\mathrm{id}_{(0,1]\cup\{2\}}.$ Suppose there is a homotopy $H(x,t).$ Then $H(1,t)$ is a path from $1$ to $2$ in $(0,1]\cup \{2\},$ which is a contradiction.
So it's not true, if that is correct. But I took a non-connected $X$. I remember that during the course some verbal agreements were made that we generally consider all spaces connected and Hausdorff, and maybe even more. Unfortunately, I don't remember it very well. And I'm not sure the agreement applied to this problem. But regardless of that I would like to know if this is still false when $X$ is connected. Or even more: what conditions on $X$ do I need for this to be true?
I'm asking this because I feel that I'm cheating in my solution. I feel I haven't really understood the problem, despite a lot of time and effort I've put into it.