Set theory of infinite CW complexes An infinite CW complex is defined, e.g. in Hatcher's algebraic topology book, as a (countable) union of its $n$-skeleta $X^{n}$, where each $n$-skeleton is identified as a subset of successive $m$-skeleta with $m>n$.  How does one make sense of this rigorously at the set theory level?
As we form new skeleta, at each step we have a space that is a priori disjoint (at the set theory level) from all the preceding spaces, being formed as a quotient of a disjoint union involving the previous space.  What we want is some sort of "limit" of this infinite chain of spaces, but strictly speaking that's not what a union achieves.  The union will not automatically identify skeleta with their homeomorphic images in higher dimensional skeleta.  One way to proceed (I suppose) is to take the union and then take a quotient to identify all homeomorphic images of each $n$ skeleton.  Is this the proper way to construct an infinite CW complex?
The definition presented in Hatcher suggests that it is possible to identify a space $X^n$ with a subset of some universal set such that we can just take a union at the end to get all the skeleta.  However, I know of no set-theoretic way of doing this rigorously.
 A: There are at least two ways of defining a CW complex:

*

*A CW complex is a Hausdorff space $X$ together with a collection of closed subsets $\{e^n_i\ |\ e^n_i\subseteq X\}_{i\in I}$ called cells (the $n$ at the top is simply a mark that this cell is $n$-dimensional) and continuous maps $\{f_i:D^n\to e^n_i\}$ from $n$-dimensional disks such that: (0) all $e^n_i$ cover whole $X$, (1) each $f_i$ restricted to the interior is a homeomorphism onto image, (2) image of each boundary $S^n$ is contained in the union of cells of dimension smaller than $n$ and (3) a subset is closed if and only its intersection with every cell is closed (in the cell).

So in this definition we start with a global $X$ space and construct its CW decomposition inside it. With this the $n$-skeleta $X^n$ is simply defined as union of all cells of dimension at most $n$. This definition also makes inclusions, unions and limits trivial.
But there is an alternative approach: we start with small building blocks and add cells at each step:


*A CW complex is a space constructed as follows: $X^0$ is defined to be a discrete space, and then $X^n$ is defined as the adjunction space of $X^{n-1}$ with a collection of $n$-dimensional disks (with some continuous maps, and adjunction is along the boundary of each disk). Since we deal with adjunction then we have a continuous closed embedding $g_n:X^{n-1}\to X^n$. In that situation $(X^n, g_n)$ can be extended to a direct system $(X^n,g_{nk})$ where for $n<k$ we have $g_{nk}:X^n\to X^k$ is just a composition of all intermediate $g_i$. Thus we can form the direct limit $X:=\varinjlim(X^n,g_{nk})$. That direct limit is our final CW complex.

The direct limit (by definition) comes with continuous functions $h_n:X^n\to X$. It can be shown that in this situation these functions are closed embeddings. And so we can identify $X^n$ with its image $h_n(X^n)$. By the same $h_n$ we transfer cells into $X$. In that situation the weak topology (meaning a subset of $X$ is closed if and only if its intersection with each cell is closed in the cell) is guaranteed by the construction.
So in order to fully understand the construction you have to learn what direct limit is and how it works for topological spaces (which is simply set-theoretic direct limit with final topology generated by $h_n$). I encourage you to read the linked wiki thoroughly.
A: In the comments and in freakish's answer you have learned that infinite CW-complexes can be built as the direct limit of a sequence of closed embeddings $g_n : X^{n-1} \to X^n$, where each $X^n$ is constructed by attaching $n$-cells to $X^{n-1}$, i.e. as the adjunction space $X^n = X^n \cup_\phi \bigcup_{i \in J_n} D^n \times \{i\}$, where $\phi : \bigcup_{i \in J_n} S^{n-1} \times \{i\} \to X^{n-1}$ is the attaching map.
Let us look a bit closer at the concept of an adjunction space. The adjunction space $Y \cup_f X$, where $f : A \to Y$ is a map defined on a subspace $A \subset X$, has  a standard construction as a quotient of the disjoint union $Y \sqcup X$. There are canonical embeddings $j_Y : Y \to Y \sqcup X$ and $j_X: X \to Y \sqcup X$. If $p : Y \sqcup X \to Y \cup_f X$ denotes the quotient map, then $i_Y  =p \circ j_Y : Y \to Y \cup_f X$ is a canonical embedding, but due to the standard construction $Y$ is not a genuine subspace of $Y \cup_f X$. Most authors nevertheless say "we identify $Y$ with a subspace of $Y \cup_f X$ and write $Y \subset Y \cup_f X$". This is an abuse of notation and formally it is incorrect.
But wait, why is it incorrect? This is because we work with a specific construction of $Y \cup_f X$ which prevents $Y$ from being a genuine subset of $Y \cup_f X$. However, we may choose an alternative construction as follows. Observe that $e = p \circ j_X \mid_{X \setminus A} : X \setminus A \to Y \cup_f X$ is a embedding and $Y \cup_f X = j_Y(Y) \cup e(X \setminus A)$, where $j_Y(Y) \cap e(X \setminus A) = \emptyset$. Now choose a copy $(X \setminus A)'$ of the set $X \setminus A$ which is disjoint from the set $Y$. This means that we have a set $(X \setminus A)'$ such that $(X \setminus A)' \cap Y = \emptyset$ and a bijection $b : (X \setminus A)' \to X \setminus A$. Note that if we already have $(X \setminus A) \cap Y = \emptyset$, then we do not need to choose something new. Define
$$Y \cup'_f X  = Y \cup (X \setminus A)', $$
$$\beta : Y \cup (X \setminus A)' \to Y \cup_f X,  \beta(y) = \begin{cases} 
i_Y(y) & y \in Y \\
e(b(x')) & x' \in (X \setminus A)'
\end{cases}$$
This function is a bijection, thus we get a unique topology on $Y \cup'_f X$ such that $\beta$ becomes a homeomorphism. Our new space is a copy of $Y \cup_f X$ which contains $Y$ as a genuine subspace.
You can use this for CW-complexes. Start with $X^0 = \bigcup_{i \in I_0} D^0 \times \{i\}$. Then form the adjunction space
$$X^1 = X^0 \cup \bigcup_{i \in I_1} \operatorname{int}D^1 \times \{i\}$$
with the topology defined above. Note that all $\operatorname{int}D^1 \times \{i\}$ are disjoint from $X^0$, thus we do not need to choose copies of then. You can proceed and obtain an ascending chain of spaces
$$X^0 \subset X^1 \subset X^2 \subset \ldots$$
Now you may define $X = \bigcup_n X^n$. This should settle your set-theoretic issue. Note that
$$X = \bigcup_n \bigcup_{i \in I_n} \operatorname{int}D^n \times \{i\}$$
which is the union of disjoint open cells in various dimensions. The topology on $X$ is of course determined by the attaching maps.
Let us emphasize that the above union (with the weak topology) is just a special case of a direct limit. As said above, the general direct limit also works perfectly, but its formal disadvantage is that $X$ does not contain any skeleton $X^n$ as genuine subspace. But there are canonical copies $X'_n \subset X$ which suffices in practice.
