  
  [1X7 Functions and operations for [10XSCNormalSurface[1X[0X
  
  
  [1X7.1 Creating an [10XSCNormalSurface[1X object[0X
  
  This  section  contains functions to construct discrete normal surfaces that
  are   slicings   from   a   list  of  2-dimensional  facets  (triangles  and
  quadrilaterals) or combinatorial 3-manifolds.
  
  For  a very short introduction to the theory of discrete normal surfaces and
  slicings  see  Section  [14X2.4[0m  and Section [14X2.5[0m, for an introduction to the [5XGAP[0m
  object  type  [10XSCNormalSurface[0m  see [14X5.4[0m, for more information see the article
  [Spr11].
  
  [1X7.1-1 SCNSEmpty[0m
  
  [2X> SCNSEmpty( [0X[3X[0X[2X ) ____________________________________________________[0Xfunction
  [6XReturns:[0X  discrete normal surface of type [10XSCNormalSurface[0m upon success, [9Xfail[0m
            otherwise.
  
  Generates  an  empty  complex  (of  dimension  -1),  i. e. an object of type
  [10XSCNormalSurface[0m with empty facet list.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCNSEmpty();[0X
    [4X [NormalSurface[0X
    [4X [0X
    [4X  Properties known: Dim, FacetsEx, Name, Vertices.[0X
    [4X [0X
    [4X  Name="empty normal surface"[0X
    [4X  Dim=-1[0X
    [4X [0X
    [4X /NormalSurface][0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X7.1-2 SCNSFromFacets[0m
  
  [2X> SCNSFromFacets( [0X[3Xfacets[0X[2X ) ___________________________________________[0Xmethod
  [6XReturns:[0X  discrete normal surface of type [10XSCNormalSurface[0m upon success, [9Xfail[0m
            otherwise.
  
  Constructor   for   a  discrete  normal  surface  from  a  facet  list,  see
  [2XSCFromFacets[0m ([14X6.1-1[0m) for details.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> sl:=SCNSFromFacets([[1,2,3],[1,2,4,5],[1,3,4,6],[2,3,5,6],[4,5,6]]);[0X
    [4X [NormalSurface[0X
    [4X [0X
    [4X  Properties known: Dim, FacetsEx, Name, Vertices.[0X
    [4X [0X
    [4X  Name="unnamed complex 86"[0X
    [4X  Dim=2[0X
    [4X [0X
    [4X /NormalSurface][0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X7.1-3 SCNS[0m
  
  [2X> SCNS( [0X[3Xfacets[0X[2X ) _____________________________________________________[0Xmethod
  [6XReturns:[0X  discrete normal surface of type [10XSCNormalSurface[0m upon success, [9Xfail[0m
            otherwise.
  
  Internally calls [2XSCNSFromFacets[0m ([14X7.1-2[0m).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> sl:=SCNS([[1,2,3],[1,2,4,5],[1,3,4,6],[2,3,5,6],[4,5,6]]);[0X
    [4X [NormalSurface[0X
    [4X [0X
    [4X  Properties known: Dim, FacetsEx, Name, Vertices.[0X
    [4X [0X
    [4X  Name="unnamed complex 87"[0X
    [4X  Dim=2[0X
    [4X [0X
    [4X /NormalSurface][0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X7.1-4 SCNSSlicing[0m
  
  [2X> SCNSSlicing( [0X[3Xcomplex, slicing[0X[2X ) __________________________________[0Xfunction
  [6XReturns:[0X  discrete normal surface of type [10XSCNormalSurface[0m upon success, [9Xfail[0m
            otherwise.
  
  Computes  a slicing defined by a partition [3Xslicing[0m of the set of vertices of
  the  3-dimensional  combinatorial  pseudomanifold  [3Xcomplex[0m.  In  particular,
  [3Xslicing[0m  has  to  be a pair of lists of vertex labels and has to contain all
  vertex labels of [3Xcomplex[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCLib.SearchByAttribute("F=[ 10, 35, 50, 25 ]");[0X
    [4X [ [ 19, "S^3 (VT)" ] ][0X
    [4X gap> c:=SCLib.Load(last[1][1]);;                       [0X
    [4X gap> sl:=SCNSSlicing(c,[[1..5],[6..10]]);    [0X
    [4X [NormalSurface[0X
    [4X [0X
    [4X  Properties known: ConnectedComponents, Dim, EulerCharacteristic, FVector, Fac\[0X
    [4X etsEx, Genus, IsConnected, IsOrientable, NSTriangulation, Name, TopologicalTyp\[0X
    [4X e, Vertices.[0X
    [4X [0X
    [4X  Name="slicing [ [ 1, 2, 3, 4, 5 ], [ 6, 7, 8, 9, 10 ] ] of S^3 (VT)"[0X
    [4X  Dim=2[0X
    [4X  FVector=[ 17, 36, 12, 9 ][0X
    [4X  EulerCharacteristic=2[0X
    [4X  IsOrientable=true[0X
    [4X  TopologicalType="S^2"[0X
    [4X [0X
    [4X /NormalSurface][0X
    [4X gap> sl.Facets;[0X
    [4X [ [ [ 1, 6 ], [ 1, 8 ], [ 1, 9 ] ], [ [ 1, 6 ], [ 1, 8 ], [ 3, 6 ], [ 3, 8 ] ][0X
    [4X     , [ [ 1, 6 ], [ 1, 9 ], [ 4, 6 ], [ 4, 9 ] ], [0X
    [4X   [ [ 1, 6 ], [ 3, 6 ], [ 4, 6 ] ], [ [ 1, 8 ], [ 1, 9 ], [ 1, 10 ] ], [0X
    [4X   [ [ 1, 8 ], [ 1, 10 ], [ 3, 8 ], [ 3, 10 ] ], [0X
    [4X   [ [ 1, 9 ], [ 1, 10 ], [ 2, 9 ], [ 2, 10 ] ], [0X
    [4X   [ [ 1, 9 ], [ 2, 9 ], [ 4, 9 ] ], [ [ 1, 10 ], [ 2, 10 ], [ 3, 10 ] ], [0X
    [4X   [ [ 2, 7 ], [ 2, 9 ], [ 2, 10 ] ], [0X
    [4X   [ [ 2, 7 ], [ 2, 9 ], [ 4, 7 ], [ 4, 9 ] ], [0X
    [4X   [ [ 2, 7 ], [ 2, 10 ], [ 5, 7 ], [ 5, 10 ] ], [0X
    [4X   [ [ 2, 7 ], [ 4, 7 ], [ 5, 7 ] ], [ [ 2, 10 ], [ 3, 10 ], [ 5, 10 ] ], [0X
    [4X   [ [ 3, 6 ], [ 3, 8 ], [ 5, 6 ], [ 5, 8 ] ], [ [ 3, 6 ], [ 4, 6 ], [ 5, 6 ] ][0X
    [4X     , [ [ 3, 8 ], [ 3, 10 ], [ 5, 8 ], [ 5, 10 ] ], [0X
    [4X   [ [ 4, 6 ], [ 4, 7 ], [ 4, 9 ] ], [ [ 4, 6 ], [ 4, 7 ], [ 5, 6 ], [ 5, 7 ] ][0X
    [4X     , [ [ 5, 6 ], [ 5, 7 ], [ 5, 8 ] ], [ [ 5, 7 ], [ 5, 8 ], [ 5, 10 ] ] ][0X
    [4X gap> sl:=SCNSSlicing(c,[[1,3,5,7,9],[2,4,6,8,10]]);    [0X
    [4X [NormalSurface[0X
    [4X [0X
    [4X  Properties known: ConnectedComponents, Dim, EulerCharacteristic, FVector, Fac\[0X
    [4X etsEx, Genus, IsConnected, IsOrientable, NSTriangulation, Name, TopologicalTyp\[0X
    [4X e, Vertices.[0X
    [4X [0X
    [4X  Name="slicing [ [ 1, 3, 5, 7, 9 ], [ 2, 4, 6, 8, 10 ] ] of S^3 (VT)"[0X
    [4X  Dim=2[0X
    [4X  FVector=[ 25, 50, 0, 25 ][0X
    [4X  EulerCharacteristic=0[0X
    [4X  IsOrientable=true[0X
    [4X  TopologicalType="T^2"[0X
    [4X [0X
    [4X /NormalSurface][0X
    [4X gap> sl.Facets;                           [0X
    [4X [ [ [ 1, 2 ], [ 1, 4 ], [ 3, 2 ], [ 3, 4 ] ], [0X
    [4X   [ [ 1, 2 ], [ 1, 4 ], [ 9, 2 ], [ 9, 4 ] ], [0X
    [4X   [ [ 1, 2 ], [ 1, 10 ], [ 3, 2 ], [ 3, 10 ] ], [0X
    [4X   [ [ 1, 2 ], [ 1, 10 ], [ 9, 2 ], [ 9, 10 ] ], [0X
    [4X   [ [ 1, 4 ], [ 1, 6 ], [ 3, 4 ], [ 3, 6 ] ], [0X
    [4X   [ [ 1, 4 ], [ 1, 6 ], [ 9, 4 ], [ 9, 6 ] ], [0X
    [4X   [ [ 1, 6 ], [ 1, 8 ], [ 3, 6 ], [ 3, 8 ] ], [0X
    [4X   [ [ 1, 6 ], [ 1, 8 ], [ 9, 6 ], [ 9, 8 ] ], [0X
    [4X   [ [ 1, 8 ], [ 1, 10 ], [ 3, 8 ], [ 3, 10 ] ], [0X
    [4X   [ [ 1, 8 ], [ 1, 10 ], [ 9, 8 ], [ 9, 10 ] ], [0X
    [4X   [ [ 3, 2 ], [ 3, 4 ], [ 5, 2 ], [ 5, 4 ] ], [0X
    [4X   [ [ 3, 2 ], [ 3, 10 ], [ 5, 2 ], [ 5, 10 ] ], [0X
    [4X   [ [ 3, 4 ], [ 3, 6 ], [ 5, 4 ], [ 5, 6 ] ], [0X
    [4X   [ [ 3, 6 ], [ 3, 8 ], [ 5, 6 ], [ 5, 8 ] ], [0X
    [4X   [ [ 3, 8 ], [ 3, 10 ], [ 5, 8 ], [ 5, 10 ] ], [0X
    [4X   [ [ 5, 2 ], [ 5, 4 ], [ 7, 2 ], [ 7, 4 ] ], [0X
    [4X   [ [ 5, 2 ], [ 5, 10 ], [ 7, 2 ], [ 7, 10 ] ], [0X
    [4X   [ [ 5, 4 ], [ 5, 6 ], [ 7, 4 ], [ 7, 6 ] ], [0X
    [4X   [ [ 5, 6 ], [ 5, 8 ], [ 7, 6 ], [ 7, 8 ] ], [0X
    [4X   [ [ 5, 8 ], [ 5, 10 ], [ 7, 8 ], [ 7, 10 ] ], [0X
    [4X   [ [ 7, 2 ], [ 7, 4 ], [ 9, 2 ], [ 9, 4 ] ], [0X
    [4X   [ [ 7, 2 ], [ 7, 10 ], [ 9, 2 ], [ 9, 10 ] ], [0X
    [4X   [ [ 7, 4 ], [ 7, 6 ], [ 9, 4 ], [ 9, 6 ] ], [0X
    [4X   [ [ 7, 6 ], [ 7, 8 ], [ 9, 6 ], [ 9, 8 ] ], [0X
    [4X   [ [ 7, 8 ], [ 7, 10 ], [ 9, 8 ], [ 9, 10 ] ] ][0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  
  [1X7.2 Generating new objects from discrete normal surfaces[0X
  
  [5Xsimpcomp[0m  provides  the  possibility  to  copy  and  / or triangulate normal
  surfaces.  Note  that  other  constructions  like  the  connected sum or the
  cartesian  product  do  not  make  sense  for  (embedded) normal surfaces in
  general.
  
  [1X7.2-1 SCCopy[0m
  
  [2X> SCCopy( [0X[3Xcomplex[0X[2X ) __________________________________________________[0Xmethod
  [6XReturns:[0X  discrete normal surface of type [10XSCNormalSurface[0m upon success, [9Xfail[0m
            otherwise.
  
  Copies a [5XGAP[0m object of type [10XSCNormalSurface[0m (cf. [2XSCCopy[0m).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> sl:=SCNSSlicing(SCBdSimplex(4),[[1],[2..5]]);[0X
    [4X [NormalSurface[0X
    [4X [0X
    [4X  Properties known: ConnectedComponents, Dim, EulerCharacteristic, FVector, Fac\[0X
    [4X etsEx, Genus, IsConnected, IsOrientable, NSTriangulation, Name, TopologicalTyp\[0X
    [4X e, Vertices.[0X
    [4X [0X
    [4X  Name="slicing [ [ 1 ], [ 2, 3, 4, 5 ] ] of S^3_5"[0X
    [4X  Dim=2[0X
    [4X  FVector=[ 4, 6, 4 ][0X
    [4X  EulerCharacteristic=2[0X
    [4X  IsOrientable=true[0X
    [4X  TopologicalType="S^2"[0X
    [4X [0X
    [4X /NormalSurface][0X
    [4X gap> sl_2:=SCCopy(sl);                          [0X
    [4X [NormalSurface[0X
    [4X [0X
    [4X  Properties known: ConnectedComponents, Dim, EulerCharacteristic, FVector, Fac\[0X
    [4X etsEx, Genus, IsConnected, IsOrientable, NSTriangulation, Name, TopologicalTyp\[0X
    [4X e, Vertices.[0X
    [4X [0X
    [4X  Name="slicing [ [ 1 ], [ 2, 3, 4, 5 ] ] of S^3_5"[0X
    [4X  Dim=2[0X
    [4X  FVector=[ 4, 6, 4 ][0X
    [4X  EulerCharacteristic=2[0X
    [4X  IsOrientable=true[0X
    [4X  TopologicalType="S^2"[0X
    [4X [0X
    [4X /NormalSurface][0X
    [4X gap> IsIdenticalObj(sl,sl_2);                     [0X
    [4X false[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X7.2-2 SCNSTriangulation[0m
  
  [2X> SCNSTriangulation( [0X[3Xsl[0X[2X ) ____________________________________________[0Xmethod
  [6XReturns:[0X  simplicial  complex of type [10XSCSimplicialComplex[0m upon success, [9Xfail[0m
            otherwise.
  
  Computes  a  simplicial  subdivision of a slicing [3Xsl[0m without introducing new
  vertices. The subdivision is stored as a property of [3Xsl[0m and thus is returned
  as  an  immutable  object.  Note  that  symmetry  may  be  lost  during  the
  computation.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCLib.SearchByAttribute("F=[ 10, 35, 50, 25 ]");[0X
    [4X [ [ 19, "S^3 (VT)" ] ][0X
    [4X gap> c:=SCLib.Load(last[1][1]);;[0X
    [4X gap> sl:=SCNSSlicing(c,[[1,3,5,7,9],[2,4,6,8,10]]);;[0X
    [4X gap> sl.F; [0X
    [4X [ 25, 50, 0, 25 ][0X
    [4X gap> sc:=SCNSTriangulation(sl);;[0X
    [4X gap> sc.F;[0X
    [4X [ 25, 75, 50 ][0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  
  [1X7.3 Properties of [10XSCNormalSurface[1X objects[0X
  
  Although  some  properties  of  a discrete normal surface can be computed by
  using  the  functions  for  simplicial  complexes,  there  is  a  variety of
  properties needing specially designed functions. See below for a list.
  
  [1X7.3-1 SCConnectedComponents[0m
  
  [2X> SCConnectedComponents( [0X[3Xcomplex[0X[2X ) ___________________________________[0Xmethod
  [6XReturns:[0X  a  list  of  simplicial  complexes  of  type  [10XSCNormalSurface[0m upon
            success, [9Xfail[0m otherwise.
  
  Computes all connected components of an arbitrary normal surface.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> sl:=SCNSSlicing(SCBdCrossPolytope(4),[[1,2],[3..8]]);[0X
    [4X [NormalSurface[0X
    [4X [0X
    [4X  Properties known: ConnectedComponents, Dim, EulerCharacteristic, FVector, Fac\[0X
    [4X etsEx, IsConnected, IsOrientable, NSTriangulation, Name, TopologicalType, Vert\[0X
    [4X ices.[0X
    [4X [0X
    [4X  Name="slicing [ [ 1, 2 ], [ 3, 4, 5, 6, 7, 8 ] ] of Bd(\beta^4)"[0X
    [4X  Dim=2[0X
    [4X  FVector=[ 12, 24, 16 ][0X
    [4X  EulerCharacteristic=4[0X
    [4X  IsOrientable=true[0X
    [4X  TopologicalType="S^2 U S^2"[0X
    [4X [0X
    [4X /NormalSurface][0X
    [4X gap> cc:=SCConnectedComponents(sl);[0X
    [4X [ [NormalSurface[0X
    [4X     [0X
    [4X      Properties known: Dim, EulerCharacteristic, FVector, FacetsEx, Genus, IsC\[0X
    [4X onnected, IsOrientable, NSTriangulation, Name, TopologicalType, Vertices.[0X
    [4X     [0X
    [4X      Name="unnamed complex 302_cc_#1"[0X
    [4X      Dim=2[0X
    [4X      FVector=[ 6, 12, 8 ][0X
    [4X      EulerCharacteristic=2[0X
    [4X      IsOrientable=true[0X
    [4X      TopologicalType="S^2"[0X
    [4X     [0X
    [4X     /NormalSurface], [NormalSurface[0X
    [4X     [0X
    [4X      Properties known: Dim, EulerCharacteristic, FVector, FacetsEx, Genus, IsC\[0X
    [4X onnected, IsOrientable, NSTriangulation, Name, TopologicalType, Vertices.[0X
    [4X     [0X
    [4X      Name="unnamed complex 302_cc_#2"[0X
    [4X      Dim=2[0X
    [4X      FVector=[ 6, 12, 8 ][0X
    [4X      EulerCharacteristic=2[0X
    [4X      IsOrientable=true[0X
    [4X      TopologicalType="S^2"[0X
    [4X     [0X
    [4X     /NormalSurface] ][0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X7.3-2 SCDim[0m
  
  [2X> SCDim( [0X[3Xsl[0X[2X ) ________________________________________________________[0Xmethod
  [6XReturns:[0X  an integer upon success, [9Xfail[0m otherwise.
  
  Computes  the  dimension  of a discrete normal surface (which is always 2 if
  the slicing [3Xsl[0m is not empty).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> sl:=SCNSEmpty();;                                                    [0X
    [4X gap> SCDim(sl);                                                         [0X
    [4X -1[0X
    [4X gap> sl:=SCNSFromFacets([[1,2,3],[1,2,4,5],[1,3,4,6],[2,3,5,6],[4,5,6]]);;[0X
    [4X gap> SCDim(sl);                                                         [0X
    [4X 2[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X7.3-3 SCEulerCharacteristic[0m
  
  [2X> SCEulerCharacteristic( [0X[3Xsl[0X[2X ) ________________________________________[0Xmethod
  [6XReturns:[0X  an integer upon success, [9Xfail[0m otherwise.
  
  Computes  the  Euler  characteristic  of  a  discrete normal surface [3Xsl[0m, cf.
  [2XSCEulerCharacteristic[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> list:=SCLib.SearchByName("S^2xS^1");;  [0X
    [4X gap> c:=SCLib.Load(list[1][1]);;             [0X
    [4X gap> sl:=SCNSSlicing(c,[[1..5],[6..10]]);;[0X
    [4X gap> SCEulerCharacteristic(sl);                 [0X
    [4X 4[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X7.3-4 SCFVector[0m
  
  [2X> SCFVector( [0X[3Xsl[0X[2X ) ____________________________________________________[0Xmethod
  [6XReturns:[0X  a  1,  3 or 4 tuple of (non-negative) integer values upon success,
            [9Xfail[0m otherwise.
  
  Computes  the  f-vector  of  a  discrete normal surface, i. e. the number of
  vertices, edges, triangles and quadrilaterals of [3Xsl[0m, cf. [2XSCFVector[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> list:=SCLib.SearchByName("S^2xS^1");;[0X
    [4X gap> c:=SCLib.Load(list[1][1]);;             [0X
    [4X gap> sl:=SCNSSlicing(c,[[1..5],[6..10]]);;[0X
    [4X gap> SCFVector(sl);                 [0X
    [4X [ 20, 40, 16, 8 ][0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X7.3-5 SCFaceLattice[0m
  
  [2X> SCFaceLattice( [0X[3Xcomplex[0X[2X ) ___________________________________________[0Xmethod
  [6XReturns:[0X  a list of facet lists upon success, [9Xfail[0m otherwise.
  
  Computes  the  face  lattice of a discrete normal surface [3Xsl[0m in the original
  labeling.  Triangles  and  quadrilaterals  are stored separately (cf. [2XSCSkel[0m
  ([14X6.6-50[0m)).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=SCBdSimplex(4);;              [0X
    [4X gap> sl:=SCNSSlicing(c,[[1,2],[3..5]]);;[0X
    [4X gap> SCFaceLattice(sl);                            [0X
    [4X [ [ [ [ 1, 3 ] ], [ [ 1, 4 ] ], [ [ 1, 5 ] ], [ [ 2, 3 ] ], [ [ 2, 4 ] ], [0X
    [4X       [ [ 2, 5 ] ] ], [0X
    [4X   [ [ [ 1, 3 ], [ 1, 4 ] ], [ [ 1, 3 ], [ 1, 5 ] ], [ [ 1, 3 ], [ 2, 3 ] ], [0X
    [4X       [ [ 1, 4 ], [ 1, 5 ] ], [ [ 1, 4 ], [ 2, 4 ] ], [ [ 1, 5 ], [ 2, 5 ] ], [0X
    [4X       [ [ 2, 3 ], [ 2, 4 ] ], [ [ 2, 3 ], [ 2, 5 ] ], [ [ 2, 4 ], [ 2, 5 ] ] ][0X
    [4X     , [ [ [ 1, 3 ], [ 1, 4 ], [ 1, 5 ] ], [ [ 2, 3 ], [ 2, 4 ], [ 2, 5 ] ] ], [0X
    [4X   [ [ [ 1, 3 ], [ 1, 4 ], [ 2, 3 ], [ 2, 4 ] ], [0X
    [4X       [ [ 1, 3 ], [ 1, 5 ], [ 2, 3 ], [ 2, 5 ] ], [0X
    [4X       [ [ 1, 4 ], [ 1, 5 ], [ 2, 4 ], [ 2, 5 ] ] ] ][0X
    [4X gap> sl.F;[0X
    [4X [ 6, 9, 2, 3 ][0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X7.3-6 SCFaceLatticeEx[0m
  
  [2X> SCFaceLatticeEx( [0X[3Xcomplex[0X[2X ) _________________________________________[0Xmethod
  [6XReturns:[0X  a list of face lists upon success, [9Xfail[0m otherwise.
  
  Computes  the  face  lattice of a discrete normal surface [3Xsl[0m in the standard
  labeling.  Triangles  and quadrilaterals are stored separately (cf. [2XSCSkelEx[0m
  ([14X6.6-51[0m)).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=SCBdSimplex(4);;              [0X
    [4X gap> sl:=SCNSSlicing(c,[[1,2],[3..5]]);;[0X
    [4X gap> SCFaceLatticeEx(sl);                            [0X
    [4X [ [ [ 1 ], [ 2 ], [ 3 ], [ 4 ], [ 5 ], [ 6 ] ], [0X
    [4X   [ [ 1, 2 ], [ 1, 3 ], [ 1, 4 ], [ 2, 3 ], [ 2, 5 ], [ 3, 6 ], [ 4, 5 ], [0X
    [4X       [ 4, 6 ], [ 5, 6 ] ], [ [ 1, 2, 3 ], [ 4, 5, 6 ] ], [0X
    [4X   [ [ 1, 2, 4, 5 ], [ 1, 3, 4, 6 ], [ 2, 3, 5, 6 ] ] ][0X
    [4X gap> sl.F;[0X
    [4X [ 6, 9, 2, 3 ][0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X7.3-7 SCFpBettiNumbers[0m
  
  [2X> SCFpBettiNumbers( [0X[3Xsl, p[0X[2X ) __________________________________________[0Xmethod
  [6XReturns:[0X  a list of non-negative integers upon success, [9Xfail[0m otherwise.
  
  Computes  the  Betti  numbers  modulo  [3Xp[0m  of a slicing [3Xsl[0m. Internally, [3Xsl[0m is
  triangulated  (using  [2XSCNSTriangulation[0m  ([14X7.2-2[0m))  and the Betti numbers are
  computed via [2XSCFpBettiNumbers[0m using the triangulation.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCLib.SearchByName("(S^2xS^1)#20");       [0X
    [4X [ [ 7618, "(S^2xS^1)#20" ] ][0X
    [4X gap> c:=SCLib.Load(last[1][1]);;[0X
    [4X gap> c.F;[0X
    [4X [ 27, 298, 542, 271 ][0X
    [4X gap> sl:=SCNSSlicing(c,[[1..13],[14..27]]);;[0X
    [4X gap> SCFpBettiNumbers(sl,2);[0X
    [4X [ 2, 14, 2 ][0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X7.3-8 SCGenus[0m
  
  [2X> SCGenus( [0X[3Xsl[0X[2X ) ______________________________________________________[0Xmethod
  [6XReturns:[0X  a non-negative integer upon success, [9Xfail[0m otherwise.
  
  Computes the genus of a discrete normal surface [3Xsl[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCLib.SearchByName("(S^2xS^1)#20");[0X
    [4X [ [ 7618, "(S^2xS^1)#20" ] ][0X
    [4X gap> c:=SCLib.Load(last[1][1]);;               [0X
    [4X gap> c.F;                               [0X
    [4X [ 27, 298, 542, 271 ][0X
    [4X gap> sl:=SCNSSlicing(c,[[1..12],[13..27]]);;[0X
    [4X gap> SCIsConnected(sl);[0X
    [4X true[0X
    [4X gap> SCGenus(sl);                     [0X
    [4X 7[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X7.3-9 SCHomology[0m
  
  [2X> SCHomology( [0X[3Xsl[0X[2X ) ___________________________________________________[0Xmethod
  [6XReturns:[0X  a list of homology groups upon success, [9Xfail[0m otherwise.
  
  Computes  the  homology of a slicing [3Xsl[0m. Internally, [3Xsl[0m is triangulated (cf.
  [2XSCNSTriangulation[0m   ([14X7.2-2[0m))   and   simplicial  homology  is  computed  via
  [2XSCHomology[0m using the triangulation.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCLib.SearchByName("(S^2xS^1)#20");       [0X
    [4X [ [ 7618, "(S^2xS^1)#20" ] ][0X
    [4X gap> c:=SCLib.Load(last[1][1]);;[0X
    [4X gap> c.F;[0X
    [4X [ 27, 298, 542, 271 ][0X
    [4X gap> sl:=SCNSSlicing(c,[[1..12],[13..27]]);;   [0X
    [4X gap> sl.Homology;[0X
    [4X [ [ 0, [  ] ], [ 14, [  ] ], [ 1, [  ] ] ][0X
    [4X gap> sl:=SCNSSlicing(c,[[1..13],[14..27]]);;[0X
    [4X gap> sl.Homology;                       [0X
    [4X [ [ 1, [  ] ], [ 14, [  ] ], [ 2, [  ] ] ][0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X7.3-10 SCIsConnected[0m
  
  [2X> SCIsConnected( [0X[3Xcomplex[0X[2X ) ___________________________________________[0Xmethod
  [6XReturns:[0X  [9Xtrue[0m or [9Xfalse[0m upon success, [9Xfail[0m otherwise.
  
  Checks if a normal surface [3Xcomplex[0m is connected.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> list:=SCLib.SearchByAttribute("Dim=3 and F[1]=10");;[0X
    [4X gap> c:=SCLib.Load(list[1][1]);[0X
    [4X [SimplicialComplex[0X
    [4X [0X
    [4X  Properties known: AltshulerSteinberg, AutomorphismGroup, [0X
    [4X                    AutomorphismGroupSize, AutomorphismGroupStructure, [0X
    [4X                    AutomorphismGroupTransitivity, ConnectedComponents, [0X
    [4X                    Dim, DualGraph, EulerCharacteristic, FVector, [0X
    [4X                    FacetsEx, GVector, GeneratorsEx, HVector, [0X
    [4X                    HasBoundary, HasInterior, Homology, Interior, [0X
    [4X                    IsCentrallySymmetric, IsConnected, [0X
    [4X                    IsEulerianManifold, IsManifold, IsOrientable, [0X
    [4X                    IsPseudoManifold, IsPure, IsStronglyConnected, [0X
    [4X                    MinimalNonFacesEx, Name, Neighborliness, [0X
    [4X                    NumFaces[], Orientation, Reference, SkelExs[], [0X
    [4X                    Vertices.[0X
    [4X [0X
    [4X  Name="S^3 (VT)"[0X
    [4X  Dim=3[0X
    [4X  AltshulerSteinberg=0[0X
    [4X  AutomorphismGroupSize=200[0X
    [4X  AutomorphismGroupStructure="(D10 x D10) : C2"[0X
    [4X  AutomorphismGroupTransitivity=1[0X
    [4X  EulerCharacteristic=0[0X
    [4X  FVector=[ 10, 35, 50, 25 ][0X
    [4X  GVector=[ 5, 5 ][0X
    [4X  HVector=[ 6, 11, 6, 1 ][0X
    [4X  HasBoundary=false[0X
    [4X  HasInterior=true[0X
    [4X  Homology=[ [ 0, [ ] ], [ 0, [ ] ], [ 0, [ ] ], [ 1, [ ] ] ][0X
    [4X  IsCentrallySymmetric=false[0X
    [4X  IsConnected=true[0X
    [4X  IsEulerianManifold=true[0X
    [4X  IsOrientable=true[0X
    [4X  IsPseudoManifold=true[0X
    [4X  IsPure=true[0X
    [4X  IsStronglyConnected=true[0X
    [4X  Neighborliness=1[0X
    [4X [0X
    [4X /SimplicialComplex][0X
    [4X gap> sl:=SCNSSlicing(c,[[1..5],[6..10]]);[0X
    [4X [NormalSurface[0X
    [4X [0X
    [4X  Properties known: ConnectedComponents, Dim, EulerCharacteristic, FVector, Fac\[0X
    [4X etsEx, Genus, IsConnected, IsOrientable, NSTriangulation, Name, TopologicalTyp\[0X
    [4X e, Vertices.[0X
    [4X [0X
    [4X  Name="slicing [ [ 1, 2, 3, 4, 5 ], [ 6, 7, 8, 9, 10 ] ] of S^3 (VT)"[0X
    [4X  Dim=2[0X
    [4X  FVector=[ 17, 36, 12, 9 ][0X
    [4X  EulerCharacteristic=2[0X
    [4X  IsOrientable=true[0X
    [4X  TopologicalType="S^2"[0X
    [4X [0X
    [4X /NormalSurface][0X
    [4X gap> SCIsConnected(sl);[0X
    [4X true[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X7.3-11 SCIsEmpty[0m
  
  [2X> SCIsEmpty( [0X[3Xcomplex[0X[2X ) _______________________________________________[0Xmethod
  [6XReturns:[0X  [9Xtrue[0m or [9Xfalse[0m upon success, [9Xfail[0m otherwise.
  
  Checks  if  a  normal  surface  [3Xcomplex[0m  is  the  empty  complex,  i.  e.  a
  [10XSCNormalSurface[0m object with empty facet list.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> sl:=SCNS([]);;[0X
    [4X gap> SCIsEmpty(sl);[0X
    [4X true[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X7.3-12 SCIsOrientable[0m
  
  [2X> SCIsOrientable( [0X[3Xsl[0X[2X ) _______________________________________________[0Xmethod
  [6XReturns:[0X  [9Xtrue[0m or [9Xfalse[0m upon success, [9Xfail[0m otherwise.
  
  Checks if a discrete normal surface [3Xsl[0m is orientable.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=SCBdSimplex(4);;[0X
    [4X gap> sl:=SCNSSlicing(c,[[1,2],[3,4,5]]);[0X
    [4X [NormalSurface[0X
    [4X [0X
    [4X  Properties known: ConnectedComponents, Dim, EulerCharacteristic, FVector, Fac\[0X
    [4X etsEx, Genus, IsConnected, IsOrientable, NSTriangulation, Name, TopologicalTyp\[0X
    [4X e, Vertices.[0X
    [4X [0X
    [4X  Name="slicing [ [ 1, 2 ], [ 3, 4, 5 ] ] of S^3_5"[0X
    [4X  Dim=2[0X
    [4X  FVector=[ 6, 9, 2, 3 ][0X
    [4X  EulerCharacteristic=2[0X
    [4X  IsOrientable=true[0X
    [4X  TopologicalType="S^2"[0X
    [4X [0X
    [4X /NormalSurface][0X
    [4X gap> SCIsOrientable(sl);[0X
    [4X true[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X7.3-13 SCSkel[0m
  
  [2X> SCSkel( [0X[3Xsl, k[0X[2X ) ____________________________________________________[0Xmethod
  [6XReturns:[0X  a  face  list (of [3Xk+1[0mtuples) or a list of face lists upon success,
            [9Xfail[0m otherwise.
  
  Computes  all  faces  of  cardinality  [3Xk+1[0m  in  the original labeling: [3Xk[0m = 0
  computes  the  vertices,  [3Xk[0m  =  1  computes  the  edges,  [3Xk[0m = 2 computes the
  triangles, [3Xk[0m = 3 computes the quadrilaterals.
  
  If  [3Xk[0m  is  a  list  (necessarily  a sublist of [10X[ 0,1,2,3 ][0m) all faces of all
  cardinalities contained in [3Xk[0m are computed.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=SCBdSimplex(4);;              [0X
    [4X gap> sl:=SCNSSlicing(c,[[1],[2..5]]);;[0X
    [4X gap> SCSkel(sl,1);                            [0X
    [4X [ [ [ 1, 2 ], [ 1, 3 ] ], [ [ 1, 2 ], [ 1, 4 ] ], [ [ 1, 2 ], [ 1, 5 ] ], [0X
    [4X   [ [ 1, 3 ], [ 1, 4 ] ], [ [ 1, 3 ], [ 1, 5 ] ], [ [ 1, 4 ], [ 1, 5 ] ] ][0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=SCBdSimplex(4);;              [0X
    [4X gap> sl:=SCNSSlicing(c,[[1],[2..5]]);;[0X
    [4X gap> SCSkel(sl,3);                            [0X
    [4X [  ][0X
    [4X gap> sl:=SCNSSlicing(c,[[1,2],[3..5]]);;[0X
    [4X gap> SCSkelEx(sl,3);                            [0X
    [4X [ [ 1, 2, 4, 5 ], [ 1, 3, 4, 6 ], [ 2, 3, 5, 6 ] ][0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X7.3-14 SCSkelEx[0m
  
  [2X> SCSkelEx( [0X[3Xsl, k[0X[2X ) __________________________________________________[0Xmethod
  [6XReturns:[0X  a  face  list (of [3Xk+1[0mtuples) or a list of face lists upon success,
            [9Xfail[0m otherwise.
  
  Computes  all  faces  of  cardinality  [3Xk+1[0m  in  the standard labeling: [3Xk[0m = 0
  computes  the  vertices,  [3Xk[0m  =  1  computes  the  edges,  [3Xk[0m = 2 computes the
  triangles, [3Xk[0m = 3 computes the quadrilaterals.
  
  If  [3Xk[0m  is  a  list  (necessarily  a sublist of [10X[ 0,1,2,3 ][0m) all faces of all
  cardinalities contained in [3Xk[0m are computed.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=SCBdSimplex(4);;              [0X
    [4X gap> sl:=SCNSSlicing(c,[[1],[2..5]]);;[0X
    [4X gap> SCSkelEx(sl,1);                            [0X
    [4X [ [ 1, 2 ], [ 1, 3 ], [ 1, 4 ], [ 2, 3 ], [ 2, 4 ], [ 3, 4 ] ][0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=SCBdSimplex(4);;              [0X
    [4X gap> sl:=SCNSSlicing(c,[[1],[2..5]]);;[0X
    [4X gap> SCSkelEx(sl,3);                            [0X
    [4X [  ][0X
    [4X gap> sl:=SCNSSlicing(c,[[1,2],[3..5]]);;[0X
    [4X gap> SCSkelEx(sl,3);                            [0X
    [4X [ [ 1, 2, 4, 5 ], [ 1, 3, 4, 6 ], [ 2, 3, 5, 6 ] ][0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X7.3-15 SCTopologicalType[0m
  
  [2X> SCTopologicalType( [0X[3Xsl[0X[2X ) ____________________________________________[0Xmethod
  [6XReturns:[0X  a string upon success, [9Xfail[0m otherwise.
  
  Determines  the  topological  type  of [3Xsl[0m via the classification theorem for
  closed  compact  surfaces.  If  [3Xsl[0m is not connected, the topological type of
  each connected component is computed.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCLib.SearchByName("(S^2xS^1)#20");      [0X
    [4X [ [ 7618, "(S^2xS^1)#20" ] ][0X
    [4X gap> c:=SCLib.Load(last[1][1]);;[0X
    [4X gap> c.F;[0X
    [4X [ 27, 298, 542, 271 ][0X
    [4X gap> for i in [1..26] do [0X
    [4X > sl:=SCNSSlicing(c,[[1..i],[i+1..27]]); [0X
    [4X > Syntax error: od expected[0X
    [4X > sl:=SCNSSlicing(c,[[1..i],[i+1..27]]); [0X
    [4X ^[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X7.3-16 SCUnion[0m
  
  [2X> SCUnion( [0X[3Xcomplex1, complex2[0X[2X ) ______________________________________[0Xmethod
  [6XReturns:[0X  normal   surface   of  type  [10XSCNormalSurface[0m  upon  success,  [9Xfail[0m
            otherwise.
  
  Forms  the  union of two normal surfaces [3Xcomplex1[0m and [3Xcomplex2[0m as the normal
  surface  formed  by the union of their facet sets. The two arguments are not
  altered.  Note:  for the union process the vertex labelings of the complexes
  are   taken   into  account,  see  also  [2XOperation  Union  (SCNormalSurface,
  SCNormalSurface)[0m  ([14X5.6-1[0m). Facets occurring in both arguments are treated as
  one facet in the new complex.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> list:=SCLib.SearchByAttribute("Dim=3 and F[1]=10");;[0X
    [4X gap> c:=SCLib.Load(list[1][1]);[0X
    [4X [SimplicialComplex[0X
    [4X [0X
    [4X  Properties known: AltshulerSteinberg, AutomorphismGroup, [0X
    [4X                    AutomorphismGroupSize, AutomorphismGroupStructure, [0X
    [4X                    AutomorphismGroupTransitivity, ConnectedComponents, [0X
    [4X                    Dim, DualGraph, EulerCharacteristic, FVector, [0X
    [4X                    FacetsEx, GVector, GeneratorsEx, HVector, [0X
    [4X                    HasBoundary, HasInterior, Homology, Interior, [0X
    [4X                    IsCentrallySymmetric, IsConnected, [0X
    [4X                    IsEulerianManifold, IsManifold, IsOrientable, [0X
    [4X                    IsPseudoManifold, IsPure, IsStronglyConnected, [0X
    [4X                    MinimalNonFacesEx, Name, Neighborliness, [0X
    [4X                    NumFaces[], Orientation, Reference, SkelExs[], [0X
    [4X                    Vertices.[0X
    [4X [0X
    [4X  Name="S^3 (VT)"[0X
    [4X  Dim=3[0X
    [4X  AltshulerSteinberg=0[0X
    [4X  AutomorphismGroupSize=200[0X
    [4X  AutomorphismGroupStructure="(D10 x D10) : C2"[0X
    [4X  AutomorphismGroupTransitivity=1[0X
    [4X  EulerCharacteristic=0[0X
    [4X  FVector=[ 10, 35, 50, 25 ][0X
    [4X  GVector=[ 5, 5 ][0X
    [4X  HVector=[ 6, 11, 6, 1 ][0X
    [4X  HasBoundary=false[0X
    [4X  HasInterior=true[0X
    [4X  Homology=[ [ 0, [ ] ], [ 0, [ ] ], [ 0, [ ] ], [ 1, [ ] ] ][0X
    [4X  IsCentrallySymmetric=false[0X
    [4X  IsConnected=true[0X
    [4X  IsEulerianManifold=true[0X
    [4X  IsOrientable=true[0X
    [4X  IsPseudoManifold=true[0X
    [4X  IsPure=true[0X
    [4X  IsStronglyConnected=true[0X
    [4X  Neighborliness=1[0X
    [4X [0X
    [4X /SimplicialComplex][0X
    [4X gap> sl1:=SCNSSlicing(c,[[1..5],[6..10]]);;[0X
    [4X gap> sl2:=sl1+10;;[0X
    [4X gap> sl3:=SCUnion(sl1,sl2);;[0X
    [4X gap> SCTopologicalType(sl3);[0X
    [4X "S^2 U S^2"[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
