Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/GAP/pkg/hap/tutorial/   (Algebra von RWTH Aachen Version 4.15.1©)  Datei vom 19.6.2025 mit Größe 556 kB image not shown  

Quellcode-Bibliothek HapTutorial.tex   Sprache: Latech

 
% generated by GAPDoc2LaTeX from XML source (Frank Luebeck)
\documentclass[a4paper,11pt]{report}

\usepackage[top=37mm,bottom=37mm,left=27mm,right=27mm]{geometry}
\sloppy
\pagestyle{myheadings}
\usepackage{amssymb}
\usepackage[latin1]{inputenc}
\usepackage{makeidx}
\makeindex
\usepackage{color}
\definecolor{FireBrick}{rgb}{0.5812,0.0074,0.0083}
\definecolor{RoyalBlue}{rgb}{0.0236,0.0894,0.6179}
\definecolor{RoyalGreen}{rgb}{0.0236,0.6179,0.0894}
\definecolor{RoyalRed}{rgb}{0.6179,0.0236,0.0894}
\definecolor{LightBlue}{rgb}{0.8544,0.9511,1.0000}
\definecolor{Black}{rgb}{0.0,0.0,0.0}

\definecolor{linkColor}{rgb}{0.0,0.0,0.554}
\definecolor{citeColor}{rgb}{0.0,0.0,0.554}
\definecolor{fileColor}{rgb}{0.0,0.0,0.554}
\definecolor{urlColor}{rgb}{0.0,0.0,0.554}
\definecolor{promptColor}{rgb}{0.0,0.0,0.589}
\definecolor{brkpromptColor}{rgb}{0.589,0.0,0.0}
\definecolor{gapinputColor}{rgb}{0.589,0.0,0.0}
\definecolor{gapoutputColor}{rgb}{0.0,0.0,0.0}

%%  for a long time these were red and blue by default,
%%  now black, but keep variables to overwrite
\definecolor{FuncColor}{rgb}{0.0,0.0,0.0}
%% strange name because of pdflatex bug:
\definecolor{Chapter }{rgb}{0.0,0.0,0.0}
\definecolor{DarkOlive}{rgb}{0.1047,0.2412,0.0064}


\usepackage{fancyvrb}

\usepackage{mathptmx,helvet}
\usepackage[T1]{fontenc}
\usepackage{textcomp}


\usepackage[
            pdftex=true,
            bookmarks=true,        
            a4paper=true,
            pdftitle={Written with GAPDoc},
            pdfcreator={LaTeX with hyperref package / GAPDoc},
            colorlinks=true,
            backref=page,
            breaklinks=true,
            linkcolor=linkColor,
            citecolor=citeColor,
            filecolor=fileColor,
            urlcolor=urlColor,
            pdfpagemode={UseNone}, 
           ]{hyperref}

\newcommand{\maintitlesize}{\fontsize{50}{55}\selectfont}

% write page numbers to a .pnr log file for online help
\newwrite\pagenrlog
\immediate\openout\pagenrlog =\jobname.pnr
\immediate\write\pagenrlog{PAGENRS := [}
\newcommand{\logpage}[1]{\protect\write\pagenrlog{#1, \thepage,}}
%% were never documented, give conflicts with some additional packages

\newcommand{\GAP}{\textsf{GAP}}

%% nicer description environments, allows long labels
\usepackage{enumitem}
\setdescription{style=nextline}

%% depth of toc
\setcounter{tocdepth}{1}





%% command for ColorPrompt style examples
\newcommand{\gapprompt}[1]{\color{promptColor}{\bfseries #1}}
\newcommand{\gapbrkprompt}[1]{\color{brkpromptColor}{\bfseries #1}}
\newcommand{\gapinput}[1]{\color{gapinputColor}{#1}}


\begin{document}

\logpage{[ 0, 0, 0 ]}
\begin{titlepage}
\mbox{}\vfill

\begin{center}{\maintitlesize \textbf{A HAP tutorial\mbox{}}}\\
\vfill

\hypersetup{pdftitle=A HAP tutorial}
\markright{\scriptsize \mbox{}\hfill A HAP tutorial \hfill\mbox{}}
{\Huge \textbf{(See also an \href{../www/SideLinks/About/aboutContents.html} {older tutorial} or \href{comp.pdf} {mini\texttt{\symbol{45}}course notes} or related \href{https://global.oup.com/academic/product/an-invitation-to-computational-homotopy-9780198832980} {book}) \href{../www/index.html} {The \textsc{HAP} home page is here}\mbox{}}}\\
\vfill

\mbox{}\\[2cm]
{\Large \textbf{Graham Ellis\mbox{}}}\\
\hypersetup{pdfauthor=Graham Ellis}
\end{center}\vfill

\mbox{}\\
\end{titlepage}

\newpage\setcounter{page}{2}
\newpage

\def\contentsname{Contents\logpage{[ 0, 0, 1 ]}}

\tableofcontents
\newpage

 
\chapter{\textcolor{Chapter }{Simplicial complexes \& CW complexes}}\logpage{[ 1, 0, 0 ]}
\hyperdef{L}{X7E5EA9587D4BCFB4}{}
{
 
\section{\textcolor{Chapter }{The Klein bottle as a simplicial complex}}\logpage{[ 1, 1, 0 ]}
\hyperdef{L}{X85691C6980034524}{}
{
 

  

 The following example constructs the Klein bottle as a simplicial complex $K$ on $9$ vertices, and then constructs the cellular chain complex $C_\ast=C_\ast(K)$ from which the integral homology groups $H_1(K,\mathbb Z)=\mathbb Z_2\oplus \mathbb Z$, $H_2(K,\mathbb Z)=0$ are computed. The chain complex $D_\ast=C_\ast \otimes_{\mathbb Z} \mathbb Z_2$ is also constructed and used to compute the mod\texttt{\symbol{45}}$2$ homology vector spaces $H_1(K,\mathbb Z_2)=\mathbb Z_2\oplus \mathbb Z_2$, $H_2(K,\mathbb Z)=\mathbb Z_2$. Finally, a presentation $\pi_1(K) = \langle x,y : yxy^{-1}x\rangle$ is computed for the fundamental group of $K$. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@2simplices:=|
  !gapprompt@>| !gapinput@[[1,2,5], [2,5,8], [2,3,8], [3,8,9], [1,3,9], [1,4,9],|
  !gapprompt@>| !gapinput@ [4,5,8], [4,6,8], [6,8,9], [6,7,9], [4,7,9], [4,5,7],|
  !gapprompt@>| !gapinput@ [1,4,6], [1,2,6], [2,6,7], [2,3,7], [3,5,7], [1,3,5]];;|
  !gapprompt@gap>| !gapinput@K:=SimplicialComplex(2simplices);|
  Simplicial complex of dimension 2.
  
  !gapprompt@gap>| !gapinput@C:=ChainComplex(K);|
  Chain complex of length 2 in characteristic 0 .
  
  !gapprompt@gap>| !gapinput@Homology(C,1);|
  [ 2, 0 ]
  !gapprompt@gap>| !gapinput@Homology(C,2);|
  [  ]
  
  !gapprompt@gap>| !gapinput@D:=TensorWithIntegersModP(C,2);|
  Chain complex of length 2 in characteristic 2 .
  
  !gapprompt@gap>| !gapinput@Homology(D,1);|
  2
  !gapprompt@gap>| !gapinput@Homology(D,2);|
  1
  
  !gapprompt@gap>| !gapinput@G:=FundamentalGroup(K);|
  <fp group of size infinity on the generators [ f1, f2 ]>
  !gapprompt@gap>| !gapinput@RelatorsOfFpGroup(G);|
  [ f2*f1*f2^-1*f1 ]
  
\end{Verbatim}
 }

 
\section{\textcolor{Chapter }{Other simplicial surfaces}}\logpage{[ 1, 2, 0 ]}
\hyperdef{L}{X7B8F88487B1B766C}{}
{
 The following example constructs the real projective plane $P$, the Klein bottle $K$ and the torus $T$ as simplicial complexes, using the surface genus $g$ as input in the oriented case and $-g$ as input in the unoriented cases. It then confirms that the connected sums $M=K\#P$ and $N=T\#P$ have the same integral homology. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@P:=ClosedSurface(-1);|
  Simplicial complex of dimension 2.
  
  !gapprompt@gap>| !gapinput@K:=ClosedSurface(-2);|
  Simplicial complex of dimension 2.
  
  !gapprompt@gap>| !gapinput@T:=ClosedSurface(1);|
  Simplicial complex of dimension 2.
  
  !gapprompt@gap>| !gapinput@M:=ConnectedSum(K,P);|
  Simplicial complex of dimension 2.
  
  !gapprompt@gap>| !gapinput@N:=ConnectedSum(T,P);|
  Simplicial complex of dimension 2.
  
  !gapprompt@gap>| !gapinput@Homology(M,0);|
  [ 0 ]
  !gapprompt@gap>| !gapinput@Homology(N,0);|
  [ 0 ]
  !gapprompt@gap>| !gapinput@Homology(M,1);|
  [ 2, 0, 0 ]
  !gapprompt@gap>| !gapinput@Homology(N,1);|
  [ 2, 0, 0 ]
  !gapprompt@gap>| !gapinput@Homology(M,2);|
  [  ]
  !gapprompt@gap>| !gapinput@Homology(N,2);|
  [  ]
  
\end{Verbatim}
 }

 
\section{\textcolor{Chapter }{The Quillen complex}}\logpage{[ 1, 3, 0 ]}
\hyperdef{L}{X80A72C347D99A58E}{}
{
 

 Given a group $G $ one can consider the partially ordered set ${\cal A}_p(G)$ of all non\texttt{\symbol{45}}trivial elementary abelian $p$\texttt{\symbol{45}}subgroups of $G$, the partial order being set inclusion. The order complex $\Delta{\cal A}_p(G)$ is a simplicial complex which is called the \emph{Quillen complex }. 

 The following example constructs the Quillen complex $\Delta{\cal A}_2(S_7)$ for the symmetric group of degree $7$ and $p=2$. This simplicial complex involves $11291$ simplices, of which $4410$ are $2$\texttt{\symbol{45}}simplices.. 
\begin{Verbatim}[commandchars=@|A,fontsize=\small,frame=single,label=Example]
  @gapprompt|gap>A @gapinput|K:=QuillenComplex(SymmetricGroup(7),2);A
  Simplicial complex of dimension 2.
  
  @gapprompt|gap>A @gapinput|Size(K);A
  11291
  
  @gapprompt|gap>A @gapinput|K!.nrSimplices(2);A
  4410
  
\end{Verbatim}
 }

 
\section{\textcolor{Chapter }{The Quillen complex as a reduced CW\texttt{\symbol{45}}complex}}\logpage{[ 1, 4, 0 ]}
\hyperdef{L}{X7C4A2B8B79950232}{}
{
 Any simplicial complex $K$ can be regarded as a regular CW complex. Different datatypes are used in \textsc{HAP} for these two notions. The following continuation of the above Quillen complex
example constructs a regular CW complex $Y$ isomorphic to (i.e. with the same face lattice as) $K=\Delta{\cal A}_2(S_7)$. An advantage to working in the category of CW complexes is that it may be
possible to find a CW complex $X$ homotopy equivalent to $Y$ but with fewer cells than $Y$. The cellular chain complex $C_\ast(X)$ of such a CW complex $X$ is computed by the following commands. From the number of free generators of $C_\ast(X)$, which correspond to the cells of $X$, we see that there is a single $0$\texttt{\symbol{45}}cell and $160$ $2$\texttt{\symbol{45}}cells. Thus the Quillen complex
\$\$\texttt{\symbol{92}}Delta\texttt{\symbol{123}}\texttt{\symbol{92}}cal
A\texttt{\symbol{125}}{\textunderscore}2(S{\textunderscore}7)
\texttt{\symbol{92}}simeq
\texttt{\symbol{92}}bigvee{\textunderscore}\texttt{\symbol{123}}1\texttt{\symbol{92}}le
i\texttt{\symbol{92}}le 160\texttt{\symbol{125}} S\texttt{\symbol{94}}2\$\$
has the homotopy type of a wedge of $160$ $2$\texttt{\symbol{45}}spheres. This homotopy equivalence is given in \cite[(15.1)]{ksontini} where it was obtained by purely theoretical methods. 
\begin{Verbatim}[commandchars=@|A,fontsize=\small,frame=single,label=Example]
  @gapprompt|gap>A @gapinput|Y:=RegularCWComplex(K);A
  Regular CW-complex of dimension 2
  
  @gapprompt|gap>A @gapinput|C:=ChainComplex(Y);A
  Chain complex of length 2 in characteristic 0 . 
  
  @gapprompt|gap>A @gapinput|C!.dimension(0);A
  1
  @gapprompt|gap>A @gapinput|C!.dimension(1);A
  0
  @gapprompt|gap>A @gapinput|C!.dimension(2);A
  160
  
\end{Verbatim}
 }

 
\section{\textcolor{Chapter }{Simple homotopy equivalences}}\logpage{[ 1, 5, 0 ]}
\hyperdef{L}{X782AAB84799E3C44}{}
{
 

For any regular CW complex $Y$ one can look for a sequence of simple homotopy collapses $Y\searrow Y_1 \searrow Y_2 \searrow \ldots \searrow Y_N=X$ with $X$ a smaller, and typically non\texttt{\symbol{45}}regular, CW complex. Such a
sequence of collapses can be recorded using what is now known as a \emph{discrete vector field} on $Y$. The sequence can, for example, be used to produce a chain homotopy
equivalence $f\colon C_\ast Y \rightarrow C_\ast X$ and its chain homotopy inverse $g\colon C_\ast X \rightarrow C_\ast Y$. The function \texttt{ChainComplex(Y)} returns the cellular chain complex $C_\ast(X)$, wheras the function \texttt{ChainComplexOfRegularCWComplex(Y)} returns the chain complex $C_\ast(Y)$. 

 For the above Quillen complex $Y=\Delta{\cal A}_2(S_7)$ the following commands produce the chain homotopy equivalence $f\colon C_\ast Y \rightarrow C_\ast X$ and $g\colon C_\ast X \rightarrow C_\ast Y$. The number of generators of $C_\ast Y$ equals the number of cells of $Y$ in each degree, and this number is listed for each degree. 
\begin{Verbatim}[commandchars=@|A,fontsize=\small,frame=single,label=Example]
  @gapprompt|gap>A @gapinput|K:=QuillenComplex(SymmetricGroup(7),2);;A
  @gapprompt|gap>A @gapinput|Y:=RegularCWComplex(K);;A
  @gapprompt|gap>A @gapinput|CY:=ChainComplexOfRegularCWComplex(Y);A
  Chain complex of length 2 in characteristic 0 . 
  
  @gapprompt|gap>A @gapinput|CX:=ChainComplex(Y);A
  Chain complex of length 2 in characteristic 0 . 
  
  @gapprompt|gap>A @gapinput|equiv:=ChainComplexEquivalenceOfRegularCWComplex(Y);;A
  @gapprompt|gap>A @gapinput|f:=equiv[1];A
  Chain Map between complexes of length 2 . 
  
  @gapprompt|gap>A @gapinput|g:=equiv[2];A
  Chain Map between complexes of length 2 .
  
  
  @gapprompt|gap>A @gapinput|CY!.dimension(0);A
  1316
  @gapprompt|gap>A @gapinput|CY!.dimension(1);A
  5565
  @gapprompt|gap>A @gapinput|CY!.dimension(2);A
  4410
  
\end{Verbatim}
 }

 
\section{\textcolor{Chapter }{Cellular simplifications preserving homeomorphism type}}\logpage{[ 1, 6, 0 ]}
\hyperdef{L}{X80474C7885AC1578}{}
{
  

For some purposes one might need to simplify the cell structure on a regular
CW\texttt{\symbol{45}}complex $Y$ so as to obtained a homeomorphic CW\texttt{\symbol{45}}complex $W$ with fewer cells. 

The following commands load a $4$\texttt{\symbol{45}}dimensional simplicial complex $Y$ representing the K3 complex surface. Its simplicial structure is taken from \cite{spreerkhuenel} and involves $1704$ cells of various dimensions. The commands then convert the cell structure into
that of a homeomorphic regular CW\texttt{\symbol{45}}complex $W$ involving $774$ cells. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@Y:=RegularCWComplex(SimplicialK3Surface());|
  Regular CW-complex of dimension 4
  
  !gapprompt@gap>| !gapinput@Size(Y);|
  1704
  !gapprompt@gap>| !gapinput@W:=SimplifiedComplex(Y);|
  Regular CW-complex of dimension 4
  
  !gapprompt@gap>| !gapinput@Size(W);|
  774
  
\end{Verbatim}
 }

 
\section{\textcolor{Chapter }{Constructing a CW\texttt{\symbol{45}}structure on a knot complement}}\logpage{[ 1, 7, 0 ]}
\hyperdef{L}{X7A15484C7E680AC9}{}
{
 The following commands construct the complement $M=S^3\setminus K$ of the trefoil knot $K$. This complement is returned as a $3$\texttt{\symbol{45}}manifold $M$ with regular CW\texttt{\symbol{45}}structure involving four $3$\texttt{\symbol{45}}cells. 
\begin{Verbatim}[commandchars=@|B,fontsize=\small,frame=single,label=Example]
  @gapprompt|gap>B @gapinput|arc:=ArcPresentation(PureCubicalKnot(3,1));B
  [ [ 2, 5 ], [ 1, 3 ], [ 2, 4 ], [ 3, 5 ], [ 1, 4 ] ]
  @gapprompt|gap>B @gapinput|S:=SphericalKnotComplement(arc);B
  Regular CW-complex of dimension 3
  
  @gapprompt|gap>B @gapinput|S!.nrCells(3);B
  4
  
\end{Verbatim}
 The following additional commands then show that $M$ is homotopy equivalent to a reduced CW\texttt{\symbol{45}}complex $Y$ of dimension $2$ involving one $0$\texttt{\symbol{45}}cell, two $1$\texttt{\symbol{45}}cells and one $2$\texttt{\symbol{45}}cell. The fundamental group of $Y$ is computed and used to calculate the Alexander polynomial of the trefoil
knot. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@Y:=ContractedComplex(S);|
  Regular CW-complex of dimension 2
  
  !gapprompt@gap>| !gapinput@CriticalCells(Y);|
  [ [ 2, 1 ], [ 1, 9 ], [ 1, 11 ], [ 0, 22 ] ]
  !gapprompt@gap>| !gapinput@G:=FundamentalGroup(Y);;|
  !gapprompt@gap>| !gapinput@AlexanderPolynomial(G);|
  x_1^2-x_1+1
  
\end{Verbatim}
 }

 
\section{\textcolor{Chapter }{Constructing a regular CW\texttt{\symbol{45}}complex by attaching cells}}\logpage{[ 1, 8, 0 ]}
\hyperdef{L}{X829793717FB6DDCE}{}
{
 

  

The following example creates the projective plane $Y$ as a regular CW\texttt{\symbol{45}}complex, and tests that it has the correct
integral homology $H_0(Y,\mathbb Z)=\mathbb Z$, $H_1(Y,\mathbb Z)=\mathbb Z_2$, $H_2(Y,\mathbb Z)=0$. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@attch:=RegularCWComplex_AttachCellDestructive;; #Function for attaching cells|
  
  !gapprompt@gap>| !gapinput@Y:=RegularCWDiscreteSpace(3); #Discrete CW-complex consisting of points {1,2,3}|
  Regular CW-complex of dimension 0
  
  !gapprompt@gap>| !gapinput@e1:=attch(Y,1,[1,2]);; #Attach 1-cell|
  !gapprompt@gap>| !gapinput@e2:=attch(Y,1,[1,2]);; #Attach 1-cell|
  !gapprompt@gap>| !gapinput@e3:=attch(Y,1,[1,3]);; #Attach 1-cell|
  !gapprompt@gap>| !gapinput@e4:=attch(Y,1,[1,3]);; #Attach 1-cell|
  !gapprompt@gap>| !gapinput@e5:=attch(Y,1,[2,3]);; #Attach 1-cell|
  !gapprompt@gap>| !gapinput@e6:=attch(Y,1,[2,3]);; #Attach 1-cell|
  !gapprompt@gap>| !gapinput@f1:=attch(Y,2,[e1,e3,e5]);; #Attach 2-cell|
  !gapprompt@gap>| !gapinput@f2:=attch(Y,2,[e2,e4,e5]);; #Attach 2-cell|
  !gapprompt@gap>| !gapinput@f3:=attch(Y,2,[e2,e3,e6]);; #Attach 2-cell|
  !gapprompt@gap>| !gapinput@f4:=attch(Y,2,[e1,e4,e6]);; #Attach 2-cell|
  !gapprompt@gap>| !gapinput@Homology(Y,0);|
  [ 0 ]
  !gapprompt@gap>| !gapinput@Homology(Y,1);|
  [ 2 ]
  !gapprompt@gap>| !gapinput@Homology(Y,2);|
  [  ]`
  
\end{Verbatim}
 

The following example creates a 2\texttt{\symbol{45}}complex $K$ corresponding to the group presentation 

$G=\langle x,y,z:xyx^{-1}y^{-1}=1, yzy^{-1}z^{-1}=1,
zxz^{-1}x^{-1}=1\rangle$. 

The complex is shown to have the correct fundamental group and homology (since
it is the 2\texttt{\symbol{45}}skeleton of the 3\texttt{\symbol{45}}torus $S^1\times S^1\times S^1$). 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@S1:=RegularCWSphere(1);;|
  !gapprompt@gap>| !gapinput@W:=WedgeSum(S1,S1,S1);;|
  !gapprompt@gap>| !gapinput@F:=FundamentalGroupWithPathReps(W);; x:=F.1;;y:=F.2;;z:=F.3;;|
  !gapprompt@gap>| !gapinput@K:=RegularCWComplexWithAttachedRelatorCells(W,F,Comm(x,y),Comm(y,z),Comm(x,z));|
  Regular CW-complex of dimension 2
  
  !gapprompt@gap>| !gapinput@G:=FundamentalGroup(K);|
  <fp group on the generators [ f1, f2, f3 ]>
  !gapprompt@gap>| !gapinput@RelatorsOfFpGroup(G);|
  [ f2^-1*f1*f2*f1^-1, f1^-1*f3*f1*f3^-1, f2^-1*f3*f2*f3^-1 ]
  !gapprompt@gap>| !gapinput@Homology(K,1);|
  [ 0, 0, 0 ]
  !gapprompt@gap>| !gapinput@Homology(K,2);|
  [ 0, 0, 0 ]
  
\end{Verbatim}
 }

 
\section{\textcolor{Chapter }{Constructing a regular CW\texttt{\symbol{45}}complex from its face lattice}}\logpage{[ 1, 9, 0 ]}
\hyperdef{L}{X7B7354E68025FC92}{}
{
 

  

The following example creats a $2$\texttt{\symbol{45}}dimensional annulus $A$ as a regular CW\texttt{\symbol{45}}complex, and testing that it has the
correct integral homology $H_0(A,\mathbb Z)=\mathbb Z$, $H_1(A,\mathbb Z)=\mathbb Z$, $H_2(A,\mathbb Z)=0$. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@FL:=[];; #The face lattice|
  !gapprompt@gap>| !gapinput@FL[1]:=[[1,0],[1,0],[1,0],[1,0]];;|
  !gapprompt@gap>| !gapinput@FL[2]:=[[2,1,2],[2,3,4],[2,1,4],[2,2,3],[2,1,4],[2,2,3]];;|
  !gapprompt@gap>| !gapinput@FL[3]:=[[4,1,2,3,4],[4,1,2,5,6]];;|
  !gapprompt@gap>| !gapinput@FL[4]:=[];;|
  !gapprompt@gap>| !gapinput@A:=RegularCWComplex(FL);|
  Regular CW-complex of dimension 2
  
  !gapprompt@gap>| !gapinput@Homology(A,0);|
  [ 0 ]
  !gapprompt@gap>| !gapinput@Homology(A,1);|
  [ 0 ]
  !gapprompt@gap>| !gapinput@Homology(A,2);|
  [  ]
  
  
\end{Verbatim}
 

Next we construct the direct product $Y=A\times A\times A\times A\times A$ of five copies of the annulus. This is a $10$\texttt{\symbol{45}}dimensional CW complex involving $248832$ cells. It will be homotopy equivalent $Y\simeq X$ to a CW complex $X$ involving fewer cells. The CW complex $X$ may be non\texttt{\symbol{45}}regular. We compute the cochain complex $D_\ast = {\rm Hom}_{\mathbb Z}(C_\ast(X),\mathbb Z)$ from which the cohomology groups \\
$H^0(Y,\mathbb Z)=\mathbb Z$, \\
$H^1(Y,\mathbb Z)=\mathbb Z^5$, \\
$H^2(Y,\mathbb Z)=\mathbb Z^{10}$, \\
$H^3(Y,\mathbb Z)=\mathbb Z^{10}$, \\
$H^4(Y,\mathbb Z)=\mathbb Z^5$, \\
$H^5(Y,\mathbb Z)=\mathbb Z$, \\
$H^6(Y,\mathbb Z)=0$\\
 are obtained. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@Y:=DirectProduct(A,A,A,A,A);|
  Regular CW-complex of dimension 10
  
  !gapprompt@gap>| !gapinput@Size(Y);|
  248832
  !gapprompt@gap>| !gapinput@C:=ChainComplex(Y);|
  Chain complex of length 10 in characteristic 0 . 
  
  !gapprompt@gap>| !gapinput@D:=HomToIntegers(C);|
  Cochain complex of length 10 in characteristic 0 . 
  
  !gapprompt@gap>| !gapinput@Cohomology(D,0);|
  [ 0 ]
  !gapprompt@gap>| !gapinput@Cohomology(D,1);|
  [ 0, 0, 0, 0, 0 ]
  !gapprompt@gap>| !gapinput@Cohomology(D,2);|
  [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
  !gapprompt@gap>| !gapinput@Cohomology(D,3);|
  [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
  !gapprompt@gap>| !gapinput@Cohomology(D,4);|
  [ 0, 0, 0, 0, 0 ]
  !gapprompt@gap>| !gapinput@Cohomology(D,5);|
  [ 0 ]
  !gapprompt@gap>| !gapinput@Cohomology(D,6);|
  [  ]
  
  
\end{Verbatim}
 }

 
\section{\textcolor{Chapter }{Cup products}}\logpage{[ 1, 10, 0 ]}
\hyperdef{L}{X823FA6A9828FF473}{}
{
 

\textsc{Strategy 1: Use geometric group theory in low dimensions.} 

Continuing with the previous example, we consider the first and fifth
generators $g_1^1, g_5^1\in H^1(Y,\mathbb Z) =\mathbb Z^5$ and establish that their cup product $ g_1^1 \cup g_5^1 = - g_7^2 \in H^2(Y,\mathbb Z) =\mathbb Z^{10}$ is equal to minus the seventh generator of $H^2(Y,\mathbb Z)$. We also verify that $g_5^1\cup g_1^1 = - g_1^1 \cup g_5^1$. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@cup11:=CupProduct(FundamentalGroup(Y));|
  function( a, b ) ... end
  
  !gapprompt@gap>| !gapinput@cup11([1,0,0,0,0],[0,0,0,0,1]);|
  [ 0, 0, 0, 0, 0, 0, -1, 0, 0, 0 ]
  
  !gapprompt@gap>| !gapinput@cup11([0,0,0,0,1],[1,0,0,0,0]);|
  [ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 ]
  
  
\end{Verbatim}
 

This computation of low\texttt{\symbol{45}}dimensional cup products is
achieved using group\texttt{\symbol{45}}theoretic methods to approximate the
diagonal map $\Delta \colon Y \rightarrow Y\times Y$ in dimensions $\le 2$. In order to construct cup products in higher degrees \textsc{HAP} invokes three further strategies. 

\textsc{Strategy 2: implement the Alexander\texttt{\symbol{45}}Whitney map for
simplicial complexes.} 

For simplicial complexes the cup product is implemented using the standard
formula for the Alexander\texttt{\symbol{45}}Whitney chain map, together with
homotopy equivalences to improve efficiency. 

As a first example, the following commands construct simplicial complexes $K=(\mathbb S^1 \times \mathbb S^1) \# (\mathbb S^1 \times \mathbb S^1)$ and $L=(\mathbb S^1 \times \mathbb S^1) \vee \mathbb S^1 \vee \mathbb S^1$ and establish that they have the same cohomology groups. It is then shown that
the cup products $\cup_K\colon H^2(K,\mathbb Z)\times H^2(K,\mathbb Z) \rightarrow H^4(K,\mathbb
Z)$ and $\cup_L\colon H^2(L,\mathbb Z)\times H^2(L,\mathbb Z) \rightarrow H^4(L,\mathbb
Z)$ are antisymmetric bilinear forms of different ranks; hence $K$ and $L$ have different homotopy types. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@K:=ClosedSurface(2);|
  Simplicial complex of dimension 2.
  
  !gapprompt@gap>| !gapinput@L:=WedgeSum(WedgeSum(ClosedSurface(1),Sphere(1)),Sphere(1));|
  Simplicial complex of dimension 2.
  
  !gapprompt@gap>| !gapinput@Cohomology(K,0);Cohomology(L,0);|
  [ 0 ]
  [ 0 ]
  !gapprompt@gap>| !gapinput@Cohomology(K,1);Cohomology(L,1);|
  [ 0, 0, 0, 0 ]
  [ 0, 0, 0, 0 ]
  !gapprompt@gap>| !gapinput@Cohomology(K,2);Cohomology(L,2);|
  [ 0 ]
  [ 0 ]
  !gapprompt@gap>| !gapinput@gens:=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];;|
  !gapprompt@gap>| !gapinput@cupK:=CupProduct(K);;|
  !gapprompt@gap>| !gapinput@cupL:=CupProduct(L);;|
  !gapprompt@gap>| !gapinput@A:=NullMat(4,4);;B:=NullMat(4,4);;|
  !gapprompt@gap>| !gapinput@for i in [1..4] do|
  !gapprompt@>| !gapinput@for j in [1..4] do|
  !gapprompt@>| !gapinput@A[i][j]:=cupK(1,1,gens[i],gens[j])[1];|
  !gapprompt@>| !gapinput@B[i][j]:=cupL(1,1,gens[i],gens[j])[1];|
  !gapprompt@>| !gapinput@od;od;|
  !gapprompt@gap>| !gapinput@Display(A);|
  [ [   0,   0,   0,   1 ],
    [   0,   0,   1,   0 ],
    [   0,  -1,   0,   0 ],
    [  -1,   0,   0,   0 ] ]
  !gapprompt@gap>| !gapinput@Display(B);|
  [ [   0,   1,   0,   0 ],
    [  -1,   0,   0,   0 ],
    [   0,   0,   0,   0 ],
    [   0,   0,   0,   0 ] ]
  !gapprompt@gap>| !gapinput@Rank(A);|
  4
  !gapprompt@gap>| !gapinput@Rank(B);|
  2
  
\end{Verbatim}
 

 As a second example of the computation of cups products, the following
commands construct the connected sums $V=M\# M$ and $W=M\# \overline M$ where $M$ is the $K3$ complex surface which is stored as a pure simplicial complex of dimension 4
and where $\overline M$ denotes the opposite orientation on $M$. The simplicial structure on the $K3$ surface is taken from \cite{spreerkhuenel}. The commands then show that $H^2(V,\mathbb Z)=H^2(W,\mathbb Z)=\mathbb Z^{44}$ and $H^4(V,\mathbb Z)=H^4(W,\mathbb Z)=\mathbb Z$. The final commands compute the matrix $AV=(x\cup y)$ as $x,y$ range over a generating set for $H^2(V,\mathbb Z)$ and the corresponding matrix $AW$ for $W$. These two matrices are seen to have a different number of positive
eigenvalues from which we can conclude that $V$ is not homotopy equivalent to $W$. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@M:=SimplicialK3Surface();;|
  !gapprompt@gap>| !gapinput@V:=ConnectedSum(M,M,+1);|
  Simplicial complex of dimension 4.
  
  !gapprompt@gap>| !gapinput@W:=ConnectedSum(M,M,-1);|
  Simplicial complex of dimension 4.
  
  !gapprompt@gap>| !gapinput@Cohomology(V,2);|
  [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
  !gapprompt@gap>| !gapinput@Cohomology(W,2);|
  [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
  !gapprompt@gap>| !gapinput@Cohomology(V,4);|
  [ 0 ]
  !gapprompt@gap>| !gapinput@Cohomology(W,4);|
  [ 0 ]
  !gapprompt@gap>| !gapinput@cupV:=CupProduct(V);;|
  !gapprompt@gap>| !gapinput@cupW:=CupProduct(W);;|
  !gapprompt@gap>| !gapinput@AV:=NullMat(44,44);;      |
  !gapprompt@gap>| !gapinput@AW:=NullMat(44,44);;|
  !gapprompt@gap>| !gapinput@gens:=IdentityMat(44);;|
  !gapprompt@gap>| !gapinput@for i in [1..44] do|
  !gapprompt@>| !gapinput@for j in [1..44] do|
  !gapprompt@>| !gapinput@AV[i][j]:=cupV(2,2,gens[i],gens[j])[1];                               |
  !gapprompt@>| !gapinput@AW[i][j]:=cupW(2,2,gens[i],gens[j])[1];|
  !gapprompt@>| !gapinput@od;od;                                 |
  !gapprompt@gap>| !gapinput@SignatureOfSymmetricMatrix(AV);|
  rec( determinant := 1, negative_eigenvalues := 22, positive_eigenvalues := 22,
    zero_eigenvalues := 0 )
  !gapprompt@gap>| !gapinput@SignatureOfSymmetricMatrix(AW);|
  rec( determinant := 1, negative_eigenvalues := 6, positive_eigenvalues := 38, 
    zero_eigenvalues := 0 )
  
\end{Verbatim}
 A cubical cubical version of the Alexander\texttt{\symbol{45}}Whitney formula,
due to J.\texttt{\symbol{45}}P. Serre, could be used for computing the
cohomology ring of a regular CW\texttt{\symbol{45}}complex whose cells all
have a cubical combinatorial face lattice. This has not been implemented in
HAP. However, the following more general approach has been implemented. 

\textsc{Strategy 3: Implement a cellular approximation to the diagonal map on an
arbitrary finite regular CW\texttt{\symbol{45}}complex.} 

The following example calculates the cup product $H^2(W,\mathbb Z)\times H^2(W,\mathbb Z) \rightarrow H^4(W,\mathbb Z)$ for the $4$\texttt{\symbol{45}}dimensional orientable manifold $W=M\times M$ where $M$ is the closed surface of genus $2$. The manifold $W$ is stored as a regular CW\texttt{\symbol{45}}complex. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@M:=RegularCWComplex(ClosedSurface(2));;|
  !gapprompt@gap>| !gapinput@W:=DirectProduct(M,M);|
  Regular CW-complex of dimension 4
  
  !gapprompt@gap>| !gapinput@Size(W);|
  5776
  !gapprompt@gap>| !gapinput@W:=SimplifiedComplex(W);;|
  !gapprompt@gap>| !gapinput@Size(W);                                |
  1024
  
  !gapprompt@gap>| !gapinput@Homology(W,2);           |
  [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
  !gapprompt@gap>| !gapinput@Homology(W,4);|
  [ 0 ]
  
  !gapprompt@gap>| !gapinput@cup:=CupProduct(W);;|
  !gapprompt@gap>| !gapinput@SecondCohomologtGens:=IdentityMat(18);;   |
  !gapprompt@gap>| !gapinput@A:=NullMat(18,18);;|
  !gapprompt@gap>| !gapinput@for i in [1..18] do|
  !gapprompt@>| !gapinput@for j in [1..18] do|
  !gapprompt@>| !gapinput@A[i][j]:=cup(2,2,SecondCohomologtGens[i],SecondCohomologtGens[j])[1];|
  !gapprompt@>| !gapinput@od;od;|
  !gapprompt@gap>| !gapinput@Display(A);|
  [ [    0,   -1,    0,    0,    0,    0,    3,   -2,    0,    0,    0,    1,   -1,    0,    0,    1,    0,    0 ],
    [   -1,  -10,    1,    2,   -2,    1,    6,   -1,    0,   -3,    4,   -1,   -1,   -1,    4,   -2,   -2,    0 ],
    [    0,    1,   -2,    1,    0,   -1,    0,    0,    1,    0,   -1,    1,    0,    0,    1,   -1,    0,    0 ],
    [    0,    2,    1,   -2,    1,    0,    0,   -1,    0,    1,    0,    0,    0,    0,   -1,    2,    0,    0 ],
    [    0,   -2,    0,    1,    0,    0,    1,   -1,    0,    0,   -1,    0,    0,    0,    0,   -1,    0,    0 ],
    [    0,    1,   -1,    0,    0,    0,    0,    1,   -1,    1,    0,    0,    0,    0,    1,   -1,    0,    0 ],
    [    3,    6,    0,    0,    1,    0,   -4,    0,   -1,    2,    4,   -5,    2,   -1,    1,    0,    3,    0 ],
    [   -2,   -1,    0,   -1,   -1,    1,    0,    4,   -2,    0,    0,    3,   -1,    1,   -1,    0,   -2,    0 ],
    [    0,    0,    1,    0,    0,   -1,   -1,   -2,    4,   -3,  -10,    1,    0,    0,   -3,    3,    0,    0 ],
    [    0,   -3,    0,    1,    0,    1,    2,    0,   -3,    2,    3,    0,    0,    0,    1,   -3,    0,    0 ],
    [    0,    4,   -1,    0,   -1,    0,    4,    0,  -10,    3,   18,    1,    0,    0,    0,    4,    0,    1 ],
    [    1,   -1,    1,    0,    0,    0,   -5,    3,    1,    0,    1,    0,    0,    0,   -2,   -1,   -1,    0 ],
    [   -1,   -1,    0,    0,    0,    0,    2,   -1,    0,    0,    0,    0,    0,    0,    1,    0,    0,    0 ],
    [    0,   -1,    0,    0,    0,    0,   -1,    1,    0,    0,    0,    0,    0,    0,    0,   -1,   -1,    0 ],
    [    0,    4,    1,   -1,    0,    1,    1,   -1,   -3,    1,    0,   -2,    1,    0,    0,    2,    2,    0 ],
    [    1,   -2,   -1,    2,   -1,   -1,    0,    0,    3,   -3,    4,   -1,    0,   -1,    2,    0,    0,    0 ],
    [    0,   -2,    0,    0,    0,    0,    3,   -2,    0,    0,    0,   -1,    0,   -1,    2,    0,    0,    0 ],
    [    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    1,    0,    0,    0,    0,    0,    0,    0 ] ]
  
  !gapprompt@gap>| !gapinput@SignatureOfSymmetricMatrix(A);|
  rec( determinant := -1, negative_eigenvalues := 9, positive_eigenvalues := 9,
    zero_eigenvalues := 0 )
  
  
\end{Verbatim}
 The matrix $A$ representing the cup product $H^2(W,\mathbb Z)\times H^2(W,\mathbb Z) \rightarrow H^4(W,\mathbb Z)$ is shown to have $9$ positive eigenvalues, $9$ negative eigenvalues, and no zero eigenvalue. 

\textsc{Strategy 4: Guess and verify a cellular approximation to the diagonal map.} 

Many naturally occuring cell structures are neither simplicial nor cubical.
For a general regular CW\texttt{\symbol{45}}complex we can attempt to
construct a cellular inclusion $\overline Y \hookrightarrow Y\times Y$ with $\{(y,y):y\in Y\}\subset \overline Y$ and with projection $p\colon \overline Y \twoheadrightarrow Y$ that induces isomorphisms on integral homology. The function \texttt{DiagonalApproximation(Y)} constructs a candidate inclusion, but the projection $p\colon \overline Y \twoheadrightarrow Y$ needs to be tested for homology equivalence. If the candidate inclusion passes
this test then the function \texttt{CupProductOfRegularCWComplex{\textunderscore}alt(Y)}, involving the candidate space, can be used for cup products. (I think the
test is passed for all regular CW\texttt{\symbol{45}}complexes that are
subcomplexes of some Euclidean space with all cells convex polytopes
\texttt{\symbol{45}}\texttt{\symbol{45}} but a proof needs to be written
down!) 

The following example calculates $g_1^2 \cup g_2^2 \ne 0$ where $Y=T\times T$ is the direct product of two copies of a simplicial torus $T$, and where $g_k^n$ denotes the $k$\texttt{\symbol{45}}th generator in some basis of $H^n(Y,\mathbb Z)$. The direct product $Y$ is a CW\texttt{\symbol{45}}complex which is not a simplicial complex. 
\begin{Verbatim}[commandchars=@|B,fontsize=\small,frame=single,label=Example]
  @gapprompt|gap>B @gapinput|K:=RegularCWComplex(ClosedSurface(1));;B
  @gapprompt|gap>B @gapinput|Y:=DirectProduct(K,K);;B
  @gapprompt|gap>B @gapinput|cup:=CupProductOfRegularCWComplex_alt(Y);;B
  @gapprompt|gap>B @gapinput|cup(2,2,[1,0,0,0,0,0],[0,1,0,0,0,0]);B
  [ 5 ]
  
  @gapprompt|gap>B @gapinput|D:=DiagonalApproximation(Y);;B
  @gapprompt|gap>B @gapinput|p:=D!.projection;B
  Map of regular CW-complexes
  
  @gapprompt|gap>B @gapinput|P:=ChainMap(p);B
  Chain Map between complexes of length 4 . 
  
  @gapprompt|gap>B @gapinput|IsIsomorphismOfAbelianFpGroups(Homology(P,0));B
  true
  @gapprompt|gap>B @gapinput|IsIsomorphismOfAbelianFpGroups(Homology(P,2));B
  true
  @gapprompt|gap>B @gapinput|IsIsomorphismOfAbelianFpGroups(Homology(P,3));B
  true
  @gapprompt|gap>B @gapinput|IsIsomorphismOfAbelianFpGroups(Homology(P,4));B
  true
  
\end{Verbatim}
 }

 Of course, either of Strategies 2 or 3 could also be used for this example. To
use the Alexander\texttt{\symbol{45}}Whitney formula of Strategy 2 we would
need to give the direct product $Y=T\times T$ a simplicial structure. This could be obtained using the function \texttt{DirectProduct(T,T)}. The details are as follows. (The result is consistent with the preceding
computation since the choice of a basis for cohomology groups is far from
unique.) 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@K:=ClosedSurface(1);;                |
  !gapprompt@gap>| !gapinput@KK:=DirectProduct(K,K);|
  Simplicial complex of dimension 4.
  
  !gapprompt@gap>| !gapinput@cup:=CupProduct(KK);;                |
  !gapprompt@gap>| !gapinput@cup(2,2,[1,0,0,0,0,0],[0,1,0,0,0,0]);|
  [ 0 ]
  
\end{Verbatim}
 
\section{\textcolor{Chapter }{Intersection forms of $4$\texttt{\symbol{45}}manifolds}}\logpage{[ 1, 11, 0 ]}
\hyperdef{L}{X7F9B01CF7EE1D2FC}{}
{
 The cup product gives rise to the intersection form of a connected, closed,
orientable $4$\texttt{\symbol{45}}manifold $Y$ is a symmetric bilinear form 

$qY\colon H^2(Y,\mathbb Z)/Torsion \times H^2(Y,\mathbb Z)/Torsion
\longrightarrow \mathbb Z$ 

which we represent as a symmetric matrix. 

The following example constructs the direct product $L=S^2\times S^2$ of two $2$\texttt{\symbol{45}}spheres, the connected sum $M=\mathbb CP^2 \# \overline{\mathbb CP^2}$ of the complex projective plane $\mathbb CP^2$ and its oppositely oriented version $\overline{\mathbb CP^2}$, and the connected sum $N=\mathbb CP^2 \# \mathbb CP^2$. The manifolds $L$, $M$ and $N$ are each shown to have a CW\texttt{\symbol{45}}structure involving one $0$\texttt{\symbol{45}}cell, two $1$\texttt{\symbol{45}}cells and one $2$\texttt{\symbol{45}}cell. They are thus simply connected and have identical
cohomology. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@S:=Sphere(2);;|
  !gapprompt@gap>| !gapinput@S:=RegularCWComplex(S);;|
  !gapprompt@gap>| !gapinput@L:=DirectProduct(S,S);|
  Regular CW-complex of dimension 4
  
  !gapprompt@gap>| !gapinput@M:=ConnectedSum(ComplexProjectiveSpace(2),ComplexProjectiveSpace(2),-1);|
  Simplicial complex of dimension 4.
  
  !gapprompt@gap>| !gapinput@N:=ConnectedSum(ComplexProjectiveSpace(2),ComplexProjectiveSpace(2),+1);|
  Simplicial complex of dimension 4.
  
  !gapprompt@gap>| !gapinput@CriticalCells(L);|
  [ [ 4, 1 ], [ 2, 13 ], [ 2, 56 ], [ 0, 16 ] ]
  !gapprompt@gap>| !gapinput@CriticalCells(RegularCWComplex(M));|
  [ [ 4, 1 ], [ 2, 109 ], [ 2, 119 ], [ 0, 8 ] ]
  !gapprompt@gap>| !gapinput@CriticalCells(RegularCWComplex(N));|
  [ [ 4, 1 ], [ 2, 119 ], [ 2, 149 ], [ 0, 12 ] ]
  
\end{Verbatim}
 John Milnor showed (as a corollary to a theorem of J. H. C. Whitehead) that
the homotopy type of a simply connected 4\texttt{\symbol{45}}manifold is
determined by its quadratic form. More precisely, a form is said to be of \emph{type I (properly primitive)} if some diagonal entry of its matrix is odd. If every diagonal entry is even,
then the form is of \emph{type II (improperly primitive)}. The \emph{index} of a form is defined as the number of positive diagonal entries minus the
number of negative ones, after the matrix has been diagonalized over the real
numbers. 

\textsc{Theorem.} (Milnor \cite{milnor}) The oriented homotopy type of a simply connected, closed, orientable
4\texttt{\symbol{45}}manifold is determined by its second Betti number and the
index and type of its intersetion form; except possibly in the case of a
manifold with definite quadratic form of rank r {\textgreater} 9. 

 The following commands compute matrices representing the intersection forms $qL$, $qM$, $qN$. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@qL:=IntersectionForm(L);;|
  !gapprompt@gap>| !gapinput@qM:=IntersectionForm(M);;|
  !gapprompt@gap>| !gapinput@qN:=IntersectionForm(N);;|
  !gapprompt@gap>| !gapinput@Display(qL);|
  [ [  -2,   1 ],
    [   1,   0 ] ]
  !gapprompt@gap>| !gapinput@Display(qM);|
  [ [  1,  0 ],
    [  0,  1 ] ]
  !gapprompt@gap>| !gapinput@Display(qN);|
  [ [   1,   0 ],
    [   0,  -1 ] ]
  
\end{Verbatim}
 Since $qL$ is of type II, whereas $qM$ and $qN$ are of type I we see that the oriented homotopy type of $L$ is distinct to that of $M$ and that of $N$. Since $qM$ has index $2$ and $qN$ has index $0$ we see that that $M$ and $N$ also have distinct oriented homotopy types. }

 
\section{\textcolor{Chapter }{Cohomology Rings}}\logpage{[ 1, 12, 0 ]}
\hyperdef{L}{X80B6849C835B7F19}{}
{
 The cup product gives the cohomology $H^\ast(X,R)$ of a space $X$ with coefficients in a ring $R$ the structure of a graded commutitive ring. The function \texttt{CohomologyRing(Y,p)} returns the cohomology as an algebra for $Y$ a simplicial complex and $R=\mathbb Z_p$ the field of $p$ elements. For more general regular CW\texttt{\symbol{45}}complexes or $R=\mathbb Z$ the cohomology ring structure can be determined using the function \texttt{CupProduct(Y)}. 

The folowing commands compute the mod $2$ cohomology ring $H^\ast(W,\mathbb Z_2)$ of the above wedge sum $W=M\vee N$ of a $2$\texttt{\symbol{45}}dimensional orientable simplicial surface of genus 2 and
the $K3$ complex simplicial surface (of real dimension 4). 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@M:=ClosedSurface(2);;|
  !gapprompt@gap>| !gapinput@N:=SimplicialK3Surface();;|
  !gapprompt@gap>| !gapinput@W:=WedgeSum(M,N);;|
  !gapprompt@gap>| !gapinput@A:=CohomologyRing(W,2);|
  <algebra of dimension 29 over GF(2)>
  !gapprompt@gap>| !gapinput@x:=Basis(A)[25];|
  v.25
  !gapprompt@gap>| !gapinput@y:=Basis(A)[27];|
  v.27
  !gapprompt@gap>| !gapinput@x*y;|
  v.29
  
\end{Verbatim}
 

The functions \texttt{CupProduct} and \texttt{IntersectionForm} can be used to determine integral cohomology rings. For example, the integral
cohomology ring of an arbitrary closed surface was calculated in \cite[Theorem 3.5]{goncalves}. For any given surface $M$ this result can be recalculated using the intersection form. For instance, for
an orientable surface of genus $g$ it is well\texttt{\symbol{45}}known that $H^1(M,\mathbb Z)=\mathbb Z^{2g}$, $H^2(M,\mathbb Z)=\mathbb Z$. The ring structure multiplication is thus given by the matrix of the
intersection form. For say $g=3$ the ring multiplication is given, with respect to some cohomology basis, in
the following. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@M:=ClosedSurface(3);;|
  !gapprompt@gap>| !gapinput@Display(IntersectionForm(M));|
  [ [   0,   0,   1,  -1,  -1,   0 ],
    [   0,   0,   0,   1,   1,   0 ],
    [  -1,   0,   0,   1,   1,  -1 ],
    [   1,  -1,  -1,   0,   0,   1 ],
    [   1,  -1,  -1,   0,   0,   0 ],
    [   0,   0,   1,  -1,   0,   0 ] ]
  
\end{Verbatim}
 By changing the basis $B$ for $H^1(M,\mathbb Z)$ we obtain the following simpler matrix representing multiplication in $H^\ast(M,\mathbb Z)$. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@B:=[ [ 0, 1, -1, -1, 1, 0 ],|
  !gapprompt@>| !gapinput@        [ 1, 0, 1, 1, 0, 0 ],|
  !gapprompt@>| !gapinput@        [ 0, 0, 1, 0, 0, 0 ],|
  !gapprompt@>| !gapinput@        [ 0, 0, 0, 1, -1, 0 ],|
  !gapprompt@>| !gapinput@        [ 0, 0, 1, 1, 0, 0 ],|
  !gapprompt@>| !gapinput@        [ 0, 0, 1, 1, 0, 1 ] ];;|
  !gapprompt@gap>| !gapinput@Display(IntersectionForm(M,B));|
  [ [   0,   1,   0,   0,   0,   0 ],
    [  -1,   0,   0,   0,   0,   0 ],
    [   0,   0,   0,   0,   1,   0 ],
    [   0,   0,   0,   0,   0,   1 ],
    [   0,   0,  -1,   0,   0,   0 ],
    [   0,   0,   0,  -1,   0,   0 ] ]
  
\end{Verbatim}
 }

 
\section{\textcolor{Chapter }{Bockstein homomorphism}}\logpage{[ 1, 13, 0 ]}
\hyperdef{L}{X83035DEC7C9659C6}{}
{
 The following example evaluates the Bockstein homomorphism $\beta_2\colon H^\ast(X,\mathbb Z_2) \rightarrow H^{\ast +1}(X,\mathbb Z_2)$ on an additive basis for $X=\Sigma^{100}(\mathbb RP^2 \times \mathbb RP^2)$ the $100$\texttt{\symbol{45}}fold suspension of the direct product of two projective
planes. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@P:=SimplifiedComplex(RegularCWComplex(ClosedSurface(-1)));|
  Regular CW-complex of dimension 2
  !gapprompt@gap>| !gapinput@PP:=DirectProduct(P,P);;|
  !gapprompt@gap>| !gapinput@SPP:=Suspension(PP,100); |
  Regular CW-complex of dimension 104
  !gapprompt@gap>| !gapinput@A:=CohomologyRing(SPP,2); |
  <algebra of dimension 9 over GF(2)>
  !gapprompt@gap>| !gapinput@List(Basis(A),x->Bockstein(A,x));|
  [ 0*v.1, v.4, v.6, 0*v.1, v.7+v.8, 0*v.1, v.9, v.9, 0*v.1 ]
  
  
\end{Verbatim}
 If only the Bockstein homomorphism is required, and not the cohomology ring
structure, then the Bockstein could also be computedirectly from a chain
complex. The following computes the Bockstein $\beta_2\colon H^2(Y,\mathbb Z_2) \rightarrow H^{3}(Y,\mathbb Z_2)$ for the direct product $Y=K \times K \times K \times K$ of four copies of the Klein bottle represented as a regular
CW\texttt{\symbol{45}}complex with $331776$ cells. The order of the kernel and image of $\beta_2$ are computed. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@K:=ClosedSurface(-2);;                |
  !gapprompt@gap>| !gapinput@K:=SimplifiedComplex(RegularCWComplex(K));;|
  !gapprompt@gap>| !gapinput@KKKK:=DirectProduct(K,K,K,K); |
  Regular CW-complex of dimension 8
  !gapprompt@gap>| !gapinput@Size(KKKK);|
  331776
  !gapprompt@gap>| !gapinput@C:=ChainComplex(KKKK);;|
  !gapprompt@gap>| !gapinput@bk:=Bockstein(C,2,2);;|
  !gapprompt@gap>| !gapinput@Order(Kernel(bk));|
  1024
  !gapprompt@gap>| !gapinput@Order(Image(bk)); |
  262144
  
\end{Verbatim}
 }

 
\section{\textcolor{Chapter }{Diagonal maps on associahedra and other polytopes}}\logpage{[ 1, 14, 0 ]}
\hyperdef{L}{X87135D067B6CDEEC}{}
{
 By a \emph{diagonal approximation} on a regular CW\texttt{\symbol{45}}complex $X$ we mean any cellular map $\Delta\colon X\rightarrow X\times X$ that is homotopic to the diagonal map $X\rightarrow X\times X, x\mapsto (x,x)$ and equal to the diagonal map when restricted to the $0$\texttt{\symbol{45}}skeleton. Theoretical formulae for diagonal maps on a
polytope $X$ can have interesting combinatorial aspects. To illustrate this let us
consider, for $n=3$, the $n$\texttt{\symbol{45}}dimensional polytope ${\cal K}^{n+2}$ known as the associahedron. The following commands display the $1$\texttt{\symbol{45}}skeleton of ${\cal K}^{5}$. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@n:=3;;Y:=RegularCWAssociahedron(n+2);;|
  !gapprompt@gap>| !gapinput@Display(GraphOfRegularCWComplex(Y));|
  
      
\end{Verbatim}
 

  

 The induced chain map $C_\ast({\cal K}^{n+2}) \rightarrow C_\ast({\cal K}^{n+2}\times {\cal K}^{n+2})$ sends the unique free generator $e^n_1$ of $C_n({\cal K}^{n+2})$ to a sum $\Delta(e^n_1)$ of a number of distinct free generators of $C_n({\cal K}^{n+2}\times {\cal K}^{n+2})$. Let $|\Delta(e^n_1)|$ denote the number of free generators. For $n=3$ the following commands show that $|\Delta(e^3_1)|=22$ with each free generator occurring with coefficient $\pm 1$. 
\begin{Verbatim}[commandchars=@|B,fontsize=\small,frame=single,label=Example]
  @gapprompt|gap>B @gapinput|n:=3;;Y:=RegularCWAssociahedron(n+2);;    B
  @gapprompt|gap>B @gapinput|D:=DiagonalChainMap(Y);;Filtered(D!.mapping([1],n),x->x<>0);B
  [ 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1 ]
  
                                  
\end{Verbatim}
 Repeating this example for $0\le n\le 6$ yields the sequence $|\Delta(e^n_1)|: 1, 2, 6, 22, 91, 408, 1938, \cdots$. The \href{https://oeis.org/A000139} {On\texttt{\symbol{45}}line Encyclopedia of Integer Sequences} explains that this is the beginning of the sequence given by thnumber of
canopy intervals in the Tamari lattices. 

Repeating the same experiment for the permutahedron, using the command \texttt{RegularCWPermutahedron(n)}, yields the sequence $|\Delta(e^n_1)|: 1, 2, 8, 50, 432, 4802,\cdots$. The \href{https://oeis.org/A007334} {On\texttt{\symbol{45}}line Encyclopedia of Integer Sequences} explains that this is the beginning of the sequence given by the number of
spanning trees in the graph $K_{n}/e$, which results from contracting an edge $e$ in the complete graph $K_{n}$ on $n$ vertices. 

Repeating the experiment for the cube, using the command \texttt{RegularCWCube(n)}, yields the sequence $|\Delta(e^n_1)|: 1, 2, 4, 8, 16, 32,\cdots$. 

Repeating the experiment for the simplex, using the command \texttt{RegularCWSimplex(n)}, yields the sequence $|\Delta(e^n_1)|: 1, 2, 3, 4, 5, 6,\cdots$. }

 
\section{\textcolor{Chapter }{CW maps and induced homomorphisms}}\logpage{[ 1, 15, 0 ]}
\hyperdef{L}{X8771FF2885105154}{}
{
 

\emph{strictly cellular} map $f\colon X\rightarrow Y$ of regular CW\texttt{\symbol{45}}complexes is a cellular map for which the
image of any cell is a cell (of possibly lower dimension). Inclusions of
CW\texttt{\symbol{45}}subcomplexes, and projections from a direct product to a
factor, are examples of such maps. Strictly cellular maps can be represented
in \textsc{HAP}, and their induced homomorphisms on (co)homology and on fundamental groups
can be computed. 

 The following example begins by visualizing the trefoil knot $\kappa \in \mathbb R^3$. It then constructs a regular CW structure on the complement $Y= D^3\setminus {\rm Nbhd}(\kappa) $ of a small tubular open neighbourhood of the knot lying inside a large closed
ball $D^3$. The boundary of this tubular neighbourhood is a $2$\texttt{\symbol{45}}dimensional CW\texttt{\symbol{45}}complex $B$ homeomorphic to a torus $\mathbb S^1\times \mathbb S^1$ with fundamental group $\pi_1(B)=<a,b\, :\, aba^{-1}b^{-1}=1>$. The inclusion map $f\colon B\hookrightarrow Y$ is constructed. Then a presentation $\pi_1(Y)= <x,y\, |\, xy^{-1}x^{-1}yx^{-1}y^{-1}>$ and the induced homomorphism
\$\$\texttt{\symbol{92}}pi{\textunderscore}1(B)\texttt{\symbol{92}}rightarrow
\texttt{\symbol{92}}pi{\textunderscore}1(Y), a\texttt{\symbol{92}}mapsto
y\texttt{\symbol{94}}\texttt{\symbol{123}}\texttt{\symbol{45}}1\texttt{\symbol{125}}xy\texttt{\symbol{94}}2xy\texttt{\symbol{94}}\texttt{\symbol{123}}\texttt{\symbol{45}}1\texttt{\symbol{125}},
b\texttt{\symbol{92}}mapsto y \$\$ are computed. This induced homomorphism is
an example of a \emph{peripheral system} and is known to contain sufficient information to characterize the knot up to
ambient isotopy. 

 Finally, it is verified that the induced homology homomorphism $H_2(B,\mathbb Z) \rightarrow H_2(Y,\mathbb Z)$ is an isomomorphism. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@K:=PureCubicalKnot(3,1);;|
  !gapprompt@gap>| !gapinput@ViewPureCubicalKnot(K);;|
  
\end{Verbatim}
  
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@K:=PureCubicalKnot(3,1);;|
  !gapprompt@gap>| !gapinput@f:=KnotComplementWithBoundary(ArcPresentation(K));|
  Map of regular CW-complexes
  
  !gapprompt@gap>| !gapinput@G:=FundamentalGroup(Target(f));|
  <fp group of size infinity on the generators [ f1, f2 ]>
  !gapprompt@gap>| !gapinput@RelatorsOfFpGroup(G);|
  [ f1*f2^-1*f1^-1*f2*f1^-1*f2^-1 ]
  
  !gapprompt@gap>| !gapinput@F:=FundamentalGroup(f);|
  [ f1, f2 ] -> [ f2^-1*f1*f2^2*f1*f2^-1, f1 ]
  
  
  !gapprompt@gap>| !gapinput@phi:=ChainMap(f);|
  Chain Map between complexes of length 2 . 
  
  !gapprompt@gap>| !gapinput@H:=Homology(phi,2);|
  [ g1 ] -> [ g1 ]
  
  
\end{Verbatim}
 }

 
\section{\textcolor{Chapter }{Constructing a simplicial complex from a regular CW\texttt{\symbol{45}}complex}}\logpage{[ 1, 16, 0 ]}
\hyperdef{L}{X853D6B247D0E18DB}{}
{
 The following example constructs a $3$\texttt{\symbol{45}}dimensional pure regular CW\texttt{\symbol{45}}complex $K$ whose $3$\texttt{\symbol{45}}cells are permutahedra. It then constructs the simplicial
complex $B$ by taking barycentric subdivision. It then constructes a smaller, homotopy
equivalent, simplicial complex $N$ by taking the nerve of the cover of $K$ by the closures of its $3$\texttt{\symbol{45}}cells. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@K:=RegularCWComplex(PureComplexComplement(PurePermutahedralKnot(3,1)));|
  Regular CW-complex of dimension 3
  
  !gapprompt@gap>| !gapinput@Size(K);|
  77923
  !gapprompt@gap>| !gapinput@B:=BarycentricSubdivision(K);|
  Simplicial complex of dimension 3.
  
  !gapprompt@gap>| !gapinput@Size(B);|
  1622517
  !gapprompt@gap>| !gapinput@N:=Nerve(K);|
  Simplicial complex of dimension 3.
  
  !gapprompt@gap>| !gapinput@Size(N);|
  48745
  
\end{Verbatim}
 }

 
\section{\textcolor{Chapter }{Some limitations to representing spaces as regular CW complexes}}\logpage{[ 1, 17, 0 ]}
\hyperdef{L}{X7900FD197F175551}{}
{
 By a \emph{classifying space} for a group $G$ we mean a path\texttt{\symbol{45}}connected space $BG$ with fundamental group $\pi_1(BG)\cong G$ isomorphic to $G$ and with higher homotopy groups $\pi_n(BG)=0$ trivial for all $n\ge 2$. The homology of the group $G$ can be defined to be the homology of $BG$: $H_n(G,\mathbb Z) = H_n(BG,\mathbb Z)$. 

In principle $BG$ can always be constructed as a regular CW\texttt{\symbol{45}}complex. For
instance, the following extremely slow commands construct the $5$\texttt{\symbol{45}}skeleton $Y^5$ of a regular CW\texttt{\symbol{45}}classifying space $Y=BG$ for the dihedral group of order $16$ and use it to calculate $H_1(G,\mathbb Z)=\mathbb Z_2\oplus \mathbb Z_2$, $H_2(G,\mathbb Z)=\mathbb Z_2$, $H_3(G,\mathbb Z)=\mathbb Z_{2}\oplus \mathbb Z_2 \oplus \mathbb Z_8$, $H_4(G,\mathbb Z)=\mathbb Z_{2} \oplus \mathbb Z_2$. The final command shows that the constructed space $Y^5$ in this example is a $5$\texttt{\symbol{45}}dimensional regular CW\texttt{\symbol{45}}complex with a
total of $15289$ cells. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@Y:=ClassifyingSpaceFiniteGroup(DihedralGroup(16),5);|
  Regular CW-complex of dimension 5
  !gapprompt@gap>| !gapinput@Homology(Y,1);|
  [ 2, 2 ]
  !gapprompt@gap>| !gapinput@Homology(Y,2);|
  [ 2 ]
  !gapprompt@gap>| !gapinput@Homology(Y,3);|
  [ 2, 2, 8 ]
  !gapprompt@gap>| !gapinput@Homology(Y,4);|
  [ 2, 2 ]
  !gapprompt@gap>| !gapinput@Size(Y);|
  15289
  
  
\end{Verbatim}
 The $n$\texttt{\symbol{45}}skeleton of a regular CW\texttt{\symbol{45}}classifying
space of a finite group necessarily involves a large number of cells. For the
group $G=C_2$ of order two a classifying space can be take to be real projective space $BG=\mathbb RP^\infty$ with $n$\texttt{\symbol{45}}skeleton $BG^n=\mathbb RP^n$. To realize $BG^n=\mathbb RP^n$ as a simplicial complex it is known that one needs at least 6 vertices for $n=2$, at least 11 vertices for $n=3$ and at least 16 vertices for $n=4$. One can do a bit better by allowing $BG$ to be a regular CW\texttt{\symbol{45}}complex. For instance, the following
creates $\mathbb RP^4$ as a regular CW\texttt{\symbol{45}}complex with 5 vertices. This construction
of $\mathbb RP^4$ involves a total of 121 cells. A minimal triangulation of $\mathbb RP^4$ would require 991 simplices. 
\begin{Verbatim}[commandchars=@|A,fontsize=\small,frame=single,label=Example]
  @gapprompt|gap>A @gapinput|Y:=ClassifyingSpaceFiniteGroup(CyclicGroup(2),4);A
  Regular CW-complex of dimension 4
  @gapprompt|gap>A @gapinput|Y!.nrCells(0);                                   A
  5
  @gapprompt|gap>A @gapinput|Y!.nrCells(1);A
  20
  @gapprompt|gap>A @gapinput|Y!.nrCells(2);A
  40
  @gapprompt|gap>A @gapinput|Y!.nrCells(3);                                   A
  40
  @gapprompt|gap>A @gapinput|Y!.nrCells(4);A
  16
  
\end{Verbatim}
 The space $\mathbb RP^n$ can be given the structure of a regular CW\texttt{\symbol{45}}complex with $n+1$ vertices. Kuehnel has described a triangulation of $\mathbb RP^n$ with $2^{n+1}-1$ vertices. 

The above examples suggest that it is inefficient/impractical to attempt to
compute the $n$\texttt{\symbol{45}}th homology of a group $G$ by first constructing a regular CW\texttt{\symbol{45}}complex corresponding
for the $n+1$ of a classifying space $BG$, even for quite small groups $G$, since such spaces seem to require a large number of cells in each dimension.
On the other hand, by dropping the requirement that $BG$ must be regular we can obtain much smaller CW\texttt{\symbol{45}}complexes.
The following example constructs $\mathbb RP^9$ as a regular CW\texttt{\symbol{45}}complex and then shows that it can be given
a non\texttt{\symbol{45}}regular CW\texttt{\symbol{45}}structure with just one
cell in each dimension. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@Y:=ClassifyingSpaceFiniteGroup(CyclicGroup(2),9);|
  Regular CW-complex of dimension 9
  !gapprompt@gap>| !gapinput@Size(Y);|
  29524
  !gapprompt@gap>| !gapinput@CriticalCells(Y);|
  [ [ 9, 1 ], [ 8, 124 ], [ 7, 1215 ], [ 6, 1246 ], [ 5, 487 ], [ 4, 254 ], 
    [ 3, 117 ], [ 2, 54 ], [ 1, 9 ], [ 0, 10 ] ]
  
\end{Verbatim}
 It is of course well\texttt{\symbol{45}}known that $\mathbb RP^\infty$ admits a theoretically described CW\texttt{\symbol{45}}structure with just one
cell in each dimension. The question is: how best to represent this on a
computer? }

 
\section{\textcolor{Chapter }{Equivariant CW complexes}}\logpage{[ 1, 18, 0 ]}
\hyperdef{L}{X85A579217DCB6CC8}{}
{
 As just explained, the representations of spaces as simplicial complexes and
regular CW complexes have their limitations. One limitation is that the number
of cells needed to describe a space can be unnecessarily large. A minimal
simplicial complex structure for the torus has $7$ vertices, $21$ edges and $14$ triangles. A minimal regular CW\texttt{\symbol{45}}complex structure for the
torus has $4$ vertices, $8$ edges and $4$ cells of dimension $2$. By using simplicial sets (which are like simplicial complexes except that
they allow the freedom to attach simplicial cells by gluing their boundary
non\texttt{\symbol{45}}homeomorphically) one obtains a minimal triangulation
of the torus involving $1$ vertex, $3$ edges and $2$ cells of dimension $2$. By using non\texttt{\symbol{45}}regular CW\texttt{\symbol{45}}complexes one
obtains a minimal cell structure involving $1$ vertex, $2$ edges and $1$ cell of dimension $2$. Minimal cell structures (in the four different categories) for the torus are
illustrated as follows. 

  

  

A second limitation to our representations of simplicial and regular
CW\texttt{\symbol{45}}complexes is that they apply only to structures with
finitely many cells. They do no apply, for instance, to the simplicial complex
structure on the real line $\mathbb R$ in which each each integer $n$ is a vertex and each interval $[n,n+1]$ is an edge. 

 Simplicial sets provide one approach to the efficient combinatorial
representation of certain spaces. So too do cubical sets (the analogues of
simplicial sets in which each cell has the combinatorics of an $n$\texttt{\symbol{45}}cube rather than an $n$\texttt{\symbol{45}}simplex). Neither of these two approaches has been
implemented in \textsc{HAP}. 

 Simplicial sets endowed with the action of a (possibly infinite) group $G$ provide for an efficient representation of (possibly infinite) cell structures
on a wider class of spaces. Such a structure can be made precise and is known
as a \emph{simplicial group}. Some functionality for simplicial groups is implemented in \textsc{HAP} and described in Chapter \ref{chapSimplicialGroups}. 

A regular CW\texttt{\symbol{45}}complex endowed with the action of a (possibly
infinite) group $G$ is an alternative approach to the efficient combinatorial representation of
(possibly infinite) cell structures on spaces. Much of \textsc{HAP} is focused on this approach. As a first example of the idea, the following
commands construct the infinite regular CW\texttt{\symbol{45}}complex $Y=\widetilde T$ arising as the universal cover of the torus $T=\mathbb S^1\times \mathbb S^1$ where $T$ is given the above minimal non\texttt{\symbol{45}}regular CW structure
involving $1$ vertex, $2$ edges, and $1$ cell of dimension $2$. The homology $H_n(T,\mathbb Z)$ is computed and the fundamental group of the torus $T$ is recovered. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@F:=FreeGroup(2);;x:=F.1;;y:=F.2;;|
  !gapprompt@gap>| !gapinput@G:=F/[ x*y*x^-1*y^-1 ];;|
  !gapprompt@gap>| !gapinput@Y:=EquivariantTwoComplex(G);|
  Equivariant CW-complex of dimension 2
  
  !gapprompt@gap>| !gapinput@C:=ChainComplexOfQuotient(Y);|
  Chain complex of length 2 in characteristic 0 . 
  
  !gapprompt@gap>| !gapinput@Homology(C,0);|
  [ 0 ]
  !gapprompt@gap>| !gapinput@Homology(C,1);|
  [ 0, 0 ]
  !gapprompt@gap>| !gapinput@Homology(C,2);|
  [ 0 ]
  !gapprompt@gap>| !gapinput@FundamentalGroupOfQuotient(Y);|
  <fp group of size infinity on the generators [ f1, f2 ]>
  
\end{Verbatim}
 

As a second example, the following comands load group number $9$ in the library of $3$\texttt{\symbol{45}}dimensional crystallographic groups. They verify that $G$ acts freely on $\mathbb R^3$ (i.e. $G$ is a \emph{Bieberbach group}) and then construct a $G$\texttt{\symbol{45}}equivariant CW\texttt{\symbol{45}}complex $Y=\mathbb R^3$ corresponding to the tessellation of $\mathbb R^3$ by a fundamental domain for $G$. Finally, the cohomology $H_n(M,\mathbb Z)$ of the $3$\texttt{\symbol{45}}dimensional closed manifold $M=\mathbb R^3/G$ is computed. The manifold $M$ is seen to be non\texttt{\symbol{45}}orientable (since it's
top\texttt{\symbol{45}}dimensional homology is trivial) and has a
non\texttt{\symbol{45}}regular CW structure with $1$ vertex, $3$ edges, $3$ cells of dimension $2$, and $1$ cell of dimension $3$. (This example uses Polymake software.) 
\begin{Verbatim}[commandchars=@|D,fontsize=\small,frame=single,label=Example]
  @gapprompt|gap>D @gapinput|G:=SpaceGroup(3,9);;D
  @gapprompt|gap>D @gapinput|IsAlmostBieberbachGroup(Image(IsomorphismPcpGroup(G)));D
  true
  @gapprompt|gap>D @gapinput|Y:=EquivariantEuclideanSpace(G,[0,0,0]);D
  Equivariant CW-complex of dimension 3
  
  @gapprompt|gap>D @gapinput|Y!.dimension(0);D
  1
  @gapprompt|gap>D @gapinput|Y!.dimension(1);D
  3
  @gapprompt|gap>D @gapinput|Y!.dimension(2);D
  3
  @gapprompt|gap>D @gapinput|Y!.dimension(3);D
  1
  @gapprompt|gap>D @gapinput|C:=ChainComplexOfQuotient(Y);D
  Chain complex of length 3 in characteristic 0 . 
  
  @gapprompt|gap>D @gapinput|Homology(C,0);D
  [ 0 ]
  @gapprompt|gap>D @gapinput|Homology(C,1);D
  [ 0, 0 ]
  @gapprompt|gap>D @gapinput|Homology(C,2);D
  [ 2, 0 ]
  @gapprompt|gap>D @gapinput|Homology(C,3);D
  [  ]
  
\end{Verbatim}
 The fundamental domain for the action of $G$ in the above example is constructed to be the
Dirichlet\texttt{\symbol{45}}Voronoi region in $\mathbb R^3$ whose points are closer to the origin $v=(0,0,0)$ than to any other point $v^g$ in the orbit of the origin under the action of $G$. This fundamental domain can be visualized as follows. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@F:=FundamentalDomainStandardSpaceGroup([0,0,0],G);|
  <polymake object>
  !gapprompt@gap>| !gapinput@Polymake(F,"VISUAL");|
  
\end{Verbatim}
 

 

 Other fundamental domains for the same group action can be obtained by
choosing some other starting vector $v$. For example: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@F:=FundamentalDomainStandardSpaceGroup([1/2,1/3,1/5],G);;|
  !gapprompt@gap>| !gapinput@Polymake(F,"VISUAL");|
  
  !gapprompt@gap>| !gapinput@F:=FundamentalDomainStandardSpaceGroup([1/7,1/2,1/2],G);|
  !gapprompt@gap>| !gapinput@Polymake(F,"VISUAL");|
  
\end{Verbatim}
 

  }

 
\section{\textcolor{Chapter }{Orbifolds and classifying spaces}}\label{secOrbifolds}
\logpage{[ 1, 19, 0 ]}
\hyperdef{L}{X86881717878ADCD6}{}
{
 If a discrete group $G$ acts on Euclidean space or hyperbolic space with finite stabilizer groups then
we say that the quotient space obtained by killing the action of $G$ an an \emph{orbifold}. If the stabilizer groups are all trivial then the quotient is of course a
manifold. 

An orbifold is represented as a $G$\texttt{\symbol{45}}equivariant regular CW\texttt{\symbol{45}}complex together
with the stabilizer group for a representative of each orbit of cells and its
subgroup consisting of those group elements that preserve the cell
orientation. \textsc{HAP} stores orbifolds using the data type of \emph{non\texttt{\symbol{45}}free resolution} and uses them mainly as a first step in constructing free $\mathbb ZG$\texttt{\symbol{45}}resolutions of $\mathbb Z$. 

 The following commands use an $8$\texttt{\symbol{45}}dimensional equivariant deformation retract of a $GL_3(\mathbb Z[{\bf i}])$\texttt{\symbol{45}}orbifold structure on hyperbolic space to compute $H_5(GL_3({\mathbb Z}[{\bf i}],\mathbb Z) = \mathbb Z_2^5\oplus \mathbb Z_4^2$. (The deformation retract is stored in a library and was supplied by Mathieu
Dutour Sikiric.) 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@Orbifold:=ContractibleGcomplex("PGL(3,Z[i])");|
  Non-free resolution in characteristic 0 for matrix group . 
  No contracting homotopy available. 
  
  !gapprompt@gap>| !gapinput@R:=FreeGResolution(Orbifold,6);|
  Resolution of length 5 in characteristic 0 for matrix group . 
  No contracting homotopy available. 
  
  !gapprompt@gap>| !gapinput@Homology(TensorWithIntegers(R),5);|
  [ 2, 2, 2, 2, 2, 4, 4 ]
  
\end{Verbatim}
 The next example computes an orbifold structure on $\mathbb R^4$, and then the first $12$ degrees of a free resolution/classifying space, for the second $4$\texttt{\symbol{45}}dimensional crystallographic group $G$ in the library of crystallographic groups. The resolution is shown to be
periodic of period $2$ in degrees $\ge 5$. The cohomology is seen to have $11$ ring generators in degree $2$ and no further ring generators. The cohomology groups are:
\$\$H\texttt{\symbol{94}}n(G,\texttt{\symbol{92}}mathbb Z)
=\texttt{\symbol{92}}left(
\texttt{\symbol{92}}begin\texttt{\symbol{123}}array\texttt{\symbol{125}}\texttt{\symbol{123}}ll\texttt{\symbol{125}}
0, \& \texttt{\symbol{123}}\texttt{\symbol{92}}rm
odd\texttt{\symbol{126}}\texttt{\symbol{125}} n\texttt{\symbol{92}}ge
1\texttt{\symbol{92}}\texttt{\symbol{92}} \texttt{\symbol{92}}mathbb
Z{\textunderscore}2\texttt{\symbol{94}}5 \texttt{\symbol{92}}oplus
\texttt{\symbol{92}}mathbb Z\texttt{\symbol{94}}6, \&
n=2\texttt{\symbol{92}}\texttt{\symbol{92}} \texttt{\symbol{92}}mathbb
Z{\textunderscore}2\texttt{\symbol{94}}\texttt{\symbol{123}}15\texttt{\symbol{125}}\texttt{\symbol{92}}oplus
\texttt{\symbol{92}}mathbb Z, \& n=4\texttt{\symbol{92}}\texttt{\symbol{92}}
\texttt{\symbol{92}}mathbb
Z{\textunderscore}2\texttt{\symbol{94}}\texttt{\symbol{123}}16\texttt{\symbol{125}},
\& \texttt{\symbol{123}}\texttt{\symbol{92}}rm
even\texttt{\symbol{126}}\texttt{\symbol{125}} n \texttt{\symbol{92}}ge 6
.\texttt{\symbol{92}}\texttt{\symbol{92}}
\texttt{\symbol{92}}end\texttt{\symbol{123}}array\texttt{\symbol{125}}\texttt{\symbol{92}}right.\$\$ 
\begin{Verbatim}[commandchars=@|A,fontsize=\small,frame=single,label=Example]
  @gapprompt|gap>A @gapinput|G:=SpaceGroup(4,2);;A
  @gapprompt|gap>A @gapinput|R:=ResolutionCubicalCrystGroup(G,12);A
  Resolution of length 12 in characteristic 0 for <matrix group with 
  5 generators> . 
  
  @gapprompt|gap>A @gapinput|R!.dimension(5);A
  16
  @gapprompt|gap>A @gapinput|R!.dimension(7);A
  16
  @gapprompt|gap>A @gapinput|List([1..16],k->R!.boundary(5,k)=R!.boundary(7,k));A
  [ true, true, true, true, true, true, true, true, true, true, true, true, 
    true, true, true, true ]
  
  @gapprompt|gap>A @gapinput|C:=HomToIntegers(R);A
  Cochain complex of length 12 in characteristic 0 . 
  
  @gapprompt|gap>A @gapinput|Cohomology(C,0);A
  [ 0 ]
  @gapprompt|gap>A @gapinput|Cohomology(C,1);A
  [  ]
--> --------------------

--> maximum size reached

--> --------------------

92%


¤ Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.0.26Bemerkung:  (vorverarbeitet)  ¤

*Bot Zugriff






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.