Could someone show an example of two spaces $X$ and $Y$ which are not of the same homotopy type, but nevertheless $\pi_q(X)=\pi_q(Y)$ for every $q$? Is there an example in the CW complex or smooth category?
Non-Homotopy Equivalent Spaces with Equal Homotopy Groups – Algebraic Topology
at.algebraic-topologyhomotopy-theorysmooth-manifolds
Related Solutions
Sure -- there are an abundance of homology spheres in dimension 3 (the wikipedia article is pretty nice).
For other examples, in dimension 4 you can find smooth simply-connected closed manifolds whose second homology groups (the only interesting ones) are the same but which have different intersection pairings.
This last subject is very rich. For bathroom reading on it, I cannot recommend Scorpan's book "The Wild World of 4-Manifolds" highly enough.
Here is a method for constructing examples. If a fiber bundle $F \to E \to B$ has a section, the associated long exact sequence of homotopy groups splits, so the homotopy groups of $E$ are the same as for the product $F \times B$, at least when these spaces are simply-connected so the homotopy groups are all abelian. To apply this idea we need an example using highly-connected finite complexes $F$ and $B$ where $E$ is not homotopy equivalent to $F \times B$ and the bundle has a section.
The simplest thing to try would be to take $F$ and $B$ to be high-dimensional spheres. A sphere bundle with a section can be constructed by taking the fiberwise one-point compactification $E^\bullet$ of a vector bundle $E$. (This is equivalent to taking the unit sphere bundle in the direct sum of $E$ with a trivial line bundle.) The set of points added in the compactification then gives a section at infinity. For the case that the base is a sphere $S^k$, take a vector bundle $E_f$ with clutching function $f : S^{k-1} \to SO(n)$ so the fibers are $n$-dimensional. Suppose that the compactification $E_f^\bullet$ is homotopy equivalent to the product $S^n \times S^k$. If $n > k$, such a homotopy equivalence can be deformed to a homotopy equivalence between the pairs $(E_f^\bullet,S^k)$ and $(S^n \times S^k,S^k)$ where $S^k$ is identified with the image of a section in both cases. The quotients with the images of the section collapsed to a point are then homotopy equivalent. Taking the section at infinity in $E_f^\bullet$, this says that the Thom space $T(E_f)$ is homotopy equivalent to the wedge $S^n \vee S^{n+k}$. It is a classical elementary fact that $T(E_f)$ is the mapping cone of the image $Jf$ of $f$ under the $J$ homomorphism $\pi_{k-1}SO(n) \to \pi_{n+k-1}S^n$. The $J$ homomorphism is known to be nontrivial when $k = 4i$ and $n\gg k>0$. Choosing $f$ so that $Jf$ is nontrivial, it follows that the mapping cone of $Jf$ is not homotopy equivalent to the wedge $S^n \vee S^{n+k}$, using the fact that a complex obtained by attaching an $(n+k)$-cell to $S^n$ is homotopy equivalent to $S^n \vee S^{n+k}$ only when the attaching map is nullhomotopic (an exercise). Thus we have a contradiction to the assumption that $E_f^\bullet$ was homotopy equivalent to the product $S^n \times S^k$. This gives the desired examples since $k$ can be arbitrarily large.
These examples use Bott periodicity and nontriviality of the $J$ homomorphism, so they are not as elementary as one might wish. (One can use complex vector bundles and then complex Bott periodicity suffices, which is easier than in the real case.) Perhaps there are simpler examples. It might be interesting to find examples where just homology suffices to distinguish the two spaces.
Best Answer
There are such spaces, for example $X = S^2 \times \mathbb{R}P^3$, $Y = S^3 \times \mathbb{R}P^2.$ (These are both smooth and CW-complexes.)
Whitehead's Theorem says that for CW-complexes, if a map $f : X \to Y$ induces an isomorphism on all homotopy groups then it is a homotopy equivalence. But, as the example above shows, you need the map. Such a map is called a weak homotopy equivalence.
(Whitehead's Theorem is not true for spaces wilder than CW-complexes. The Warsaw circle has all of its homotopy groups trivial but the unique map to a point is not a homotopy equivalence.)