Counterexample to "Contracting an Edge is a Homotopy Equivalence". It is known that if $X$ is a CW complex and $A$ is a contractible subcomplex of $X$ then $X\to X/A$ is a homotopy equivalence.
I am trying to find a counter example to this when $X$ is not as nice as a CW complex and $A$ is an "edge".
More precisely, I want to find a space $Y$ with two points $y_1$ and $y_2$ in $Y$ such that if $X$ is formed from $Y$ by attaching the left end point of the closed interval $I=[0,1]$ to $y_1$ and the right end point to $y_2$, then $X$ is not homotopically equivalent to $Y/\{y_1, y_2\}$.
What I thought of is the following:
Let $Y\subseteq \mathbf R^2$ be the space defined as $Y=[0, 1]\times \{0\} \cup\bigcup_{0\leq r\leq 1,\ r\in \mathbb Q}\{r\}\times [0, 1]$.
Let $y_1=(0, 1)$ and $y_2=(1, 1)$.
Then the space $X$ formed by attaching an edge is homotopically equivalent to a circle, since $X$ deformation retracts to a circle.
On the other hand, I have a feeling that $Y/\{y_1, y_2\}$ is homotopically different from a circle.
Though I am not able to prove it.
 A: Here's a very simple example: let $Y=\{y_1,y_2\}$ with the indiscrete topology.  Then $X$ is homotopy equivalent to a circle (it deformation-retracts onto $X\setminus\{y_2\}\cong S^1$ by just moving $y_2$ to $y_1$ at any time), but $Y/\{y_1,y_2\}$ is a point.
Here's a somewhat less pathological example, which is a variant of your idea (but in one dimension lower, which makes it a lot easier to prove the map $X\to Y/\{y_1,y_2\}$ is not a homotopy equivalence).  Let $Y=\mathbb{Q}$ and $y_1,y_2\in\mathbb{Q}$ be any two distinct points. If $g:Y/\{y_1,y_2\}\to X$ is a homotopy inverse of the canonical map $f:X\to Y/\{y_1,y_2\}$, then $f\circ g$ must actually be equal to the identity, since $Y/\{y_1,y_2\}$ is totally disconnected.  But it is easy to see that $f$ has no continuous right-inverse (basically, the point $\{y_1,y_2\}$ would have to go to both $y_1$ and $y_2$, since it can be approached by sequences which in $X$ converge to either point).
(Actually, a similar argument works whenever $Y$ is a space with two non-isolated points $y_1$ and $y_2$ such that $Y/\{y_1,y_2\}$ is totally path-disconnected and $y_1$ and $y_2$ have disjoint neighborhoods in $Y$.)
A: Another well known example, but more complicated than Eric's. is to take two copies  $CH_1, CH_2$ of the cone on the Hawaian Earring, with base points $x_1,x_2$  at the "bad points" of the bases of the cones. Each of $CH_i$ is contractible to the vertex of each cone, but not with the base point fixed. The union of the two cones with a line segment joining the base points is also contractible, but the wedge,  with the two base  points identified,  is not contractible. 
