  
  [1X3 The GAP object types SCSimplicicalComplex and SCNormalSurface[0X
  
  The  [5Xsimpcomp[0m  package  defines two new GAP object types [10XSCSimplicialComplex[0m
  and  [10XSCNormalSurface[0m,  which  are  used  to  store  simplicial complexes and
  discrete  normal  surfaces as well as their properties. As a property should
  not  be  calculated  multiple  times  in  case  the  object was not altered,
  [5Xsimpcomp[0m  caches  all  calculated properties (the ``known properties'') of a
  simplicial  complex  or  a  discrete normal surface within the corresponding
  object   such   that   each   property   is   only   calculated   once  (see
  [2XSCPropertiesDropped[0m  ([14X3.1-4[0m)  for  a  way  of dropping previously calculated
  properties).
  
  Internally, this behaviour is accomplished by making [10XSCSimplicialComplex[0m and
  [10XSCNormalSurface[0m both subtypes of [10XSCPropertyObject[0m, a GAP object type defined
  by [5Xsimpcomp[0m that provides the means to store (i.e. cache) certain properties
  of  objects  and also provides means of (de)serializing these objects to and
  from a XML format (see Section [14X10[0m).
  
  
  [1X3.1 The object types [10XSCSimplicialComplex[1X and [10XSCPropertyObject[1X[0X
  
  The  object  type  [10XSCPropertyObject[0m  provides  a  GAP  object  consisting of
  permanent  and  temporary  attributes.  While  the  permanent attributes are
  serialized  to  and from XML (and thus are persistent), this is not the case
  for  temporary  attributes.  The  permanent  and  temporary  properties of a
  [10XSCPropertyObject[0m    can    be   accessed   directly   with   the   functions
  [10XSCPropertyByName[0m,   [10XSCPropertyTmpByName[0m   and  changed  with  [10XSCPropertySet[0m,
  [10XSCPropertyTmpSet[0m.  But this direct access to property objects is discouraged
  when  working  with  [5Xsimpcomp[0m,  as  the  internal consistency of the objects
  cannot  be  guaranteed  when the properties of the objects are accessed (and
  modified)  in  this way. Instead, the access to the object properties via so
  called   property   handlers  is  strongly  recommended  (and  actually  the
  [10XSCProperty...[0m-functions  are only meant for internal use). For each property
  that  an object of type [10XSCPropertyObject[0m can have, a function referred to as
  property  handler  ensures the integrity of the property and handles caching
  of  this  property. See Section [14X3.2[0m below for a description of how to access
  properties  of  a  [10XSCSimplicialComplex[0m  object.  Note  that  all  properties
  returned  by  such  property  handlers  are  immutable  objects. You can use
  [10XShallowCopy[0m  to  obtain  mutable  copies.  For  a  list  of  properties that
  [10XSCSimplicialComplex[0m  handles,  see  Chapter [14X4[0m. For a few fundamental methods
  and  functions  (such  as checking the object class, copying objects of this
  type, etc.) for [10XSCSimplcicialComplex[0m see below.
  
  [1X3.1-1 SCIsSimplicialComplex[0m
  
  [2X> SCIsSimplicialComplex( [0X[3Xobject[0X[2X ) ____________________________________[0Xfilter
  [6XReturns:[0X  [9Xtrue[0m or [9Xfalse[0m upon success, [9Xfail[0m otherwise.
  
  Checks   if   [3Xobject[0m   is  of  type  [10XSCSimplicialComplex[0m.  The  object  type
  [10XSCSimplicialComplex[0m is derived from the object type [10XSCPropertyObject[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=SCEmpty();;[0X
    [4X gap> SCIsSimplicialComplex(c);[0X
    [4X true[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X3.1-2 SCCopy[0m
  
  [2X> SCCopy( [0X[3Xcomplex[0X[2X ) _______________________________________________[0Xoperation
  [6XReturns:[0X  a copy of [3Xcomplex[0m upon success, [9Xfail[0m otherwise.
  
  Makes  a ``deep copy'' of [3Xcomplex[0m -- this is a copy such that all properties
  of the copy can be altered without changing the original complex.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=SCBdSimplex(4);;[0X
    [4X gap> d:=SCCopy(c)-1;;[0X
    [4X gap> c.Facets=d.Facets;[0X
    [4X false[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=SCBdSimplex(4);;[0X
    [4X gap> d:=SCCopy(c);;[0X
    [4X gap> IsIdenticalObj(c,d);[0X
    [4X false[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X3.1-3 ShallowCopy (SCSimplicialComplex)[0m
  
  [2X> ShallowCopy (SCSimplicialComplex)( [0X[3Xcomplex[0X[2X ) ____________________[0Xoperation
  [6XReturns:[0X  a copy of [3Xcomplex[0m upon success, [9Xfail[0m otherwise.
  
  Makes  a  copy  of  [3Xcomplex[0m.  This is actually a ``deep copy'' such that all
  properties of the copy can be altered without changing the original complex.
  Internally calls [2XSCCopy[0m ([14X3.1-2[0m).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=SCLib.Load(87);;[0X
    [4X gap> d:=ShallowCopy(c)+10;;[0X
    [4X gap> c.Facets=d.Facets;[0X
    [4X false[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X3.1-4 SCPropertiesDropped[0m
  
  [2X> SCPropertiesDropped( [0X[3Xcomplex[0X[2X ) ___________________________________[0Xfunction
  [6XReturns:[0X  a object of type [10XSCSimplicialComplex[0m upon success, [9Xfail[0m otherwise.
  
  An  object  of the type [10XSCSimplicialComplex[0m caches its previously calculated
  properties  such  that  each  property  only has to be calculated once. This
  function  returns  a copy of [3Xcomplex[0m with all properties (apart from Facets,
  Dim and Name) dropped, clearing all previously computed properties. See also
  [2XSCPropertyDrop[0m ([14X14.1-8[0m) and [2XSCPropertyTmpDrop[0m ([14X14.1-13[0m).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=SCFromFacets(Combinations([1..16],15));;[0X
    [4X gap> c.F;; time;[0X
    [4X 2000[0X
    [4X gap> c.F;; time;[0X
    [4X 0[0X
    [4X gap> c:=SCPropertiesDropped(c);[0X
    [4X true[0X
    [4X gap> c.F;; time;[0X
    [4X 2036[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  
  [1X3.2 Accessing properties of a [10XSCSimplicialComplex[1X object[0X
  
  As  described  in  Section  [14X3.1[0m  the  object  type  [10XSCSimplicialComplex[0m  has
  properties  that  are handled by so called property handlers. These handlers
  take care of the internal consistency of objects of type [10XSCSimplicialComplex[0m
  and (re)compute object attributes if necessary.
  
  There  are two ways of accessing properties of a [10XSCSimplicialComplex[0m object.
  The  first is to call a property handler function of the property one wishes
  to  calculate.  The  first  argument  of such a property handler function is
  always  the  simplicial complex for which the property should be calculated,
  in  some  cases  followed  by  further  arguments  of  the  property handler
  function. An example would be:
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> c:=SCBdSimplex(3);; # create a simplicial complex object[0X
    [4Xgap> SCFVector(c);[0X
    [4X[ 4, 6, 4 ][0X
    [4Xgap> SCSkel(c,0);[0X
    [4X[ [ 1 ], [ 2 ], [ 3 ], [ 4 ] ][0X
  [4X------------------------------------------------------------------[0X
  
  Here  the functions [10XSCFVector[0m and [10XSCSkel[0m are the property handler functions,
  see  Chapter [14X12[0m for a list of all property handlers of a [10XSCSimplicialComplex[0m
  object.  Apart  from this (standard) method of calling the property handlers
  directly  with a [10XSCSimplicialComplex[0m object, [5Xsimpcomp[0m provides the user with
  another  more  object  oriented  method  which  calls property handlers of a
  [10XSCSimplicialComplex[0m object indirectly and more conveniently:
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> c:=SCBdSimplex(3);; # create a simplicial complex object[0X
    [4Xgap> c.F;[0X
    [4X[ 4, 6, 4 ][0X
    [4Xgap> c.Skel(0);[0X
    [4X[ [ 1 ], [ 2 ], [ 3 ], [ 4 ] ][0X
  [4X------------------------------------------------------------------[0X
  
  Note  that the code in this example calculates the same properties as in the
  first  example above, but the properties of a [10XSCSimplicialComplex[0m object are
  accessed via the [10X.[0m operator (the record access operator).
  
  For  each  property handler of a [10XSCSimplicialComplex[0m object the short object
  oriented  form  of  this property handler is given in the description of the
  property  handler  function. In most cases it is just formed by dropping the
  prefix ``[10XSC[0m'' of the property handler functions.
  
  
  [1X3.3 Overloaded operators of [10XSCSimplicialComplex[1X[0X
  
  [5Xsimpcomp[0m   overloads   some   standard   operations   for  the  object  type
  [10XSCSimplcicialComplex[0m  if  this  definition  is  intuitive and mathematically
  sound. See a list of overloaded operators below.
  
  [1X3.3-1 Operation + (SCSimplicialComplex, Integer)[0m
  
  [2X> Operation + (SCSimplicialComplex, Integer)( [0X[3Xcomplex, value[0X[2X ) ____[0Xoperation
  [6XReturns:[0X  the  simplicial  complex  passed  as  argument  upon success, [9Xfail[0m
            otherwise.
  
  Positively  shifts  the  vertex  labels of [3Xcomplex[0m (provided that all labels
  satisfy the property [10XIsAdditiveElement[0m) by the amount specified in [3Xvalue[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=SCBdSimplex(3)+10;;[0X
    [4X gap> c.Facets;[0X
    [4X [[11, 12, 13], [11, 12, 14], [11, 13, 14], [12, 13, 14]][0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X3.3-2 Operation - (SCSimplicialComplex, Integer)[0m
  
  [2X> Operation - (SCSimplicialComplex, Integer)( [0X[3Xcomplex, value[0X[2X ) ____[0Xoperation
  [6XReturns:[0X  the  simplicial  complex  passed  as  argument  upon success, [9Xfail[0m
            otherwise.
  
  Negatively  shifts  the  vertex  labels of [3Xcomplex[0m (provided that all labels
  satisfy the property [10XIsAdditiveElement[0m) by the amount specified in [3Xvalue[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=SCBdSimplex(3)-1;;[0X
    [4X gap> c.Facets;[0X
    [4X [[0, 1, 2], [0, 1, 3], [0, 2, 3], [1, 2, 3]][0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X3.3-3 Operation mod (SCSimplicialComplex, Integer)[0m
  
  [2X> Operation mod (SCSimplicialComplex, Integer)( [0X[3Xcomplex, value[0X[2X ) __[0Xoperation
  [6XReturns:[0X  the  simplicial  complex  passed  as  argument  upon success, [9Xfail[0m
            otherwise.
  
  Takes  all  vertex  labels  of  [3Xcomplex[0m  modulo the value specified in [3Xvalue[0m
  (provided  that all labels satisfy the property [10XIsAdditiveElement[0m). Warning:
  this  might  result  in  different vertices being assigned the same label or
  even in invalid facet lists, so be careful.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=(SCBdSimplex(3)*10) mod 7;;[0X
    [4X gap> c.Facets;[0X
    [4X [[3, 6, 2], [3, 6, 5], [3, 2, 5], [6, 2, 5]][0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X3.3-4 Operation ^ (SCSimplicialComplex, Integer)[0m
  
  [2X> Operation ^ (SCSimplicialComplex, Integer)( [0X[3Xcomplex, value[0X[2X ) ____[0Xoperation
  [6XReturns:[0X  simplicial  complex of type [10XSCSimplicialComplex[0m upon success, [9Xfail[0m
            otherwise.
  
  Forms   the  [3Xvalue[0m-th  simplicial  cartesian  power  of  [3Xcomplex[0m,  i.e.  the
  [3Xvalue[0m-fold  cartesian  product  of  copies of [3Xcomplex[0m. The complex passed as
  argument is not altered. Internally calls [2XSCCartesianPower[0m ([14X4.4-1[0m).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=SCBdSimplex(2)^2; #a torus[0X
    [4X [SimplicialComplex[0X
    [4X [0X
    [4X  Properties known: Dim, Facets, Name, TopologicalType, VertexLabels.[0X
    [4X [0X
    [4X  Name="(S^1_3)^2"[0X
    [4X  Dim=2[0X
    [4X  TopologicalType="(S^1)^2"[0X
    [4X [0X
    [4X /SimplicialComplex][0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X3.3-5 Operation + (SCSimplicialComplex, SCSimplicialComplex)[0m
  
  [2X> Operation + (SCSimplicialComplex, SCSimplicialComplex)( [0X[3Xcomplex1, complex2[0X[2X ) [0Xoperation
  [6XReturns:[0X  simplicial  complex of type [10XSCSimplicialComplex[0m upon success, [9Xfail[0m
            otherwise.
  
  Forms the connected sum of [3Xcomplex1[0m and [3Xcomplex2[0m. Uses the lexicographically
  first  facets  of  both  complexes to do the gluing. The complexes passed as
  arguments are not altered. Internally calls [2XSCConnectedSum[0m ([14X4.4-5[0m).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCLib.SearchByName("RP^3");[0X
    [4X [ [ 45, "RP^3" ], [ 103, "RP^3=L(2,1) (VT)" ], [ 246, "(S^2~S^1)#RP^3" ], [0X
    [4X   [ 247, "(S^2xS^1)#RP^3" ], [ 283, "(S^2~S^1)#2#RP^3" ], [0X
    [4X   [ 285, "(S^2xS^1)#2#RP^3" ], [ 409, "RP^3#RP^3" ], ...[0X
    [4X gap> SCLib.SearchByName("S^2~S^1");[0X
    [4X [ [ 14, "S^2~S^1 (VT)" ], [ 29, "S^2~S^1 (VT)" ], [ 34, "S^2~S^1 (VT)" ], [0X
    [4X   [ 42, "S^2~S^1 (VT)" ], [ 48, "S^2~S^1 (VT)" ], [ 49, "S^2~S^1 (VT)" ], [0X
    [4X   [ 84, "S^2~S^1 (VT)" ], [ 87, "S^2~S^1 (VT)" ], ...[0X
    [4X gap> c:=SCLib.Load(45)+SCLib.Load(14); #form RP^3#(S^2~S^1)[0X
    [4X [SimplicialComplex[0X
    [4X [0X
    [4X  Properties known: Dim, Facets, Name, VertexLabels, Vertices.[0X
    [4X [0X
    [4X  Name="RP^3#+-S^2~S^1 (VT)"[0X
    [4X  Dim=3[0X
    [4X [0X
    [4X /SimplicialComplex][0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X3.3-6 Operation - (SCSimplicialComplex, SCSimplicialComplex)[0m
  
  [2X> Operation - (SCSimplicialComplex, SCSimplicialComplex)( [0X[3Xcomplex1, complex2[0X[2X ) [0Xoperation
  [6XReturns:[0X  simplicial  complex of type [10XSCSimplicialComplex[0m upon success, [9Xfail[0m
            otherwise.
  
  Calls [2XSCDifference[0m ([14X4.8-7[0m)([3Xcomplex1[0m, [3Xcomplex2[0m)
  
  [1X3.3-7 Operation * (SCSimplicialComplex, SCSimplicialComplex)[0m
  
  [2X> Operation * (SCSimplicialComplex, SCSimplicialComplex)( [0X[3Xcomplex1, complex2[0X[2X ) [0Xoperation
  [6XReturns:[0X  simplicial  complex of type [10XSCSimplicialComplex[0m upon success, [9Xfail[0m
            otherwise.
  
  Forms  the simplicial cartesian product of [3Xcomplex1[0m and [3Xcomplex2[0m. Internally
  calls [2XSCCartesianProduct[0m ([14X4.4-2[0m).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCLib.SearchByName("RP^2");[0X
    [4X [ [ 3, "RP^2 (VT)" ], [ 284, "RP^2xS^1" ] ][0X
    [4X gap> c:=SCLib.Load(3)*SCBdSimplex(3); #form RP^2 x S^2[0X
    [4X [SimplicialComplex[0X
    [4X [0X
    [4X  Properties known: Dim, Facets, Name, VertexLabels.[0X
    [4X [0X
    [4X  Name="RP^2 (VT)xS^2_4"[0X
    [4X  Dim=4[0X
    [4X [0X
    [4X /SimplicialComplex][0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X3.3-8 Operation = (SCSimplicialComplex, SCSimplicialComplex)[0m
  
  [2X> Operation = (SCSimplicialComplex, SCSimplicialComplex)( [0X[3Xcomplex1, complex2[0X[2X ) [0Xoperation
  [6XReturns:[0X  [9Xtrue[0m or [9Xfalse[0m upon success, [9Xfail[0m otherwise.
  
  Calculates  whether  two simplicial complexes are isomorphic, i.e. are equal
  up to a relabeling of the vertices.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=SCBdSimplex(3);;[0X
    [4X gap> c=c+10;[0X
    [4X true[0X
    [4X gap> c=SCBdCrossPolytope(4);[0X
    [4X false[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  
  [1X3.4 [10XSCSimplicialComplex[1X as a subtype of [10XSet[1X[0X
  
  Apart   from  being  a  subtype  of  [10XSCPropertyObject[0m,  an  object  of  type
  [10XSCSimplicialComplex[0m  also  behaves  like a GAP [10XSet[0m type. The elements of the
  set  are  given  by  the  facets  of the simplical complex, grouped by their
  dimensionality,  i.e.  if  [10Xcomplex[0m is an object of type [10XSCSimplicialComplex[0m,
  [10Xc[1][0m refers to the 0-faces of [10Xcomplex[0m, [10Xc[2][0m to the 1-faces, etc.
  
  [1X3.4-1 Operation Union (SCSimplicialComplex, SCSimplicialComplex)[0m
  
  [2X> Operation Union (SCSimplicialComplex, SCSimplicialComplex)( [0X[3Xcomplex1, complex2[0X[2X ) [0Xoperation
  [6XReturns:[0X  simplicial  complex of type [10XSCSimplicialComplex[0m upon success, [9Xfail[0m
            otherwise.
  
  Computes the union of two simplicial complexes by calling [2XSCUnion[0m ([14X4.8-27[0m).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=Union(SCBdSimplex(3),SCBdSimplex(3)+3); #a wedge of two 2-spheres[0X
    [4X [SimplicialComplex[0X
    [4X [0X
    [4X  Properties known: Dim, Facets, Name, VertexLabels.[0X
    [4X [0X
    [4X  Name="S^2_4 cup S^2_4"[0X
    [4X  Dim=2[0X
    [4X [0X
    [4X /SimplicialComplex][0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X3.4-2 Operation Difference (SCSimplicialComplex, SCSimplicialComplex)[0m
  
  [2X> Operation Difference (SCSimplicialComplex, SCSimplicialComplex)( [0X[3Xcomplex1, complex2[0X[2X ) [0Xoperation
  [6XReturns:[0X  simplicial  complex of type [10XSCSimplicialComplex[0m upon success, [9Xfail[0m
            otherwise.
  
  Computes   the   ``difference''  of  two  simplicial  complexes  by  calling
  [2XSCDifference[0m ([14X4.8-7[0m).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=SCBdSimplex(3);;[0X
    [4X gap> d:=SC([[1,2,3]]);;[0X
    [4X gap> disc:=Difference(c,d);;[0X
    [4X gap> disc.Facets;[0X
    [4X [ [ 1, 2, 4 ], [ 1, 3, 4 ], [ 2, 3, 4 ] ][0X
    [4X gap> empty:=Difference(d,c);;[0X
    [4X gap> empty.Dim;[0X
    [4X -1[0X
    [4X gap> [0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X3.4-3 Operation Intersection (SCSimplicialComplex, SCSimplicialComplex)[0m
  
  [2X> Operation Intersection (SCSimplicialComplex, SCSimplicialComplex)( [0X[3Xcomplex1, complex2[0X[2X ) [0Xoperation
  [6XReturns:[0X  simplicial  complex of type [10XSCSimplicialComplex[0m upon success, [9Xfail[0m
            otherwise.
  
  Computes  the  ``intersection''  of  two  simplicial  complexes  by  calling
  [2XSCIntersection[0m ([14X4.8-10[0m).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=SCBdSimplex(3);;        [0X
    [4X gap> d:=SCBdSimplex(3);;        [0X
    [4X gap> d:=SCMove(d,[[1,2,3],[]]);;[0X
    [4X gap> d:=d+1;;                   [0X
    [4X gap> s1:=SCIntersection(c,d);   [0X
    [4X [SimplicialComplex[0X
    [4X [0X
    [4X  Properties known: Dim, Facets, Name, VertexLabels.[0X
    [4X [0X
    [4X  Name="S^2_4 cap unnamed complex m"[0X
    [4X  Dim=1[0X
    [4X [0X
    [4X /SimplicialComplex][0X
    [4X gap> s1.Facets;                 [0X
    [4X [ [ 2, 3 ], [ 2, 4 ], [ 3, 4 ] ][0X
    [4X gap> [0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X3.4-4 Size (SCSimplicialComplex)[0m
  
  [2X> Size (SCSimplicialComplex)( [0X[3Xcomplex[0X[2X ) ___________________________[0Xoperation
  [6XReturns:[0X  an integer upon success, [9Xfail[0m otherwise.
  
  Returns  the  ``size''  of a simplicial complex. This is d+1, where d is the
  dimension  of the complex. d+1 is returned instead of d, as all lists in GAP
  are  indexed  beginning  with  1  --  thus  this also holds for all the face
  lattice related properties of the complex.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCLib.SearchByAttribute("F=·[12,66,108,54]");[0X
    [4X [ [ 116, "S^2xS^1 (VT)" ], [ 117, "S^2xS^1 (VT)" ], [0X
    [4X   [ 118, "(S^2xS^1)#(S^2xS^1) (VT)" ], [ 119, "S^2~S^1 (VT)" ], [0X
    [4X   [ 120, "(S^2xS^1)#(S^2xS^1) (VT)" ], [ 121, "(S^2xS^1)#(S^2xS^1) (VT)" ], [0X
    [4X   [ 122, "S^2xS^1 (VT)" ], [ 123, "(S^2xS^1)#(S^2xS^1) (VT)" ], ...[0X
    [4X gap> c:=SCLib.Load(116);;[0X
    [4X gap> for i in [1..Size(c)] do Print(c.F[i],"\n"); od;[0X
    [4X 12[0X
    [4X 66[0X
    [4X 108[0X
    [4X 54[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X3.4-5 Length (SCSimplicialComplex)[0m
  
  [2X> Length (SCSimplicialComplex)( [0X[3Xcomplex[0X[2X ) _________________________[0Xoperation
  [6XReturns:[0X  an integer upon success, [9Xfail[0m otherwise.
  
  Returns the ``size'' of a simplicial complex by calling [10XSize([0m[3Xcomplex[0m[10X)[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCLib.SearchByAttribute("F=¸[12,66,108,54]");[0X
    [4X [ [ 116, "Sˆ2xSˆ1 (VT)" ], [ 117, "Sˆ2xSˆ1 (VT)" ],[0X
    [4X [ 118, "(Sˆ2xSˆ1)#(Sˆ2xSˆ1) (VT)" ], [ 119, "Sˆ2˜Sˆ1 (VT)" ],[0X
    [4X [ 120, "(Sˆ2xSˆ1)#(Sˆ2xSˆ1) (VT)" ], [ 121, "(Sˆ2xSˆ1)#(Sˆ2xSˆ1) (VT)" ],[0X
    [4X [ 122, "Sˆ2xSˆ1 (VT)" ], [ 123, "(Sˆ2xSˆ1)#(Sˆ2xSˆ1) (VT)" ], ...[0X
    [4X gap> c:=SCLib.Load(116);;[0X
    [4X gap> for i in [1..Length(c)] do Print(c.F[i],"\n"); od;[0X
    [4X 12[0X
    [4X 66[0X
    [4X 108[0X
    [4X 54[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X3.4-6 Operation [] (SCSimplicialComplex)[0m
  
  [2X> Operation [] (SCSimplicialComplex)( [0X[3Xcomplex, pos[0X[2X ) ______________[0Xoperation
  [6XReturns:[0X  a list of faces upon success, [9Xfail[0m otherwise.
  
  Returns  the  (pos-1)-dimensional faces of [3Xcomplex[0m as a list. If pos >= d+2,
  where  d  is  the dimension of [3Xcomplex[0m, the empty set is returned. Note that
  [3Xpos[0m must be >= 1.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCLib.SearchByName("K^2");[0X
    [4X [ [ 19, "K^2 (VT)" ], [ 230, "K^2 (VT)" ] ][0X
    [4X gap> c:=SCLib.Load(230);;[0X
    [4X gap> c[2];[0X
    [4X [ [ 1, 2 ], [ 1, 3 ], [ 1, 7 ], [ 1, 9 ], [ 1, 13 ], [ 1, 14 ], [ 2, 3 ], [0X
    [4X   [ 2, 4 ], [ 2, 8 ], [ 2, 10 ], [ 2, 14 ], [ 3, 4 ], [ 3, 5 ], [ 3, 9 ], [0X
    [4X   [ 3, 11 ], [ 4, 5 ], [ 4, 6 ], [ 4, 10 ], [ 4, 12 ], [ 5, 6 ], [ 5, 7 ], [0X
    [4X   [ 5, 11 ], [ 5, 13 ], [ 6, 7 ], [ 6, 8 ], [ 6, 12 ], [ 6, 14 ], [ 7, 8 ], [0X
    [4X   [ 7, 9 ], [ 7, 13 ], [ 8, 9 ], [ 8, 10 ], [ 8, 14 ], [ 9, 10 ], [ 9, 11 ], [0X
    [4X   [ 10, 11 ], [ 10, 12 ], [ 11, 12 ], [ 11, 13 ], [ 12, 13 ], [ 12, 14 ], [0X
    [4X   [ 13, 14 ] ][0X
    [4X gap> c[4];[0X
    [4X [  ][0X
    [4X gap> [0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X3.4-7 IsBound (SCSimplicialComplex)[0m
  
  [2X> IsBound (SCSimplicialComplex)( [0X[3Xcomplex, pos[0X[2X ) ___________________[0Xoperation
  [6XReturns:[0X  [9Xtrue[0m or [9Xfalse[0m upon success, [9Xfail[0m otherwise.
  
  Returns  [9Xtrue[0m  when [3Xcomplex[0m has proper faces of dimension (pos-1) ([3Xpos[0m>= 1),
  [9Xfalse[0m otherwise.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=SCBdCrossPolytope(4);;[0X
    [4X gap> IsBound(c[4]);[0X
    [4X true[0X
    [4X gap> IsBound(c[5]);[0X
    [4X false[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X3.4-8 Iterator (SCSimplicialComplex)[0m
  
  [2X> Iterator (SCSimplicialComplex)( [0X[3Xcomplex[0X[2X ) _______________________[0Xoperation
  [6XReturns:[0X  an  iterator  on  the  face  lattice of [3Xcomplex[0m upon success, [9Xfail[0m
            otherwise.
  
  Provides an iterator object for the face lattice of a simplicial complex.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=SCBdCrossPolytope(4);;[0X
    [4X gap> for faces in c do Print(Length(faces),"\n"); od;[0X
    [4X 8[0X
    [4X 24[0X
    [4X 32[0X
    [4X 16[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  
  [1X3.5 The object type [10XSCNormalSurface[1X as a subtype of [10XSCPropertyObject[1X[0X
  
  The  [5Xsimpcomp[0m  package defines a GAP object type [10XSCNormalSurface[0m to describe
  slicings   (level   sets  of  discrete  Morse  functions)  of  combinatorial
  3-manifolds, i. e. discrete normal surfaces. Internally [10XSCNormalSurface[0m is a
  subtype   of   [10XSCPropertyObject[0m   and,   thus,   mostly   behaves   like   a
  [10XSCSimplicialComplex[0m  object (see Section [14X3.1[0m). For a very short introduction
  to  normal  surfaces  see [14X2.4[0m, for a more thorough introduction to the field
  see [Spr10b]. For some fundamental methods and functions for [10XSCNormalSurface[0m
  see below. For more functions related to the [10XSCNormalSurface[0m object type see
  Chapter [14X9[0m.
  
  
  [1X3.6 Overloaded operators of [10XSCNormalSurface[1X[0X
  
  As  with  the  object  type  [10XSCSimplcicialComplex[0m,  [5Xsimpcomp[0m  overloads some
  standard  operations  for  the  object  type  [10XSCNormalSurface[0m. See a list of
  overloaded operators below.
  
  [1X3.6-1 Operation + (SCNormalSurface, Integer)[0m
  
  [2X> Operation + (SCNormalSurface, Integer)( [0X[3Xcomplex, value[0X[2X ) ________[0Xoperation
  [6XReturns:[0X  the  discrete normal surface passed as argument upon success, [9Xfail[0m
            otherwise.
  
  Positively  shifts  the  vertex  labels of [3Xcomplex[0m (provided that all labels
  satisfy the property [10XIsAdditiveElement[0m) by the amount specified in [3Xvalue[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> sl:=SCNSSlicing(SCBdSimplex(4),[[1],[2..5]]);;[0X
    [4X gap> sl.Facets;                                    [0X
    [4X [ [ [ 1, 2 ], [ 1, 3 ], [ 1, 4 ] ], [ [ 1, 2 ], [ 1, 3 ], [ 1, 5 ] ], [0X
    [4X   [ [ 1, 2 ], [ 1, 4 ], [ 1, 5 ] ], [ [ 1, 3 ], [ 1, 4 ], [ 1, 5 ] ] ][0X
    [4X gap> sl:=sl + 2;;                                  [0X
    [4X gap> sl.Facets;  [0X
    [4X [ [ [ 3, 4 ], [ 3, 5 ], [ 3, 6 ] ], [ [ 3, 4 ], [ 3, 5 ], [ 3, 7 ] ], [0X
    [4X   [ [ 3, 4 ], [ 3, 6 ], [ 3, 7 ] ], [ [ 3, 5 ], [ 3, 6 ], [ 3, 7 ] ] ][0X
    [4X gap> [0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X3.6-2 Operation - (SCNormalSurface, Integer)[0m
  
  [2X> Operation - (SCNormalSurface, Integer)( [0X[3Xcomplex, value[0X[2X ) ________[0Xoperation
  [6XReturns:[0X  the  discrete normal surface passed as argument upon success, [9Xfail[0m
            otherwise.
  
  Negatively  shifts  the  vertex  labels of [3Xcomplex[0m (provided that all labels
  satisfy the property [10XIsAdditiveElement[0m) by the amount specified in [3Xvalue[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> sl:=SCNSSlicing(SCBdSimplex(4),[[1],[2..5]]);;[0X
    [4X gap> sl.Facets;                                    [0X
    [4X [ [ [ 1, 2 ], [ 1, 3 ], [ 1, 4 ] ], [ [ 1, 2 ], [ 1, 3 ], [ 1, 5 ] ], [0X
    [4X   [ [ 1, 2 ], [ 1, 4 ], [ 1, 5 ] ], [ [ 1, 3 ], [ 1, 4 ], [ 1, 5 ] ] ][0X
    [4X gap> sl:=sl - 2;;                                  [0X
    [4X gap> sl.Facets;  [0X
    [4X [ [ [ -1, 0 ], [ -1, 1 ], [ -1, 2 ] ], [ [ -1, 0 ], [ -1, 1 ], [ -1, 3 ] ], [0X
    [4X   [ [ -1, 0 ], [ -1, 2 ], [ -1, 3 ] ], [ [ -1, 1 ], [ -1, 2 ], [ -1, 3 ] ] ][0X
    [4X gap> [0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X3.6-3 Operation mod (SCNormalSurface, Integer)[0m
  
  [2X> Operation mod (SCNormalSurface, Integer)( [0X[3Xcomplex, value[0X[2X ) ______[0Xoperation
  [6XReturns:[0X  the  discrete normal surface passed as argument upon success, [9Xfail[0m
            otherwise.
  
  Takes  all  vertex  labels  of  [3Xcomplex[0m  modulo the value specified in [3Xvalue[0m
  (provided  that all labels satisfy the property [10XIsAdditiveElement[0m). Warning:
  this  might  result  in  different vertices being assigned the same label or
  even invalid facet lists, so be careful.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> sl:=SCNSSlicing(SCBdSimplex(4),[[1],[2..5]]);;    [0X
    [4X gap> sl.Facets;[0X
    [4X [ [ [ 1, 2 ], [ 1, 3 ], [ 1, 4 ] ], [ [ 1, 2 ], [ 1, 3 ], [ 1, 5 ] ], [0X
    [4X   [ [ 1, 2 ], [ 1, 4 ], [ 1, 5 ] ], [ [ 1, 3 ], [ 1, 4 ], [ 1, 5 ] ] ][0X
    [4X gap> sl:=sl mod 2;;[0X
    [4X gap> sl.Facets;    [0X
    [4X [ [ [ 1, 0 ], [ 1, 1 ], [ 1, 0 ] ], [ [ 1, 0 ], [ 1, 1 ], [ 1, 1 ] ], [0X
    [4X   [ [ 1, 0 ], [ 1, 0 ], [ 1, 1 ] ], [ [ 1, 1 ], [ 1, 0 ], [ 1, 1 ] ] ][0X
    [4X gap> [0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  
  [1X3.7 [10XSCNormalSurface[1X as a subtype of [10XSet[1X[0X
  
  Like  objects of type [10XSCSimplicialComplex[0m, an object of type [10XSCNormalSurface[0m
  behaves like a GAP [10XSet[0m 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[0m  is an object of type [10XSCNormalSurface[0m, [10Xc[1][0m refers to the 0-faces of
  [10Xcomplex[0m,  [10Xc[2][0m  to  the  1-faces,  [10Xc[3][0m  to  the  triangles  and [10Xc[4][0m to the
  quadrilaterals. See below for some examples and Section [14X3.4[0m for details.
  
  [1X3.7-1 Operation Union (SCNormalSurface, SCNormalSurface)[0m
  
  [2X> Operation Union (SCNormalSurface, SCNormalSurface)( [0X[3Xcomplex1, complex2[0X[2X ) [0Xoperation
  [6XReturns:[0X  discrete normal surface of type [10XSCNormalSurface[0m upon success, [9Xfail[0m
            otherwise.
  
  Computes  the  union  of  two  discrete  normal  surfaces by calling [2XSCUnion[0m
  ([14X4.8-27[0m).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCLib.SearchByAttribute("F=[6,15,18,9]");[0X
    [4X [ [ 4, "S^3 (VT)" ] ][0X
    [4X gap> c:=SCLib.Load(4);;[0X
    [4X gap> sl1:=SCNSSlicing(c,[[1,3,5],[2,4,6]]);;[0X
    [4X gap> sl2:=SCNSSlicing(c,[[1,3,5],[2,4,6]])+10;;[0X
    [4X gap> SCNSTopologicalType(sl1);[0X
    [4X "T^2"[0X
    [4X gap> SCNSTopologicalType(sl2);[0X
    [4X "T^2"[0X
    [4X gap> sl3:=Union(sl1,sl2);;[0X
    [4X gap> SCNSTopologicalType(sl3);[0X
    [4X "T^2 U T^2"[0X
    [4X gap> [0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
