SCSimplicialComplex
object from a facet listThis section contains functions to generate or to construct new simplicial complexes. Some of them obtain new complexes from existing ones, some generate new complexes.
> SCFromFacets ( facets ) | ( function ) |
Returns: simplicial complex of type SCSimplicialComplex
upon success, fail otherwise.
Constructs a simplicial complex object from the given facet list. The facet list facets has to be a duplicate free list (or set) which consists of duplicate free entries, which are in turn lists or sets. Any vertex labeling can be used, even sets as vertex labels are allowed. Internally the vertices are mapped to the standard labeling 1..N, where N is the number of vertices of the complex, but the vertex labels of the original complex are stored in the property ''VertexLabels'', see SCLabels
(4.4-3) and the SCRelabel..
functions like SCRelabel
(4.4-4) or SCRelabelStandard
(4.4-5).
gap> c:=SCFromFacets([[1,2,5], [1,4,5], [1,4,6], [2,3,5], [3,4,6], [3,5,6]]); [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels. Name="unnamed complex n" Dim=2 /SimplicialComplex] gap> c:=SCFromFacets([["a","d","e"], ["a","b","e"], ["b","c","e"], ["c","e","f"], ["c","d","f"], ["a", "d", "f"]]); [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels. Name="unnamed complex n" Dim=2 /SimplicialComplex] |
> SC ( facets ) | ( function ) |
Returns: simplicial complex of type SCSimplicialComplex upon success, fail otherwise.
A shorter function to create a simplicial complex from a facet list, just calls SCFromFacets
(4.1-1)(facets).
gap> c:=SC(Combinations([1..6],5)); [SimplicialComplex Properties known: Dim, Facets, VertexLabels. Name="unnamed complex n" Dim=4 /SimplicialComplex] |
> SCFromDifferenceCycles ( diffcycles ) | ( function ) |
Returns: a simplicial complex upon success, fail
otherwise.
Creates a simplicial complex object from the list of difference cycles provided. If diffcycles is of length 1 the computation is equivalent to the one in SCDifferenceCycleExpand
(4.3-8). Otherwise the induced modulus of all cycles has to be equal and the union of all expanded difference cycles is returned.
gap> c:=SCFromDifferenceCycles([[1,1,6],[2,3,3]]);; gap> c.F; [ 8, 24, 16 ] gap> c.Homology; [ [ 0, [ ] ], [ 2, [ ] ], [ 1, [ ] ] ] gap> c.Chi; 0 gap> c.HasBoundary; false gap> SCIsPseudoManifold(c); true gap> SCIsManifold(c); #I SCIsManifold: link is sphere. #I SCIsManifold: transitive automorphism group, checking only one link. true gap> |
> SCFromGenerators ( group, generators ) | ( function ) |
Returns: simplicial complex of type SCSimplicialComplex
upon success, fail otherwise.
Constructs a simplicial complex object from the set of generators on which the group group acts, i.e. a complex which has group as automorphism group that consists of the orbits specified by the list of representatives passed in generators. Internally calls SCFromFacets
(4.1-1).
gap> #group: (C7 : C3) : C2, order 42 gap> G:=Group([(2,6,5,7,3,4),(1,3,5,7,2,4,6)]);; gap> c:=SCFromGenerators(G,[[ 1, 2, 4 ]]); [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels. Name="unnamed complex n" Dim=2 /SimplicialComplex] gap> SCLib.DetermineTopologicalType(c); [ [ true, 5 ] ] gap> # a torus |
> SCBdCrossPolytope ( dim ) | ( function ) |
Returns: a new simplicial complex upon success, fail
otherwise.
Generates the boundary of the dim-dimensional cross polytope beta^d.
gap> SCBdCrossPolytope(3); # the octahedron [SimplicialComplex Properties known: Chi, Dim, F, Facets, HasBoundary, Homology, IsConnected, IsStronglyConnected, Name, TopologicalType, VertexLabels. Name="Bd(\beta^3)" Dim=2 Chi=2 F=[ 6, 12, 8 ] Homology=[ [ 0, [ ] ], [ 0, [ ] ], [ 1, [ ] ] ] IsConnected=true IsStronglyConnected=true TopologicalType="S^2" /SimplicialComplex] |
> SCBdSimplex ( dim ) | ( function ) |
Returns: a new simplicial complex upon success, fail
otherwise.
Generates the boundary of the d-simplex.
gap> SCBdSimplex(5); [SimplicialComplex Properties known: AutomorphismGroup, AutomorphismGroupOrder, AutomorphismGroupStructure, AutomorphismGroupTransitivity, Chi, Dim, F, Facets, Generators, HasBoundary, Homology, IsConnected, IsStronglyConnected, Name, TopologicalType, VertexLabels. Name="S^4_6" Dim=4 AutomorphismGroupStructure="S6" AutomorphismGroupTransitivity=6 Chi=2 F=[ 6, 15, 20, 15, 6 ] Homology=[ [ 0, [ ] ], [ 0, [ ] ], [ 0, [ ] ], [ 0, [ ] ], [ 1, [ ] ] ] IsConnected=true IsStronglyConnected=true TopologicalType="S^4" /SimplicialComplex] |
> SCEmpty ( ) | ( function ) |
Returns: simplicial complex with empty facet list upon success, fail
otherwise.
Generates an empty complex (of dimension -1).
gap> SCEmpty(); [SimplicialComplex Properties known: Dim, Faces, Facets, Name, VertexLabels. Name="empty complex" Dim=-1 /SimplicialComplex] |
> SCSimplex ( dim ) | ( function ) |
Returns: a new simplicial complex upon success, fail
otherwise.
Generates the dim-simplex.
gap> SCSimplex(3); [SimplicialComplex Properties known: Chi, Dim, Facets, Name, TopologicalType, VertexLabels. Name="B^3_4" Dim=3 Chi=1 TopologicalType="B^3" /SimplicialComplex] |
> SCCartesianPower ( complex, n ) | ( function ) |
Returns: a new simplicial complex upon success, fail
otherwise.
The new complex is PL-homeomorphic to n-times the cartesian product of complex, of dimensions n * dim and has f_dim^n * n * frac2n-12^n-1}! facets where dim denotes the dimension of complex.
gap> c:=SCBdSimplex(2);; gap> 4torus:=SCCartesianPower(c,4); [SimplicialComplex Properties known: Dim, Facets, Name, TopologicalType, VertexLabels. Name="(S^1_3)^4" Dim=4 TopologicalType="(S^1)^4" /SimplicialComplex] gap> 4torus.Homology; [ [ 0, [ ] ], [ 4, [ ] ], [ 6, [ ] ], [ 4, [ ] ], [ 1, [ ] ] ] gap> 4torus.Chi; 0 gap> 4torus.F; [ 81, 1215, 4050, 4860, 1944 ] gap> |
> SCCartesianProduct ( complex1, complex2 ) | ( function ) |
Returns: a new simplicial complex upon success, fail
otherwise.
Computes the simplicial cartesian product of complex1 and complex2 where complex1 and complex2 are pure, simplicial complexes. The original vertex labeling of complex1 and complex2 is changed into the standard one. The new complex has vertex labels of type [v_i, v_j] where v_i is a vertex of complex1 and v_j is a vertex of complex2.
If n_i, i=1,2 are the number facets and if d_i, i=1,2 are the dimensions of complexi, then the new complex has n_1 * n_2 * d_1+d_2 choose d_1 facets. The number of vertices of the new complex equals the product of the numbers of vertices of the arguments.
gap> c1:=SCBdSimplex(2);; gap> c2:=SCBdSimplex(3);; gap> c3:=SCCartesianProduct(c1,c2); [SimplicialComplex Properties known: Dim, Facets, Name, TopologicalType, VertexLabels. Name="S^1_3xS^2_4" Dim=3 TopologicalType="S^1xS^2" /SimplicialComplex] gap> c3.Homology; [ [ 0, [ ] ], [ 1, [ ] ], [ 1, [ ] ], [ 1, [ ] ] ] gap> c3.F; [ 12, 48, 72, 36 ] gap> |
> SCConnectedComponents ( complex ) | ( function ) |
Returns: a list of simplicial complexes upon success, fail
otherwise.
Computes all connected components of an arbitrary simplicial complex.
gap> c:=SC([[1,2,3],[3,4,5],[4,5,6,7,8]]);; gap> SCRename(c,"connected complex");; gap> SCConnectedComponents(c); [ [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels. Name="Connected component #1 of connected complex" Dim=4 /SimplicialComplex] ] gap> c:=SC([[1,2,3],[4,5],[6,7,8]]);; gap> SCRename(c,"non-connected complex");; gap> SCConnectedComponents(c); [ [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels. Name="Connected component #1 of non-connected complex" Dim=2 /SimplicialComplex], [SimplicialComplex Properties known: Chi, Dim, Facets, Name, VertexLabels. Name="Connected component #2 of non-connected complex" Dim=1 Chi=0 /SimplicialComplex], [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels. Name="Connected component #3 of non-connected complex" Dim=2 /SimplicialComplex] ] gap> |
> SCConnectedProduct ( complex, n ) | ( function ) |
Returns: a simplicial complex upon success, fail
otherwise.
If n >= 2, the function internally calls 1 times SCConnectedSum
(4.3-5) and (n-2) times SCConnectedSumMinus
(4.3-6).
gap> SCLib.SearchByName("T^2"); [ [ 5, "T^2 (VT)" ], [ 7, "T^2 (VT)" ], [ 11, "T^2 (VT)" ], [ 12, "T^2 (VT)" ], [ 20, "T^2 (VT)" ], [ 22, "(T^2)#2" ], [ 27, "(T^2)#3" ], [ 41, "T^2 (VT)" ], [ 44, "(T^2)#4" ], ... gap> torus:=SCLib.Load(5);; gap> genus10:=SCConnectedProduct(torus,10); [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels. Name="T^2 (VT)#+-T^2 (VT)#+-T^2 (VT)#+-T^2 (VT)#+-T^2 (VT)#+-T^2 (VT)#+-T^2 (\ VT)#+-T^2 (VT)#+-T^2 (VT)#+-T^2 (VT)" Dim=2 /SimplicialComplex] gap> genus10.Chi; -18 gap> genus10.F; [ 43, 183, 122 ] gap> |
> SCConnectedSum ( complex1, complex2 ) | ( function ) |
Returns: a new simplicial complex upon success, fail
otherwise.
The function removes the first simplex of complex1 and complex2 and glues them together along the boundary. The boundary components of the complexes are glued in with a twist (a transposition on the vertex labels of the boundary of complex2
). Thus, SCConnectedSum
is different from SCConnectedSumMinus
(4.3-6) whenever complex1 and complex2 do not allow an orientation reversing homeomorphism.
gap> SCLib.SearchByName("T^2"); [ [ 5, "T^2 (VT)" ], [ 7, "T^2 (VT)" ], [ 11, "T^2 (VT)" ], [ 12, "T^2 (VT)" ], [ 20, "T^2 (VT)" ], [ 22, "(T^2)#2" ], [ 27, "(T^2)#3" ], [ 41, "T^2 (VT)" ], [ 44, "(T^2)#4" ], ... gap> torus:=SCLib.Load(5);; gap> genus2:=SCConnectedSum(torus,torus); [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels. Name="T^2 (VT)#+-T^2 (VT)" Dim=2 /SimplicialComplex] gap> genus2.Homology; [ [ 0, [ ] ], [ 4, [ ] ], [ 1, [ ] ] ] gap> genus2.Chi; -2 gap> |
gap> SCLib.SearchByName("CP^2"); [ [ 17, "CP^2 (VT)" ], [ 88, "CP^2#CP^2" ], [ 89, "CP^2#-CP^2" ], [ 186, "CP^2#(S^2xS^2)" ], [ 499, "(S^3~S^1)#(CP^2)^{#5} (VT)" ] ] gap> cp2:=SCLib.Load(17);; # CP^2 # CP^2 (signature of intersection form is 2) gap> c1:=SCConnectedSum(cp2,cp2);; # CP^2 # - CP^2 (signature of intersection form is 0) gap> c2:=SCConnectedSumMinus(cp2,cp2);; gap> c1.F=c2.F; true gap> c1.ASDet=c2.ASDet; true gap> SCIsIsomorphic(c1,c2); false gap> PrintArray(SCIntersectionForm(c1)); [ [ 1, 0 ], [ 0, 1 ] ] gap> PrintArray(SCIntersectionForm(c2)); [ [ 1, 0 ], [ 0, -1 ] ] gap> |
> SCConnectedSumMinus ( complex1, complex2 ) | ( function ) |
Returns: a new simplicial complex upon success, fail
otherwise.
The function removes the first simplex of complex1 and complex2 and glues them together along the boundary. The boundary components of the complexes are glued in without twist. Thus, SCConnectedSumMinus
is different from SCConnectedSum
(4.3-5) whenever complex1 and complex2 do not allow an orientation reversing homeomorphism.
gap> SCLib.SearchByName("T^2"); [ [ 5, "T^2 (VT)" ], [ 7, "T^2 (VT)" ], [ 11, "T^2 (VT)" ], [ 12, "T^2 (VT)" ], [ 20, "T^2 (VT)" ], [ 22, "(T^2)#2" ], [ 27, "(T^2)#3" ], [ 41, "T^2 (VT)" ], [ 44, "(T^2)#4" ], ... gap> torus:=SCLib.Load(5);; gap> genus2:=SCConnectedSumMinus(torus,torus); [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels. Name="T^2 (VT)#+-T^2 (VT)" Dim=2 /SimplicialComplex] gap> genus2.Homology; [ [ 0, [ ] ], [ 4, [ ] ], [ 1, [ ] ] ] gap> genus2.Chi; -2 gap> |
gap> SCLib.SearchByName("CP^2"); [ [ 17, "CP^2 (VT)" ], [ 88, "CP^2#CP^2" ], [ 89, "CP^2#-CP^2" ], [ 186, "CP^2#(S^2xS^2)" ], [ 499, "(S^3~S^1)#(CP^2)^{#5} (VT)" ] ] gap> cp2:=SCLib.Load(17);; # CP^2 # CP^2 (signature of intersection form is 2) gap> c1:=SCConnectedSum(cp2,cp2);; # CP^2 # - CP^2 (signature of intersection form is 0) gap> c2:=SCConnectedSumMinus(cp2,cp2);; gap> c1.F=c2.F; true gap> c1.ASDet=c2.ASDet; true gap> SCIsIsomorphic(c1,c2); false gap> PrintArray(SCIntersectionForm(c1)); [ [ 1, 0 ], [ 0, 1 ] ] gap> PrintArray(SCIntersectionForm(c2)); [ [ 1, 0 ], [ 0, -1 ] ] gap> |
> SCDifferenceCycleCompress ( simplex, modulus ) | ( function ) |
Returns: list with possibly duplicate entries upon success, fail
otherwise.
A difference cycle is returned, i. e. a list of integer values of length (d+1), if d is the dimension of complex, and a sum equal to modulus. In some sense this is the inverse operation of SCDifferenceCycleExpand
(4.3-8).
gap> sphere:=SCBdSimplex(4);; gap> gens:=SCGenerators(sphere); [ [ [ 1, 2, 3, 4 ], [ [ 5 ] ] ] ] gap> diffcycle:=SCDifferenceCycleCompress(gens[1][1],5); [ 1, 1, 1, 2 ] gap> c:=SCDifferenceCycleExpand([1,1,1,2]);; gap> c.Facets; [ [ 1, 2, 3, 4 ], [ 1, 2, 3, 5 ], [ 1, 2, 4, 5 ], [ 1, 3, 4, 5 ], [ 2, 3, 4, 5 ] ] gap> |
> SCDifferenceCycleExpand ( diffcycle ) | ( function ) |
Returns: a simplicial complex upon success, fail
otherwise.
diffcycle induces a simplex Delta = ( v_1 , ... , v_n+1 ) by v_1 =diffcycle[1], v_i = v_i-1 + diffcycle[i] and a cyclic group action by Z_sigma where sigma = sum diffcycle[i] is the modulus of diffcycle
. The function returns the Z_sigma-orbit of Delta.
Note, that modulo operations in GAP are often a little bit cumbersome, since all integer ranges usually start from 1.
gap> c:=SCDifferenceCycleExpand([1,1,2]);; gap> c.Facets; [ [ 1, 2, 3 ], [ 1, 2, 4 ], [ 1, 3, 4 ], [ 2, 3, 4 ] ] gap> |
> SCFVectorBdCrossPolytope ( dim ) | ( function ) |
Returns: a list of integers of size dim + 1
upon success, fail
otherwise.
Computes the f-vector of the d-dimensional cross polytope without generating the underlying complex.
SCFVectorBdCrossPolytope(50); [100, 4900, 156800, 3684800, 67800320, 1017004800, 12785203200, 137440934400, 1282782054400, 10518812846080, 76500457062400, 497252970905600, 2907017368371200, 15365663232819200, 73755183517532160, 322678927889203200, 1290715711556812800, 4732624275708313600, 15941471244491161600, 49418560857922600960, 141195888165493145600, 372243705163572838400, 906332499528699084800, 2039248123939572940800, 4241636097794311716864, 8156992495758291763200, 14501319992459185356800, 23823597130468661657600, 36146147370366245273600, 50604606318512743383040, 65296266217435797913600, 77539316133205010022400, 84588344872587283660800, 84588344872587283660800, 77337915312079802204160, 64448262760066501836800, 48771658304915190579200, 33370081998099867238400, 20535435075753764454400, 11294489291664570449920, 5509506971543692902400, 2361217273518725529600, 878592473867432755200, 279552150776001331200, 74547240206933688320, 16205921784116019200, 2758454771764428800, 344806846470553600, 28147497671065600, 1125899906842624] |
> SCFVectorBdSimplex ( dim ) | ( function ) |
Returns: a list of integers of size dim + 1
upon success, fail
otherwise.
Computes the f-vector of the d-simplex without generating the underlying complex.
SCFVectorBdSimplex(100); [101, 5050, 166650, 4082925, 79208745, 1267339920, 17199613200, 202095455100, 2088319702700, 19212541264840, 158940114100040, 1192050855750300, 8160963550905900, 51297485177122800, 297525414027312240, 1599199100396803290, 7995995501984016450, 37314645675925410100, 163006083742200475700, 668324943343021950370, 2577824781465941808570, 9373908296239788394800, 32197337191432316660400, 104641345872155029146300, 322295345286237489770604, 942094086221309585483304, 2616928017281415515231400, 6916166902815169575968700, 17409661513983013070541900, 41783187633559231369300560, 95696978128474368620010960, 209337139656037681356273975, 437704928371715151926754675, 875409856743430303853509350, 1675784582908852295948146470, 3072271735332895875904935195, 5397234129638871133346507775, 9090078534128625066688855200, 14683973016669317415420458400, 22760158175837441993901710520, 33862674359172779551902544920, 48375249084532542217003635600, 66375341767149302111702662800, 87494768693060443692698964600, 110826707011209895344085355160, 134919469404951176940625649760, 157884485473879036845412994400, 177620046158113916451089618700, 192119641762857909630770403900, 199804427433372226016001220056, 199804427433372226016001220056, 192119641762857909630770403900, 177620046158113916451089618700, 157884485473879036845412994400, 134919469404951176940625649760, 110826707011209895344085355160, 87494768693060443692698964600, 66375341767149302111702662800, 48375249084532542217003635600, 33862674359172779551902544920, 22760158175837441993901710520, 14683973016669317415420458400, 9090078534128625066688855200, 5397234129638871133346507775, 3072271735332895875904935195, 1675784582908852295948146470, 875409856743430303853509350, 437704928371715151926754675, 209337139656037681356273975, 95696978128474368620010960, 41783187633559231369300560, 17409661513983013070541900, 6916166902815169575968700, 2616928017281415515231400, 942094086221309585483304, 322295345286237489770604, 104641345872155029146300, 32197337191432316660400, 9373908296239788394800, 2577824781465941808570, 668324943343021950370, 163006083742200475700, 37314645675925410100, 7995995501984016450, 1599199100396803290, 297525414027312240, 51297485177122800, 8160963550905900, 1192050855750300, 158940114100040, 19212541264840, 2088319702700, 202095455100, 17199613200, 1267339920, 79208745, 4082925, 166650, 5050, 101] |
> SCStronglyConnectedComponents ( complex ) | ( function ) |
Returns: a list of simplicial complexes upon success, fail
otherwise.
Computes all strongly connected components of an arbitrary simplicial complex.
gap> c:=SC([[1,2,3],[3,4,5],[4,5,6,7,8,9],[6,7,8,9,10,11]]);; gap> comps:=SCStronglyConnectedComponents(c); [ [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels. Name="Strongly connected component #1 of unnamed complex n20" Dim=2 /SimplicialComplex], [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels. Name="Strongly connected component #2 of unnamed complex n20" Dim=5 /SimplicialComplex], [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels. Name="Strongly connected component #3 of unnamed complex n20" Dim=5 /SimplicialComplex] ] gap> comps[1].Facets; [ [ 1, 2, 3 ] ] gap> comps[2].Facets; [ [ 3, 4, 5 ], [ 4, 5, 6, 7, 8, 9 ] ] gap> comps[3].Facets; [ [ 6, 7, 8, 9, 10, 11 ] ] gap> |
Functions operating on the labels of a complex such as the name or the vertex labeling.
Internally, simpcomp uses the standard labeling [1, ... , n]. It is recommended to use simple vertex labels like integers end, whenever possible, the standard labeling, see also SCRelabelStandard
(4.4-5).
> SCLabelMax ( complex ) | ( function ) |
Returns: maximal vertex label of complex upon success, fail
otherwise.
The maximum over all vertex labels is determined by the gap function MaximumList
.
gap> c:=SCBdSimplex(3);; gap> SCRelabel(c,[10,100,100000,3500]);; gap> SCLabelMax(c); 100000 gap> |
gap> c:=SCBdSimplex(3);; gap> SCRelabel(c,["a","bbb",5,[1,1]]); true gap> SCLabelMax(c); "bbb" gap> |
> SCLabelMin ( complex ) | ( function ) |
Returns: minimal vertex label of complex upon success, fail
otherwise.
The minimum over all vertex labels is determined by the gap function MinimumList
.
gap> c:=SCBdSimplex(3);; gap> SCRelabel(c,[10,100,100000,3500]);; gap> SCLabelMin(c); 10 gap> |
gap> c:=SCBdSimplex(3);; gap> SCRelabel(c,["a","bbb",5,[1,1]]); true gap> SCLabelMin(c); 5 gap> |
> SCLabels ( complex ) | ( function ) |
Returns: a list of vertex labels upon success, fail
otherwise.
Returns the vertex labels of complex as a list.
gap> c:=SCFromFacets(Combinations(["a","b","c","d"],3));; gap> SCLabels(c); [ "a", "b", "c", "d" ] gap> c.Labels; [ "a", "b", "c", "d" ] |
> SCRelabel ( complex, maptable ) | ( function ) |
Returns: true
upon success, fail
otherwise.
maptable has to be a list of length f_0. The function maps the i-th entry of maptable to the i-th entry of the current vertex labels. If complex has the standard vertex labeling [1, ... , n] i is mapped to maptable[i].
Internally the property ``VertexLabels'' of complex is replaced by maptable.
gap> SCLib.SearchByAttribute("F[1]=12"); [ [ 56, "S^2 (VT)" ], [ 57, "T^2 (VT)" ], [ 58, "T^2 (VT)" ], [ 59, "T^2 (VT)" ], [ 60, "T^2 (VT)" ], [ 61, "(T^2)#2 (VT)" ], [ 62, "(P^2)#4 (VT)" ], [ 63, "(T^2)#2 (VT)" ], [ 64, "(T^2)#2 (VT)" ], gap> c:=SCLib.Load(56);; gap> SCPropertyByName(c,"VertexLabels"); [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] gap> SCRelabel(c,["a","b","c","d","e","f","g","h","i","j","k","l"]); true gap> SCLabels(c); [ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l" ] gap> |
> SCRelabelStandard ( complex ) | ( function ) |
Returns: true
upon success upon success, fail
otherwise.
Maps vertex labels v_1 , ... , v_n of complex to [1 , ... , n].
gap> SCLib.SearchByAttribute("F[1]=12"); [ [ 56, "S^2 (VT)" ], [ 57, "T^2 (VT)" ], [ 58, "T^2 (VT)" ], [ 59, "T^2 (VT)" ], [ 60, "T^2 (VT)" ], [ 61, "(T^2)#2 (VT)" ], [ 62, "(P^2)#4 (VT)" ], [ 63, "(T^2)#2 (VT)" ], [ 64, "(T^2)#2 (VT)" ], gap> c:=SCLib.Load(56);; gap> SCRelabel(c,[4..15]); true gap> SCVertices(c); [ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ] gap> SCRelabelStandard(c); true gap> SCLabels(c); [ 1 .. 12 ] gap> |
> SCRelabelTransposition ( complex, pair ) | ( function ) |
Returns: true
upon success, fail
otherwise.
Permutes vertex labels of a single pair of vertices. pair has to be a list of length 2 and a sublist of the property ``VertexLabels''.
The function is equivalent to SCRelabel
(4.4-4) with maptable = [ VertexLabels[1] , ... , VertexLabels[i] , ... , VertexLabels[j] , dots , VertexLabels[n]] if pair = [ VertexLabels[j] , VertexLabels[i]], j <= i, j <> i.
gap> c:=SCBdSimplex(3);; gap> SCVertices(c); [ 1, 2, 3, 4 ] gap> SCRelabelTransposition(c,[1,2]);; gap> SCLabels(c); [ 2, 1, 3, 4 ] gap> |
> SCRename ( complex, name ) | ( function ) |
Returns: true
upon success, fail
otherwise.
Renames a simplicial complex.
gap> c:=SCBdSimplex(5);; gap> SCName(c); "S^4_6" gap> SCRename(c,"mySphere"); true gap> SCName(c); "mySphere" |
> SCSortComplex ( complex ) | ( function ) |
Returns: a new simplicial complex from sorted facet list upon success, fail
otherwise.
Sorts facet list (with arbitrary vertex labels) and returns a new simplicial complex object from sorted facets. In particular all known properties are lost by this operation.
gap> c:=SCBdSimplex(3); [SimplicialComplex Properties known: AutomorphismGroup, AutomorphismGroupOrder, AutomorphismGroupStructure, AutomorphismGroupTransitivity, Chi, Dim, F, Facets, Generators, HasBoundary, Homology, IsConnected, IsStronglyConnected, Name, TopologicalType, VertexLabels. Name="S^2_4" Dim=2 AutomorphismGroupStructure="S4" AutomorphismGroupTransitivity=4 Chi=2 F=[ 4, 6, 4 ] Homology=[ [ 0, [ ] ], [ 0, [ ] ], [ 1, [ ] ] ] IsConnected=true IsStronglyConnected=true TopologicalType="S^2" /SimplicialComplex] gap> SCRelabel(c,[4,3,2,1]);; gap> SCFacets(c); [ [ 4, 3, 2 ], [ 4, 3, 1 ], [ 4, 2, 1 ], [ 3, 2, 1 ] ] gap> d:=SCSortComplex(c); [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels. Name="unnamed complex n" Dim=2 /SimplicialComplex] gap> SCFacets(d); [ [ 1, 2, 3 ], [ 1, 2, 4 ], [ 1, 3, 4 ], [ 2, 3, 4 ] ] gap> |
> SCUnlabelFace ( complex, face ) | ( function ) |
Returns: a list upon success, fail
otherwise.
Computes the standard labeling of face in complex.
gap> c:=SCBdSimplex(3);; gap> SCRelabel(c,["a","bbb",5,[1,1]]);; gap> SCUnlabelFace(c,["a","bbb",5]); [ 1, 2, 3 ] gap> |
The following functions compute some basic properties of a simplicial complex. In particular, the facets of the complex are not altered by these functions.
Note: Every simplicial complex is internally stored with the standard vertex labeling from 1 to n and a maptable to restore the original vertex labeling. Thus, we have to relabel some of the complex properties (facets, face lattice, generators, etc...) whenever we want to return them to the user. As a consequence, some of the functions exist twice, one of them with the appendix "Ex". These functions return the standard labeling whereas the other ones relabel the result to the original labeling.
> SCAltshulerSteinberg ( complex ) | ( function ) |
Returns: a non-negative integer upon success, fail
otherwise.
Computes the Altshuler-Steinberg determinant.
Definition: Let v_i, 1 <= i <= n be the vertices and let F_j, 1 <= j <= m be the facets of a pure simplicial complex C, then the determinant of AS in Z^n times m, AS_ij=1 if v_i in F_j, AS_ij=0 otherwise, is called the Altshuler-Steinberg-determinant.
gap> SCLib.SearchByName("T^2"); [ [ 5, "T^2 (VT)" ], [ 7, "T^2 (VT)" ], [ 11, "T^2 (VT)" ], [ 12, "T^2 (VT)" ], [ 20, "T^2 (VT)" ], [ 22, "(T^2)#2" ], [ 27, "(T^2)#3" ], [ 41, "T^2 (VT)" ], [ 44, "(T^2)#4" ], ... gap> torus:=SCLib.Load(5);; gap> SCAltshulerSteinberg(torus); 73728 |
gap> c:=SCBdSimplex(3);; gap> SCAltshulerSteinberg(c); 9 gap> c:=SCBdSimplex(4);; gap> SCAltshulerSteinberg(c); 16 gap> c:=SCBdSimplex(5);; gap> SCAltshulerSteinberg(c); 25 |
> SCAutomorphismGroup ( complex ) | ( function ) |
Returns: a group upon success, fail
otherwise
Computes the automorphism group of a strongly connected pseudomanifold complex. Necessarily the group is a subgroup of the symmetric group S_n where n is the number of vertices of the simplicial complex.
The function uses an efficient algorithm provided by the package GRAPE (see [S06], which is based on the program nauty
by Brendan McKay [M84]). If the package GRAPE is not available, this function call falls back to SCAutomorphismGroupInternal
(4.5-3).
gap> SCLib.SearchByName("K3"); [ [ 584, "K3 surface" ] ] gap> k3surf:=SCLib.Load(584);; gap> SCAutomorphismGroup(k3surf); ((C2 x C2 x C2 x C2) : C5) : C3 gap> |
> SCAutomorphismGroupInternal ( complex ) | ( function ) |
Returns: permutation group in structure description upon success, fail
otherwise.
Computes the group of all automorphisms on the set of vertices of a simplicial complex that do not change the complex as a whole. Necessarily the group is a subgroup of S_n where n is the number of vertices of the simplicial complex.
The group is given in structure description, provided by the GAP function StructureDescription()
. Note, that this is not always unique, since every non trivial semi-direct product is denoted by '':
''.
gap> c:=SCBdSimplex(5);; gap> SCAutomorphismGroupInternal(c); S6 |
gap> c:=SCBdSimplex(2);; gap> g:=SCAutomorphismGroupInternal(c); S3 gap> List(g); [(), (1,3), (1,2,3), (2,3), (1,3,2), (1,2)] |
> SCBoundary ( complex ) | ( function ) |
Returns: a new simplicial complex upon success, fail
otherwise.
Computes the boundary of a combinatorial pseudomanifold. The boundary is returned as a simplicial complex and stored as a property of complex.
If the complex is not a pseudomanifold the function returns fail
.
gap> c:=SC([[1,2,3,4],[1,2,3,5],[1,2,4,5],[1,3,4,5]]); [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels. Name="unnamed complex n" Dim=3 /SimplicialComplex] gap> SCBoundary(c); [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels. Name="Bd(unnamed complex 5)" Dim=2 /SimplicialComplex] gap> c; [SimplicialComplex Properties known: Boundary, Dim, Faces, Facets, HasBoundary, Name, VertexLabels. Name="unnamed complex 5" Dim=3 HasBoundary=true /SimplicialComplex] gap> |
> SCDim ( complex ) | ( function ) |
Returns: an integer value >= -1 upon success, fail
otherwise.
Computes the dimension of a simplicial complex. If the complex is not pure, the dimension of the highest dimensional simplex is returned.
gap> complex:=SC([[1,2,3], [1,2,4], [1,3,4], [2,3,4]]);; gap> SCDim(complex); 2 gap> |
gap> c:=SC([[1], [2,4], [3,4], [5,6,7,8]]);; gap> SCDim(c); 3 gap> |
> SCDualGraph ( complex ) | ( function ) |
Returns: A 1-dimensional simplicial complex upon success, fail
otherwise
Computes the dual graph of complex.
gap> sphere:=SCBdSimplex(5);; gap> graph:=SCFaces(sphere,1); [ [ 1, 2 ], [ 1, 3 ], [ 1, 4 ], [ 1, 5 ], [ 1, 6 ], [ 2, 3 ], [ 2, 4 ], [ 2, 5 ], [ 2, 6 ], [ 3, 4 ], [ 3, 5 ], [ 3, 6 ], [ 4, 5 ], [ 4, 6 ], [ 5, 6 ] ] gap> graph:=SC(graph);; gap> dualGraph:=SCDualGraph(sphere); [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels. Name="dual graph of S^4_6" Dim=1 /SimplicialComplex] gap> graph.Facets = dualGraph.Facets; true gap> |
> SCEulerCharacteristic ( complex ) | ( function ) |
Returns: integer upon success, fail
otherwise.
Computes the Euler characteristic of a simplicial complex C
$ \chi(C)=\sum \limits_{i=0}^{d} (-1)^{i} f_i $
where f_i denotes the i-th component of the f-vector.
gap> complex:=SCFromFacets([[1,2,3], [1,2,4], [1,3,4], [2,3,4]]);; gap> SCEulerCharacteristic(complex); 2 |
gap> s2:=SCBdSimplex(3);; gap> s2.EulerCharacteristic; 2 |
> SCFVector ( complex ) | ( function ) |
Returns: a list of integers upon success, fail
otherwise.
Computes the f-vector of the simplicial complex complex, . i. e. the number of i-dimensional faces for 0 <= i <= d, where d is the dimension of the complex. A memory-saving implicit algorithm is used that avoids calculating the face lattice of the complex. Internally calls SCNumFaces
(4.5-43).
gap> complex:=SC([[1,2,3], [1,2,4], [1,3,4], [2,3,4]]);; gap> SCFVector(complex); [4, 6, 4] gap> |
> SCFaceLattice ( complex ) | ( function ) |
Returns: a list of face lists upon success, fail
otherwise.
Computes the entire face lattice of a d-dimensional simplicial complex, i. e. all of its i-skeletons for 0 <= i <= d. The faces are returned in the original labeling.
gap> c:=SC([["a","b","c"],["a","b","d"], ["a","c","d"], ["b","c","d"]]);; gap> SCFaceLattice(c); [ [ ["a"], ["b"], ["c"], ["d"] ], [ ["a", "b"], ["a", "c"], ["a", "d"], ["b", "c"], ["b", "d"], ["c", "d"] ], [ ["a", "b", "c"], ["a", "b", "d"], ["a", "c", "d"], ["b", "c", "d"] ] ] gap> |
> SCFaceLatticeEx ( complex ) | ( function ) |
Returns: a list of face lists upon success, fail
otherwise.
Computes the entire face lattice of a d-dimensional simplicial complex, i. e. all of its i-skeletons for 0 <= i <= d. The faces are returned in the standard labeling.
gap> c:=SC([["a","b","c"],["a","b","d"], ["a","c","d"], ["b","c","d"]]);; gap> SCFaceLatticeEx(c); [ [ [1], [2], [3], [4] ], [ [1, 2], [1, 3], [1, 4], [2, 3], [2, 4], [3, 4] ], [ [1, 2, 3], [1, 2, 4], [1, 3, 4], [2, 3, 4] ] ] gap> |
> SCFaces ( complex, dim ) | ( function ) |
Returns: a face list upon success, fail
otherwise.
This is a synonym of the function SCSkel
(4.5-45).
> SCFacesEx ( complex, dim ) | ( function ) |
Returns: a face list upon success, fail
otherwise.
This is a synonym of the function SCSkelEx
(4.5-46).
> SCFacets ( complex ) | ( function ) |
Returns: a facet list upon success, fail
otherwise.
Returns the facets of a simplicial complex in the original vertex labeling.
gap> c:=SC([[2,3],[3,4],[4,2]]);; gap> SCFacets(c); [ [ 2, 3 ], [ 3, 4 ], [ 2, 4 ] ] gap> |
> SCFacetsEx ( complex ) | ( function ) |
Returns: a facet list upon success, fail
otherwise.
Returns the facets of a simplicial complex as they are stored, i. e. with standard vertex labeling from 1 to n.
gap> c:=SC([[2,3],[3,4],[4,2]]);; gap> SCFacetsEx(c); [ [ 1, 2 ], [ 2, 3 ], [ 1, 3 ] ] gap> |
> SCFpBettiNumbers ( complex, p ) | ( function ) |
Returns: a list of non-negative integers upon success, fail
otherwise.
Computes the F_p Betti numbers of a simplicial complex for any prime number p
.
gap> SCLib.SearchByName("K^2"); [ [ 19, "K^2 (VT)" ], [ 230, "K^2 (VT)" ] ] gap> kleinBottle:=SCLib.Load(19);; gap> SCHomology(kleinBottle); [ [ 0, [ ] ], [ 1, [ 2 ] ], [ 0, [ ] ] ] gap> SCFpBettiNumbers(kleinBottle,2); [ 1, 2, 1 ] gap> SCFpBettiNumbers(kleinBottle,3); [ 1, 1, 0 ] gap> |
> SCFundamentalGroup ( complex ) | ( function ) |
Returns: an fp group upon success, fail
otherwise.
Computes the first fundamental group of complex which must be a connected simplicial complex and returns it in form of a finitely presented group. The generators of the group are given as 2-tuples that correspond to the edges of complex in standard labeling. You can use GAP's SimplifiedFpGroup
to simplify the group presenation.
# an RP^2 gap> c:=SC([[ 1, 2, 3 ], [ 1, 2, 6 ], [ 1, 3, 5 ], [ 1, 4, 5 ], [ 1, 4, 6 ], [ 2, 3, 4 ], [ 2, 4, 5 ], [ 2, 5, 6 ], [ 3, 4, 6 ], [ 3, 5, 6 ]]);; gap> g:=SCFundamentalGroup(c); <fp group on the generators [ [2,3], [2,4], [2,5], [2,6], [3,4], [3,5], [3,6], [4,5], [4,6], [5,6] ]> gap> Order(g); 2 gap> Elements(g); [ <identity ...>, [2,4] ] |
> SCGVector ( complex ) | ( function ) |
Returns: a list of non-negative integers upon success, fail
otherwise.
Computes the g-vector of a simplicial complex. The g-vector is defined as follows:
Let h be the h-vector of a d-dimensional simplicial complex C, then
$h_{-1}:=1 ; \quad g_i:=h_i - h_{i-1} ; \quad \frac{d-1}{2} \geq i \geq 0 $
is called the g-vector of C. For the definition of the h-vector see SCHVector
(4.5-20). The information contained in g suffices to determine the f-vector of C.
gap> SCLib.SearchByName("RP^2"); [ [ 3, "RP^2 (VT)" ], [ 284, "RP^2xS^1" ] ] gap> rp2_6:=SCLib.Load(3);; gap> SCFVector(rp2_6); [ 6, 15, 10 ] gap> SCHVector(rp2_6); [ 3, 6, 0 ] gap> SCGVector(rp2_6); [ 2 ] gap> |
> SCGenerators ( complex ) | ( function ) |
Returns: a list of pairs of the form [ list, integer ]
upon success, fail
otherwise.
Computes the generators of a simplicial complex in the original vertex labeling.
The generating set of a simplicial complex is a list of simplices that will generate the complex by uniting their G-orbits if G is the group of automorphisms of complex.
The function will return the simplices together with the length of the their orbits.
gap> SCLib.SearchByName("T^2"); [ [ 5, "T^2 (VT)" ], [ 7, "T^2 (VT)" ], [ 11, "T^2 (VT)" ], [ 12, "T^2 (VT)" ], [ 20, "T^2 (VT)" ], [ 22, "(T^2)#2" ], [ 27, "(T^2)#3" ], [ 41, "T^2 (VT)" ], [ 44, "(T^2)#4" ], ... gap> torus:=SCLib.Load(5);; gap> SCGenerators(torus); [ [ [ 1, 2, 4 ], 14 ] ] gap> |
gap> SCLib.SearchByName("K3"); [ [ 584, "K3 surface" ] ] gap> SCLib.Load(584); [SimplicialComplex Properties known: AltshulerSteinberg, AutomorphismGroup, AutomorphismGroupSize, AutomorphismGroupStructure, AutomorphismGroupTransitivity, Boundary, Chi, ConnectedComponents, Dim, DualGraph, F, Faces, Facets, G, Generators, H, HasBoundary, HasInterior, Homology, Interior, IsCentrallySymmetric, IsConnected, IsEulerianManifold, IsOrientable, IsPM, IsPure, MinimalNonFaces, Name, Neighborliness, Orientation, StronglyConnected, VertexLabels, Vertices. Name="K3 surface" Dim=4 AutomorphismGroupSize=240 AutomorphismGroupStructure="((C2 x C2 x C2 x C2) : C5) : C3" AutomorphismGroupTransitivity=2 Chi=24 F=[ 16, 120, 560, 720, 288 ] G=[ 10, 55 ] H=[ 11, 66, 286, -99, 23 ] HasBoundary=false HasInterior=true Homology=[ [ 0, [ ] ], [ 0, [ ] ], [ 22, [ ] ], [ 0, [ ] ], [ 1, [ ] ] ] IsCentrallySymmetric=false IsConnected=true IsEulerianManifold=true IsOrientable=true IsPM=true IsPure=true Neighborliness=3 /SimplicialComplex] gap> SCGenerators(last); [ [ [ 1, 2, 3, 8, 12 ], 240 ], [ [ 1, 2, 5, 8, 14 ], 48 ] ] gap> |
> SCGeneratorsEx ( complex ) | ( function ) |
Returns: a list of pairs of the form [ list, integer ]
upon success, fail
otherwise.
Computes the generators of a simplicial complex in the standard vertex labeling.
The generating set of a simplicial complex is a list of simplices that will generate the complex by uniting their G-orbits if G is the group of automorphisms of complex.
The function will return the simplices together with the length of the their orbits.
gap> SCLib.SearchByName("T^2"); [ [ 5, "T^2 (VT)" ], [ 7, "T^2 (VT)" ], [ 11, "T^2 (VT)" ], [ 12, "T^2 (VT)" ], [ 20, "T^2 (VT)" ], [ 22, "(T^2)#2" ], [ 27, "(T^2)#3" ], [ 41, "T^2 (VT)" ], [ 44, "(T^2)#4" ], ... gap> torus:=SCLib.Load(5);; gap> SCGeneratorsEx(torus); [ [ [ 1, 2, 4 ], 14 ] ] gap> |
gap> SCLib.SearchByName("K3"); [ [ 584, "K3 surface" ] ] gap> SCLib.Load(584); [SimplicialComplex Properties known: AltshulerSteinberg, AutomorphismGroup, AutomorphismGroupSize, AutomorphismGroupStructure, AutomorphismGroupTransitivity, Boundary, Chi, ConnectedComponents, Dim, DualGraph, F, Faces, Facets, G, Generators, H, HasBoundary, HasInterior, Homology, Interior, IsCentrallySymmetric, IsConnected, IsEulerianManifold, IsOrientable, IsPM, IsPure, MinimalNonFaces, Name, Neighborliness, Orientation, StronglyConnected, VertexLabels, Vertices. Name="K3 surface" Dim=4 AutomorphismGroupSize=240 AutomorphismGroupStructure="((C2 x C2 x C2 x C2) : C5) : C3" AutomorphismGroupTransitivity=2 Chi=24 F=[ 16, 120, 560, 720, 288 ] G=[ 10, 55 ] H=[ 11, 66, 286, -99, 23 ] HasBoundary=false HasInterior=true Homology=[ [ 0, [ ] ], [ 0, [ ] ], [ 22, [ ] ], [ 0, [ ] ], [ 1, [ ] ] ] IsCentrallySymmetric=false IsConnected=true IsEulerianManifold=true IsOrientable=true IsPM=true IsPure=true Neighborliness=3 /SimplicialComplex] gap> SCGeneratorsEx(last); [ [ [ 1, 2, 3, 8, 12 ], 240 ], [ [ 1, 2, 5, 8, 14 ], 48 ] ] gap> |
> SCHVector ( complex ) | ( function ) |
Returns: a list of integers upon success, fail
otherwise.
Computes the h-vector of a simplicial complex. The h-vector is defined as follows:
Let f in N^d+1 be the f-vector of a d-dimensional simplicial complex, i. e. the number of its i-faces for 0 <= i <= d C, and let p(C,x) be the polynomial
$p(C,x)=x^{d+1}+f_0 x^d +f_1 + x^{d-1} + \ldots + f_{d-1} x + f_d$
of degree d+1. Then h=(h_0 , ... , h_d) in Z^d+1 is given by
$q(C,x):=p(C,x-1) =x^{d+1}+h_0 x^d +h_1 + x^{d-1} + \ldots + h_{d-1} x + h_d.$
This results into the following formula
$ h_k:=(-1)^{k+1}{d+1 \choose k+1} + \sum \limits_{i=0}^{k} (-1)^{k-i}{d-i \choose d-k} f_i.$
gap> SCLib.SearchByName("RP^2"); [ [ 3, "RP^2 (VT)" ], [ 284, "RP^2xS^1" ] ] gap> rp2_6:=SCLib.Load(3);; gap> SCFVector(rp2_6); [ 6, 15, 10 ] gap> SCHVector(rp2_6); [ 3, 6, 0 ] gap> |
> SCHasBoundary ( complex ) | ( function ) |
Returns: true
/ false
upon success, fail
otherwise.
Checks, if a combinatorial pseudomanifold complex has a boundary. If the complex is closed false
is returned, if the complex is not a pseudomanifold, fail
is returned.
gap> SCLib.SearchByName("K^2"); [ [ 19, "K^2 (VT)" ], [ 230, "K^2 (VT)" ] ] gap> kleinBottle:=SCLib.Load(19);; gap> SCHasBoundary(kleinBottle); false gap> |
gap> c:=SC([[1,2,3,4],[1,2,3,5],[1,2,4,5],[1,3,4,5]]);; gap> SCHasBoundary(c); true |
> SCHasInterior ( ) | ( function ) |
Returns: true
/ false
upon success, fail
otherwise.
Returns true
if there exist at least one (d-1)-face of complex that is not in its boundary.
gap> c:=SC([[1,2,3,4],[1,2,3,5],[1,2,4,5],[1,3,4,5]]);; gap> SCHasInterior(c) true gap> c:=SC([[1,2,3,4]]);; gap> SCHasInterior(c); false |
> SCHomology ( complex ) | ( function ) |
Returns: a list of pairs of the form [ integer, list ]
.
Computes the integral simplicial homology groups for a simplicial complex (internally calls SimplicialHomology(complex.FacetsEx)
from the homology package, version 1.4.2., see [DH+04].
If the homology package is not available, this function call falls back to SCHomologyInternal
(5.1-5). The output is a list of homology groups of the form [H_0,....,H_d], where d is the dimension of complex. The format of the homology groups H_i is given in terms of their maximal cyclic subgroups, i.e. a homology group H_icong Z^f + Z / t_1 Z times dots times Z / t_n Z is returned in form of a list [ f, [t_1,...,t_n] ], where f is the (integer) free part of H_i and t_i denotes the torsion parts of H_i ordered in weakly incresing size.
gap> SCLib.SearchByName("K^2"); [ [ 19, "K^2 (VT)" ], [ 230, "K^2 (VT)" ] ] gap> kleinBottle:=SCLib.Load(19);; gap> kleinBottle.Homology; [ [ 0, [ ] ], [ 1, [ 2 ] ], [ 0, [ ] ] ] gap> |
gap> SCLib.SearchByName("L_"); [ [ 139, "L_3_1" ], [ 282, "L_4_1" ], [ 300, "L_5_2" ], [ 411, "(S^2xS^1)#L_3_1" ], [ 412, "(S^2~S^1)#L_3_1" ], [ 444, "L_5_1" ], [ 445, "(S^2xS^1)#2#L_3_1" ], [ 446, "(S^2~S^1)#2#L_3_1" ], ... gap> c:=SCConnectedSum(SCConnectedProduct(SCLib.Load(446),3), SCConnectedProduct(SCLib.Load(445),2)); [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels, Vertices. Name="(S^2~S^1)#2#L_3_1#+-(S^2~S^1)#2#L_3_1#+-(S^2~S^1)#2#L_3_1#+-(S^2xS^1)# 2#L_3_1#+-(S^2xS^1)#2#L_3_1" Dim=3 /SimplicialComplex] gap> SCHomology(c); [ [ 0, [ ] ], [ 10, [ 3, 3, 3, 3, 3 ] ], [ 9, [ 2 ] ], [ 0, [ ] ] ] gap> SCFpBettiNumbers(c,2); [ 1, 10, 10, 1 ] gap> SCFpBettiNumbers(c,3); [ 1, 15, 14, 0 ] gap> |
> SCIncidences ( complex, dim ) | ( function ) |
Returns: a list of face lists upon success, fail
otherwise.
Returns an array of all dim-faces of complex. The array is sorted by the incidence of the face in the (dim+1)-skeleton of the complex, i. e. the i-th entry of the array contains all dim-faces with incidence i. The faces are returned in the original labeling.
gap> c:=SC([[1,2,3],[2,3,4],[3,4,5],[4,5,6],[1,5,6],[1,4,6],[2,3,6]]);; gap> SCIncidences(c,1); [ [ [1, 2], [1, 3], [1, 4], [1, 5], [2, 4], [2, 6], [3, 5], [3, 6] ], [ [1, 6], [3, 4], [4, 5], [4, 6], [5, 6] ], [ [2, 3] ] ] |
> SCIncidencesEx ( complex, dim ) | ( function ) |
Returns: a list of face lists upon success, fail
otherwise.
Returns an array of all dim-faces of complex. The array is sorted by the incidence of the face in the (dim+1)-skeleton of the complex, i. e. the i-th entry of the array contains all dim-faces with incidence i. The faces are returned in the standard labeling.
gap> c:=SC([[1,2,3],[2,3,4],[3,4,5],[4,5,6],[1,5,6],[1,4,6],[2,3,6]]);; gap> SCIncidences(c,1); [ [ [1, 2], [1, 3], [1, 4], [1, 5], [2, 4], [2, 6], [3, 5], [3, 6] ], [ [1, 6], [3, 4], [4, 5], [4, 6], [5, 6] ], [ [2, 3] ] ] |
> SCInterior ( complex ) | ( function ) |
Returns: a new simplicial complex upon success, fail
otherwise.
Computes all (d-1)-faces of a combinatorial d-pseudomanifold C that occur in exactly two facets, i. e. returns the part of the (d-1)-skeleton of C that is not part of the boundary.
gap> c:=SC([[1,2,3,4],[1,2,3,5],[1,2,4,5],[1,3,4,5]]);; gap> SCInterior(c).Facets; [[1, 2, 3], [1, 2, 4], [1, 2, 5], [1, 3, 4], [1, 3, 5], [1, 4, 5]] gap> c:=SC([[1,2,3,4]]);; gap> SCInterior(c).Facets; [] |
> SCIsCentrallySymmetric ( complex ) | ( function ) |
Returns: true
/ false
upon success, fail
otherwise.
Checks, if a simplicial complex is centrally symmetric, i. e. if its automorphism group contains a fixed point free involution.
gap> c:=SCBdCrossPolytope(4);; gap> SCIsCentrallySymmetric(c); true |
gap> c:=SCBdSimplex(4);; gap> SCIsCentrallySymmetric(c); false |
> SCIsConnected ( complex ) | ( function ) |
Returns: true
/ false
upon success, fail
otherwise.
Checks, if a simplicial complex is connected.
gap> c:=SCBdSimplex(1);; gap> SCIsConnected(c); false gap> c:=SCBdSimplex(2);; gap> SCIsConnected(c); true |
> SCIsEmpty ( complex ) | ( function ) |
Returns: true
/ false
upon success, fail
otherwise.
Checks if complex is empty
gap> c:=SC([[1]]);; gap> SCIsEmpty(c); false |
gap> c:=SC([]);; gap> SCIsEmpty(c); true gap> c:=SC([[]]);; gap> SCIsEmpty(c); true gap> |
> SCIsEulerianManifold ( complex ) | ( function ) |
Returns: true
/ false
upon success, fail
otherwise.
Checks whether a given simplicial complex is a Eulerian manifold or not, i. e. checks, if all vertex links of a combinatorial pseudomanifold have the Euler characteristic of a sphere. In particular the function returns false
in case of a bounded manifold.
gap> c:=SCBdSimplex(4);; gap> SCIsEulerianManifold(c); true gap> moebius:=SCLib.Load(6); # a moebius strip gap> SCIsEulerianManifold(moebius); false gap> |
> SCIsHomologySphere ( complex ) | ( function ) |
Returns: true
or false
upon success, fail
otherwise.
Checks, whether the complex given is a homology sphere, or not.
gap> c:=SC([[2,3],[3,4],[4,2]]);; gap> SCIsHomologySphere(c); true |
> SCIsInKd ( complex, k ) | ( function ) |
Returns: an integer upon success, fail
otherwise.
Checks, whether the complex is in the class K^k(d) of simplicial complexes that only have k-stacked spheres as vertex links. Returns the minimal determined k for which the membership was tested or 0 if the membership test could not be decided for the given complex. Internally calls SCIsKStackedSphere
(6.2-5) for all links. Please note that this is a radomized algorithm that may give an indefinite answer to the membership problem.
gap> SCLib.SearchByName("S^2~S^1"); [ [ 14, "S^2~S^1 (VT)" ], [ 29, "S^2~S^1 (VT)" ], [ 34, "S^2~S^1 (VT)" ], [ 42, "S^2~S^1 (VT)" ], [ 48, "S^2~S^1 (VT)" ], [ 49, "S^2~S^1 (VT)" ], [ 84, "S^2~S^1 (VT)" ], [ 87, "S^2~S^1 (VT)" ], [ 90, "(S^2~S^1)#2" ], ... gap> c:=SCLib.Load(14);; gap> c.AutomorphismGroup; D18 gap> SCIsInKd(c,1); #I SCIsInKd: checking link 1/9 #I SCIsKStackedSphere: try 1/50 round 0: [ 7, 15, 10 ] round 1: [ 6, 12, 8 ] round 2: [ 5, 9, 6 ] round 3: [ 4, 6, 4 ] Computed locally minimal complex after 4 rounds. #I SCIsInKd: complex has transitive automorphism group, all links are 1-stacked. 1 |
> SCIsKNeighborly ( complex, k ) | ( function ) |
Returns: true
/ false
upon success, fail
otherwise.
Checks, if a simplicial complex is k-neighborly, i. e. if it contains all possible f_0 choose k (k-1)-simplices, where f_0 denotes the number of simplices.
gap> SCLib.SearchByName("RP^2"); [ [ 3, "RP^2 (VT)" ], [ 284, "RP^2xS^1" ] ] gap> rp2_6:=SCLib.Load(3);; gap> SCFVector(rp2_6); [6, 15, 10] gap> SCIsKNeighborly(rp2_6,2); true gap> SCIsKNeighborly(rp2_6,3); false |
> SCIsOrientable ( complex ) | ( function ) |
Returns: true
/ false
upon success, fail
otherwise.
Checks, if a combinatorial pseudomanifold is orientable.
gap> c:=SCBdCrossPolytope(4);; gap> SCIsOrientable(c); true |
> SCIsPseudoManifold ( complex ) | ( function ) |
Returns: true
/ false
upon success, fail
otherwise.
Checks, if every (d-1)-face of complex is contained in exactly 2 facets.
# Two 2-spheres glued together at [1] gap> c:=SC([[1,2,3],[1,2,4],[1,3,4],[2,3,4],[1,5,6],[1,5,7],[1,6,7],[5,6,7]]);; gap> SCIsPseudoManifold(c); true # Two circles glued together a 1 gap> c:=SC([[1,2],[2,3],[3,1],[1,4],[4,5],[5,1]]);; gap> SCIsPseudoManifold(c); false |
> SCIsPure ( complex ) | ( function ) |
Returns: a pair of the form [ integer, boolean ]
upon success, fail
otherwise.
Checks, if a simplicial complex is pure.
gap> c:=SC([[1,2], [1,4], [2,4], [2,3,4]]);; gap> SCIsPure(c); false gap> |
gap> c:=SC([[1,2], [1,4], [2,4]]);; gap> SCIsPure(c); true |
> SCIsShellable ( complex ) | ( function ) |
Returns: true
/ false
upon success, fail
otherwise.
Checks, if a bounded simplical complex is shellable. See [Z95], [P87] to learn more about shellings.
gap> c:=SCBdCrossPolytope(4);; gap> c:=Difference(c,SC([[1,3,5,7]]));; # bounded version gap> SCIsShellable(c); true gap> |
> SCIsStronglyConnected ( complex ) | ( function ) |
Returns: true
/ false
upon success, fail
otherwise.
Checks, if a simplicial complex is strongly connected, i. e. if for any pair of facets (hatDelta,tildeDelta) there exists a sequence of facets ( Delta_1 , ... , Delta_n ) with Delta_1 = hatDelta and Delta_n = tildeDelta and dim(Delta_i , Delta_i+1 ) = d - 1 for all 1 <= i <= n - 1.
# Two 2-spheres, glued along [1] gap> c:=SC([[1,2,3],[1,2,4],[1,3,4],[2,3,4],[1,5,6],[1,5,7],[1,6,7],[5,6,7]]); gap> SCIsConnected(c); true gap> SCIsStronglyConnected(c); false gap> |
> SCMinimalNonFaces ( complex ) | ( function ) |
Returns: a list of face lists upon success, fail
otherwise.
Computes all missing proper faces of complex by calling SCMinimalNonFacesEx
(4.5-40). The simplices are returned in the original labeling of complex.
gap> c:=SCFromFacets(["abc","abd"]);; gap> SCMinimalNonFaces(c); [ [ ], [ "cd" ] ] gap> |
> SCMinimalNonFacesEx ( complex ) | ( function ) |
Returns: a list of face lists upon success, fail
otherwise.
Computes all missing proper faces of complex, i.e. the missing (i+1)-tuples in the i-dim. skeleton of a complex in minimal dimension. A missing (i+1)-tuple is not listed if it only consists of missing i-tuples. Note, that whenever complex is k-neighborly the first k+1 entries are empty. Note that the simplices returned are in standard labeling 1,dots,n, where n is the number of vertices of complex.
gap> SCLib.SearchByName("T^2"); [ [ 5, "T^2 (VT)" ], [ 7, "T^2 (VT)" ], [ 11, "T^2 (VT)" ], [ 12, "T^2 (VT)" ], [ 20, "T^2 (VT)" ], [ 22, "(T^2)#2" ], [ 27, "(T^2)#3" ], [ 41, "T^2 (VT)" ], [ 44, "(T^2)#4" ], ... gap> torus:=SCLib.Load(5);; gap> SCFVector(torus); [7, 21, 14] gap> SCMinimalNonFacesEx(torus); [ [ ], [ ] ] gap> SCMinimalNonFacesEx(SCBdCrossPolytope(4)); [ [ ], [ ], [ [ 1 .. 3 ], [ 1, 2, 4 ], [ 1, 2, 5 ], [ 1, 2, 6 ], [ 1, 2, 7 ], [ 1, 2, 8 ], [ 1, 3, 4 ], [ 1, 5, 6 ], [ 1, 7, 8 ], [ 2, 3, 4 ], [ 2, 5, 6 ], [ 2, 7, 8 ], [ 3, 4, 5 ], [ 3, 4, 6 ], [ 3, 4, 7 ], [ 3, 4, 8 ], [ 3, 5, 6 ], [ 3, 7, 8 ], [ 4, 5, 6 ], [ 4, 7, 8 ], [ 5, 6, 7 ], [ 5, 6, 8 ], [ 5, 7, 8 ], [ 6, 7, 8 ] ] ] gap> |
> SCName ( complex ) | ( function ) |
Returns: a string upon success, fail
otherwise.
Returns the name of complex.
gap> c:=SCBdSimplex(5);; gap> SCName(c); "S^4_6" |
gap> c:=SC([[1,2],[2,3],[3,1]]);; gap> SCName(c); "unnamed complex n" gap> |
> SCNeighborliness ( complex ) | ( function ) |
Returns: a positive integer upon success, fail
otherwise.
Returns k if a simplicial complex is k-neighborly but not (k+1)-neighborly. See also SCIsKNeighborly
(4.5-33)
Note, that every complex is at least 1-neighborly.
gap> c:=SCBdSimplex(4);; gap> SCNeighborliness(c); 4 gap> c:=SCBdCrossPolytope(4);; gap> SCNeighborliness(c); 1 gap> SCLib.SearchByAttribute("F[3]=Binomial(F[1],3)"); [ [ 10, "S^5 (VT)" ], [ 17, "CP^2 (VT)" ], [ 18, "S^5 (VT)" ], [ 38, "S^5 (VT)" ], [ 39, "S^6 (VT)" ], [ 40, "S^7 (VT)" ], [ 53, "S^5 (VT)" ], [ 54, "S^5 (VT)" ], [ 55, "S^7 (VT)" ], ... gap> cp2:=SCLib.Load(17);; gap> SCNeighborliness(cp2); 3 |
> SCNumFaces ( complex[, i] ) | ( function ) |
Returns: an integer or a list of integers upon success, fail
otherwise.
Computes the f-vector of the simplicial complex complex, . i. e. the number of i-dimensional faces for 0 <= i <= d, where d is the dimension of the complex. Note that a value of i=k calculates the number of (k-1)-faces of complex. A memory-saving implicit algorithm is used that avoids calculating the face lattice of the complex. If the optional integer parameter i is passed, only the i-th position of the face vector of complex is calculated.
gap> complex:=SC([[1,2,3], [1,2,4], [1,3,4], [2,3,4]]);; gap> SCNumFaces(complex,1); 4 gap> |
> SCOrientation ( complex ) | ( function ) |
Returns: a list of the type pm 1 ^f_d / [ ]
upon success, fail
otherwise.
This function tries to compute an orientation of a pure simplicial complex that fulfills the pseudomanifold property. If complex is orientable, an orientation in form of a list of orientations for the facets of complex is returned, otherwise an empty set.
gap> c:=SCBdCrossPolytope(4);; gap> SCOrientation(c); [ 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1 ] |
> SCSkel ( complex, dim ) | ( function ) |
Returns: a face list upon success, fail
otherwise.
Computes the dim-skeleton of a simplcial complex, i. e. all dim-faces of complex, if dim is an integer value. If dim is a list, a list of all dim[i]
-faces of complex for each entry dim[i]
(which has to be an integer) is returned. The faces are returned in the original labeling.
gap> SCLib.SearchByName("RP^2"); [ [ 3, "RP^2 (VT)" ], [ 284, "RP^2xS^1" ] ] gap> rp2_6:=SCLib.Load(3);; gap> rp2_6:=SC(rp2_6.Facets+10);; gap> SCSkelEx(rp2_6,1); [ [ 1, 2 ], [ 1, 3 ], [ 1, 4 ], [ 1, 5 ], [ 1, 6 ], [ 2, 3 ], [ 2, 4 ], [ 2, 5 ], [ 2, 6 ], [ 3, 4 ], [ 3, 5 ], [ 3, 6 ], [ 4, 5 ], [ 4, 6 ], [ 5, 6 ] ] gap> SCSkel(rp2_6,1); [ [ 11, 12 ], [ 11, 13 ], [ 11, 14 ], [ 11, 15 ], [ 11, 16 ], [ 12, 13 ], [ 12, 14 ], [ 12, 15 ], [ 12, 16 ], [ 13, 14 ], [ 13, 15 ], [ 13, 16 ], [ 14, 15 ], [ 14, 16 ], [ 15, 16 ] ] gap> |
> SCSkelEx ( complex, dim ) | ( function ) |
Returns: a face list upon success, fail
otherwise.
Computes the dim-skeleton of a simplcial complex, i. e. all dim-faces of complex, if dim is an integer value. If dim is a list, a list of all dim[i]
-faces of complex for each entry dim[i]
(which has to be an integer) is returned. The faces are returned in the standard labeling.
gap> SCLib.SearchByName("RP^2"); [ [ 3, "RP^2 (VT)" ], [ 284, "RP^2xS^1" ] ] gap> rp2_6:=SCLib.Load(3);; gap> rp2_6:=SC(rp2_6.Facets+10);; gap> SCSkelEx(rp2_6,1); [ [ 1, 2 ], [ 1, 3 ], [ 1, 4 ], [ 1, 5 ], [ 1, 6 ], [ 2, 3 ], [ 2, 4 ], [ 2, 5 ], [ 2, 6 ], [ 3, 4 ], [ 3, 5 ], [ 3, 6 ], [ 4, 5 ], [ 4, 6 ], [ 5, 6 ] ] gap> SCSkel(rp2_6,1); [ [ 11, 12 ], [ 11, 13 ], [ 11, 14 ], [ 11, 15 ], [ 11, 16 ], [ 12, 13 ], [ 12, 14 ], [ 12, 15 ], [ 12, 16 ], [ 13, 14 ], [ 13, 15 ], [ 13, 16 ], [ 14, 15 ], [ 14, 16 ], [ 15, 16 ] ] gap> |
> SCSpanningTree ( complex ) | ( function ) |
Returns: a spanning tree of complex upon success, fail
otherwise.
Computes a spanning tree of complex which must be a connected simplicial complex with a greedy algorithm and returns it in form of a SCSimplicialComplex
object.
gap> c:=SC([["a","b","c"],["a","b","d"], ["a","c","d"], ["b","c","d"]]);; gap> s:=SCSpanningTree(c); [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels. Name="spanning tree of unnamed complex n" Dim=1 /SimplicialComplex] gap> s.Facets; [ [ "a", "b" ], [ "a", "c" ], [ "a", "d" ] ] |
> SCVertices ( complex ) | ( function ) |
Returns: a list of vertex labels upon success, fail
otherwise.
Returns vertex labels.
gap> sphere:=SC([["x",45,[1,1]],["x",45,["b",3]],["x",[1,1], ["b",3]],[45,[1,1],["b",3]]]);; gap> SCVerticesEx(sphere); [1, 2, 3, 4] gap> SCVertices(sphere); [ 45, [ 1, 1 ], "x", [ "b", 3 ] ] |
> SCVerticesEx ( complex ) | ( function ) |
Returns: [ 1, ... , n ] upon success, fail
otherwise.
Returns [1, ... , n ], where n is the number of vertices of complex.
gap> c:=SC([[1,4,5],[4,9,8],[12,13,14,15,16,17]]);; gap> SCVerticesEx(c); [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] |
The following functions perform operations on simplicial complexes. Most of them return simplicial complexes. Thus, this section is closely related to section ''Generate new complexes from old'' earlier in this chapter. However, the data generated here is rather seen as an intrinsic attribute of the original complex and not as an independent complex.
> SCAlexanderDual ( complex ) | ( function ) |
Returns: a new simplicial complex upon success, fail
otherwise.
The Alexander dual of complex is the simplicial complex whose faces are the complements of the nonfaces of complex.
# a square gap> c:=SC([[1,2],[2,3],[3,4],[4,1]]);; gap> dual:=SCAlexanderDual(c);; gap> dual.F; [4, 2] gap> dual.IsConnected; false gap> dual.Facets; [[1, 3], [2, 4]] |
> SCCollapseGreedy ( complex ) | ( function ) |
Returns: a new simplicial complex upon success, fail
otherwise.
Employs a greedy collapsing algorithm in order to collapse complex. The source code of this function is taken from [ManifoldPage].
gap> SCLib.SearchByName("T^2"); [ [ 5, "T^2 (VT)" ], [ 7, "T^2 (VT)" ], [ 11, "T^2 (VT)" ], [ 12, "T^2 (VT)" ], [ 20, "T^2 (VT)" ], [ 22, "(T^2)#2" ], [ 27, "(T^2)#3" ], [ 41, "T^2 (VT)" ], [ 44, "(T^2)#4" ], ... gap> torus:=SCLib.Load(5);; gap> torus:=SCLib.Load(5);; gap> bdtorus:=SCDifference(torus,SC([torus.Facets[1]]));; gap> coll:=SCCollapseGreedy(bdtorus); [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels. Name="collapsed version of T^2 (VT) \ unnamed complex n" Dim=1 /SimplicialComplex] gap> coll.Facets; [ [ 3, 6 ], [ 3, 7 ], [ 5, 6 ], [ 5, 7 ], [ 6, 7 ] ] gap> sphere:=SCBdSimplex(4);; gap> bdsphere:=SCDifference(sphere,SC([sphere.Facets[1]]));; gap> coll:=SCCollapseGreedy(bdsphere); [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels. Name="collapsed version of S^3_5 \ unnamed complex n" Dim=0 /SimplicialComplex] gap> coll.Facets; [ [ 5 ] ] gap> |
> SCCone ( ) | ( function ) |
Returns: a new simplicial complex upon success, fail
otherwise.
Takes a new vertex v and unites every facet with it. The function returns the new complex in the standard vertex labeling from 1 to (n+1). The apex of the cone is (n+1).
gap> SCLib.SearchByName("RP^3"); [ [ 45, "RP^3" ], [ 103, "RP^3=L(2,1) (VT)" ], [ 246, "(S^2~S^1)#RP^3" ], [ 247, "(S^2xS^1)#RP^3" ], [ 283, "(S^2~S^1)#2#RP^3" ], [ 285, "(S^2xS^1)#2#RP^3" ], [ 409, "RP^3#RP^3" ], ... gap> rp3:=SCLib.Load(45);; gap> rp3.F; [11, 51, 80, 40] gap> cone:=SCCone(rp3);; gap> cone.F; [12, 62, 131, 120, 40] gap> |
> SCDeletedJoin ( complex1, complex2 ) | ( function ) |
Returns: a new simplicial complex upon success, fail
otherwise.
Calculates the simplicial deleted join of the simplicial complexes complex1 and complex2. Internally falls back to the homology package [DH+04] if called with a facet list and does not interfere with the homology package.
gap> deljoin:=SCDeletedJoin(SCBdSimplex(3),SCBdSimplex(3)); [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels. Name="S^2_4 deljoin S^2_4" Dim=3 /SimplicialComplex] gap> bddeljoin:=SCBoundary(deljoin);; gap> bddeljoin.Homology; [ [ 1, [ ] ], [ 0, [ ] ], [ 2, [ ] ] ] gap> deljoin.Facets; [ [ [ 1, 1 ], [ 2, 1 ], [ 3, 1 ], [ 4, 2 ] ], [ [ 1, 1 ], [ 2, 1 ], [ 3, 2 ], [ 4, 1 ] ], [ [ 1, 1 ], [ 2, 1 ], [ 3, 2 ], [ 4, 2 ] ], [ [ 1, 1 ], [ 2, 2 ], [ 3, 1 ], [ 4, 1 ] ], [ [ 1, 1 ], [ 2, 2 ], [ 3, 1 ], [ 4, 2 ] ], [ [ 1, 1 ], [ 2, 2 ], [ 3, 2 ], [ 4, 1 ] ], [ [ 1, 1 ], [ 2, 2 ], [ 3, 2 ], [ 4, 2 ] ], [ [ 1, 2 ], [ 2, 1 ], [ 3, 1 ], [ 4, 1 ] ], [ [ 1, 2 ], [ 2, 1 ], [ 3, 1 ], [ 4, 2 ] ], [ [ 1, 2 ], [ 2, 1 ], [ 3, 2 ], [ 4, 1 ] ], [ [ 1, 2 ], [ 2, 1 ], [ 3, 2 ], [ 4, 2 ] ], [ [ 1, 2 ], [ 2, 2 ], [ 3, 1 ], [ 4, 1 ] ], [ [ 1, 2 ], [ 2, 2 ], [ 3, 1 ], [ 4, 2 ] ], [ [ 1, 2 ], [ 2, 2 ], [ 3, 2 ], [ 4, 1 ] ] ] gap> |
> SCDifference ( complex1, complex2 ) | ( function ) |
Returns: a new simplicial complex upon success, fail
otherwise.
Forms the ``difference'' of two simplicial complexes complex1 and complex2 as the simplicial complex formed by the difference of the face lattices of complex1 minus complex2. The two arguments are not altered. Note: for the difference process the vertex labelings of the complexes are taken into account, see also Operation Difference (SCSimplicialComplex, SCSimplicialComplex)
(3.3-10).
gap> c:=SCBdSimplex(3);; gap> d:=SC([[1,2,3]]);; gap> disc:=SCDifference(c,d);; gap> disc.Facets; [ [ 1, 2, 4 ], [ 1, 3, 4 ], [ 2, 3, 4 ] ] gap> empty:=SCDifference(d,c);; gap> empty.Dim; -1 gap> |
> SCHandleAddition ( complex, f1, f2 ) | ( function ) |
Returns: simplicial complex obtained by identifying the vertices of facet f1 with the ones of facet f2 in complex. fail
upon an error.
A combinatorial handle addition is possible, whenever we have d(v,w) >= 3 for any two vertices v inf1 and w inf2, where d(*,*) is the length of the shortest path from v to w. This condition is not checked by this algorithm. See. [BD08] for further information.
gap> c:=SC([[1,2,4],[2,4,5],[2,3,5],[3,5,6],[1,3,6],[1,4,6]]);; gap> c:=SCUnion(c,SCUnion(SCCopy(c)+3,SCCopy(c)+6));; gap> c:=SCUnion(c,SC([[1,2,3],[10,11,12]]));; gap> c.Facets; [[1, 2, 3], [1, 2, 4], [1, 3, 6], [1, 4, 6], [2, 3, 5], [2, 4, 5], [3, 5, 6], [4, 5, 7], [4, 6, 9], [4, 7, 9], [5, 6, 8], [5, 7, 8], [6, 8, 9], [7, 8, 10], [7, 9, 12], [7, 10, 12], [8, 9, 11], [8, 10, 11], [9, 11, 12], [10, 11, 12]] gap> c.Homology; [[0, []], [0, []], [1, []]] gap> torus:=SCHandleAddition(c,[1,2,3],[10,11,12]);; gap> torus.Homology; [[0, []], [2, []], [1, []]] gap> ism:=SCIsManifold(torus);; gap> ism; true gap> |
> SCIntersection ( complex1, complex2 ) | ( function ) |
Returns: a new simplicial complex upon success, fail
otherwise.
Forms the ``intersection'' of two simplicial complexes complex1 and complex2 as the simplicial complex formed by the intersection of the face lattices of complex1 and complex2. The two arguments are not altered. Note: for the intersection process the vertex labelings of the complexes are taken into account.
gap> c:=SCBdSimplex(3);; gap> d:=SCBdSimplex(3)+1;; gap> d.Facets; [ [ 2, 3, 4 ], [ 2, 3, 5 ], [ 2, 4, 5 ], [ 3, 4, 5 ] ] gap> c:=SCBdSimplex(3);; gap> d:=SCBdSimplex(3);; gap> d:=SCMove(d,[[1,2,3],[]])+1;; gap> s1:=SCIntersection(c,d);; gap> s1.Facets; [ [ 2, 3 ], [ 2, 4 ], [ 3, 4 ] ] gap> |
> SCIsIsomorphic ( complex1, complex2 ) | ( function ) |
Returns: true
/ false
upon success, fail
otherwise.
true
is returned, if complex1 and complex2 are combinatorially isomorphic, false
if not.
gap> c1:=SC([[11,12,13],[11,12,14],[11,13,14],[12,13,14]]);; gap> c2:=SCBdSimplex(3);; gap> SCIsIsomorphic(c1,c2); true gap> c3:=SCBdCrossPolytope(3);; gap> SCIsIsomorphic(c1,c3); false |
> SCIsSubcomplex ( sc1, sc2 ) | ( function ) |
Returns: true
if complex1 and complex2 are combinatorially isomorphic, false
otherwise.
Returns true
if sc2 is a subcomplex of sc1, false
otherwise. If dim(sc2) <= dim(sc1) the facets of sc2 are compared with the dim(sc2)-skeleton of sc1. Only works for pure simplicial complexes.
gap> SCLib.SearchByAttribute("F[1]=10"); [ [ 19, "K^2 (VT)" ], [ 20, "T^2 (VT)" ], [ 21, "S^3 (VT)" ], [ 22, "(T^2)#2" ], [ 23, "S^3 (VT)" ], [ 24, "S^2xS^1 (VT)" ], [ 25, "S^3 (VT)" ], [ 26, "S^4 (VT)" ], [ 27, "(T^2)#3" ], ... gap> t2:=SCLib.Load(20);; gap> c:=SCBdSimplex(9);; gap> t2.F; [10, 30, 20] gap> c.F; [10, 45, 120, 210, 252, 210, 120, 45, 10] gap> SCIsSubcomplex(c,t2); true gap> SCIsSubcomplex(t2,c); false |
> SCIsomorphism ( complex1, complex2 ) | ( function ) |
Returns: a list of pairs of vertex labels upon success, fail
otherwise.
Returns an isomorphism of complex1 to complex2 in the original labeling if they are combinatorially isomorphic, false
otherwise. Internally calls SCIsomorphismEx
(4.6-11)(complex1,complex2);
gap> c1:=SC([[11,12,13],[11,12,14],[11,13,14],[12,13,14]]);; gap> c2:=SCBdSimplex(3);; gap> SCIsomorphism(c1,c2); [ [ 11, 1 ], [ 12, 2 ], [ 13, 3 ], [ 14, 4 ] ] gap> SCIsomorphismEx(c1,c2); [ [ [ 1, 1 ], [ 2, 2 ], [ 3, 3 ], [ 4, 4 ] ] ] gap> |
> SCIsomorphismEx ( complex1, complex2 ) | ( function ) |
Returns: a list of pairs of vertex labels upon success, fail
otherwise.
Returns an isomorphism of complex1 to complex2 in the standard labeling if they are combinatorially isomorphic, false
otherwise. If f-vector and Altshuler-Steinberg determinant are equal, the internal function SCIntFunc.SCComputeIsomorphismsEx"(complex1,complex2,true)
is called.
gap> c1:=SC([[11,12,13],[11,12,14],[11,13,14],[12,13,14]]);; gap> c2:=SCBdSimplex(3);; gap> SCIsomorphism(c1,c2); [ [ 11, 1 ], [ 12, 2 ], [ 13, 3 ], [ 14, 4 ] ] gap> SCIsomorphismEx(c1,c2); [ [ [ 1, 1 ], [ 2, 2 ], [ 3, 3 ], [ 4, 4 ] ] ] gap> |
> SCJoin ( complex1, complex2 ) | ( function ) |
Returns: a new simplicial complex upon success, fail
otherwise.
Calculates the simplicial join of the simplicial complexes complex1 and complex2. Internally falls back to the homology package [DH+04] and does not interfere with the homology package. Note that the vertex labelings of the complexes passed as arguments are not propagated to the new complex.
gap> sphere:=SCJoin(SCBdSimplex(2),SCBdSimplex(2)); [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels. Name="S^1_3 join S^1_3" Dim=3 /SimplicialComplex] gap> SCHasBoundary(sphere); false gap> sphere.Facets; [ [ [ 1, 1 ], [ 1, 2 ], [ 2, 1 ], [ 2, 2 ] ], [ [ 1, 1 ], [ 1, 2 ], [ 2, 1 ], [ 2, 3 ] ], [ [ 1, 1 ], [ 1, 2 ], [ 2, 2 ], [ 2, 3 ] ], [ [ 1, 1 ], [ 1, 3 ], [ 2, 1 ], [ 2, 2 ] ], [ [ 1, 1 ], [ 1, 3 ], [ 2, 1 ], [ 2, 3 ] ], [ [ 1, 1 ], [ 1, 3 ], [ 2, 2 ], [ 2, 3 ] ], [ [ 1, 2 ], [ 1, 3 ], [ 2, 1 ], [ 2, 2 ] ], [ [ 1, 2 ], [ 1, 3 ], [ 2, 1 ], [ 2, 3 ] ], [ [ 1, 2 ], [ 1, 3 ], [ 2, 2 ], [ 2, 3 ] ] ] gap> sphere.Homology; [ [ 0, [ ] ], [ 0, [ ] ], [ 0, [ ] ], [ 1, [ ] ] ] gap> |
gap> ball:=SCJoin(SC([[1]]),SCBdSimplex(2)); [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels. Name="unnamed complex n join S^1_3" Dim=2 /SimplicialComplex] gap> ball.Homology; [ [ 0, [ ] ], [ 0, [ ] ], [ 0, [ ] ] ] gap> ball.Facets; [ [ [ 1, 1 ], [ 2, 1 ], [ 2, 2 ] ], [ [ 1, 1 ], [ 2, 1 ], [ 2, 3 ] ], [ [ 1, 1 ], [ 2, 2 ], [ 2, 3 ] ] ] gap> |
> SCLink ( complex, face ) | ( function ) |
Returns: a new simplicial complex upon success, fail
otherwise.
Computes the link of face in complex, i. e. all facets containing face, reduced by face. if complex is pure, the resulting complex is of dimension dim(complex) - dim(face) -1.
gap> SCLib.SearchByName("RP^2"); [ [ 3, "RP^2 (VT)" ], [ 284, "RP^2xS^1" ] ] gap> rp2:=SCLib.Load(3);; gap> SCVertices(rp2); [1, 2, 3, 4, 5, 6] gap> SCLink(rp2,[1]); [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels. Name="unnamed complex n" Dim=1 /SimplicialComplex] gap> last.Facets; [[2, 3], [2, 6], [3, 5], [4, 5], [4, 6]] |
> SCLinks ( complex, dim ) | ( function ) |
Returns: a list of new simplicial complexes upon success, fail
otherwise.
Computes the link of all dim-faces in complex and stores them in a list of simplicial complexes. Internally calls SCLink
(4.6-13) for every face.
gap> c:=SCBdSimplex(4);; # all vertex links -> 2 spheres gap> SCLinks(c,0); [ [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels. Name="lk([ 1 ]) in S^3_5" Dim=2 /SimplicialComplex], # ... etc ] # all edge links -> circles gap> SCLinks(c,1); [ [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels. Name="lk([ 1, 2 ]) in S^3_5" Dim=1 /SimplicialComplex], # ... etc ] gap> |
> SCNeighbors ( complex, face ) | ( function ) |
Returns: a list of faces upon success, fail
otherwise.
Computes the neighboring faces of a given face in complex. A neighboring face is a face distinct from face that must have the same dimension as face and intersect face in a (d-1)-face, where face is of dimensions d. The face is returned in original labeling.
gap> c:=SCFromFacets(Combinations(["a","b","c"],2)); [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels. Name="unnamed complex n" Dim=1 /SimplicialComplex] gap> SCNeighbors(c,["a","d"]); [ [ "a", "b" ], [ "a", "c" ] ] gap> |
> SCNeighborsEx ( complex, face ) | ( function ) |
Returns: a list of faces upon success, fail
otherwise.
Computes the neighboring faces of a given face in standard labeling in complex. A neighboring face is a face distinct from face that must have the same dimension as face and intersect face in a (d-1)-face, where face is of dimensions d.
gap> c:=SCFromFacets(Combinations(["a","b","c"],2)); [SimplicialComplex Properties known: Chi, Dim, Facets, Name, VertexLabels. Name="unnamed complex n" Dim=1 /SimplicialComplex] gap> SCLabels(c); [ "a", "b", "c" ] gap> SCNeighborsEx(c,[1,2]); [ [ 1, 3 ], [ 2, 3 ] ] |
> SCShelling ( complex ) | ( function ) |
Returns: a permuted list of the facets of complex upon success, fail
otherwise.
complex must be a pure, strongly connected pseudomanifold with boundary.
Internally calls SCShellingExt
(4.6-18)(complex,false,[]);
. To learn more about shellings see [Z95], [P87].
gap> c:=SC([[1,2,3],[1,2,4],[1,3,4]]);; gap> SCShelling(c); [[1, 2, 3], [1, 2, 4], [1, 3, 4]] |
> SCShellingExt ( sc, all, checkvector ) | ( function ) |
Returns: a list of permuted lists of the facets of sc of size 1 (all = false
), n (all = true
) if checkvector is empty, true
/ false
if checkvector is not empty, fail
upon an error.
sc must be a pure, bounded, strongly connected combinatorial pseudomanifold.
A shelling is an ordering on the facet list of sc starting with a facet at the boundary. The facets are removed with respect to that ordering. In every step the intersection of the removed facet and the already removed facets has to be a shelling too.
Every shelling is represented as a permuted version of the facet list of sc. A checkvector encodes a shelling in a shorter form. It only contains the indices of the facets. If an order of indices is assigned to checkvector the function tests whether it is a valid shelling or not.
See [Z95], [P87] to learn more about shellings.
gap> SCLib.SearchByName("RP^2"); [ [ 3, "RP^2 (VT)" ], [ 284, "RP^2xS^1" ] ] gap> rp2:=SCLib.Load(3);; gap> rp2:=SCDifference(rp2,SC([rp2.Facets[1]]));; # bounded version gap> all:=SCShellingExt(rp2,true,[]);; gap> Size(all); 1488 gap> all[1]; [ [ 1, 2, 6 ], [ 1, 4, 6 ], [ 1, 4, 5 ], [ 1, 3, 5 ], [ 2, 4, 5 ], [ 2, 3, 4 ], [ 2, 5, 6 ], [ 3, 4, 6 ], [ 3, 5, 6 ] ] gap> all:=SCShellingExt(rp2,false,[]); [ [ [1, 2, 6], [1, 4, 6], [1, 4, 5], [1, 3, 5], [2, 4, 5], [2, 3, 4], [2, 5, 6], [3, 4, 6], [3, 5, 6] ] ] # valid shelling gap> all:=SCShellingExt(rp2,false,[4, 9, 3, 2, 5, 6, 7, 1, 8]); true gap> all:=SCShellingExt(rp2,true,[4, 9, 3, 2, 5, 6, 7, 1, 8]); true # invalid shelling gap> all:=SCShellingExt(rp2,true,[1 .. 9]); #I SCShellingExt: 2 is not a valid shelling facet. false |
> SCShellings ( complex ) | ( function ) |
Returns: a list of permuted versions of the facet list of complex.
Internally calls SCShellingExt
(4.6-18)(complex,true,[]);
. To learn more about shellings see [Z95], [P87].
gap> c:=SC([[1,2,3],[1,2,4],[1,3,4]]);; gap> SCShellings(c); [[[1, 2, 3], [1, 2, 4], [1, 3, 4]], [[1, 2, 3], [1, 3, 4], [1, 2, 4]], [[1, 2, 4], [1, 2, 3], [1, 3, 4]], [[1, 3, 4], [1, 2, 3], [1, 2, 4]], [[1, 2, 4], [1, 3, 4], [1, 2, 3]], [[1, 3, 4], [1, 2, 4], [1, 2, 3]] ] |
> SCSpan ( complex, subset ) | ( function ) |
Returns: a new simplicial complex upon success, fail
otherwise.
Computes the reduced face lattice of all faces that are a subset of subset.
gap> c:=SCBdCrossPolytope(4);; gap> SCVertices(c); [1, 2, 3, 4, 5, 6, 7, 8] gap> span:=SCSpan(c,[1,2,3,4]); [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels. Name="span([ 1, 2, 3, 4 ]) in Bd(\beta^4)" Dim=1 /SimplicialComplex] gap> span.Facets; [[1, 3], [1, 4], [2, 3], [2, 4]] |
gap> c:=SC([[1,2],[1,4,5],[2,3,4]]);; gap> span:=SCSpan(c,[2,3,5]); [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels. Name="span([ 2, 3, 5 ]) in unnamed complex n" Dim=1 /SimplicialComplex] gap> SCFacets(span); [[2, 3], [5]] |
> SCStar ( complex, face ) | ( function ) |
Returns: a new simplicial complex upon success, fail
otherwise .
Computes the star of face in complex, i. e. the set of facets of complex that contain face.
gap> SCLib.SearchByName("RP^2"); [ [ 3, "RP^2 (VT)" ], [ 284, "RP^2xS^1" ] ] gap> rp2:=SCLib.Load(3);; gap> SCVertices(rp2); [1, 2, 3, 4, 5, 6] gap> SCStar(rp2,[1]); [SimplicialComplex Properties known: Dim, Facets, VertexLabels. Name="star([ 1 ]) in RP^2 (VT)" Dim=2 /SimplicialComplex] gap> last.Facets; [[1, 2, 3], [1, 2, 6], [1, 3, 5], [1, 4, 5], [1, 4, 6]] |
> SCStars ( complex, dim ) | ( function ) |
Returns: a list of new simplicial complexes upon success, fail
otherwise.
Computes for every dim-face f the set of facets that contain f.
gap> SCLib.SearchByName("T^2"); [ [ 5, "T^2 (VT)" ], [ 7, "T^2 (VT)" ], [ 11, "T^2 (VT)" ], [ 12, "T^2 (VT)" ], [ 20, "T^2 (VT)" ], [ 22, "(T^2)#2" ], [ 27, "(T^2)#3" ], [ 41, "T^2 (VT)" ], [ 44, "(T^2)#4" ], ... # the minimal 7-vertex torus gap> torus:=SCLib.Load(5);; # 7 2-discs as vertex stars gap> SCStars(torus,0); [ [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels. Name="star([ 1 ]) in T^2 (VT)" Dim=2 /SimplicialComplex], # ... etc ] gap> |
> SCSuspension ( complex ) | ( function ) |
Returns: a new simplicial complex upon success, fail
otherwise.
Calculates the simplicial suspension of the simplicial complex complex. Internally falls back to the homology package [DH+04] and does not interfere with the homology package. Note that the vertex labelings of the complexes passed as arguments are not propagated to the new complex.
gap> SCLib.SearchByName("Poincare"); [ [ 563, "Poincare_sphere" ] ] gap> phs:=SCLib.Load(587); [SimplicialComplex Properties known: AltshulerSteinberg, AutomorphismGroup, AutomorphismGroupSize, AutomorphismGroupStructure, AutomorphismGroupTransitivity, Boundary, Chi, ConnectedComponents, Dim, DualGraph, F, Faces, Facets, G, Generators, H, HasBoundary, HasInterior, Homology, Interior, IsCentrallySymmetric, IsConnected, IsEulerianManifold, IsOrientable, IsPM, IsPure, MinimalNonFaces, Name, Neighborliness, Orientation, StronglyConnected, VertexLabels, Vertices. Name="B4" Dim=3 AutomorphismGroupSize=1 AutomorphismGroupStructure="1" AutomorphismGroupTransitivity=0 Chi=0 F=[ 17, 117, 200, 100 ] G=[ 12, 59 ] H=[ 13, 72, 13, 1 ] HasBoundary=false HasInterior=true Homology=[ [ 0, [ ] ], [ 1, [ 4 ] ], [ 0, [ 2 ] ], [ 0, [ ] ] ] IsCentrallySymmetric=false IsConnected=true IsEulerianManifold=true IsOrientable=false IsPM=true IsPure=true Neighborliness=1 /SimplicialComplex] gap> phs:=SCLib.Load(587);; gap> susp:=SCSuspension(phs);; gap> edwardsSphere:=SCSuspension(susp);; gap> SCIsManifold(edwardsSphere); ... |
> SCUnion ( complex1, complex2 ) | ( function ) |
Returns: a new simplicial complex upon success, fail
otherwise.
Forms the union of two simplicial complexes complex1 and complex2 as the simplicial complex formed by the union of their facets sets. The two arguments are not altered. Note: for the union process the vertex labelings of the complexes are taken into account, see also Operation Union (SCSimplicialComplex, SCSimplicialComplex)
(3.3-9).
gap> c:=SCUnion(SCBdSimplex(3),SCBdSimplex(3)+3); #a wedge of two 2-spheres [SimplicialComplex Properties known: Dim, Facets, VertexLabels. Name="S^2_4 cup S^2_4" Dim=2 /SimplicialComplex] |
> SCVertexIdentification ( complex, v1, v2 ) | ( function ) |
Returns: simplicial complex with pinched point v1=v2 upon success, fail
otherwise.
A vertex identification of v1 and v2 is possible whenever d(v1,v2) >= 3. This is not checked by this algorithm.
gap> c:=SC([[1,2],[2,3],[3,4]]);; gap> circle:=SCVertexIdentification(c,[1],[4]);; gap> circle.Facets; [[1, 2], [1, 3], [2, 3]] gap> circle.Homology; [[0, []], [1, []]] |
> SCWedge ( complex1, complex2, ... ) | ( function ) |
Returns: a new simplicial complex upon success, fail
otherwise.
Calculates the wedge product of the complexes supplied as arguments. Note, that the vertex labelings of the complexes passed as arguments are not propagated to the new complex.
gap> wedge:=SCWedge(SCBdSimplex(2),SCBdSimplex(2)); [SimplicialComplex Properties known: Dim, Facets, Name, VertexLabels. Name="S^1_3 wedge S^1_3" Dim=1 /SimplicialComplex] gap> wedge.Facets; [ [ [ 1, 2 ], [ 1, 3 ] ], [ [ 2, 2 ], [ 2, 3 ] ], [ [ 1, 2 ], "a" ], [ [ 1, 3 ], "a" ], [ [ 2, 2 ], "a" ], [ [ 2, 3 ], "a" ] ] gap> |
generated by GAPDoc2HTML