Let $A$ be a subcomplex of a CW complex $X$, let $Y$ be a CW complex, and let $f: A \to Y$ be a cellular map. What is the relationship between $H\_\*(X, A)$ and $H\_\*(Y \cup\_f X, Y)$? Is there a similar relationship between $\pi\_\*(X, A)$ and $\pi\_\*(Y \cup\_f X, Y)$?


Apologies in advance if this question is sort of remedial...



Relationship between $H_*(X, A)$ and $H_*(Y \cup_f X, Y)$? $\pi_*(X, A)$ and $\pi_*(Y \cup_f X, Y)$?
Expanding my comment:


The natural map $H\_\*(X,A)\rightarrow H\_\*(X\cup\_f Y, Y)$ is an isomorphism, this is the so-called "excision axiom".


The map $\pi\_i(X,A)\rightarrow \pi\_i(X\cup\_f Y, Y)$ is an isomorphism through $i<n+m$, where $n,m$ are the connectivities of the maps $A\rightarrow X$, $A\rightarrow Y$, cf. Hatcher, theorem 4.23.


To see that it cannot generally hold, consider $X=D^n$, $A=\partial D^n$, $Y=pt$. The map takes the form
$$
\pi\_i(D^n,\partial D^n)\rightarrow \pi\_i(S^n)
$$
The left side is isomorphic to $\pi\_{i-1}(\partial D^n)$, and the map coincides with the suspension homomorphism $\pi\_{i-1}(S^{n-1})\rightarrow \pi\_i(S^n)$. This is not an isomorphism.


This is not surprising at all, since excision is more or less the thing that axiomatically characterizes homology. In fact, the standard calculation of $H\_\*(S^n)$ uses basically only excision.


