# Inclusion not a cofibration

What is an example of a compact Hausdorff space $X$ and a contractible subspace $A\subset X$ such that $H^2(X)\ncong H^2(X/A)$?

Note that $A\subset X$ must not be a cofibration. I was thinking that $X=[0,1]^2$ and $A$ the comb space might work but I am not sure.

Let $X=S^2$ and let $A$ be the complement of a point in $X$. Then $X/A$ has only two points, and is in fact contractible. So $H^2(X)\cong\mathbb{Z}$ but $H^2(X/A)$ is trivial.

Here's an example for which $A$ is closed. Start with a sphere $S^2\subset\mathbb{R}^3$, and then replace a neighborhood of a point by circular waves that oscillate faster and faster as you get near the point, accumulating at an entire line segment (like a 2-dimensional version of the topologist's sine curve). Let $A$ be the line segment where the waves accumulate and let $X$ be the union of the modified sphere and $A$. There is no path in $X$ from a point of $A$ to a point of the sphere, so $X$ is weak homotopy equivalent to the disjoint union of the punctured sphere and $A$; in particular, $H^2(X)$ is trivial. But $X/A$ is an ordinary sphere, so $H^2(X/A)\cong \mathbb{Z}$.

• Let's pretend that instead of $S^2$, we had $\mathbb{R}^2$ sitting inside $\mathbb{R}^3$. What I'm doing is taking points of the form $(r\cos\theta,r\sin\theta,\sin(1/r))$ for $r>0$. As $r$ approaches $0$, the set of such points accumulates at the entire vertical line segment $\{(0,0)\}\times[-1,1]$. That vertical line segment is $A$ (except we are doing all this in a little patch of $S^2$ sitting inside $\mathbb{R}^3$, rather than on $\mathbb{R}^2$ sitting inside $\mathbb{R}^3$). May 22, 2017 at 6:03
• The space $X$ is compact...why do you think it isn't? Also, any metric space (in particular, any subspace of $\mathbb{R}^n$) is paracompact. May 22, 2017 at 6:18
• There is a map $X\to S^2$ which "flattens" all the waves and sends $A$ to a point. This induces a continuous bijection $X/A\to S^2$, which is a homeomorphism since $X/A$ is compact and $S^2$ is Hausdorff. May 22, 2017 at 6:23
• $X$ has the weak homotopy type of $S^0$ (since as far as paths are concerned, it's a disjoint union of two contractible pieces). So it has no cohomology in positive degrees, but $H^0(X)$ has rank $2$. May 22, 2017 at 6:24
• Consider the obvious continuous bijection $f:X\setminus A\coprod A\to X$. Any map from a path-connected space to $X$ factors through $f$ uniquely. It follows that $f$ is a weak equivalence. But $X\setminus A\coprod A\cong \mathbb{R}^2\coprod [0,1]$ is homotopy equivalent to $S^0$. May 22, 2017 at 15:51