# 6.6 Cell complexes

In classical topology, a cell complex is a space obtained by successively attaching discs along their boundaries. It is called a CW complex if the boundary of an $n$-dimensional disc is constrained to lie in the discs of dimension strictly less than $n$ (the $(n-1)$-skeleton).

Any finite CW complex can be presented as a higher inductive type, by turning $n$-dimensional discs into $n$-dimensional paths and partitioning the image of the attaching map into a source and a target, with each written as a composite of lower dimensional paths. Our explicit definitions of $\mathbb{S}^{1}$ and $\mathbb{S}^{2}$ in Β§6.4 (http://planetmath.org/64circlesandspheres) had this form.

Another example is the torus $T^{2}$, which is generated by:

• β’

a point $b:T^{2}$,

• β’

a path $p:b=b$,

• β’

another path $q:b=b$, and

• β’

a 2-path $t:p\mathchoice{\mathbin{\raisebox{2.15pt}{\displaystyle\centerdot}}}{% \mathbin{\raisebox{2.15pt}{\centerdot}}}{\mathbin{\raisebox{1.075pt}{% \scriptstyle\,\centerdot\,}}}{\mathbin{\raisebox{0.43pt}{\scriptscriptstyle% \,\centerdot\,}}}q=q\mathchoice{\mathbin{\raisebox{2.15pt}{\displaystyle% \centerdot}}}{\mathbin{\raisebox{2.15pt}{\centerdot}}}{\mathbin{\raisebox{1% .075pt}{\scriptstyle\,\centerdot\,}}}{\mathbin{\raisebox{0.43pt}{% \scriptscriptstyle\,\centerdot\,}}}p$.

Perhaps the easiest way to see that this is a torus is to start with a rectangle, having four corners $a,b,c,d$, four edges $p,q,r,s$, and an interior which is manifestly a 2-path $t$ from $p\mathchoice{\mathbin{\raisebox{2.15pt}{\displaystyle\centerdot}}}{\mathbin{% \raisebox{2.15pt}{\centerdot}}}{\mathbin{\raisebox{1.075pt}{\scriptstyle\,% \centerdot\,}}}{\mathbin{\raisebox{0.43pt}{\scriptscriptstyle\,\centerdot\,% }}}q$ to $r\mathchoice{\mathbin{\raisebox{2.15pt}{\displaystyle\centerdot}}}{\mathbin{% \raisebox{2.15pt}{\centerdot}}}{\mathbin{\raisebox{1.075pt}{\scriptstyle\,% \centerdot\,}}}{\mathbin{\raisebox{0.43pt}{\scriptscriptstyle\,\centerdot\,% }}}s$:

Now identify the edge $r$ with $q$ and the edge $s$ with $p$, resulting in also identifying all four corners. Topologically, this identification can be seen to produce a torus.

The induction principle for the torus is the trickiest of any weβve written out so far. Given $P:T^{2}\to\mathcal{U}$, for a section $\mathchoice{\prod_{x:T^{2}}\,}{\mathchoice{{\textstyle\prod_{(x:T^{2})}}}{% \prod_{(x:T^{2})}}{\prod_{(x:T^{2})}}{\prod_{(x:T^{2})}}}{\mathchoice{{% \textstyle\prod_{(x:T^{2})}}}{\prod_{(x:T^{2})}}{\prod_{(x:T^{2})}}{\prod_{(x:% T^{2})}}}{\mathchoice{{\textstyle\prod_{(x:T^{2})}}}{\prod_{(x:T^{2})}}{\prod_% {(x:T^{2})}}{\prod_{(x:T^{2})}}}P(x)$ we require

• β’

a point $b^{\prime}:P(b)$,

• β’

a path $p^{\prime}:b^{\prime}=^{P}_{p}b^{\prime}$,

• β’

a path $q^{\prime}:b^{\prime}=^{P}_{q}b^{\prime}$, and

• β’

a 2-path $t^{\prime}$ between the βcompositesβ $p^{\prime}\mathchoice{\mathbin{\raisebox{2.15pt}{\displaystyle\centerdot}}}{% \mathbin{\raisebox{2.15pt}{\centerdot}}}{\mathbin{\raisebox{1.075pt}{% \scriptstyle\,\centerdot\,}}}{\mathbin{\raisebox{0.43pt}{\scriptscriptstyle% \,\centerdot\,}}}q^{\prime}$ and $q^{\prime}\mathchoice{\mathbin{\raisebox{2.15pt}{\displaystyle\centerdot}}}{% \mathbin{\raisebox{2.15pt}{\centerdot}}}{\mathbin{\raisebox{1.075pt}{% \scriptstyle\,\centerdot\,}}}{\mathbin{\raisebox{0.43pt}{\scriptscriptstyle% \,\centerdot\,}}}p^{\prime}$, lying over $t$.

In order to make sense of this last datum, we need a composition operation for dependent paths, but this is not hard to define. Then the induction principle gives a function $f:\mathchoice{\prod_{x:T^{2}}\,}{\mathchoice{{\textstyle\prod_{(x:T^{2})}}}{% \prod_{(x:T^{2})}}{\prod_{(x:T^{2})}}{\prod_{(x:T^{2})}}}{\mathchoice{{% \textstyle\prod_{(x:T^{2})}}}{\prod_{(x:T^{2})}}{\prod_{(x:T^{2})}}{\prod_{(x:% T^{2})}}}{\mathchoice{{\textstyle\prod_{(x:T^{2})}}}{\prod_{(x:T^{2})}}{\prod_% {(x:T^{2})}}{\prod_{(x:T^{2})}}}P(x)$ such that $f(b)\equiv b^{\prime}$ and $\mathsf{apd}_{f}\mathopen{}\left(p\right)\mathclose{}=p^{\prime}$ and $\mathsf{apd}_{f}\mathopen{}\left(q\right)\mathclose{}=q^{\prime}$ and something like β$\mathsf{apd}^{2}_{f}\mathopen{}\left(t\right)\mathclose{}=t^{\prime}$β. However, this is not well-typed as it stands, firstly because the equalities $\mathsf{apd}_{f}\mathopen{}\left(p\right)\mathclose{}=p^{\prime}$ and $\mathsf{apd}_{f}\mathopen{}\left(q\right)\mathclose{}=q^{\prime}$ are not judgmental, and secondly because $\mathsf{apd}_{f}$ only preserves path concatenation up to homotopy. We leave the details to the reader (see http://planetmath.org/node/87797Exercise 6.1).

Of course, another definition of the torus is $T^{2}:\!\!\equiv\mathbb{S}^{1}\times\mathbb{S}^{1}$ (in http://planetmath.org/node/87800Exercise 6.3 we ask the reader to verify the equivalence of the two). The cell-complex definition, however, generalizes easily to other spaces without such descriptions, such as the Klein bottle, the projective plane, etc. But it does get increasingly difficult to write down the induction principles, requiring us to define notions of dependent $n$-paths and of $\mathsf{apd}$ acting on $n$-paths. Fortunately, once we have the spheres in hand, there is a way around this.

Title 6.6 Cell complexes
\metatable