11. 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 9. for further functions provided by SimpComp.

11.1 Creating a SCSimplicialComplex object

Simplicial complex objects can either be created from a facet list, from a function generating triangulations of standard complexes or by expanding difference cycles. There are also functions creating new simplicial complexes from old, see chapter 4. which will be described in the next sections.


gap> #first run functionality test on simpcomp
gap> SCRunTest();
+ test simpcomp package, version 1.1.21
+ 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> c2:=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> 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> 

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

11.3 Calculating properties of a SCSimplicialComplex object

SimpComp provides a variety of functions for calculating properties of simplicial complexes, see chapter 4.. 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> 

11.4 Creating new complexes from a SCSimplicialComplex object


gap> c4:=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(c4,"T^2#T^2");
true
gap> SCLink(c4,1);
[SimplicialComplex

 Properties known: Dim, Facets, Name, VertexLabels.

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

/SimplicialComplex]
gap> SCStar(c4,[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(c2,c2);
[SimplicialComplex

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

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

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

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

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

/SimplicialComplex]
gap> 

11.5 Homology related calculations

SimpComp relies on the GAP package homology [DH+04] 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> 

11.6 Bistellar flips


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> 
			



generated by GAPDoc2HTML