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 ⟶ Cellular Complexes

1.1-1 RegularCWPolytope
 ‣ RegularCWPolytope( L ) ( function )
 ‣ RegularCWPolytope( G, v ) ( function )

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

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

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.

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

1.1-3 PureCubicalComplex
 ‣ PureCubicalComplex( A ) ( function )

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

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

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.

1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10

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.

1.1-6 PurePermutahedralComplex
 ‣ PurePermutahedralComplex( A ) ( function )

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

1 , 2 , 3

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.

1.1-8 EquivariantEuclideanSpace
 ‣ EquivariantEuclideanSpace( G, v ) ( function )

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

1.1-9 EquivariantOrbitPolytope
 ‣ EquivariantOrbitPolytope( G, v ) ( function )

Inputs a permutation group G of degree n together with a row vector v ∈ 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 R^n.

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.

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.

1 , 2 , 3

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.

1.1-13 RandomSimplicialGraph
 ‣ RandomSimplicialGraph( n, p ) ( function )

Inputs an integer n ge 1 and positive prime p, and returns an Erd\"os-R\'enyi 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.

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.

1

 ‣ 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 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.

 ‣ 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.

1 , 2 , 3

 ‣ 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 kth 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 × 765/n. The 2-cells of the kth term correspond to pixels with RGB value R+G+B le t_k.

1

 ‣ 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: Y→ Z corresponding to a filtration on Y of filtration length t. The pair [Y,w] is returned.

 ‣ 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.

1 , 2

 ‣ 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.

1.1-21 RegularCWPolytope
 ‣ RegularCWPolytope( L ) ( function )
 ‣ RegularCWPolytope( G, v ) ( function )

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

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

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.

1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10

1.1-23 SymmetricMatrixToFilteredGraph
 ‣ SymmetricMatrixToFilteredGraph( A, m, s ) ( function )
 ‣ SymmetricMatrixToFilteredGraph( A, m ) ( function )

Inputs an n × 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 × s/m.

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

1 , 2

1.1-24 SymmetricMatrixToGraph
 ‣ SymmetricMatrixToGraph( A, t ) ( function )

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

1

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.

1

1.2-2 EuclideanMetric
 ‣ EuclideanMetric ( global variable )

Inputs two vectors v,w ∈ R^n and returns a rational number approximating the Euclidean distance between them.

1.2-3 EuclideanSquaredMetric
 ‣ EuclideanSquaredMetric( g, h ) ( function )

Inputs two vectors v,w ∈ R^n and returns the square of the Euclidean distance between them.

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.

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 {\em adjacent} transposition is of the form (i,i+1).

1.2-6 ManhattanMetric
 ‣ ManhattanMetric( g, h ) ( function )

Inputs two vectors v,w ∈ R^n and returns the Manhattan distance between them.

1

1.2-7 VectorsToSymmetricMatrix
 ‣ VectorsToSymmetricMatrix( V ) ( function )
 ‣ VectorsToSymmetricMatrix( V, d ) ( function )

Inputs a list V ={ v_1, ..., v_k} ∈ R^n and returns the k × 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.

1

1.3 Cellular Complexes ⟶ Cellular Complexes

1.3-1 BoundaryMap
 ‣ BoundaryMap( K ) ( function )

Inputs a pure regular CW-complex K and returns the regular CW-inclusion map ι : ∂ K ↪ K from the boundary ∂ K into the complex K.

1 , 2

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.

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 ⋯ 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.)

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.

1 , 2 , 3 , 4 , 5 , 6

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.

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.

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

1.3-7 HomotopyGraph
 ‣ HomotopyGraph( Y ) ( function )

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

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.

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

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.

1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10

1.3-10 RegularCWMap
 ‣ RegularCWMap( M, A ) ( function )

Inputs a pure cubical complex M and a subcomplex A and returns the inclusion map A → M as a map of regular CW complexes.

1 , 2

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.

1

1.4 Cellular Complexes ⟶ 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.

1 , 2 , 3 , 4 , 5 , 6

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.

1

1.4-3 KnotReflection
 ‣ KnotReflection( K ) ( function )

Inputs a pure cubical knot and returns the reflected knot.

1.4-4 KnotSum
 ‣ KnotSum( K, L ) ( function )

Inputs two pure cubical knots and returns their sum.

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.

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 β_0(K). The n-th path component of K is returned.

1 , 2

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.

1.4-8 PureComplexComplement
 ‣ PureComplexComplement( M ) ( function )
 ‣ PureComplexComplement( M ) ( function )

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

1 , 2 , 3 , 4

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.

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.

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.

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.

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 ZG-resolution R of Z and returns a 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.

1 , 2 , 3

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.

1

1.5 Cellular Complexes ⟶ 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 = π_1( R^3∖ K).

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

1 , 2

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 nth 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 nth Betti number of K over a field of characteristic p is returned.

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.

1.5-4 EulerIntegral
 ‣ EulerIntegral( Y, w ) ( function )

Inputs a regular CW-complex Y and a weight function w: Y→ Z, and returns the Euler integral ∫_Y w dχ.

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.

1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10

1.5-6 FundamentalGroupOfQuotient
 ‣ FundamentalGroupOfQuotient( Y ) ( function )

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

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/⟨ R ⟩^F is aspherical. If it succeeds it returns true. Otherwise the test is inconclusive and fail is returned.

1 , 2 , 3

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.

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) ∈ cells.

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 nth 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 nth PersistentBetti numbers of K over a field of characteristic p are returned.

1

1.6 Data ⟶ Homotopy Invariants

1.6-1 DendrogramMat
 ‣ DendrogramMat( A, t, s ) ( function )

Inputs an n× n symmetric matrix A over the rationals, a rational t ge 0 and an integer s ge 1. A list [v_1, ..., 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, ..., 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).

1.7 Cellular Complexes ⟶ 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.

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

1.7-2 ChainComplexEquivalence
 ‣ ChainComplexEquivalence ( global variable )

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

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.

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⊂ Y, B⊂ Y,A⊂ B. It returns the induced chain map f_∗: C_∗(X/A) → C_∗(Y/B) of cellular chain complexes of pairs. (Typlically one takes A and B to be empty or contractible subspaces, in which case C_∗(X/A) ≃ C_∗(X), C_∗(Y/B) ≃ C_∗(Y).)

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

Inputs a map f: X → Y between two simplicial complexes X,Y and returns the induced chain map f_∗: C_∗(X) → C_∗(Y) of cellular chain complexes.

1 , 2 , 3 , 4 , 5 , 6

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.

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.

1 , 2 , 3 , 4 , 5 , 6

1.7-7 DiagonalApproximation
 ‣ DiagonalApproximation( X ) ( function )

Inputs a regular CW-complex X and outputs a pair [p,ι] of maps of CW-complexes. The map p: X^∆ → 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_∗ : C_∗(X^∆) → C_∗(X) is an isomorphism on integral homology. The second map ι : X^∆ ↪ X× X is an inclusion into the direct product. If p_∗ induces an isomorphism on homology then the chain map ι_∗: C_∗(X^∆) → C_∗(X× X) can be used to compute the cup product.

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.

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

1.8 (Co)chain Complexes ⟶ (Co)chain Complexes

1.8-1 FilteredTensorWithIntegers
 ‣ FilteredTensorWithIntegers( R ) ( function )

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

1

1.8-2 FilteredTensorWithIntegersModP
 ‣ FilteredTensorWithIntegersModP( R, p ) ( function )

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

1

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_ Z(C, Z).

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

Inputs an equivariant chain map F: R→ S of resolutions and returns the induced cochain map Hom_ ZG(S, Z) ⟶ Hom_ ZG(R, Z).

1 , 2 , 3 , 4 , 5 , 6

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 ⊗_ Z Z_p of characteristic p.

Inputs a free ZG-resolution R of characteristic 0 and a prime integer p. It returns the chain complex R ⊗_ ZG Z_p of characteristic p.

Inputs an equivariant chain map F: R → S in characteristic 0 a prime integer p. It returns the induced chain map F⊗_ ZG Z_p : R ⊗_ ZG Z_p ⟶ S ⊗_ ZG Z_p.

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

1.9 (Co)chain Complexes ⟶ 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.

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

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, ..., p_m], Q=[q_1, ..., q_n] representing elements P∈ H^p(Y, Z) and Q∈ H^q(Y, Z). The function f returns a list P ∪ Q representing the cup product P ∪ Q ∈ H^p+q(Y, Z).

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

1 , 2

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.

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

1.10 Visualization

1.10-1 BarCodeDisplay
 ‣ BarCodeDisplay( L ) ( function )

Displays a barcode .

1

1.10-2 BarCodeCompactDisplay
 ‣ BarCodeCompactDisplay( L ) ( function )

Displays a barcode in compact form.

1 , 2

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.

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.

1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18

1.10-5 DisplayArcPresentation
 ‣ DisplayArcPresentation( K ) ( function )

Displays a 3-dimensional pure cubical knot in the form of an arc presentation.

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 R^3. It displays the knot.

1.10-7 DisplayDendrogram
 ‣ DisplayDendrogram( L ) ( function )

Displays the dendrogram .

1.10-8 DisplayDendrogramMat
 ‣ DisplayDendrogramMat( A, t, s ) ( function )

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

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".

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∈ R^d. In both cases there is a natural action of G on 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.

1

1.10-11 ScatterPlot
 ‣ ScatterPlot( L ) ( function )

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

generated by GAPDoc2HTML