  
  [1X5 [33X[0;0YThe GAP object types [10XSCSimplicialComplex[110X[101X[1X and [10XSCNormalSurface[110X[101X[1X[133X[101X
  
  [33X[0;0YCurrently,  the  [5XGAP[105X  package  [5Xsimpcomp[105X  supports  data  structures  for two
  different   kinds   of   geometric   objects,  namely  simplicial  complexes
  ([10XSCSimplicialComplex[110X)  and  discrete normal surfaces ([10XSCNormalSurface[110X) which
  are both subtypes of the [5XGAP[105X object type [10XSCPolyhedralComplex[110X[133X
  
  
  [1X5.1 [33X[0;0YThe object type [10XSCSimplicialComplex[110X[101X[1X[133X[101X
  
  [33X[0;0YA major part of [5Xsimpcomp[105X deals with the object type [10XSCSimplicialComplex[110X. For
  a  complete list of properties that [10XSCSimplicialComplex[110X handles, see Chapter
  [14X6[114X.  For a few fundamental methods and functions (such as checking the object
  class,  copying  objects  of  this  type,  etc.) for [10XSCSimplicialComplex[110X see
  below.[133X
  
  [1X5.1-1 SCIsSimplicialComplex[101X
  
  [29X[2XSCIsSimplicialComplex[102X( [3Xobject[103X ) [32X filter
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X upon success, [9Xfail[109X otherwise.[133X
  
  [33X[0;0YChecks   if   [3Xobject[103X   is  of  type  [10XSCSimplicialComplex[110X.  The  object  type
  [10XSCSimplicialComplex[110X is derived from the object type [10XSCPropertyObject[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> c:=SCEmpty();;
[128X[104X
    [4X[28X gap> SCIsSimplicialComplex(c);
[128X[104X
    [4X[28X true[128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X5.1-2 SCCopy[101X
  
  [29X[2XSCCopy[102X( [3Xcomplex[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Ya copy of [3Xcomplex[103X upon success, [9Xfail[109X otherwise.[133X
  
  [33X[0;0YMakes  a ``deep copy'' of [3Xcomplex[103X -- this is a copy such that all properties
  of the copy can be altered without changing the original complex.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> c:=SCBdSimplex(4);;
[128X[104X
    [4X[28X gap> d:=SCCopy(c)-1;;
[128X[104X
    [4X[28X gap> c.Facets=d.Facets;
[128X[104X
    [4X[28X false[128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> c:=SCBdSimplex(4);;
[128X[104X
    [4X[28X gap> d:=SCCopy(c);;
[128X[104X
    [4X[28X gap> IsIdenticalObj(c,d);
[128X[104X
    [4X[28X false[128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X5.1-3 ShallowCopy (SCSimplicialComplex)[101X
  
  [29X[2XShallowCopy (SCSimplicialComplex)[102X( [3Xcomplex[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Ya copy of [3Xcomplex[103X upon success, [9Xfail[109X otherwise.[133X
  
  [33X[0;0YMakes  a  copy  of  [3Xcomplex[103X.  This is actually a ``deep copy'' such that all
  properties of the copy can be altered without changing the original complex.
  Internally calls [2XSCCopy[102X ([14X5.1-2[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> c:=SCBdCrossPolytope(7);;
[128X[104X
    [4X[28X gap> d:=ShallowCopy(c)+10;;
[128X[104X
    [4X[28X gap> c.Facets=d.Facets;
[128X[104X
    [4X[28X false[128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X5.1-4 SCPropertiesDropped[101X
  
  [29X[2XSCPropertiesDropped[102X( [3Xcomplex[103X ) [32X function
  [6XReturns:[106X  [33X[0;10Ya object of type [10XSCSimplicialComplex[110X upon success, [9Xfail[109X otherwise.[133X
  
  [33X[0;0YAn  object  of the type [10XSCSimplicialComplex[110X caches its previously calculated
  properties  such  that  each  property  only has to be calculated once. This
  function  returns  a copy of [3Xcomplex[103X with all properties (apart from Facets,
  Dim and Name) dropped, clearing all previously computed properties. See also
  [2XSCPropertyDrop[102X ([14X18.1-8[114X) and [2XSCPropertyTmpDrop[102X ([14X18.1-13[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> c:=SC(SCFacets(SCBdCyclicPolytope(10,12)));
[128X[104X
    [4X[28X [SimplicialComplex[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Properties known: Dim, FacetsEx, Name, Vertices.[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Name="unnamed complex 27"[128X[104X
    [4X[28X  Dim=9[128X[104X
    [4X[28X [128X[104X
    [4X[28X /SimplicialComplex][128X[104X
    [4X[28X gap> c.F; time;                                 
[128X[104X
    [4X[28X [ 12, 66, 220, 495, 792, 922, 780, 465, 180, 36 ][128X[104X
    [4X[28X 36[128X[104X
    [4X[28X gap> c.F; time;                                 
[128X[104X
    [4X[28X [ 12, 66, 220, 495, 792, 922, 780, 465, 180, 36 ][128X[104X
    [4X[28X 0[128X[104X
    [4X[28X gap> c:=SCPropertiesDropped(c);                 
[128X[104X
    [4X[28X [SimplicialComplex[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Properties known: Dim, FacetsEx, Name, Vertices.[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Name="unnamed complex 27"[128X[104X
    [4X[28X  Dim=9[128X[104X
    [4X[28X [128X[104X
    [4X[28X /SimplicialComplex][128X[104X
    [4X[28X gap> c.F; time;                                 
[128X[104X
    [4X[28X [ 12, 66, 220, 495, 792, 922, 780, 465, 180, 36 ][128X[104X
    [4X[28X 40[128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  
  [1X5.2 [33X[0;0YOverloaded operators of [10XSCSimplicialComplex[110X[101X[1X[133X[101X
  
  [33X[0;0Y[5Xsimpcomp[105X   overloads   some   standard   operations   for  the  object  type
  [10XSCSimplicialComplex[110X  if  this  definition  is  intuitive  and mathematically
  sound. See a list of overloaded operators below.[133X
  
  [1X5.2-1 Operation + (SCSimplicialComplex, Integer)[101X
  
  [29X[2XOperation + (SCSimplicialComplex, Integer)[102X( [3Xcomplex[103X, [3Xvalue[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Ythe  simplicial  complex  passed  as  argument  upon success, [9Xfail[109X
            otherwise.[133X
  
  [33X[0;0YPositively  shifts  the  vertex  labels of [3Xcomplex[103X (provided that all labels
  satisfy the property [10XIsAdditiveElement[110X) by the amount specified in [3Xvalue[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> c:=SCBdSimplex(3)+10;;
[128X[104X
    [4X[28X gap> c.Facets;
[128X[104X
    [4X[28X [ [ 11, 12, 13 ], [ 11, 12, 14 ], [ 11, 13, 14 ], [ 12, 13, 14 ] ][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X5.2-2 Operation - (SCSimplicialComplex, Integer)[101X
  
  [29X[2XOperation - (SCSimplicialComplex, Integer)[102X( [3Xcomplex[103X, [3Xvalue[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Ythe  simplicial  complex  passed  as  argument  upon success, [9Xfail[109X
            otherwise.[133X
  
  [33X[0;0YNegatively  shifts  the  vertex  labels of [3Xcomplex[103X (provided that all labels
  satisfy the property [10XIsAdditiveElement[110X) by the amount specified in [3Xvalue[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> c:=SCBdSimplex(3)-1;;
[128X[104X
    [4X[28X gap> c.Facets;
[128X[104X
    [4X[28X [ [ 0, 1, 2 ], [ 0, 1, 3 ], [ 0, 2, 3 ], [ 1, 2, 3 ] ][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X5.2-3 Operation mod (SCSimplicialComplex, Integer)[101X
  
  [29X[2XOperation mod (SCSimplicialComplex, Integer)[102X( [3Xcomplex[103X, [3Xvalue[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Ythe  simplicial  complex  passed  as  argument  upon success, [9Xfail[109X
            otherwise.[133X
  
  [33X[0;0YTakes  all  vertex  labels  of  [3Xcomplex[103X  modulo the value specified in [3Xvalue[103X
  (provided  that all labels satisfy the property [10XIsAdditiveElement[110X). Warning:
  this  might  result  in  different vertices being assigned the same label or
  even in invalid facet lists, so be careful.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> c:=(SCBdSimplex(3)*10) mod 7;;
[128X[104X
    [4X[28X gap> c.Facets;
[128X[104X
    [4X[28X [ [ 2, 3, 5 ], [ 2, 3, 6 ], [ 2, 5, 6 ], [ 3, 5, 6 ] ][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X5.2-4 Operation ^ (SCSimplicialComplex, Integer)[101X
  
  [29X[2XOperation ^ (SCSimplicialComplex, Integer)[102X( [3Xcomplex[103X, [3Xvalue[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Ysimplicial  complex of type [10XSCSimplicialComplex[110X upon success, [9Xfail[109X
            otherwise.[133X
  
  [33X[0;0YForms   the  [3Xvalue[103X-th  simplicial  cartesian  power  of  [3Xcomplex[103X,  i.e.  the
  [3Xvalue[103X-fold  cartesian  product  of  copies of [3Xcomplex[103X. The complex passed as
  argument is not altered. Internally calls [2XSCCartesianPower[102X ([14X6.6-1[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> c:=SCBdSimplex(2)^2; #a torus
[128X[104X
    [4X[28X [SimplicialComplex[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Properties known: Dim, FacetsEx, Name, TopologicalType, Vertices.[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Name="(S^1_3)^2"[128X[104X
    [4X[28X  Dim=2[128X[104X
    [4X[28X  TopologicalType="(S^1)^2"[128X[104X
    [4X[28X [128X[104X
    [4X[28X /SimplicialComplex][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X5.2-5 Operation + (SCSimplicialComplex, SCSimplicialComplex)[101X
  
  [29X[2XOperation + (SCSimplicialComplex, SCSimplicialComplex)[102X( [3Xcomplex1[103X, [3Xcomplex2[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Ysimplicial  complex of type [10XSCSimplicialComplex[110X upon success, [9Xfail[109X
            otherwise.[133X
  
  [33X[0;0YForms the connected sum of [3Xcomplex1[103X and [3Xcomplex2[103X. Uses the lexicographically
  first  facets  of  both  complexes to do the gluing. The complexes passed as
  arguments are not altered. Internally calls [2XSCConnectedSum[102X ([14X6.6-5[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> SCLib.SearchByName("RP^3");
[128X[104X
    [4X[28X [ [ 45, "RP^3" ], [ 113, "RP^3=L(2,1) (VT)" ], [ 589, "(S^2~S^1)#RP^3" ], [128X[104X
    [4X[28X   [ 590, "(S^2xS^1)#RP^3" ], [ 632, "(S^2~S^1)#2#RP^3" ], [128X[104X
    [4X[28X   [ 633, "(S^2xS^1)#2#RP^3" ], [ 2414, "RP^3#RP^3" ], [128X[104X
    [4X[28X   [ 2426, "RP^3=L(2,1) (VT)" ], [ 2488, "(S^2~S^1)#3#RP^3" ], [128X[104X
    [4X[28X   [ 2489, "(S^2xS^1)#3#RP^3" ], [ 2502, "RP^3=L(2,1) (VT)" ], [128X[104X
    [4X[28X   [ 7473, "(S^2~S^1)#4#RP^3" ], [ 7474, "(S^2xS^1)#4#RP^3" ], [128X[104X
    [4X[28X   [ 7504, "(S^2~S^1)#5#RP^3" ], [ 7505, "(S^2xS^1)#5#RP^3" ] ][128X[104X
    [4X[28X gap> c:=SCLib.Load(last[1][1]);;
[128X[104X
    [4X[28X gap> SCLib.SearchByName("S^2~S^1"){[1..3]};
[128X[104X
    [4X[28X [ [ 12, "S^2~S^1 (VT)" ], [ 27, "S^2~S^1 (VT)" ], [ 28, "S^2~S^1 (VT)" ] ][128X[104X
    [4X[28X gap> d:=SCLib.Load(last[1][1]);;
[128X[104X
    [4X[28X gap> c:=c+d; #form RP^3#(S^2~S^1)
[128X[104X
    [4X[28X [SimplicialComplex[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Properties known: Dim, FacetsEx, Name, Vertices.[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Name="RP^3#+-S^2~S^1 (VT)"[128X[104X
    [4X[28X  Dim=3[128X[104X
    [4X[28X [128X[104X
    [4X[28X /SimplicialComplex][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X5.2-6 Operation - (SCSimplicialComplex, SCSimplicialComplex)[101X
  
  [29X[2XOperation - (SCSimplicialComplex, SCSimplicialComplex)[102X( [3Xcomplex1[103X, [3Xcomplex2[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Ysimplicial  complex of type [10XSCSimplicialComplex[110X upon success, [9Xfail[109X
            otherwise.[133X
  
  [33X[0;0YCalls [2XSCDifference[102X ([14X6.10-5[114X)([3Xcomplex1[103X, [3Xcomplex2[103X)[133X
  
  [1X5.2-7 Operation * (SCSimplicialComplex, SCSimplicialComplex)[101X
  
  [29X[2XOperation * (SCSimplicialComplex, SCSimplicialComplex)[102X( [3Xcomplex1[103X, [3Xcomplex2[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Ysimplicial  complex of type [10XSCSimplicialComplex[110X upon success, [9Xfail[109X
            otherwise.[133X
  
  [33X[0;0YForms  the simplicial cartesian product of [3Xcomplex1[103X and [3Xcomplex2[103X. Internally
  calls [2XSCCartesianProduct[102X ([14X6.6-2[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> SCLib.SearchByName("RP^2");
[128X[104X
    [4X[28X [ [ 3, "RP^2 (VT)" ], [ 635, "RP^2xS^1" ] ][128X[104X
    [4X[28X gap> c:=SCLib.Load(last[1][1])*SCBdSimplex(3); #form RP^2 x S^2
[128X[104X
    [4X[28X [SimplicialComplex[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Properties known: Dim, FacetsEx, Name, Vertices.[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Name="RP^2 (VT)xS^2_4"[128X[104X
    [4X[28X  Dim=4[128X[104X
    [4X[28X [128X[104X
    [4X[28X /SimplicialComplex][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X5.2-8 Operation = (SCSimplicialComplex, SCSimplicialComplex)[101X
  
  [29X[2XOperation = (SCSimplicialComplex, SCSimplicialComplex)[102X( [3Xcomplex1[103X, [3Xcomplex2[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X upon success, [9Xfail[109X otherwise.[133X
  
  [33X[0;0YCalculates  whether  two simplicial complexes are isomorphic, i.e. are equal
  up to a relabeling of the vertices.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> c:=SCBdSimplex(3);;
[128X[104X
    [4X[28X gap> c=c+10;
[128X[104X
    [4X[28X true[128X[104X
    [4X[28X gap> c=SCBdCrossPolytope(4);
[128X[104X
    [4X[28X false[128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  
  [1X5.3 [33X[0;0Y[10XSCSimplicialComplex[110X[101X[1X as a subtype of [10XSet[110X[101X[1X[133X[101X
  
  [33X[0;0YApart   from  being  a  subtype  of  [10XSCPropertyObject[110X,  an  object  of  type
  [10XSCSimplicialComplex[110X  also  behaves  like a [5XGAP[105X [10XSet[110X type. The elements of the
  set  are  given  by  the  facets  of the simplical complex, grouped by their
  dimensionality,  i.e.  if  [10Xcomplex[110X is an object of type [10XSCSimplicialComplex[110X,
  [10Xc[1][110X refers to the 0-faces of [10Xcomplex[110X, [10Xc[2][110X to the 1-faces, etc.[133X
  
  [1X5.3-1 Operation Union (SCSimplicialComplex, SCSimplicialComplex)[101X
  
  [29X[2XOperation Union (SCSimplicialComplex, SCSimplicialComplex)[102X( [3Xcomplex1[103X, [3Xcomplex2[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Ysimplicial  complex of type [10XSCSimplicialComplex[110X upon success, [9Xfail[109X
            otherwise.[133X
  
  [33X[0;0YComputes the union of two simplicial complexes by calling [2XSCUnion[102X ([14X7.3-16[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> c:=Union(SCBdSimplex(3),SCBdSimplex(3)+3); #a wedge of two 2-spheres
[128X[104X
    [4X[28X [SimplicialComplex[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Properties known: Dim, FacetsEx, Name, Vertices.[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Name="S^2_4 cup S^2_4"[128X[104X
    [4X[28X  Dim=2[128X[104X
    [4X[28X [128X[104X
    [4X[28X /SimplicialComplex][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X5.3-2 Operation Difference (SCSimplicialComplex, SCSimplicialComplex)[101X
  
  [29X[2XOperation Difference (SCSimplicialComplex, SCSimplicialComplex)[102X( [3Xcomplex1[103X, [3Xcomplex2[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Ysimplicial  complex of type [10XSCSimplicialComplex[110X upon success, [9Xfail[109X
            otherwise.[133X
  
  [33X[0;0YComputes   the   ``difference''  of  two  simplicial  complexes  by  calling
  [2XSCDifference[102X ([14X6.10-5[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> c:=SCBdSimplex(3);;
[128X[104X
    [4X[28X gap> d:=SC([[1,2,3]]);;
[128X[104X
    [4X[28X gap> disc:=Difference(c,d);;
[128X[104X
    [4X[28X gap> disc.Facets;
[128X[104X
    [4X[28X [ [ 1, 2, 4 ], [ 1, 3, 4 ], [ 2, 3, 4 ] ][128X[104X
    [4X[28X gap> empty:=Difference(d,c);;
[128X[104X
    [4X[28X gap> empty.Dim;
[128X[104X
    [4X[28X -1[128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X5.3-3 Operation Intersection (SCSimplicialComplex, SCSimplicialComplex)[101X
  
  [29X[2XOperation Intersection (SCSimplicialComplex, SCSimplicialComplex)[102X( [3Xcomplex1[103X, [3Xcomplex2[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Ysimplicial  complex of type [10XSCSimplicialComplex[110X upon success, [9Xfail[109X
            otherwise.[133X
  
  [33X[0;0YComputes  the  ``intersection''  of  two  simplicial  complexes  by  calling
  [2XSCIntersection[102X ([14X6.10-8[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> c:=SCBdSimplex(3);;        
[128X[104X
    [4X[28X gap> d:=SCBdSimplex(3);;        
[128X[104X
    [4X[28X gap> d:=SCMove(d,[[1,2,3],[]]);;
[128X[104X
    [4X[28X gap> d:=d+1;;                   
[128X[104X
    [4X[28X gap> s1:=SCIntersection(c,d);   
[128X[104X
    [4X[28X [SimplicialComplex[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Properties known: Dim, FacetsEx, Name, Vertices.[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Name="S^2_4 cap unnamed complex 20"[128X[104X
    [4X[28X  Dim=1[128X[104X
    [4X[28X [128X[104X
    [4X[28X /SimplicialComplex][128X[104X
    [4X[28X gap> s1.Facets;                 
[128X[104X
    [4X[28X [ [ 2, 3 ], [ 2, 4 ], [ 3, 4 ] ][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X5.3-4 Size (SCSimplicialComplex)[101X
  
  [29X[2XSize (SCSimplicialComplex)[102X( [3Xcomplex[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Yan integer upon success, [9Xfail[109X otherwise.[133X
  
  [33X[0;0YReturns  the  ``size''  of a simplicial complex. This is [22Xd+1[122X, where [22Xd[122X is the
  dimension  of the complex. [22Xd+1[122X is returned instead of [22Xd[122X, as all lists in [5XGAP[105X
  are  indexed  beginning  with  1  --  thus  this also holds for all the face
  lattice related properties of the complex.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> SCLib.SearchByAttribute("F=[12,66,108,54]");
[128X[104X
    [4X[28X [ [ 139, "L_3_1" ], [ 140, "S^2~S^1 (VT)" ], [128X[104X
    [4X[28X   [ 141, "(S^2xS^1)#(S^2xS^1) (VT)" ], [ 142, "S^2xS^1 (VT)" ], [128X[104X
    [4X[28X   [ 143, "S^2xS^1 (VT)" ], [ 144, "S^2xS^1 (VT)" ], [ 145, "S^2xS^1 (VT)" ], [128X[104X
    [4X[28X   [ 146, "S^2~S^1 (VT)" ], [ 147, "S^2~S^1 (VT)" ], [ 148, "S^2~S^1 (VT)" ], [128X[104X
    [4X[28X   [ 149, "S^2~S^1 (VT)" ], [ 150, "S^2~S^1 (VT)" ], [128X[104X
    [4X[28X   [ 151, "(S^2xS^1)#(S^2xS^1) (VT)" ], [ 152, "S^2xS^1 (VT)" ], [128X[104X
    [4X[28X   [ 153, "(S^2xS^1)#(S^2xS^1) (VT)" ], [ 154, "S^2xS^1 (VT)" ], [128X[104X
    [4X[28X   [ 155, "S^2xS^1 (VT)" ], [ 156, "S^2~S^1 (VT)" ], [ 157, "S^2~S^1 (VT)" ], [128X[104X
    [4X[28X   [ 158, "(S^2xS^1)#(S^2xS^1) (VT)" ], [ 159, "S^2xS^1 (VT)" ], [128X[104X
    [4X[28X   [ 160, "S^2xS^1 (VT)" ], [ 161, "(S^2xS^1)#(S^2xS^1) (VT)" ] ][128X[104X
    [4X[28X gap> c:=SCLib.Load(last[1][1]);;
[128X[104X
    [4X[28X gap> for i in [1..Size(c)] do Print(c.F[i],"\n"); od;
[128X[104X
    [4X[28X 12[128X[104X
    [4X[28X 66[128X[104X
    [4X[28X 108[128X[104X
    [4X[28X 54[128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X5.3-5 Length (SCSimplicialComplex)[101X
  
  [29X[2XLength (SCSimplicialComplex)[102X( [3Xcomplex[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Yan integer upon success, [9Xfail[109X otherwise.[133X
  
  [33X[0;0YReturns the ``size'' of a simplicial complex by calling [10XSize([110X[3Xcomplex[103X[10X)[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> SCLib.SearchByAttribute("F=[12,66,108,54]");
[128X[104X
    [4X[28X [ [ 139, "L_3_1" ], [ 140, "S^2~S^1 (VT)" ], [128X[104X
    [4X[28X   [ 141, "(S^2xS^1)#(S^2xS^1) (VT)" ], [ 142, "S^2xS^1 (VT)" ], [128X[104X
    [4X[28X   [ 143, "S^2xS^1 (VT)" ], [ 144, "S^2xS^1 (VT)" ], [ 145, "S^2xS^1 (VT)" ], [128X[104X
    [4X[28X   [ 146, "S^2~S^1 (VT)" ], [ 147, "S^2~S^1 (VT)" ], [ 148, "S^2~S^1 (VT)" ], [128X[104X
    [4X[28X   [ 149, "S^2~S^1 (VT)" ], [ 150, "S^2~S^1 (VT)" ], [128X[104X
    [4X[28X   [ 151, "(S^2xS^1)#(S^2xS^1) (VT)" ], [ 152, "S^2xS^1 (VT)" ], [128X[104X
    [4X[28X   [ 153, "(S^2xS^1)#(S^2xS^1) (VT)" ], [ 154, "S^2xS^1 (VT)" ], [128X[104X
    [4X[28X   [ 155, "S^2xS^1 (VT)" ], [ 156, "S^2~S^1 (VT)" ], [ 157, "S^2~S^1 (VT)" ], [128X[104X
    [4X[28X   [ 158, "(S^2xS^1)#(S^2xS^1) (VT)" ], [ 159, "S^2xS^1 (VT)" ], [128X[104X
    [4X[28X   [ 160, "S^2xS^1 (VT)" ], [ 161, "(S^2xS^1)#(S^2xS^1) (VT)" ] ][128X[104X
    [4X[28X gap> c:=SCLib.Load(last[1][1]);;
[128X[104X
    [4X[28X gap> for i in [1..Length(c)] do Print(c.F[i],"\n"); od;
[128X[104X
    [4X[28X 12[128X[104X
    [4X[28X 66[128X[104X
    [4X[28X 108[128X[104X
    [4X[28X 54[128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X5.3-6 Operation [] (SCSimplicialComplex)[101X
  
  [29X[2XOperation [] (SCSimplicialComplex)[102X( [3Xcomplex[103X, [3Xpos[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Ya list of faces upon success, [9Xfail[109X otherwise.[133X
  
  [33X[0;0YReturns  the  [22X(pos-1)[122X-dimensional  faces of [3Xcomplex[103X as a list. If [22Xpos ≥ d+2[122X,
  where  [22Xd[122X  is  the dimension of [3Xcomplex[103X, the empty set is returned. Note that
  [3Xpos[103X must be [22X≥ 1[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> SCLib.SearchByName("K^2");
[128X[104X
    [4X[28X [ [ 17, "K^2 (VT)" ], [ 571, "K^2 (VT)" ] ][128X[104X
    [4X[28X gap> c:=SCLib.Load(last[1][1]);;
[128X[104X
    [4X[28X gap> c[2];
[128X[104X
    [4X[28X [ [ 1, 2 ], [ 1, 3 ], [ 1, 5 ], [ 1, 7 ], [ 1, 9 ], [ 1, 10 ], [ 2, 3 ], [128X[104X
    [4X[28X   [ 2, 4 ], [ 2, 6 ], [ 2, 8 ], [ 2, 10 ], [ 3, 4 ], [ 3, 5 ], [ 3, 7 ], [128X[104X
    [4X[28X   [ 3, 9 ], [ 4, 5 ], [ 4, 6 ], [ 4, 8 ], [ 4, 10 ], [ 5, 6 ], [ 5, 7 ], [128X[104X
    [4X[28X   [ 5, 9 ], [ 6, 7 ], [ 6, 8 ], [ 6, 10 ], [ 7, 8 ], [ 7, 9 ], [ 8, 9 ], [128X[104X
    [4X[28X   [ 8, 10 ], [ 9, 10 ] ][128X[104X
    [4X[28X gap> c[4];
[128X[104X
    [4X[28X [  ][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X5.3-7 Iterator (SCSimplicialComplex)[101X
  
  [29X[2XIterator (SCSimplicialComplex)[102X( [3Xcomplex[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Yan  iterator  on  the  face  lattice of [3Xcomplex[103X upon success, [9Xfail[109X
            otherwise.[133X
  
  [33X[0;0YProvides an iterator object for the face lattice of a simplicial complex.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> c:=SCBdCrossPolytope(4);;
[128X[104X
    [4X[28X gap> for faces in c do Print(Length(faces),"\n"); od;
[128X[104X
    [4X[28X 8[128X[104X
    [4X[28X 24[128X[104X
    [4X[28X 32[128X[104X
    [4X[28X 16[128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  
  [1X5.4 [33X[0;0YThe object type [10XSCNormalSurface[110X[101X[1X[133X[101X
  
  [33X[0;0YThe  [5XGAP[105X object type [10XSCNormalSurface[110X is designed to describe slicings (level
  sets  of  discrete  Morse  functions)  of  combinatorial  [22X3[122X-manifolds, i. e.
  discrete  normal  surfaces.  Internally  [10XSCNormalSurface[110X  is  a  subtype  of
  [10XSCPolyhedralComplex[110X  and,  thus,  mostly  behaves like a [10XSCSimplicialComplex[110X
  object  (see  Section [14X5.1[114X). For a very short introduction to normal surfaces
  see  [14X2.4[114X,  for  a  more thorough introduction to the field see [Spr11b]. For
  some  fundamental  methods  and functions for [10XSCNormalSurface[110X see below. For
  more functions related to the [10XSCNormalSurface[110X object type see Chapter [14X7[114X.[133X
  
  
  [1X5.5 [33X[0;0YOverloaded operators of [10XSCNormalSurface[110X[101X[1X[133X[101X
  
  [33X[0;0YAs  with  the  object  type  [10XSCSimplicialComplex[110X,  [5Xsimpcomp[105X  overloads  some
  standard  operations  for  the  object  type  [10XSCNormalSurface[110X. See a list of
  overloaded operators below.[133X
  
  [1X5.5-1 Operation + (SCNormalSurface, Integer)[101X
  
  [29X[2XOperation + (SCNormalSurface, Integer)[102X( [3Xcomplex[103X, [3Xvalue[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Ythe  discrete normal surface passed as argument upon success, [9Xfail[109X
            otherwise.[133X
  
  [33X[0;0YPositively  shifts  the  vertex  labels of [3Xcomplex[103X (provided that all labels
  satisfy the property [10XIsAdditiveElement[110X) by the amount specified in [3Xvalue[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> sl:=SCNSSlicing(SCBdSimplex(4),[[1],[2..5]]);;
[128X[104X
    [4X[28X gap> sl.Facets;                                    
[128X[104X
    [4X[28X [ [ [ 1, 2 ], [ 1, 3 ], [ 1, 4 ] ], [ [ 1, 2 ], [ 1, 3 ], [ 1, 5 ] ], [128X[104X
    [4X[28X   [ [ 1, 2 ], [ 1, 4 ], [ 1, 5 ] ], [ [ 1, 3 ], [ 1, 4 ], [ 1, 5 ] ] ][128X[104X
    [4X[28X gap> sl:=sl + 2;;                                  
[128X[104X
    [4X[28X gap> sl.Facets;  
[128X[104X
    [4X[28X [ [ [ 3, 4 ], [ 3, 5 ], [ 3, 6 ] ], [ [ 3, 4 ], [ 3, 5 ], [ 3, 7 ] ], [128X[104X
    [4X[28X   [ [ 3, 4 ], [ 3, 6 ], [ 3, 7 ] ], [ [ 3, 5 ], [ 3, 6 ], [ 3, 7 ] ] ][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X5.5-2 Operation - (SCNormalSurface, Integer)[101X
  
  [29X[2XOperation - (SCNormalSurface, Integer)[102X( [3Xcomplex[103X, [3Xvalue[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Ythe  discrete normal surface passed as argument upon success, [9Xfail[109X
            otherwise.[133X
  
  [33X[0;0YNegatively  shifts  the  vertex  labels of [3Xcomplex[103X (provided that all labels
  satisfy the property [10XIsAdditiveElement[110X) by the amount specified in [3Xvalue[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> sl:=SCNSSlicing(SCBdSimplex(4),[[1],[2..5]]);;
[128X[104X
    [4X[28X gap> sl.Facets;                                    
[128X[104X
    [4X[28X [ [ [ 1, 2 ], [ 1, 3 ], [ 1, 4 ] ], [ [ 1, 2 ], [ 1, 3 ], [ 1, 5 ] ], [128X[104X
    [4X[28X   [ [ 1, 2 ], [ 1, 4 ], [ 1, 5 ] ], [ [ 1, 3 ], [ 1, 4 ], [ 1, 5 ] ] ][128X[104X
    [4X[28X gap> sl:=sl - 2;;                                  
[128X[104X
    [4X[28X gap> sl.Facets;  
[128X[104X
    [4X[28X [ [ [ -1, 0 ], [ -1, 1 ], [ -1, 2 ] ], [ [ -1, 0 ], [ -1, 1 ], [ -1, 3 ] ], [128X[104X
    [4X[28X   [ [ -1, 0 ], [ -1, 2 ], [ -1, 3 ] ], [ [ -1, 1 ], [ -1, 2 ], [ -1, 3 ] ] ][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X5.5-3 Operation mod (SCNormalSurface, Integer)[101X
  
  [29X[2XOperation mod (SCNormalSurface, Integer)[102X( [3Xcomplex[103X, [3Xvalue[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Ythe  discrete normal surface passed as argument upon success, [9Xfail[109X
            otherwise.[133X
  
  [33X[0;0YTakes  all  vertex  labels  of  [3Xcomplex[103X  modulo the value specified in [3Xvalue[103X
  (provided  that all labels satisfy the property [10XIsAdditiveElement[110X). Warning:
  this  might  result  in  different vertices being assigned the same label or
  even invalid facet lists, so be careful.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> sl:=SCNSSlicing(SCBdSimplex(4),[[1],[2..5]]);;    
[128X[104X
    [4X[28X gap> sl.Facets;
[128X[104X
    [4X[28X [ [ [ 1, 2 ], [ 1, 3 ], [ 1, 4 ] ], [ [ 1, 2 ], [ 1, 3 ], [ 1, 5 ] ], [128X[104X
    [4X[28X   [ [ 1, 2 ], [ 1, 4 ], [ 1, 5 ] ], [ [ 1, 3 ], [ 1, 4 ], [ 1, 5 ] ] ][128X[104X
    [4X[28X gap> sl:=sl mod 2;;
[128X[104X
    [4X[28X gap> sl.Facets;    
[128X[104X
    [4X[28X [ [ [ 1, 0 ], [ 1, 0 ], [ 1, 1 ] ], [ [ 1, 0 ], [ 1, 0 ], [ 1, 1 ] ], [128X[104X
    [4X[28X   [ [ 1, 0 ], [ 1, 1 ], [ 1, 1 ] ], [ [ 1, 0 ], [ 1, 1 ], [ 1, 1 ] ] ][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  
  [1X5.6 [33X[0;0Y[10XSCNormalSurface[110X[101X[1X as a subtype of [10XSet[110X[101X[1X[133X[101X
  
  [33X[0;0YLike  objects of type [10XSCSimplicialComplex[110X, an object of type [10XSCNormalSurface[110X
  behaves like a [5XGAP[105X [10XSet[110X type. The elements of the set are given by the facets
  of  the  normal  surface,  grouped by their dimensionality and type, i.e. if
  [10Xcomplex[110X  is an object of type [10XSCNormalSurface[110X, [10Xc[1][110X refers to the 0-faces of
  [10Xcomplex[110X,  [10Xc[2][110X  to  the  1-faces,  [10Xc[3][110X  to  the  triangles  and [10Xc[4][110X to the
  quadrilaterals. See below for some examples and Section [14X5.3[114X for details.[133X
  
  [1X5.6-1 Operation Union (SCNormalSurface, SCNormalSurface)[101X
  
  [29X[2XOperation Union (SCNormalSurface, SCNormalSurface)[102X( [3Xcomplex1[103X, [3Xcomplex2[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Ydiscrete normal surface of type [10XSCNormalSurface[110X upon success, [9Xfail[109X
            otherwise.[133X
  
  [33X[0;0YComputes  the  union  of  two  discrete  normal  surfaces by calling [2XSCUnion[102X
  ([14X7.3-16[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> SCLib.SearchByAttribute("F = [ 10, 35, 50, 25 ]");
[128X[104X
    [4X[28X [ [ 19, "S^3 (VT)" ] ][128X[104X
    [4X[28X gap> c:=SCLib.Load(last[1][1]);;
[128X[104X
    [4X[28X gap> sl1:=SCNSSlicing(c,[[1,3,5,7,9],[2,4,6,8,10]]);;
[128X[104X
    [4X[28X gap> sl2:=sl1+10;;
[128X[104X
    [4X[28X gap> SCTopologicalType(sl1);
[128X[104X
    [4X[28X "T^2"[128X[104X
    [4X[28X gap> sl3:=Union(sl1,sl2);;
[128X[104X
    [4X[28X gap> SCTopologicalType(sl3);
[128X[104X
    [4X[28X "T^2 U T^2"[128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
