Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Bib Ind
 Top of Book   Previous Chapter   Next Chapter 

13 A demo session with simpcomp
 13.1 Creating a SCSimplicialComplex object
 13.2 Working with a SCSimplicialComplex object
 13.3 Calculating properties of a SCSimplicialComplex object
 13.4 Creating new complexes from a SCSimplicialComplex object
 13.5 Homology related calculations
 13.6 Bistellar flips

13 A demo session with simpcomp

This chapter contains the transcript of a demo session with simpcomp that is intended to give an insight into what things can be done with this package.

Of course this only scratches the surface of the functions provided by simpcomp. See chapters 4 through 11 for further functions provided by simpcomp.

13.1 Creating a SCSimplicialComplex object

Simplicial complex objects can either be created from a facet list (complex c1 below), orbit representatives together with a permutation group (complex c2) or difference cycles (complex c3, see Section 4.1), from a function generating triangulations of standard complexes (complex c4, see Section 4.2) or from a function constructing infinite series for combinatorial (pseudo)manifolds (complexes c5, c5, c5, see Section 4.3 and the function prefix SCSeries...). There are also functions creating new simplicial complexes from old, see Section 4.4, which will be described in the next sections.

gap> #first run functionality test on simpcomp
gap> SCRunTest();
+ test simpcomp package, version 1.4.0
+ GAP4stones: 69988
true
gap> #all ok
gap> c1:=SCFromFacets([[1,2],[2,3],[3,1]]);
[SimplicialComplex

 Properties known: Dim, Facets, Name, VertexLabels.

 Name="unnamed complex 1"
 Dim=1

/SimplicialComplex]
gap> G:=Group([(2,12,11,6,8,3)(4,7,10)(5,9),(1,11,6,4,5,3,10,8,9,7,2,12)]);
Group([ (2,12,11,6,8,3)(4,7,10)(5,9), (1,11,6,4,5,3,10,8,9,7,2,12) ])
gap> StructureDescription(G);
"S4 x S3"
gap> Size(G);
144
gap> c2:=SCFromGenerators(G,[[1,2,3]]);;
gap> c2.IsManifold;                    
true
gap> SCLibDetermineTopologicalType(c2);
[SimplicialComplex

 Properties known: AutomorphismGroup, AutomorphismGroupSize, 
                   AutomorphismGroupStructure, AutomorphismGroupTransitivity,\
 
                   Boundary, Dim, Faces, Facets, Generators, HasBoundary, 
                   IsManifold, IsPM, Name, TopologicalType, VertexLabels, 
                   Vertices.

 Name="complex from generators under group S4 x S3"
 Dim=2
 AutomorphismGroupSize=144
 AutomorphismGroupStructure="S4 x S3"
 AutomorphismGroupTransitivity=1
 HasBoundary=false
 IsPM=true
 TopologicalType="T^2"

/SimplicialComplex]
gap> c3:=SCFromDifferenceCycles([[1,1,6],[3,3,2]]);
[SimplicialComplex

 Properties known: Dim, Facets, Name, VertexLabels.

 Name="complex from diffcycles [ [ 1, 1, 6 ], [ 3, 3, 2 ] ]"
 Dim=2

/SimplicialComplex]
gap> c4:=SCBdSimplex(2);
[SimplicialComplex

 Properties known: AutomorphismGroup, AutomorphismGroupOrder, 
                   AutomorphismGroupStructure, AutomorphismGroupTransitivity, 
                   Chi, Dim, F, Facets, Generators, HasBounday, Homology, 
                   IsConnected, IsStronglyConnected, Name, TopologicalType, 
                   VertexLabels.

 Name="S^1_3"
 Dim=1
 AutomorphismGroupStructure="S3"
 AutomorphismGroupTransitivity=3
 Chi=0
 F=[ 3, 3 ]
 Homology=[ [ 0, [ ] ], [ 1, [ ] ] ]
 IsConnected=true
 IsStronglyConnected=true
 TopologicalType="S^1"

/SimplicialComplex]
gap> c5:=SCSeriesCSTSurface(2,16);;    
gap> SCLibDetermineTopologicalType(c5);
[SimplicialComplex

 Properties known: Boundary, Dim, Faces, Facets, HasBoundary, IsPM, Name, 
                   TopologicalType, VertexLabels.

 Name="cst surface S_{(2,16)} = { (2:2:12),(6:6:4) }"
 Dim=2
 HasBoundary=false
 IsPM=true
 TopologicalType="T^2 U T^2"

/SimplicialComplex]
gap> c6:=SCSeriesD2n(22);;
gap> c6.Homology;
[ [ 0, [  ] ], [ 1, [  ] ], [ 0, [ 2 ] ], [ 0, [  ] ] ]
gap> c6.F;
[ 44, 264, 440, 220 ]
gap> SCSeriesAGL(17);
[ AGL(1,17), [ [ 1, 2, 4, 8, 16 ] ] ]
gap> c7:=SCFromGenerators(last[1],last[2]);;
gap> c7.AutomorphismGroupTransitivity;
2
gap> 

13.2 Working with a SCSimplicialComplex object

As described in Section 3.2 there are two several ways of accessing an object of type SCSimplicialComplex. An example for the two equivalent ways is given below. The preference will be given to the object oriented notation in this demo session. The code listed below

gap> c:=SCBdSimplex(3);; # create a simplicial complex object
gap> SCFVector(c);
[ 4, 6, 4 ]
gap> SCSkel(c,0);
[ [ 1 ], [ 2 ], [ 3 ], [ 4 ] ]
gap> 

is equivalent to

gap> c:=SCBdSimplex(3);; # create a simplicial complex object
gap> c.F;
[ 4, 6, 4 ]
gap> c.Skel(0);
[ [ 1 ], [ 2 ], [ 3 ], [ 4 ] ]
gap> 

13.3 Calculating properties of a SCSimplicialComplex object

simpcomp provides a variety of functions for calculating properties of simplicial complexes, see Section 4.7. All these properties are only calculated once and stored in the simplicial complex object.

gap> c1.F;     
[ 3, 3 ]
gap> c1.FaceLattice;
[ [ [ 1 ], [ 2 ], [ 3 ] ], [ [ 1, 2 ], [ 1, 3 ], [ 2, 3 ] ] ]
gap> c1.AutomorphismGroup;
S3
gap> c1.Generators;
[ [ [ 1, 2 ], 3 ] ]
gap> c3.Facets;
[ [ 1, 2, 3 ], [ 1, 2, 8 ], [ 1, 3, 6 ], [ 1, 4, 6 ], [ 1, 4, 7 ], 
  [ 1, 7, 8 ], [ 2, 3, 4 ], [ 2, 4, 7 ], [ 2, 5, 7 ], [ 2, 5, 8 ], 
  [ 3, 4, 5 ], [ 3, 5, 8 ], [ 3, 6, 8 ], [ 4, 5, 6 ], [ 5, 6, 7 ], 
  [ 6, 7, 8 ] ]
gap> c3.F;
[ 8, 24, 16 ]
gap> c3.G;
[ 4 ]
gap> c3.H;
[ 5, 11, -1 ]
gap> c3.ASDet;
186624
gap> c3.Chi;
0
gap> c3.Generators;
[ [ [ 1, 2, 3 ], 16 ] ]
gap> c3.HasBoundary;
false
gap> c3.IsConnected;
true
gap> c3.IsCentrallySymmetric;
true
gap> c3.Vertices;
[ 1, 2, 3, 4, 5, 6, 7, 8 ]
gap> c3.ConnectedComponents;
[ [SimplicialComplex
    
     Properties known: Dim, Facets, Name, VertexLabels.
    
     Name="Connected component #1 of complex from diffcycles [ [ 1, 1, 6 ], [ \
3, 3, 2 ] ]"
     Dim=2
    
    /SimplicialComplex] ]
gap> c3.UnknownProperty;
#I  SCPropertyObject: unhandled property 'UnknownProperty'. Handled properties\
 are [ "Equivalent", "IsKStackedSphere", "IsManifold", "IsMovable", "Move", 
  "Moves", "RMoves", "ReduceAsSubcomplex", "Reduce", "ReduceEx", "Copy", 
  "Recalc", "ASDet", "AutomorphismGroup", "AutomorphismGroupInternal", 
  "Boundary", "ConnectedComponents", "Dim", "DualGraph", "Chi", "F", 
  "FaceLattice", "FaceLatticeEx", "Faces", "FacesEx", "Facets", "FacetsEx", 
  "FpBetti", "FundamentalGroup", "G", "Generators", "GeneratorsEx", "H", 
  "HasBoundary", "HasInterior", "Homology", "Incidences", "IncidencesEx", 
  "Interior", "IsCentrallySymmetric", "IsConnected", "IsEmpty", 
  "IsEulerianManifold", "IsHomologySphere", "IsInKd", "IsKNeighborly", 
  "IsOrientable", "IsPM", "IsPure", "IsShellable", "IsStronglyConnected", 
  "MinimalNonFaces", "MinimalNonFacesEx", "Name", "Neighborliness", 
  "Orientation", "Skel", "SkelEx", "SpanningTree", 
  "StronglyConnectedComponents", "Vertices", "VerticesEx", 
  "BoundaryOperatorMatrix", "HomologyBasis", "HomologyBasisAsSimplices", 
  "HomologyInternal", "CoboundaryOperatorMatrix", "Cohomology", 
  "CohomologyBasis", "CohomologyBasisAsSimplices", "CupProduct", 
  "IntersectionForm", "IntersectionFormParity", 
  "IntersectionFormDimensionality", "Load", "Save", "ExportPolymake", 
  "ExportLatexTable", "ExportJavaView", "LabelMax", "LabelMin", "Labels", 
  "Relabel", "RelabelStandard", "RelabelTransposition", "Rename", 
  "SortComplex", "UnlabelFace", "AlexanderDual", "CollapseGreedy", "Cone", 
  "DeletedJoin", "Difference", "HandleAddition", "Intersection", 
  "IsIsomorphic", "IsSubcomplex", "Isomorphism", "IsomorphismEx", "Join", 
  "Link", "Links", "Neighbors", "NeighborsEx", "Shelling", "ShellingExt", 
  "Shellings", "Span", "Star", "Stars", "Suspension", "Union", 
  "VertexIdentification", "Wedge", "DetermineTopologicalType", "Dim", 
  "Facets", "VertexLabels", "Name", "Vertices", "IsConnected", 
  "ConnectedComponents" ].

fail
gap> 

13.4 Creating new complexes from a SCSimplicialComplex object

As already mentioned, there is the possibility to generate new objects of type SCSimplicialComplex from existing ones using standard constructions. The functions used in this section are described in more detail in Section 4.4.

gap> d:=c3+c3;
[SimplicialComplex

 Properties known: Dim, Facets, Name, VertexLabels, Vertices.

 Name="complex from diffcycles [ [ 1, 1, 6 ], [ 3, 3, 2 ] ]#+-complex from dif\
fcycles [ [ 1, 1, 6 ], [ 3, 3, 2 ] ]"
 Dim=2

/SimplicialComplex]
gap> SCRename(d,"T^2#T^2");
true
gap> SCLink(d,1);
[SimplicialComplex

 Properties known: Dim, Facets, Name, VertexLabels.

 Name="lk(1) in T^2#T^2"
 Dim=1

/SimplicialComplex]
gap> SCStar(d,[1,2]);
[SimplicialComplex

 Properties known: Dim, Facets, Name, VertexLabels.

 Name="star([ 1, 2 ]) in T^2#T^2"
 Dim=2

/SimplicialComplex]
gap> SCRename(c3,"T^2");
true
gap> SCConnectedProduct(c3,4);
[SimplicialComplex

 Properties known: Dim, Facets, Name, VertexLabels, Vertices.

 Name="T^2#+-T^2#+-T^2#+-T^2"
 Dim=2

/SimplicialComplex]
gap> SCCartesianProduct(c4,c4);
[SimplicialComplex

 Properties known: Dim, Facets, Name, TopologicalType, VertexLabels.

 Name="S^1_3xS^1_3"
 Dim=2
 TopologicalType="S^1xS^1"

/SimplicialComplex]
gap> SCCartesianPower(c4,3);
[SimplicialComplex

 Properties known: Dim, Facets, Name, TopologicalType, VertexLabels.

 Name="(S^1_3)^3"
 Dim=3
 TopologicalType="(S^1)^3"

/SimplicialComplex]
gap> 

13.5 Homology related calculations

simpcomp relies on the GAP package homology [DHSW04] for its homology computations but provides further (co-)homology related functions, see Chapter 5.

gap> s2s2:=SCCartesianProduct(SCBdSimplex(3),SCBdSimplex(3));
[SimplicialComplex

 Properties known: Dim, Facets, Name, TopologicalType, VertexLabels.

 Name="S^2_4xS^2_4"
 Dim=4
 TopologicalType="S^2xS^2"

/SimplicialComplex]
gap> SCHomology(s2s2);
[ [ 0, [  ] ], [ 0, [  ] ], [ 2, [  ] ], [ 0, [  ] ], [ 1, [  ] ] ]
gap> SCHomologyInternal(s2s2);
[ [ 0, [  ] ], [ 0, [  ] ], [ 2, [  ] ], [ 0, [  ] ], [ 1, [  ] ] ]
gap> SCHomologyBasis(s2s2,2);
[ [ 1, [ [ 1, 70 ], [ -1, 12 ], [ 1, 2 ], [ -1, 1 ] ] ], 
  [ 1, [ [ 1, 143 ], [ -1, 51 ], [ 1, 29 ], [ -1, 25 ] ] ] ]
gap> SCHomologyBasisAsSimplices(s2s2,2);
[ [ 1, 
      [ [ 1, [ 2, 3, 4 ] ], [ -1, [ 1, 3, 4 ] ], [ 1, [ 1, 2, 4 ] ], [ -1, [ 1
                    , 2, 3 ] ] ] ], 
  [ 1, [ [ 1, [ 5, 9, 13 ] ], [ -1, [ 1, 9, 13 ] ], [ 1, [ 1, 5, 13 ] ], 
          [ -1, [ 1, 5, 9 ] ] ] ] ]
gap> SCCohomologyBasis(s2s2,2);
[ [ 1, 
      [ [ 1, 122 ], [ 1, 115 ], [ 1, 112 ], [ 1, 111 ], [ 1, 93 ], [ 1, 90 ], 
          [ 1, 89 ], [ 1, 84 ], [ 1, 83 ], [ 1, 82 ], [ 1, 46 ], [ 1, 43 ], 
          [ 1, 42 ], [ 1, 37 ], [ 1, 36 ], [ 1, 35 ], [ 1, 28 ], [ 1, 27 ], 
          [ 1, 26 ], [ 1, 25 ] ] ], 
  [ 1, [ [ 1, 213 ], [ 1, 201 ], [ 1, 192 ], [ 1, 189 ], [ 1, 159 ], 
          [ 1, 150 ], [ 1, 147 ], [ 1, 131 ], [ 1, 128 ], [ 1, 125 ], 
          [ 1, 67 ], [ 1, 58 ], [ 1, 55 ], [ 1, 39 ], [ 1, 36 ], [ 1, 33 ], 
          [ 1, 10 ], [ 1, 7 ], [ 1, 4 ], [ 1, 1 ] ] ] ]
gap> SCCohomologyBasisAsSimplices(s2s2,2);
[ [ 1, [ [ 1, [ 4, 8, 12 ] ], [ 1, [ 3, 8, 12 ] ], [ 1, [ 3, 7, 12 ] ], 
          [ 1, [ 3, 7, 11 ] ], [ 1, [ 2, 8, 12 ] ], [ 1, [ 2, 7, 12 ] ], 
          [ 1, [ 2, 7, 11 ] ], [ 1, [ 2, 6, 12 ] ], [ 1, [ 2, 6, 11 ] ], 
          [ 1, [ 2, 6, 10 ] ], [ 1, [ 1, 8, 12 ] ], [ 1, [ 1, 7, 12 ] ], 
          [ 1, [ 1, 7, 11 ] ], [ 1, [ 1, 6, 12 ] ], [ 1, [ 1, 6, 11 ] ], 
          [ 1, [ 1, 6, 10 ] ], [ 1, [ 1, 5, 12 ] ], [ 1, [ 1, 5, 11 ] ], 
          [ 1, [ 1, 5, 10 ] ], [ 1, [ 1, 5, 9 ] ] ] ], 
  [ 1, [ [ 1, [ 13, 14, 15 ] ], [ 1, [ 9, 14, 15 ] ], [ 1, [ 9, 10, 15 ] ], 
          [ 1, [ 9, 10, 11 ] ], [ 1, [ 5, 14, 15 ] ], [ 1, [ 5, 10, 15 ] ], 
          [ 1, [ 5, 10, 11 ] ], [ 1, [ 5, 6, 15 ] ], [ 1, [ 5, 6, 11 ] ], 
          [ 1, [ 5, 6, 7 ] ], [ 1, [ 1, 14, 15 ] ], [ 1, [ 1, 10, 15 ] ], 
          [ 1, [ 1, 10, 11 ] ], [ 1, [ 1, 6, 15 ] ], [ 1, [ 1, 6, 11 ] ], 
          [ 1, [ 1, 6, 7 ] ], [ 1, [ 1, 2, 15 ] ], [ 1, [ 1, 2, 11 ] ], 
          [ 1, [ 1, 2, 7 ] ], [ 1, [ 1, 2, 3 ] ] ] ] ]
gap> PrintArray(SCIntersectionForm(s2s2));
[ [  0,  1 ],
  [  1,  0 ] ]
gap> c:=s2s2+s2s2;
[SimplicialComplex

 Properties known: Dim, Facets, Name, VertexLabels, Vertices.

 Name="S^2_4xS^2_4#+-S^2_4xS^2_4"
 Dim=4

/SimplicialComplex]
gap> PrintArray(SCIntersectionForm(c));
[ [   0,  -1,   0,   0 ],
  [  -1,   0,   0,   0 ],
  [   0,   0,   0,  -1 ],
  [   0,   0,  -1,   0 ] ]
gap> 

13.6 Bistellar flips

For a more detailed description of functions related to bistellar flips as well as a very short introduction into the topic, see Chapter 6.

gap> beta4:=SCBdCrossPolytope(4);;    
gap> s3:=SCBdSimplex(4);;             
gap> SCEquivalent(beta4,s3);
#I  round 0, move: [ [ 2, 6, 7 ], [ 3, 4 ] ]
[ 8, 25, 34, 17 ]
#I  round 1, move: [ [ 2, 7 ], [ 3, 4, 5 ] ]
[ 8, 24, 32, 16 ]
#I  round 2, move: [ [ 2, 5 ], [ 3, 4, 8 ] ]
[ 8, 23, 30, 15 ]
#I  round 3, move: [ [ 2 ], [ 3, 4, 6, 8 ] ]
[ 7, 19, 24, 12 ]
#I  round 4, move: [ [ 6, 8 ], [ 1, 3, 4 ] ]
[ 7, 18, 22, 11 ]
#I  round 5, move: [ [ 8 ], [ 1, 3, 4, 5 ] ]
[ 6, 14, 16, 8 ]
#I  round 6, move: [ [ 5 ], [ 1, 3, 4, 7 ] ]
[ 5, 10, 10, 5 ]
#I  SCReduceComplexEx: complexes are bistellarly equivalent.
true
gap> SCBistellarOptions.WriteLevel;   
0
gap> SCBistellarOptions.WriteLevel:=1;
1
gap> SCEquivalent(beta4,s3);          
#I  SCLibInit: made directory "~/PATH" for user library.
#I  SCIntFunc.SCLibInit: index not found -- trying to reconstruct it.
#I  SCLibUpdate: rebuilding index for ~/PATH.
#I  SCLibUpdate: rebuilding index done.

#I  round 0, move: [ [ 2, 4, 6 ], [ 7, 8 ] ]
[ 8, 25, 34, 17 ]
#I  round 1, move: [ [ 2, 4 ], [ 5, 7, 8 ] ]
[ 8, 24, 32, 16 ]
#I  round 2, move: [ [ 4, 5 ], [ 1, 7, 8 ] ]
[ 8, 23, 30, 15 ]
#I  round 3, move: [ [ 4 ], [ 1, 6, 7, 8 ] ]
[ 7, 19, 24, 12 ]
#I  SCLibAdd: saving complex to file "complex_ReducedComplex_7_vertices_3_2009\
-10-27_11-40-00.sc".
#I  round 4, move: [ [ 2, 6 ], [ 3, 7, 8 ] ]
[ 7, 18, 22, 11 ]
#I  round 5, move: [ [ 2 ], [ 3, 5, 7, 8 ] ]
[ 6, 14, 16, 8 ]
#I  SCLibAdd: saving complex to file "complex_ReducedComplex_6_vertices_5_2009\
-10-27_11-40-00.sc".
#I  round 6, move: [ [ 5 ], [ 1, 3, 7, 8 ] ]
[ 5, 10, 10, 5 ]
#I  SCLibAdd: saving complex to file "complex_ReducedComplex_5_vertices_6_2009\
-10-27_11-40-00.sc".
#I  SCLibAdd: saving complex to file "complex_ReducedComplex_5_vertices_7_2009\
-10-27_11-40-00.sc".
#I  SCReduceComplexEx: complexes are bistellarly equivalent.
true
gap> myLib:=SCLibInit("~/PATH"); # copy path from above             
[Simplicial complex library. Properties:
CalculateIndexAttributes=true
Number of complexes in library=4
IndexAttributes=[ "Name", "Date", "Dim", "F", "G", "H", "Chi", "Homology" ]
Loaded=true
Path="/home/spreerjn/reducedComplexes/2009-10-27_11-40-00/"
]
gap> s3:=myLib.Load(3);
[SimplicialComplex

 Properties known: Chi, Date, Dim, F, Faces, Facets, G, H, Homology, 
                   IsConnected, Name, VertexLabels.

 Name="ReducedComplex_5_vertices_6"
 Dim=3
 Chi=0
 F=[ 5, 10, 10, 5 ]
 G=[ 0, 0 ]
 H=[ 1, 1, 1, 1 ]
 Homology=[ [ 0, [ ] ], [ 0, [ ] ], [ 0, [ ] ], [ 1, [ ] ] ]
 IsConnected=true

/SimplicialComplex]
gap> s3:=myLib.Load(2);
[SimplicialComplex

 Properties known: Chi, Date, Dim, F, Faces, Facets, G, H, Homology, 
                   IsConnected, Name, VertexLabels.

 Name="ReducedComplex_6_vertices_5"
 Dim=3
 Chi=0
 F=[ 6, 14, 16, 8 ]
 G=[ 1, 0 ]
 H=[ 2, 2, 2, 1 ]
 Homology=[ [ 0, [ ] ], [ 0, [ ] ], [ 0, [ ] ], [ 1, [ ] ] ]
 IsConnected=true

/SimplicialComplex]
gap> t2:=SCCartesianProduct(SCBdSimplex(2),SCBdSimplex(2));;
gap> t2.F;
[ 9, 27, 18 ]
gap> SCBistellarOptions.WriteLevel:=0;
0
gap> SCBistellarOptions.LogLevel:=0;  
0
gap> mint2:=SCReduceComplex(t2);    
[ true, [SimplicialComplex
    
     Properties known: Dim, Facets, Name, VertexLabels.
    
     Name="unnamed complex 85"
     Dim=2
    
    /SimplicialComplex], 32 ]
gap> 
			

Further example computations can be found in the slides of various talks about simpcomp, available from the homepage, and in Appendix A of [Spr10a].

 Top of Book   Previous Chapter   Next Chapter 
Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Bib Ind

generated by GAPDoc2HTML