My understanding: CW complexes are constructed by inductively attaching $n+1$ cells to an $n$-skeleton where a 0-skeleton consists of a discrete set of 0-cells (points).
What I fail to understand: real projective space $\mathbb{R}\mathrm{P}^n$ is constructed by using pairs of $k$-cells and joining the two resulting "hemispheres" together and then gluing these two pieces together properly. Doesn't this construction break the rules of CW complexes? I have no problem attaching $n+1$ cells to lower order cells. Are we allowed to glue CW complexes to themselves though?
Edit: hopefully this illustrates what I mean by "gluing a complex to itself". We start out with two 0-cells:
$X_0=\{-1,1\}$
We attach two 1-cells, one going from -1 to 1 and the other going from 1 to -1.
$X_1=\{(-1,1),(1,-1)\}$
(Please forgive my notation, I know it's awful so bear with me) We now have a topological space homeomorphic to $S^1$. The final step is to glue either of the 1-cells to the other and the result is $\mathbb{R}\mathrm{P}^1$. This step is what my question is about.
Edit 2: to make the "gluing" step more precise, I mean that we identify antipodal points with one another and take the quotient space as our new real projection space. This construction generalises to higher dimensions.
What I failed to understand is that:
So basically, "self-gluing" is not permitted in the construction of CW complexes per se, but it is possible to construct CW complexes that can be interpreted as "self-glued" (as is the case with real projective space).