GAP (HAP commands) - Chapter 1: Basic functionality for cellular complexes, fundamental groups and homology

Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 Ind
[Top of Book] [Contents] [Previous Chapter] [Next Chapter]

[MathJax off]

1 Basic functionality for cellular complexes, fundamental groups and homology
1.1 Data \(\longrightarrow\) Cellular Complexes
1.1-1 RegularCWPolytope
1.1-2 CubicalComplex
1.1-3 PureCubicalComplex
1.1-4 PureCubicalKnot
1.1-5 PurePermutahedralKnot
1.1-6 PurePermutahedralComplex
1.1-7 CayleyGraphOfGroup
1.1-8 EquivariantEuclideanSpace
1.1-9 EquivariantOrbitPolytope
1.1-10 EquivariantTwoComplex
1.1-11 QuillenComplex
1.1-12 RestrictedEquivariantCWComplex
1.1-13 RandomSimplicialGraph
1.1-14 RandomSimplicialTwoComplex
1.1-15 ReadCSVfileAsPureCubicalKnot
1.1-16 ReadImageAsPureCubicalComplex
1.1-17 ReadImageAsFilteredPureCubicalComplex
1.1-18 ReadImageAsWeightFunction
1.1-19 ReadPDBfileAsPureCubicalComplex
1.1-20 ReadPDBfileAsPurepermutahedralComplex
1.1-21 RegularCWPolytope
1.1-22 SimplicialComplex
1.1-23 SymmetricMatrixToFilteredGraph
1.1-24 SymmetricMatrixToGraph
1.2 Metric Spaces
1.2-1 CayleyMetric
1.2-2 EuclideanMetric
1.2-3 EuclideanSquaredMetric
1.2-4 HammingMetric
1.2-5 KendallMetric
1.2-6 ManhattanMetric
1.2-7 VectorsToSymmetricMatrix
1.3 Cellular Complexes \(\longrightarrow\) Cellular Complexes
1.3-1 BoundaryMap
1.3-2 CliqueComplex
1.3-3 ConcentricFiltration
1.3-4 DirectProduct
1.3-5 FiltrationTerm
1.3-6 Graph
1.3-7 HomotopyGraph
1.3-8 Nerve
1.3-9 RegularCWComplex
1.3-10 RegularCWMap
1.3-11 ThickeningFiltration
1.4 Cellular Complexes \(\longrightarrow\) Cellular Complexes (Preserving Data Types)
1.4-1 ContractedComplex
1.4-2 ContractibleSubcomplex
1.4-3 KnotReflection
1.4-4 KnotSum
1.4-5 OrientRegularCWComplex
1.4-6 PathComponent
1.4-7 PureComplexBoundary
1.4-8 PureComplexComplement
1.4-9 PureComplexDifference
1.4-10 PureComplexInterstection
1.4-11 PureComplexThickened
1.4-12 PureComplexUnion
1.4-13 SimplifiedComplex
1.4-14 ZigZagContractedComplex
1.5 Cellular Complexes \(\longrightarrow\) Homotopy Invariants
1.5-1 AlexanderPolynomial
1.5-2 BettiNumber
1.5-3 EulerCharacteristic
1.5-4 EulerIntegral
1.5-5 FundamentalGroup
1.5-6 FundamentalGroupOfQuotient
1.5-7 IsAspherical
1.5-8 KnotGroup
1.5-9 PiZero
1.5-10 PersistentBettiNumbers
1.6 Data \(\longrightarrow\) Homotopy Invariants
1.6-1 DendrogramMat
1.7 Cellular Complexes \(\longrightarrow\) Non Homotopy Invariants
1.7-1 ChainComplex
1.7-2 ChainComplexEquivalence
1.7-3 ChainComplexOfQuotient
1.7-4 ChainMap
1.7-5 CochainComplex
1.7-6 CriticalCells
1.7-7 DiagonalApproximation
1.7-8 Size
1.8 (Co)chain Complexes \(\longrightarrow \) (Co)chain Complexes
1.8-1 FilteredTensorWithIntegers
1.8-2 FilteredTensorWithIntegersModP
1.8-3 HomToIntegers
1.8-4 TensorWithIntegersModP
1.9 (Co)chain Complexes \(\longrightarrow \) Homotopy Invariants
1.9-1 Cohomology
1.9-2 CupProduct
1.9-3 Homology
1.10 Visualization
1.10-1 BarCodeDisplay
1.10-2 BarCodeCompactDisplay
1.10-3 CayleyGraphOfGroup
1.10-4 Display
1.10-5 DisplayArcPresentation
1.10-6 DisplayCSVKnotFile
1.10-7 DisplayDendrogram
1.10-8 DisplayDendrogramMat
1.10-9 DisplayPDBfile
1.10-10 OrbitPolytope
1.10-11 ScatterPlot

### 1 Basic functionality for cellular complexes, fundamental groups and homology

This page covers the functions used in chapters 1 and 2 of the book An Invitation to Computational Homotopy.

#### 1.1 Data \(\longrightarrow\) Cellular Complexes

##### 1.1-1 RegularCWPolytope

`‣ RegularCWPolytope`( L ) | ( function )

`‣ RegularCWPolytope`( G, v ) | ( function )

Inputs a list \(L\) of vectors in \(\mathbb R^n\) and outputs their convex hull as a regular CW-complex.

Inputs a permutation group G of degree \(d\) and vector \(v\in \mathbb R^d\), and outputs the convex hull of the orbit \(\{v^g : g\in G\}\) as a regular CW-complex.

Examples:

##### 1.1-2 CubicalComplex

`‣ CubicalComplex`( A ) | ( function )

Inputs a binary array \(A\) and returns the cubical complex represented by \(A\). The array \(A\) must of course be such that it represents a cubical complex.

Examples: 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12

##### 1.1-3 PureCubicalComplex

`‣ PureCubicalComplex`( A ) | ( function )

Inputs a binary array \(A\) and returns the pure cubical complex represented by \(A\).

Examples: 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12

##### 1.1-4 PureCubicalKnot

`‣ PureCubicalKnot`( n, k ) | ( function )

`‣ PureCubicalKnot`( L ) | ( function )

Inputs integers \(n, k\) and returns the \(k\)-th prime knot on \(n\) crossings as a pure cubical complex (if this prime knot exists).

Inputs a list \(L\) describing an arc presentation for a knot or link and returns the knot or link as a pure cubical complex.

Examples: 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11

##### 1.1-5 PurePermutahedralKnot

`‣ PurePermutahedralKnot`( n, k ) | ( function )

`‣ PurePermutahedralKnot`( L ) | ( function )

Inputs integers \(n, k\) and returns the \(k\)-th prime knot on \(n\) crossings as a pure permutahedral complex (if this prime knot exists).

Inputs a list \(L\) describing an arc presentation for a knot or link and returns the knot or link as a pure permutahedral complex.

Examples: 1 , 2

##### 1.1-6 PurePermutahedralComplex

`‣ PurePermutahedralComplex`( A ) | ( function )

Inputs a binary array \(A\) and returns the pure permutahedral complex represented by \(A\).

Examples: 1 , 2 , 3 , 4

##### 1.1-7 CayleyGraphOfGroup

`‣ CayleyGraphOfGroup`( G, L ) | ( function )

Inputs a finite group \(G\) and a list \(L\) of elements in \(G\).It returns the Cayley graph of the group generated by \(L\).

Examples:

##### 1.1-8 EquivariantEuclideanSpace

`‣ EquivariantEuclideanSpace`( G, v ) | ( function )

Inputs a crystallographic group \(G\) with left action on \(\mathbb R^n\) together with a row vector \(v \in \mathbb R^n\). It returns an equivariant regular CW-space corresponding to the Dirichlet-Voronoi tessellation of \(\mathbb R^n\) produced from the orbit of \(v\) under the action.

Examples: 1

##### 1.1-9 EquivariantOrbitPolytope

`‣ EquivariantOrbitPolytope`( G, v ) | ( function )

Inputs a permutation group \(G\) of degree \(n\) together with a row vector \(v \in \mathbb R^n\). It returns, as an equivariant regular CW-space, the convex hull of the orbit of \(v\) under the canonical left action of \(G\) on \(\mathbb R^n\).

Examples:

##### 1.1-10 EquivariantTwoComplex

`‣ EquivariantTwoComplex`( G ) | ( function )

Inputs a suitable group \(G\) and returns, as an equivariant regular CW-space, the \(2\)-complex associated to some presentation of \(G\).

Examples: 1

##### 1.1-11 QuillenComplex

`‣ QuillenComplex`( G, p ) | ( function )

Inputs a finite group \(G\) and prime \(p\), and returns the simplicial complex arising as the order complex of the poset of elementary abelian \(p\)-subgroups of \(G\).

Examples: 1 , 2 , 3 , 4

##### 1.1-12 RestrictedEquivariantCWComplex

`‣ RestrictedEquivariantCWComplex`( Y, H ) | ( function )

Inputs a \(G\)-equivariant regular CW-space Y and a subgroup \(H \le G\) for which GAP can find a transversal. It returns the equivariant regular CW-complex obtained by retricting the action to \(H\).

Examples:

##### 1.1-13 RandomSimplicialGraph

`‣ RandomSimplicialGraph`( n, p ) | ( function )

Inputs an integer \( n \ge 1 \) and positive prime \(p\), and returns an Erdős–Rényi random graph as a \(1\)-dimensional simplicial complex. The graph has \(n\) vertices. Each pair of vertices is, with probability \(p\), directly connected by an edge.

Examples: 1

##### 1.1-14 RandomSimplicialTwoComplex

`‣ RandomSimplicialTwoComplex`( n, p ) | ( function )

Inputs an integer \( n \ge 1 \) and positive prime \(p\), and returns a Linial-Meshulam random simplicial \(2\)-complex. The \(1\)-skeleton of this simplicial complex is the complete graph on \(n\) vertices. Each triple of vertices lies, with probability \(p\), in a common \(2\)-simplex of the complex.

Examples: 1 , 2

##### 1.1-15 ReadCSVfileAsPureCubicalKnot

`‣ ReadCSVfileAsPureCubicalKnot`( str ) | ( function )

`‣ ReadCSVfileAsPureCubicalKnot`( str, r ) | ( function )

`‣ ReadCSVfileAsPureCubicalKnot`( L ) | ( function )

`‣ ReadCSVfileAsPureCubicalKnot`( L, R ) | ( function )

Reads a CSV file identified by a string str such as "file.pdb" or "path/file.pdb" and returns a \(3\)-dimensional pure cubical complex \(K\). Each line of the file should contain the coordinates of a point in \(\mathbb R^3\) and the complex \(K\) should represent a knot determined by the sequence of points, though the latter is not guaranteed. A useful check in this direction is to test that \(K\) has the homotopy type of a circle.

If the test fails then try the function again with an integer \(r \ge 2\) entered as the optional second argument. The integer determines the resolution with which the knot is constructed.

The function can also read in a list \(L\) of strings identifying CSV files for several knots. In this case a list \(R\) of integer resolutions can also be entered. The lists \(L\) and \(R\) must be of equal length.

Examples: 1

##### 1.1-16 ReadImageAsPureCubicalComplex

`‣ ReadImageAsPureCubicalComplex`( str, t ) | ( function )

Reads an image file identified by a string str such as "file.bmp", "file.eps", "file.jpg", "path/file.png" etc., together with an integer \(t\) between \(0\) and \(765\). It returns a \(2\)-dimensional pure cubical complex corresponding to a black/white version of the image determined by the threshold \(t\). The \(2\)-cells of the pure cubical complex correspond to pixels with RGB value \(R+G+B \le t\).

Examples: 1 , 2 , 3 , 4 , 5

##### 1.1-17 ReadImageAsFilteredPureCubicalComplex

`‣ ReadImageAsFilteredPureCubicalComplex`( str, n ) | ( function )

Reads an image file identified by a string str such as "file.bmp", "file.eps", "file.jpg", "path/file.png" etc., together with a positive integer \(n\). It returns a \(2\)-dimensional filtered pure cubical complex of filtration length \(n\). The \(k\)th term in the filtration is a pure cubical complex corresponding to a black/white version of the image determined by the threshold \(t_k=k \times 765/n \). The \(2\)-cells of the \(k\)th term correspond to pixels with RGB value \(R+G+B \le t_k\).

Examples: 1

##### 1.1-18 ReadImageAsWeightFunction

`‣ ReadImageAsWeightFunction`( str, t ) | ( function )

Reads an image file identified by a string str such as "file.bmp", "file.eps", "file.jpg", "path/file.png" etc., together with an integer \(t\). It constructs a \(2\)-dimensional regular CW-complex \(Y\) from the image, together with a weight function \(w\colon Y\rightarrow \mathbb Z\) corresponding to a filtration on \(Y\) of filtration length \(t\). The pair \([Y,w]\) is returned.

Examples:

##### 1.1-19 ReadPDBfileAsPureCubicalComplex

`‣ ReadPDBfileAsPureCubicalComplex`( str ) | ( function )

`‣ ReadPDBfileAsPureCubicalComplex`( str, r ) | ( function )

Reads a PDB (Protein Database) file identified by a string str such as "file.pdb" or "path/file.pdb" and returns a \(3\)-dimensional pure cubical complex \(K\). The complex \(K\) should represent a (protein backbone) knot but this is not guaranteed. A useful check in this direction is to test that \(K\) has the homotopy type of a circle.

If the test fails then try the function again with an integer \(r \ge 2\) entered as the optional second argument. The integer determines the resolution with which the knot is constructed.

Examples: 1 , 2 , 3

##### 1.1-20 ReadPDBfileAsPurepermutahedralComplex

`‣ ReadPDBfileAsPurepermutahedralComplex` | ( global variable )

`‣ ReadPDBfileAsPurePermutahedralComplex`( str, r ) | ( function )

Reads a PDB (Protein Database) file identified by a string str such as "file.pdb" or "path/file.pdb" and returns a \(3\)-dimensional pure permutahedral complex \(K\). The complex \(K\) should represent a (protein backbone) knot but this is not guaranteed. A useful check in this direction is to test that \(K\) has the homotopy type of a circle.

If the test fails then try the function again with an integer \(r \ge 2\) entered as the optional second argument. The integer determines the resolution with which the knot is constructed.

Examples:

##### 1.1-21 RegularCWPolytope

`‣ RegularCWPolytope`( L ) | ( function )

`‣ RegularCWPolytope`( G, v ) | ( function )

Inputs a list \(L\) of vectors in \(\mathbb R^n\) and outputs their convex hull as a regular CW-complex.

Inputs a permutation group G of degree \(d\) and vector \(v\in \mathbb R^d\), and outputs the convex hull of the orbit \(\{v^g : g\in G\}\) as a regular CW-complex.

Examples:

##### 1.1-22 SimplicialComplex

`‣ SimplicialComplex`( L ) | ( function )

Inputs a list \(L\) whose entries are lists of vertices representing the maximal simplices of a simplicial complex, and returns the simplicial complex. Here a "vertex" is a GAP object such as an integer or a subgroup. The list \(L\) can also contain non-maximal simplices.

Examples: 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12

##### 1.1-23 SymmetricMatrixToFilteredGraph

`‣ SymmetricMatrixToFilteredGraph`( A, m, s ) | ( function )

`‣ SymmetricMatrixToFilteredGraph`( A, m ) | ( function )

Inputs an \(n \times n\) symmetric matrix \(A\), a positive integer \(m\) and a positive rational \(s\). The function returns a filtered graph of filtration length \(m\). The \(t\)-th term of the filtration is a graph with \(n\) vertices and an edge between the \(i\)-th and \(j\)-th vertices if the \((i,j)\) entry of \(A\) is less than or equal to \(t \times s/m\).

If the optional input \(s\) is omitted then it is set equal to the largest entry in the matrix \(A\).

Examples: 1 , 2 , 3

##### 1.1-24 SymmetricMatrixToGraph

`‣ SymmetricMatrixToGraph`( A, t ) | ( function )

Inputs an \(n\times n\) symmetric matrix \(A\) over the rationals and a rational number \(t \ge 0\), and returns the graph on the vertices \(1,2, \ldots, n\) with an edge between distinct vertices \(i\) and \(j\) precisely when the \((i,j)\) entry of \(A\) is \(\le t\).

Examples: 1 , 2

#### 1.2 Metric Spaces

##### 1.2-1 CayleyMetric

`‣ CayleyMetric`( g, h ) | ( function )

Inputs two permutations \(g,h\) and optionally the degree \(N\) of a symmetric group containing them. It returns the minimum number of transpositions needed to express \(g*h^{-1}\) as a product of transpositions.

Examples: 1

##### 1.2-2 EuclideanMetric

`‣ EuclideanMetric` | ( global variable )

Inputs two vectors \(v,w \in \mathbb R^n\) and returns a rational number approximating the Euclidean distance between them.

Examples:

##### 1.2-3 EuclideanSquaredMetric

`‣ EuclideanSquaredMetric`( g, h ) | ( function )

Inputs two vectors \(v,w \in \mathbb R^n\) and returns the square of the Euclidean distance between them.

Examples:

##### 1.2-4 HammingMetric

`‣ HammingMetric`( g, h ) | ( function )

Inputs two permutations \(g,h\) and optionally the degree \(N\) of a symmetric group containing them. It returns the minimum number of integers moved by the permutation \(g*h^{-1}\).

Examples:

##### 1.2-5 KendallMetric

`‣ KendallMetric`( g, h ) | ( function )

Inputs two permutations \(g,h\) and optionally the degree \(N\) of a symmetric group containing them. It returns the minimum number of adjacent transpositions needed to express \(g*h^{-1}\) as a product of adjacent transpositions. An adjacent transposition is of the form \((i,i+1)\).

Examples:

##### 1.2-6 ManhattanMetric

`‣ ManhattanMetric`( g, h ) | ( function )

Inputs two vectors \(v,w \in \mathbb R^n\) and returns the Manhattan distance between them.

Examples: 1

##### 1.2-7 VectorsToSymmetricMatrix

`‣ VectorsToSymmetricMatrix`( V ) | ( function )

`‣ VectorsToSymmetricMatrix`( V, d ) | ( function )

Inputs a list \(V =\{ v_1, \ldots, v_k\} \in \mathbb R^n\) and returns the \(k \times k\) symmetric matrix of Euclidean distances \(d(v_i, v_j)\). When these distances are irrational they are approximated by a rational number.

As an optional second argument any rational valued function \(d(x,y)\) can be entered.

Examples: 1 , 2 , 3

#### 1.3 Cellular Complexes \(\longrightarrow\) Cellular Complexes

##### 1.3-1 BoundaryMap

`‣ BoundaryMap`( K ) | ( function )

Inputs a pure regular CW-complex \(K\) and returns the regular CW-inclusion map \(\iota \colon \partial K \hookrightarrow K\) from the boundary \(\partial K\) into the complex \(K\).

Examples: 1 , 2 , 3

##### 1.3-2 CliqueComplex

`‣ CliqueComplex`( G, n ) | ( function )

`‣ CliqueComplex`( F, n ) | ( function )

`‣ CliqueComplex`( K, n ) | ( function )

Inputs a graph \(G\) and integer \(n \ge 1\). It returns the \(n\)-skeleton of a simplicial complex \(K\) with one \(k\)-simplex for each complete subgraph of \(G\) on \(k+1\) vertices.

Inputs a fitered graph \(F\) and integer \(n \ge 1\). It returns the \(n\)-skeleton of a filtered simplicial complex \(K\) whose \(t\)-term has one \(k\)-simplex for each complete subgraph of the \(t\)-th term of \(G\) on \(k+1\) vertices.

Inputs a simplicial complex of dimension \(d=1\) or \(d=2\). If \(d=1\) then the clique complex of a graph returned. If \(d=2\) then the clique complex of a \(2\)-complex is returned.

Examples: 1

##### 1.3-3 ConcentricFiltration

`‣ ConcentricFiltration`( K, n ) | ( function )

Inputs a pure cubical complex \(K\) and integer \(n \ge 1\), and returns a filtered pure cubical complex of filtration length \(n\). The \(t\)-th term of the filtration is the intersection of \(K\) with the ball of radius \(r_t\) centred on the centre of gravity of \(K\), where \(0=r_1 \le r_2 \le r_3 \le \cdots \le r_n\) are equally spaced rational numbers. The complex \(K\) is contained in the ball of radius \(r_n\). (At present, this is implemented only for \(2\)- and \(3\)-dimensional complexes.)

Examples:

##### 1.3-4 DirectProduct

`‣ DirectProduct`( M, N ) | ( function )

`‣ DirectProduct`( M, N ) | ( function )

Inputs two or more regular CW-complexes or two or more pure cubical complexes and returns their direct product.

Examples: 1 , 2 , 3 , 4 , 5 , 6 , 7

##### 1.3-5 FiltrationTerm

`‣ FiltrationTerm`( K, t ) | ( function )

`‣ FiltrationTerm`( K, t ) | ( function )

Inputs a filtered regular CW-complex or a filtered pure cubical complex \(K\) together with an integer \(t \ge 1\). The \(t\)-th term of the filtration is returned.

Examples: 1

##### 1.3-6 Graph

`‣ Graph`( K ) | ( function )

`‣ Graph`( K ) | ( function )

Inputs a regular CW-complex or a simplicial complex \(K\) and returns its \(1\)-skeleton as a graph.

Examples: 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15

##### 1.3-7 HomotopyGraph

`‣ HomotopyGraph`( Y ) | ( function )

Inputs a regular CW-complex \(Y\) and returns a subgraph \(M \subset Y^1\) of the \(1\)-skeleton for which the induced homology homomorphisms \(H_1(M,\mathbb Z) \rightarrow H_1(Y,\mathbb Z)\) and \(H_1(Y^1,\mathbb Z) \rightarrow H_1(Y,\mathbb Z)\) have identical images. The construction tries to include as few edges in \(M\) as possible, though a minimum is not guaranteed.

Examples: 1

##### 1.3-8 Nerve

`‣ Nerve`( M ) | ( function )

`‣ Nerve`( M ) | ( function )

`‣ Nerve`( M, n ) | ( function )

`‣ Nerve`( M, n ) | ( function )

Inputs a pure cubical complex or pure permutahedral complex \(M\) and returns the simplicial complex \(K\) obtained by taking the nerve of an open cover of \(|M|\), the open sets in the cover being sufficiently small neighbourhoods of the top-dimensional cells of \(|M|\). The spaces \(|M|\) and \(|K|\) are homotopy equivalent by the Nerve Theorem. If an integer \(n \ge 0\) is supplied as the second argument then only the n-skeleton of \(K\) is returned.

Examples: 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9

##### 1.3-9 RegularCWComplex

`‣ RegularCWComplex`( K ) | ( function )

`‣ RegularCWComplex`( K ) | ( function )

`‣ RegularCWComplex`( K ) | ( function )

`‣ RegularCWComplex`( K ) | ( function )

`‣ RegularCWComplex`( L ) | ( function )

`‣ RegularCWComplex`( L, M ) | ( function )

Inputs a simplicial, pure cubical, cubical or pure permutahedral complex \(K\) and returns the corresponding regular CW-complex. Inputs a list \(L=Y!.boundaries\) of boundary incidences of a regular CW-complex \(Y\) and returns \(Y\). Inputs a list \(L=Y!.boundaries\) of boundary incidences of a regular CW-complex \(Y\) together with a list \(M=Y!.orientation\) of incidence numbers and returns a regular CW-complex \(Y\). The availability of precomputed incidence numbers saves recalculating them.

Examples: 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13

##### 1.3-10 RegularCWMap

`‣ RegularCWMap`( M, A ) | ( function )

Inputs a pure cubical complex \(M\) and a subcomplex \(A\) and returns the inclusion map \(A \rightarrow M\) as a map of regular CW complexes.

Examples: 1 , 2 , 3

##### 1.3-11 ThickeningFiltration

`‣ ThickeningFiltration`( K, n ) | ( function )

`‣ ThickeningFiltration`( K, n, s ) | ( function )

Inputs a pure cubical complex \(K\) and integer \(n \ge 1\), and returns a filtered pure cubical complex of filtration length \(n\). The \(t\)-th term of the filtration is the \(t\)-fold thickening of \(K\). If an integer \(s \ge 1\) is entered as the optional third argument then the \(t\)-th term of the filtration is the \(ts\)-fold thickening of \(K\).

Examples: 1 , 2

#### 1.4 Cellular Complexes \(\longrightarrow\) Cellular Complexes (Preserving Data Types)

##### 1.4-1 ContractedComplex

`‣ ContractedComplex`( K ) | ( function )

`‣ ContractedComplex`( K ) | ( function )

`‣ ContractedComplex`( K ) | ( function )

`‣ ContractedComplex`( K ) | ( function )

`‣ ContractedComplex`( K, S ) | ( function )

`‣ ContractedComplex`( K ) | ( function )

`‣ ContractedComplex`( K ) | ( function )

`‣ ContractedComplex`( K, S ) | ( function )

`‣ ContractedComplex`( K ) | ( function )

`‣ ContractedComplex`( G ) | ( function )

Inputs a complex (regular CW, Filtered regular CW, pure cubical etc.) and returns a homotopy equivalent subcomplex.

Inputs a pure cubical complex or pure permutahedral complex \(K\) and a subcomplex \(S\). It returns a homotopy equivalent subcomplex of \(K\) that contains \(S\).

Inputs a graph \(G\) and returns a subgraph \(S\) such that the clique complexes of \(G\) and \(S\) are homotopy equivalent.

Examples: 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13

##### 1.4-2 ContractibleSubcomplex

`‣ ContractibleSubcomplex`( K ) | ( function )

`‣ ContractibleSubcomplex`( K ) | ( function )

`‣ ContractibleSubcomplex`( K ) | ( function )

Inputs a non-empty pure cubical, pure permutahedral or simplicial complex \(K\) and returns a contractible subcomplex.

Examples: 1 , 2

##### 1.4-3 KnotReflection

`‣ KnotReflection`( K ) | ( function )

Inputs a pure cubical knot and returns the reflected knot.

Examples:

##### 1.4-4 KnotSum

`‣ KnotSum`( K, L ) | ( function )

Inputs two pure cubical knots and returns their sum.

Examples: 1 , 2 , 3 , 4 , 5

##### 1.4-5 OrientRegularCWComplex

`‣ OrientRegularCWComplex`( Y ) | ( function )

Inputs a regular CW-complex \(Y\) and computes and stores incidence numbers for \(Y\). If \(Y\) already has incidence numbers then the function does nothing.

Examples:

##### 1.4-6 PathComponent

`‣ PathComponent`( K, n ) | ( function )

`‣ PathComponent`( K, n ) | ( function )

`‣ PathComponent`( K, n ) | ( function )

Inputs a simplicial, pure cubical or pure permutahedral complex \(K\) together with an integer \(1 \le n \le \beta_0(K)\). The \(n\)-th path component of \(K\) is returned.

Examples: 1 , 2 , 3

##### 1.4-7 PureComplexBoundary

`‣ PureComplexBoundary`( M ) | ( function )

`‣ PureComplexBoundary`( M ) | ( function )

Inputs a \(d\)-dimensional pure cubical or pure permutahedral complex \(M\) and returns a \(d\)-dimensional complex consisting of the closure of those \(d\)-cells whose boundaries contains some cell with coboundary of size less than the maximal possible size.

Examples: 1

##### 1.4-8 PureComplexComplement

`‣ PureComplexComplement`( M ) | ( function )

`‣ PureComplexComplement`( M ) | ( function )

Inputs a pure cubical complex or a pure permutahedral complex and returns its complement.

Examples: 1 , 2 , 3 , 4 , 5 , 6 , 7

##### 1.4-9 PureComplexDifference

`‣ PureComplexDifference`( M, N ) | ( function )

`‣ PureComplexDifference`( M, N ) | ( function )

Inputs two pure cubical complexes or two pure permutahedral complexes and returns the difference \( M - N\).

Examples: 1

##### 1.4-10 PureComplexInterstection

`‣ PureComplexInterstection` | ( global variable )

`‣ PureComplexIntersection`( M, N ) | ( function )

Inputs two pure cubical complexes or two pure permutahedral complexes and returns their intersection.

Examples:

##### 1.4-11 PureComplexThickened

`‣ PureComplexThickened`( M ) | ( function )

`‣ PureComplexThickened`( M ) | ( function )

Inputs a pure cubical complex or a pure permutahedral complex and returns the a thickened complex.

Examples: 1

##### 1.4-12 PureComplexUnion

`‣ PureComplexUnion`( M, N ) | ( function )

`‣ PureComplexUnion`( M, N ) | ( function )

Inputs two pure cubical complexes or two pure permutahedral complexes and returns their union.

Examples: 1

##### 1.4-13 SimplifiedComplex

`‣ SimplifiedComplex`( K ) | ( function )

`‣ SimplifiedComplex`( K ) | ( function )

`‣ SimplifiedComplex`( R ) | ( function )

`‣ SimplifiedComplex`( C ) | ( function )

Inputs a regular CW-complex or a pure permutahedral complex \(K\) and returns a homeomorphic complex with possibly fewer cells and certainly no more cells.

Inputs a free \(\mathbb ZG\)-resolution \(R\) of \(\mathbb Z\) and returns a \(\mathbb ZG\)-resolution \(S\) with potentially fewer free generators.

Inputs a chain complex \(C\) of free abelian groups and returns a chain homotopic chain complex \(D\) with potentially fewer free generators.

Examples: 1 , 2 , 3 , 4 , 5 , 6 , 7

##### 1.4-14 ZigZagContractedComplex

`‣ ZigZagContractedComplex`( K ) | ( function )

`‣ ZigZagContractedComplex`( K ) | ( function )

`‣ ZigZagContractedComplex`( K ) | ( function )

Inputs a pure cubical, filtered pure cubical or pure permutahedral complex and returns a homotopy equivalent complex. In the filtered case, the \(t\)-th term of the output is homotopy equivalent to the \(t\)-th term of the input for all \(t\).

Examples: 1

#### 1.5 Cellular Complexes \(\longrightarrow\) Homotopy Invariants

##### 1.5-1 AlexanderPolynomial

`‣ AlexanderPolynomial`( K ) | ( function )

`‣ AlexanderPolynomial`( K ) | ( function )

`‣ AlexanderPolynomial`( G ) | ( function )

Inputs a \(3\)-dimensional pure cubical or pure permutahdral complex \(K\) representing a knot and returns the Alexander polynomial of the fundamental group \(G = \pi_1(\mathbb R^3\setminus K)\).

Inputs a finitely presented group \(G\) with infinite cyclic abelianization and returns its Alexander polynomial.

Examples: 1 , 2 , 3 , 4

##### 1.5-2 BettiNumber

`‣ BettiNumber`( K, n ) | ( function )

`‣ BettiNumber`( K, n ) | ( function )

`‣ BettiNumber`( K, n ) | ( function )

`‣ BettiNumber`( K, n ) | ( function )

`‣ BettiNumber`( K, n ) | ( function )

`‣ BettiNumber`( K, n ) | ( function )

`‣ BettiNumber`( K, n ) | ( function )

`‣ BettiNumber`( K, n, p ) | ( function )

`‣ BettiNumber`( K, n, p ) | ( function )

`‣ BettiNumber`( K, n, p ) | ( function )

`‣ BettiNumber`( K, n, p ) | ( function )

`‣ BettiNumber`( K, n, p ) | ( function )

Inputs a simplicial, cubical, pure cubical, pure permutahedral, regular CW, chain or sparse chain complex \(K\) together with an integer \(n \ge 0\) and returns the \(n\)th Betti number of \(K\).

Inputs a simplicial, cubical, pure cubical, pure permutahedral or regular CW-complex \(K\) together with an integer \(n \ge 0\) and a prime \(p \ge 0\) or \(p=0\). In this case the \(n\)th Betti number of \(K\) over a field of characteristic \(p\) is returned.

Examples: 1

##### 1.5-3 EulerCharacteristic

`‣ EulerCharacteristic`( C ) | ( function )

`‣ EulerCharacteristic`( K ) | ( function )

`‣ EulerCharacteristic`( K ) | ( function )

`‣ EulerCharacteristic`( K ) | ( function )

`‣ EulerCharacteristic`( K ) | ( function )

`‣ EulerCharacteristic`( K ) | ( function )

Inputs a chain complex \(C\) and returns its Euler characteristic.

Inputs a cubical, or pure cubical, or pure permutahedral or regular CW-, or simplicial complex \(K\) and returns its Euler characteristic.

Examples:

##### 1.5-4 EulerIntegral

`‣ EulerIntegral`( Y, w ) | ( function )

Inputs a regular CW-complex \(Y\) and a weight function \(w\colon Y\rightarrow \mathbb Z\), and returns the Euler integral \( \int_Y w\, d\chi \).

Examples:

##### 1.5-5 FundamentalGroup

`‣ FundamentalGroup`( K ) | ( function )

`‣ FundamentalGroup`( K, n ) | ( function )

`‣ FundamentalGroup`( K ) | ( function )

`‣ FundamentalGroup`( K ) | ( function )

`‣ FundamentalGroup`( K ) | ( function )

`‣ FundamentalGroup`( F ) | ( function )

`‣ FundamentalGroup`( F, n ) | ( function )

Inputs a regular CW, simplicial, pure cubical or pure permutahedral complex \(K\) and returns the fundamental group.

Inputs a regular CW complex \(K\) and the number \(n\) of some zero cell. It returns the fundamental group of \(K\) based at the \(n\)-th zero cell.

Inputs a regular CW map \(F\) and returns the induced homomorphism of fundamental groups. If the number of some zero cell in the domain of \(F\) is entered as an optional second variable then the fundamental group is based at this zero cell.

Examples: 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13

##### 1.5-6 FundamentalGroupOfQuotient

`‣ FundamentalGroupOfQuotient`( Y ) | ( function )

Inputs a \(G\)-equivariant regular CW complex \(Y\) and returns the group \(G\).

Examples: 1

##### 1.5-7 IsAspherical

`‣ IsAspherical`( F, R ) | ( function )

Inputs a free group \(F\) and a list \(R\) of words in \(F\). The function attempts to test if the quotient group \(G=F/\langle R \rangle^F\) is aspherical. If it succeeds it returns \(true\). Otherwise the test is inconclusive and \(fail\) is returned.

Examples: 1 , 2 , 3 , 4

##### 1.5-8 KnotGroup

`‣ KnotGroup`( K ) | ( function )

`‣ KnotGroup`( K ) | ( function )

Inputs a pure cubical or pure permutahedral complex \(K\) and returns the fundamental group of its complement. If the complement is path-connected then this fundamental group is unique up to isomorphism. Otherwise it will depend on the path-component in which the randomly chosen base-point lies.

Examples: 1

##### 1.5-9 PiZero

`‣ PiZero`( Y ) | ( function )

`‣ PiZero`( Y ) | ( function )

`‣ PiZero`( Y ) | ( function )

Inputs a regular CW-complex \(Y\), or graph \(Y\), or simplicial complex \(Y\) and returns a pair \([cells,r]\) where: \(cells\) is a list of vertices of \(Y\) representing the distinct path-components; \(r(v)\) is a function which, for each vertex \(v\) of \(Y\) returns the representative vertex \(r(v) \in cells\).

Examples: 1

##### 1.5-10 PersistentBettiNumbers

`‣ PersistentBettiNumbers`( K, n ) | ( function )

`‣ PersistentBettiNumbers`( K, n ) | ( function )

`‣ PersistentBettiNumbers`( K, n ) | ( function )

`‣ PersistentBettiNumbers`( K, n ) | ( function )

`‣ PersistentBettiNumbers`( K, n ) | ( function )

`‣ PersistentBettiNumbers`( K, n, p ) | ( function )

`‣ PersistentBettiNumbers`( K, n, p ) | ( function )

`‣ PersistentBettiNumbers`( K, n, p ) | ( function )

`‣ PersistentBettiNumbers`( K, n, p ) | ( function )

`‣ PersistentBettiNumbers`( K, n, p ) | ( function )

Inputs a filtered simplicial, filtered pure cubical, filtered regular CW, filtered chain or filtered sparse chain complex \(K\) together with an integer \(n \ge 0\) and returns the \(n\)th PersistentBetti numbers of \(K\) as a list of lists of integers.

Inputs a filtered simplicial, filtered pure cubical, filtered regular CW, filtered chain or filtered sparse chain complex \(K\) together with an integer \(n \ge 0\) and a prime \(p \ge 0\) or \(p=0\). In this case the \(n\)th PersistentBetti numbers of \(K\) over a field of characteristic \(p\) are returned.

Examples: 1

#### 1.6 Data \(\longrightarrow\) Homotopy Invariants

##### 1.6-1 DendrogramMat

`‣ DendrogramMat`( A, t, s ) | ( function )

Inputs an \(n\times n\) symmetric matrix \(A\) over the rationals, a rational \(t \ge 0\) and an integer \(s \ge 1\). A list \([v_1, \ldots, v_{t+1}]\) is returned with each \(v_k\) a list of positive integers. Let \(t_k = (k-1)s\). Let \(G(A,t_k)\) denote the graph with vertices \(1, \ldots, n\) and with distinct vertices \(i\) and \(j\) connected by an edge when the \((i,j)\) entry of \(A\) is \(\le t_k\). The \(i\)-th path component of \(G(A,t_k)\) is included in the \(v_k[i]\)-th path component of \(G(A,t_{k+1})\). This defines the integer vector \(v_k\). The vector \(v_k\) has length equal to the number of path components of \(G(A,t_k)\).

Examples:

#### 1.7 Cellular Complexes \(\longrightarrow\) Non Homotopy Invariants

##### 1.7-1 ChainComplex

`‣ ChainComplex`( K ) | ( function )

`‣ ChainComplex`( K ) | ( function )

`‣ ChainComplex`( K ) | ( function )

`‣ ChainComplex`( Y ) | ( function )

`‣ ChainComplex`( K ) | ( function )

Inputs a cubical, or pure cubical, or pure permutahedral or simplicial complex \(K\) and returns its chain complex of free abelian groups. In degree \(n\) this chain complex has one free generator for each \(n\)-dimensional cell of \(K\).

Inputs a regular CW-complex \(Y\) and returns a chain complex \(C\) which is chain homotopy equivalent to the cellular chain complex of \(Y\). In degree \(n\) the free abelian chain group \(C_n\) has one free generator for each critical \(n\)-dimensional cell of \(Y\) with respect to some discrete vector field on \(Y\).

Examples: 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13

##### 1.7-2 ChainComplexEquivalence

`‣ ChainComplexEquivalence` | ( global variable )

Inputs a regular CW-complex \(X\) and returns a pair \([f_\ast, g_\ast]\) of chain maps \(f_\ast\colon C_\ast(X) \rightarrow D_\ast(X)\), \(g_\ast\colon D_\ast(X) \rightarrow C_\ast(X)\). Here \(C_\ast(X)\) is the standard cellular chain complex of \(X\) with one free generator for each cell in \(X\). The chain complex \(D_\ast(X)\) is a typically smaller chain complex arising from a discrete vector field on \(X\). The chain maps \(f_\ast, g_\ast\) are chain homotopy equivalences.

Examples:

##### 1.7-3 ChainComplexOfQuotient

`‣ ChainComplexOfQuotient`( Y ) | ( function )

Inputs a \(G\)-equivariant regular CW-complex \(Y\) and returns the cellular chain complex of the quotient space \(Y/G\).

Examples: 1

##### 1.7-4 ChainMap

`‣ ChainMap`( X, A, Y, B ) | ( function )

`‣ ChainMap`( f ) | ( function )

`‣ ChainMap`( f ) | ( function )

Inputs a pure cubical complex \(Y\) and pure cubical sucomplexes \(X\subset Y\), \(B\subset Y\),\(A\subset B\). It returns the induced chain map \(f_\ast\colon C_\ast(X/A) \rightarrow C_\ast(Y/B)\) of cellular chain complexes of pairs. (Typlically one takes \(A\) and \(B\) to be empty or contractible subspaces, in which case \(C_\ast(X/A) \simeq C_\ast(X)\), \(C_\ast(Y/B) \simeq C_\ast(Y)\).)

Inputs a map \(f\colon X \rightarrow Y\) between two regular CW-complexes \(X,Y\) and returns an induced chain map \(f_\ast\colon C_\ast(X) \rightarrow C_\ast(Y)\) where \(C_\ast(X)\), \(C_\ast(Y)\) are chain homotopic to (but usually smaller than) the cellular chain complexes of \(X\), \(Y\).

Inputs a map \(f\colon X \rightarrow Y\) between two simplicial complexes \(X,Y\) and returns the induced chain map \(f_\ast\colon C_\ast(X) \rightarrow C_\ast(Y)\) of cellular chain complexes.

Examples: 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8

##### 1.7-5 CochainComplex

`‣ CochainComplex`( K ) | ( function )

`‣ CochainComplex`( K ) | ( function )

`‣ CochainComplex`( K ) | ( function )

`‣ CochainComplex`( Y ) | ( function )

`‣ CochainComplex`( K ) | ( function )

Inputs a cubical, or pure cubical, or pure permutahedral or simplicial complex \(K\) and returns its cochain complex of free abelian groups. In degree \(n\) this cochain complex has one free generator for each \(n\)-dimensional cell of \(K\).

Inputs a regular CW-complex \(Y\) and returns a cochain complex \(C\) which is chain homotopy equivalent to the cellular cochain complex of \(Y\). In degree \(n\) the free abelian cochain group \(C_n\) has one free generator for each critical \(n\)-dimensional cell of \(Y\) with respect to some discrete vector field on \(Y\).

Examples:

##### 1.7-6 CriticalCells

`‣ CriticalCells`( K ) | ( function )

Inputs a regular CW-complex \(K\) and returns its critical cells with respect to some discrete vector field on \(K\). If no discrete vector field on \(K\) is available then one will be computed and stored.

Examples: 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8

##### 1.7-7 DiagonalApproximation

`‣ DiagonalApproximation`( X ) | ( function )

Inputs a regular CW-complex \(X\) and outputs a pair \([p,\iota]\) of maps of CW-complexes. The map \(p\colon X^\Delta \rightarrow X\) will often be a homotopy equivalence. This is always the case if \(X\) is the CW-space of any pure cubical complex. In general, one can test to see if the induced chain map \(p_\ast \colon C_\ast(X^\Delta) \rightarrow C_\ast(X)\) is an isomorphism on integral homology. The second map \(\iota \colon X^\Delta \hookrightarrow X\times X\) is an inclusion into the direct product. If \(p_\ast\) induces an isomorphism on homology then the chain map \(\iota_\ast\colon C_\ast(X^\Delta) \rightarrow C_\ast(X\times X)\) can be used to compute the cup product.

Examples: 1

##### 1.7-8 Size

`‣ Size`( Y ) | ( function )

`‣ Size`( Y ) | ( function )

`‣ Size`( K ) | ( function )

`‣ Size`( K ) | ( function )

Inputs a regular CW complex or a simplicial complex \(Y\) and returns the number of cells in the complex.

Inputs a \(d\)-dimensional pure cubical or pure permutahedral complex \(K\) and returns the number of \(d\)-dimensional cells in the complex.

Examples: 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 , 20 , 21 , 22

#### 1.8 (Co)chain Complexes \(\longrightarrow \) (Co)chain Complexes

##### 1.8-1 FilteredTensorWithIntegers

`‣ FilteredTensorWithIntegers`( R ) | ( function )

Inputs a free \(\mathbb ZG\)-resolution \(R\) for which \("filteredDimension"\) lies in NamesOfComponents(R). (Such a resolution can be produced using TwisterTensorProduct(), ResolutionNormalSubgroups() or FreeGResolution().) It returns the filtered chain complex obtained by tensoring with the trivial module \(\mathbb Z\).

Examples: 1 , 2

##### 1.8-2 FilteredTensorWithIntegersModP

`‣ FilteredTensorWithIntegersModP`( R, p ) | ( function )

Inputs a free \(\mathbb ZG\)-resolution \(R\) for which \("filteredDimension"\) lies in NamesOfComponents(R), together with a prime \(p\). (Such a resolution can be produced using TwisterTensorProduct(), ResolutionNormalSubgroups() or FreeGResolution().) It returns the filtered chain complex obtained by tensoring with the trivial module \(\mathbb F\), the field of \(p\) elements.

Examples: 1 , 2

##### 1.8-3 HomToIntegers

`‣ HomToIntegers`( C ) | ( function )

`‣ HomToIntegers`( R ) | ( function )

`‣ HomToIntegers`( F ) | ( function )

Inputs a chain complex \(C\) of free abelian groups and returns the cochain complex \(Hom_{\mathbb Z}(C,\mathbb Z)\).

Inputs a free \(\mathbb ZG\)-resolution \(R\) in characteristic \(0\) and returns the cochain complex \(Hom_{\mathbb ZG}(R,\mathbb Z)\).

Inputs an equivariant chain map \(F\colon R\rightarrow S\) of resolutions and returns the induced cochain map \(Hom_{\mathbb ZG}(S,\mathbb Z) \longrightarrow Hom_{\mathbb ZG}(R,\mathbb Z)\).

Examples: 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9

##### 1.8-4 TensorWithIntegersModP

`‣ TensorWithIntegersModP`( C, p ) | ( function )

`‣ TensorWithIntegersModP`( R, p ) | ( function )

`‣ TensorWithIntegersModP`( F, p ) | ( function )

Inputs a chain complex \(C\) of characteristic \(0\) and a prime integer \(p\). It returns the chain complex \(C \otimes_{\mathbb Z} {\mathbb Z}_p\) of characteristic \(p\).

Inputs a free \(\mathbb ZG\)-resolution \(R\) of characteristic \(0\) and a prime integer \(p\). It returns the chain complex \(R \otimes_{\mathbb ZG} {\mathbb Z}_p\) of characteristic \(p\).

Inputs an equivariant chain map \(F\colon R \rightarrow S\) in characteristic \(0\) a prime integer \(p\). It returns the induced chain map \(F\otimes_{\mathbb ZG}\mathbb Z_p \colon R \otimes_{\mathbb ZG} {\mathbb Z}_p \longrightarrow S \otimes_{\mathbb ZG} {\mathbb Z}_p\).

Examples: 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9

#### 1.9 (Co)chain Complexes \(\longrightarrow \) Homotopy Invariants

##### 1.9-1 Cohomology

`‣ Cohomology`( C, n ) | ( function )

`‣ Cohomology`( F, n ) | ( function )

`‣ Cohomology`( K, n ) | ( function )

`‣ Cohomology`( K, n ) | ( function )

`‣ Cohomology`( K, n ) | ( function )

`‣ Cohomology`( K, n ) | ( function )

`‣ Cohomology`( K, n ) | ( function )

Inputs a cochain complex \(C\) and integer \(n \ge 0\) and returns the \(n\)-th cohomology group of \(C\) as a list of its abelian invariants.

Inputs a chain map \(F\) and integer \(n \ge 0\). It returns the induced cohomology homomorphism \(H_n(F)\) as a homomorphism of finitely presented groups.

Inputs a cubical, or pure cubical, or pure permutahedral or regular CW or simplicial complex \(K\) together with an integer \(n \ge 0\). It returns the \(n\)-th integral cohomology group of \(K\) as a list of its abelian invariants.

Examples: 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 , 24 , 25 , 26

##### 1.9-2 CupProduct

`‣ CupProduct`( Y ) | ( function )

`‣ CupProduct`( R, p, q, P, Q ) | ( function )

Inputs a regular CW-complex \(Y\) and returns a function \(f(p,q,P,Q)\). This function \(f\) inputs two integers \(p,q \ge 0\) and two integer lists \(P=[p_1, \ldots, p_m]\), \(Q=[q_1, \ldots, q_n]\) representing elements \(P\in H^p(Y,\mathbb Z)\) and \(Q\in H^q(Y,\mathbb Z)\). The function \(f\) returns a list \(P \cup Q\) representing the cup product \(P \cup Q \in H^{p+q}(Y,\mathbb Z)\).

Inputs a free \(\mathbb ZG\) resolution \(R\) of \(\mathbb Z\) for some group \(G\), together with integers \(p,q \ge 0\) and integer lists \(P, Q\) representing cohomology classes \(P\in H^p(G,\mathbb Z)\), \(Q\in H^q(G,\mathbb Z)\). An integer list representing the cup product \(P\cup Q \in H^{p+q}(G,\mathbb Z)\) is returned.

Examples: 1 , 2 , 3 , 4 , 5 , 6

##### 1.9-3 Homology

`‣ Homology`( C, n ) | ( function )

`‣ Homology`( F, n ) | ( function )

`‣ Homology`( K, n ) | ( function )

`‣ Homology`( K, n ) | ( function )

`‣ Homology`( K, n ) | ( function )

`‣ Homology`( K, n ) | ( function )

`‣ Homology`( K, n ) | ( function )

Inputs a chain complex \(C\) and integer \(n \ge 0\) and returns the \(n\)-th homology group of \(C\) as a list of its abelian invariants.

Inputs a chain map \(F\) and integer \(n \ge 0\). It returns the induced homology homomorphism \(H_n(F)\) as a homomorphism of finitely presented groups.

Inputs a cubical, or pure cubical, or pure permutahedral or regular CW or simplicial complex \(K\) together with an integer \(n \ge 0\). It returns the \(n\)-th integral homology group of \(K\) as a list of its abelian invariants.

Examples: 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 , 24 , 25 , 26 , 27 , 28 , 29 , 30 , 31 , 32 , 33 , 34 , 35 , 36 , 37 , 38 , 39 , 40 , 41 , 42 , 43 , 44 , 45

#### 1.10 Visualization

##### 1.10-1 BarCodeDisplay

`‣ BarCodeDisplay`( L ) | ( function )

Displays a barcode L=PersitentBettiNumbers(X,n).

Examples: 1 , 2

##### 1.10-2 BarCodeCompactDisplay

`‣ BarCodeCompactDisplay`( L ) | ( function )

Displays a barcode L=PersitentBettiNumbers(X,n) in compact form.

Examples: 1 , 2 , 3

##### 1.10-3 CayleyGraphOfGroup

`‣ CayleyGraphOfGroup`( G, L ) | ( function )

Inputs a finite group \(G\) and a list \(L\) of elements in \(G\).It displays the Cayley graph of the group generated by \(L\) where edge colours correspond to generators.

Examples:

##### 1.10-4 Display

`‣ Display`( G ) | ( function )

`‣ Display`( M ) | ( function )

`‣ Display`( M ) | ( function )

Displays a graph \(G\); a \(2\)- or \(3\)-dimensional pure cubical complex \(M\); a \(3\)-dimensional pure permutahedral complex \(M\).

Examples: 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 , 24

##### 1.10-5 DisplayArcPresentation

`‣ DisplayArcPresentation`( K ) | ( function )

Displays a \(3\)-dimensional pure cubical knot K=PureCubicalKnot(L) in the form of an arc presentation.

Examples:

##### 1.10-6 DisplayCSVKnotFile

`‣ DisplayCSVKnotFile` | ( global variable )

Inputs a string \(str\) that identifies a csv file containing the points on a piecewise linear knot in \(\mathbb R^3\). It displays the knot.

Examples:

##### 1.10-7 DisplayDendrogram

`‣ DisplayDendrogram`( L ) | ( function )

Displays the dendrogram L:=DendrogramMat(A,t,s).

Examples:

##### 1.10-8 DisplayDendrogramMat

`‣ DisplayDendrogramMat`( A, t, s ) | ( function )

Inputs an \(n\times n\) symmetric matrix \(A\) over the rationals, a rational \(t \ge 0\) and an integer \(s \ge 1\). The dendrogram defined by DendrogramMat(A,t,s) is displayed.

Examples:

##### 1.10-9 DisplayPDBfile

`‣ DisplayPDBfile`( str ) | ( function )

Displays the protein backone described in a PDB (Protein Database) file identified by a string str such as "file.pdb" or "path/file.pdb".

Examples: 1

##### 1.10-10 OrbitPolytope

`‣ OrbitPolytope`( G, v, L ) | ( function )

Inputs a permutation group or finite matrix group \(G\) of degree \(d\) and a rational vector \(v\in \mathbb R^d\). In both cases there is a natural action of \(G\) on \(\mathbb R^d\). Let \(P(G,v)\) be the convex hull of the orbit of \(v\) under the action of \(G\). The function also inputs a sublist \(L\) of the following list of strings: ["dimension","vertex_degree", "visual_graph", "schlegel", "visual"]

Depending on \(L\), the function displays the following information:
the dimension of the orbit polytope \(P(G,v)\);
the degree of a vertex in the graph of \(P(G,v)\);
a visualization of the graph of \(P(G,v)\);
a visualization of the Schlegel diagram of \(P(G,v)\);
a visualization of the polytope \(P(G,v)\) if \(d=2,3\).

The function requires Polymake software.

Examples: 1 , 2

##### 1.10-11 ScatterPlot

`‣ ScatterPlot`( L ) | ( function )

Inputs a list \(L=[[x_1,y_1],\ldots, [x_n,y_n]]\) of pairs of rational numbers and displays a scatter plot of the points in the \(x\)-\(y\)-plane.

Examples: 1 , 2

[Top of Book] [Contents] [Previous Chapter] [Next Chapter]
Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 Ind

generated by GAPDoc2HTML