# Fundamental group of CW complexes

I was building a small text on the fundamental group of CW complexes. I followed https://www.homepages.ucl.ac.uk/~ucahjde/tg/html/vkt02.html, where I have the result that the fundamental group of a CW complex depends only on its $$1$$-cells and how the $$2$$-cells are attached.

But there is something not so clear about this, for example: If I construct the solid torus $$\mathbf T$$ as

• one $$0$$-cell, $$v$$
• two $$1$$-cells, $$a$$ and $$b$$ whose endpoints are attached to the $$0$$-cell
• one $$2$$-cell, $$A$$ attached along the loop $$aba^{-1}b^{-1}$$
• one $$3$$-cell, $$S$$ attached to the the $$2$$-cell $$A$$ (is this possible?) such that it fills the torus

Then I get that $$\pi_1(\mathbf T)\simeq\mathbb Z\times \mathbb Z$$, but this is wrong since one of the generating loops is now homotopic (through the $$3$$-cell) to the constant loop, and so $$\pi_1(\mathbf T)\simeq\mathbb Z$$.

Makes me wonder if this result about the dependence of $$\pi_1(X)$$ (for $$X$$ a CW complex) only applies for $$k$$-cells that attach to the $$1$$-cells; and that it fails to be true about $$k$$-cells that are attached to $$2,3,4,\dots$$-cells.

Can anyone shine some light on this?

PS: I did not study amalgamated relations for this, I only went with the material used in Hatcher's Algebraic Topology https://pi.math.cornell.edu/~hatcher/AT/AT.pdf, for example in Proposition 1.26, page 50, where he uses the quotient definition of presentation.

In Proposition 1.26 point (a), after a short paragraph describing that the attaching of cells occurs through an attaching map $$\varphi_\alpha:S^1 \to X$$, Hatcher says,

If $$Y$$ is obtained from $$X$$ by attaching $$2$$-cells as described above, then the inclusion $$X\hookrightarrow Y$$ induces a surjection $$\dots$$

Which further leads me to believe that it only applies, like I said before, to $$k$$-cells attached along $$1$$-cells.