  
  [1X8 Functions for normal surfaces[0X
  
  
  [1X8.1 Creating an [10XSCNormalSurface[1X object[0X
  
  This  section  contains  functions  to  construct normal surfaces from facet
  lists or combinatorial 3-manifolds.
  
  [1X8.1-1 SCNSEmpty[0m
  
  [2X> SCNSEmpty( [0X[3X[0X[2X ) ____________________________________________________[0Xfunction
  [6XReturns:[0X  normal surface with empty facet list upon success, [9Xfail[0m otherwise.
  
  Generates an empty complex (of dimension -1).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCNSEmpty();[0X
    [4X [NormalSurface[0X
    [4X [0X
    [4X  Properties known: Dim, Faces, Facets, Name, VertexLabels.[0X
    [4X [0X
    [4X  Name="empty normal surface"[0X
    [4X  Dim=-1[0X
    [4X [0X
    [4X /NormalSurface][0X
    [4X gap> [0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X8.1-2 SCNSFromFacets[0m
  
  [2X> SCNSFromFacets( [0X[3Xfacets[0X[2X ) _________________________________________[0Xfunction
  [6XReturns:[0X  A new object of type [10XSCNormalSurface[0m upon success, [9Xfail[0m otherwise.
  
  Constructor  of a normal surface from a facet list, see [2XSCFromFacets[0m ([14X4.1-1[0m)
  for details.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> ns:=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, Facets, Name, VertexLabels.[0X
    [4X [0X
    [4X  Name="unnamed normal surface n"[0X
    [4X  Dim=2[0X
    [4X [0X
    [4X /NormalSurface][0X
    [4X gap> [0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X8.1-3 SCNS[0m
  
  [2X> SCNS( [0X[3Xfacets[0X[2X ) ___________________________________________________[0Xfunction
  [6XReturns:[0X  A new object of type [10XSCNormalSurface[0m upon success, [9Xfail[0m otherwise.
  
  Internally calls [2XSCNSFromFacets[0m ([14X8.1-2[0m).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> ns:=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, Facets, Name, VertexLabels.[0X
    [4X [0X
    [4X  Name="unnamed normal surface n"[0X
    [4X  Dim=2[0X
    [4X [0X
    [4X /NormalSurface][0X
    [4X gap> [0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X8.1-4 SCNSSlicing[0m
  
  [2X> SCNSSlicing( [0X[3Xcomplex, slicing[0X[2X ) __________________________________[0Xfunction
  [6XReturns:[0X  a normal surface upon success, [9Xfail[0m otherwise.
  
  Computes  a slicing defined by a partition [3Xslicing[0m of the set of vertices of
  the  3-dimensional  combinatorial pseudo manifold [3Xcomplex[0m. [3Xslicing[0m has to be
  of size 2.
  
  [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> ns:=SCNSSlicing(c,[[1,2,3],[4,5,6]]);    [0X
    [4X [NormalSurface[0X
    [4X [0X
    [4X  Properties known: Chi, ConnectedComponents, Dim, F, Facets, Genus, IsConnect\[0X
    [4X ed, Name, Oriented, Subdivision, TopologicalType, VertexLabels, Vertices.[0X
    [4X [0X
    [4X  Name="slicing [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] of S^3 (VT)"[0X
    [4X  Dim=2[0X
    [4X  Chi=2[0X
    [4X  F=[ 9, 16, 4, 5 ][0X
    [4X  IsConnected=true[0X
    [4X  TopologicalType="S^2"[0X
    [4X [0X
    [4X /NormalSurface][0X
    [4X gap> ns.Facets;[0X
    [4X [ [ [ 1, 4 ], [ 2, 4 ], [ 3, 4 ] ], [0X
    [4X   [ [ 1, 6 ], [ 2, 6 ], [ 3, 6 ] ], [0X
    [4X   [ [ 1, 4 ], [ 1, 5 ], [ 2, 4 ], [ 2, 5 ] ], [0X
    [4X   [ [ 1, 5 ], [ 1, 6 ], [ 2, 5 ], [ 2, 6 ] ], [0X
    [4X   [ [ 1, 4 ], [ 1, 6 ], [ 3, 4 ], [ 3, 6 ] ], [0X
    [4X   [ [ 1, 4 ], [ 1, 5 ], [ 1, 6 ] ], [0X
    [4X   [ [ 2, 4 ], [ 2, 5 ], [ 3, 4 ], [ 3, 5 ] ], [0X
    [4X   [ [ 2, 5 ], [ 2, 6 ], [ 3, 5 ], [ 3, 6 ] ], [0X
    [4X   [ [ 3, 4 ], [ 3, 5 ], [ 3, 6 ] ] ][0X
    [4X gap> ns:=SCNSSlicing(c,[[1,3,5],[2,4,6]]);    [0X
    [4X [NormalSurface[0X
    [4X [0X
    [4X  Properties known: Chi, ConnectedComponents, Dim, F, Facets, Genus, IsConnect\[0X
    [4X ed, Name, Oriented, Subdivision, TopologicalType, VertexLabels, Vertices.[0X
    [4X [0X
    [4X  Name="slicing [ [ 1, 3, 5 ], [ 2, 4, 6 ] ] of S^3 (VT)"[0X
    [4X  Dim=2[0X
    [4X  Chi=0[0X
    [4X  F=[ 9, 18, 0, 9 ][0X
    [4X  IsConnected=true[0X
    [4X  TopologicalType="T^2"[0X
    [4X [0X
    [4X /NormalSurface][0X
    [4X gap> ns.Facets;                           [0X
    [4X [ [ [ 1, 2 ], [ 1, 4 ], [ 3, 2 ], [ 3, 4 ] ], [0X
    [4X   [ [ 1, 2 ], [ 1, 6 ], [ 3, 2 ], [ 3, 6 ] ], [0X
    [4X   [ [ 1, 2 ], [ 1, 4 ], [ 5, 2 ], [ 5, 4 ] ], [0X
    [4X   [ [ 1, 2 ], [ 1, 6 ], [ 5, 2 ], [ 5, 6 ] ], [0X
    [4X   [ [ 1, 4 ], [ 1, 6 ], [ 3, 4 ], [ 3, 6 ] ], [0X
    [4X   [ [ 1, 4 ], [ 1, 6 ], [ 5, 4 ], [ 5, 6 ] ], [0X
    [4X   [ [ 3, 2 ], [ 3, 4 ], [ 5, 2 ], [ 5, 4 ] ], [0X
    [4X   [ [ 3, 2 ], [ 3, 6 ], [ 5, 2 ], [ 5, 6 ] ], [0X
    [4X   [ [ 3, 4 ], [ 3, 6 ], [ 5, 4 ], [ 5, 6 ] ] ][0X
    [4X gap> [0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  
  [1X8.2 Generating new objects from 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.
  
  [1X8.2-1 SCNSCopy[0m
  
  [2X> SCNSCopy( [0X[3Xcomplex[0X[2X ) ______________________________________________[0Xfunction
  [6XReturns:[0X  a normal surface upon success, [9Xfail[0m otherwise.
  
  Copies a [10XGAP[0m object of type [10XSCNormalSurface[0m (cf. [2XSCCopy[0m ([14X3.1-2[0m)).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> sl:=SCNSSlicing(SCBdSimplex(4),[[1],[2..5]]);[0X
    [4X [NormalSurface[0X
    [4X [0X
    [4X  Properties known: Chi, ConnectedComponents, Dim, F, Facets, Genus, IsConnect\[0X
    [4X ed, Name, Oriented, Subdivision, TopologicalType, VertexLabels, Vertices.[0X
    [4X [0X
    [4X  Name="slicing [ [ 1 ], [ 2, 3, 4, 5 ] ] of S^3_5"[0X
    [4X  Dim=2[0X
    [4X  Chi=2[0X
    [4X  F=[ 4, 6, 4 ][0X
    [4X  IsConnected=true[0X
    [4X  TopologicalType="S^2"[0X
    [4X [0X
    [4X /NormalSurface][0X
    [4X gap> sl_2:=SCNSCopy(sl);                          [0X
    [4X [NormalSurface[0X
    [4X [0X
    [4X  Properties known: Chi, ConnectedComponents, Dim, F, Facets, Genus, IsConnect\[0X
    [4X ed, Name, Oriented, Subdivision, TopologicalType, VertexLabels, Vertices.[0X
    [4X [0X
    [4X  Name="slicing [ [ 1 ], [ 2, 3, 4, 5 ] ] of S^3_5"[0X
    [4X  Dim=2[0X
    [4X  Chi=2[0X
    [4X  F=[ 4, 6, 4 ][0X
    [4X  IsConnected=true[0X
    [4X  TopologicalType="S^2"[0X
    [4X [0X
    [4X /NormalSurface][0X
    [4X gap> IsIdenticalObj(sl,sl_2);                     [0X
    [4X false[0X
    [4X gap> [0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X8.2-2 SCNSSubdivision[0m
  
  [2X> SCNSSubdivision( [0X[3Xnormalsurface[0X[2X ) _________________________________[0Xfunction
  [6XReturns:[0X  a simplicial complex upon success, [9Xfail[0m otherwise.
  
  Computes  a  simplicial subdivision of [3Xnormalsurface[0m without introducing new
  vertices.  The  subdivision  is stored as a property of [3Xnormalsurface[0m. Note,
  that symmetry may be lost during the process of subdividing.
  
  [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> ns:=SCNSSlicing(c,[[1,3,5],[2,4,6]]);;[0X
    [4X gap> ns.F; [0X
    [4X [ 9, 18, 0, 9 ][0X
    [4X gap> sc:=SCNSSubdivision(ns);;[0X
    [4X gap> sc.F;[0X
    [4X [ 9, 27, 18 ][0X
    [4X gap> [0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  
  [1X8.3 Properties of [10XSCNormalSurface[1X objects[0X
  
  Although  some  properties  of a 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.
  
  [1X8.3-1 SCNSDim[0m
  
  [2X> SCNSDim( [0X[3Xnormalsurface[0X[2X ) _________________________________________[0Xfunction
  [6XReturns:[0X  2 if [3Xnormalsurface[0m is not empty, -1 otherwise.
  
  Computes  the  dimension  of  a  normal  surface  (which  is always 2 in the
  non-empty case.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> ns:=SCNSEmpty();;                                                    [0X
    [4X gap> SCNSDim(ns);                                                         [0X
    [4X -1[0X
    [4X gap> ns:=SCNSFromFacets([[1,2,3],[1,2,4,5],[1,3,4,6],[2,3,5,6],[4,5,6]]);;[0X
    [4X gap> SCNSDim(ns);                                                         [0X
    [4X 2[0X
    [4X gap> [0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X8.3-2 SCNSEulerCharacteristic[0m
  
  [2X> SCNSEulerCharacteristic( [0X[3Xnormalsurface[0X[2X ) _________________________[0Xfunction
  [6XReturns:[0X  an integer upon success, [9Xfail[0m otherwise.
  
  Computes the Euler characteristic of a normal surface.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCLib.SearchByName("S^2xS^1");  [0X
    [4X [ [ 24, "S^2xS^1 (VT)" ], [ 33, "S^2xS^1 (VT)" ], [ 68, "S^2xS^1 (VT)" ], [0X
    [4X [ 81, "S^2xS^1 (VT)" ], [ 82, "S^2xS^1 (VT)" ], [ 83, "S^2xS^1 (VT)" ], ... [0X
    [4X ][0X
    [4X gap> c:=SCLib.Load(24);;             [0X
    [4X gap> ns:=c.Slicing([[1..5],[6..10]]);;[0X
    [4X gap> SCNSEulerCharacteristic(ns);                 [0X
    [4X 4[0X
    [4X gap> [0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X8.3-3 SCNSFVector[0m
  
  [2X> SCNSFVector( [0X[3Xnormalsurface[0X[2X ) _____________________________________[0Xfunction
  [6XReturns:[0X  a  1,  3 or 4 tuple of (non-negative) integer values upon success,
            [9Xfail[0m otherwise.
  
  Computes  the  f-vector  of  a normal surface, i. e. the number of vertices,
  edges, triangles and quadrilaterals of [3Xnormalsurface[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCLib.SearchByName("S^2xS^1");  [0X
    [4X [ [ 24, "S^2xS^1 (VT)" ], [ 33, "S^2xS^1 (VT)" ], [ 68, "S^2xS^1 (VT)" ], [0X
    [4X [ 81, "S^2xS^1 (VT)" ], [ 82, "S^2xS^1 (VT)" ], [ 83, "S^2xS^1 (VT)" ], ... [0X
    [4X ][0X
    [4X gap> c:=SCLib.Load(24);;             [0X
    [4X gap> ns:=c.Slicing([[1..5],[6..10]]);;[0X
    [4X gap> SCNSFVector(ns);                 [0X
    [4X [ 20, 40, 16, 8 ][0X
    [4X gap> [0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X8.3-4 SCNSFaceLattice[0m
  
  [2X> SCNSFaceLattice( [0X[3Xcomplex[0X[2X ) _______________________________________[0Xfunction
  [6XReturns:[0X  a list of facet lists upon success, [9Xfail[0m otherwise.
  
  Computes  the  face  lattice  of  a  normal  surface  in  original labeling.
  Triangles and quadrilaterals are stored separately (cf. [2XSCNSSkel[0m ([14X8.3-9[0m)).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=SCBdSimplex(4);;              [0X
    [4X gap> ns:=SCNSSlicing(c,[[1,2],[3..5]]);;[0X
    [4X gap> SCNSFaceLattice(ns);                            [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> ns.F;[0X
    [4X [ 6, 9, 2, 3 ][0X
    [4X gap> [0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X8.3-5 SCNSFaceLatticeEx[0m
  
  [2X> SCNSFaceLatticeEx( [0X[3Xcomplex[0X[2X ) _____________________________________[0Xfunction
  [6XReturns:[0X  a list of facet lists upon success, [9Xfail[0m otherwise.
  
  Computes  the  face  lattice  of  a  normal  surface  in  standard labeling.
  Triangles   and   quadrilaterals   are  stored  separately  (cf.  [2XSCNSSkelEx[0m
  ([14X8.3-10[0m)).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=SCBdSimplex(4);;              [0X
    [4X gap> ns:=SCNSSlicing(c,[[1,2],[3..5]]);;[0X
    [4X gap> SCNSFaceLatticeEx(ns);                            [0X
    [4X [ [ [ 1 ], [ 2 ], [ 3 ], [ 4 ], [ 5 ], [ 6 ] ], [0X
    [4X   [ [ 1, 2 ], [ 1, 3 ], [ 1, 4 ], [ 2, 3 ], [ 2, 5 ], [0X
    [4X     [ 3, 6 ], [ 4, 5 ], [ 4, 6 ], [ 5, 6 ] ], [0X
    [4X   [ [ 1, 2, 3 ], [ 4, 5, 6 ] ], [0X
    [4X   [ [ 1, 2, 4, 5 ], [ 1, 3, 4, 6 ], [ 2, 3, 5, 6 ] ] ][0X
    [4X gap> ns.F;[0X
    [4X [ 6, 9, 2, 3 ][0X
    [4X gap> [0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X8.3-6 SCNSFpBettiNumbers[0m
  
  [2X> SCNSFpBettiNumbers( [0X[3Xnormalsurface, p[0X[2X ) ___________________________[0Xfunction
  [6XReturns:[0X  a list of non-negative integers upon success, [9Xfail[0m otherwise
  
  Computes   the   Betti   numbers  modulo  [3Xp[0m  of  [3Xnormalsurface[0m.  Internally,
  [3Xnormalsurface[0m  is  subdivided  and  the  Betti  numbers  are computed on the
  subdivision (cf. [2XSCNSSubdivision[0m ([14X8.2-2[0m)).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCLib.SearchByName("(S^2xS^1)#20");       [0X
    [4X [ [ 688, "(S^2xS^1)#20" ] ][0X
    [4X gap> c:=SCLib.Load(688);;[0X
    [4X gap> c.F;[0X
    [4X [ 27, 298, 542, 271 ][0X
    [4X gap> ns:=c.Slicing([[1..13],[14..27]]);;[0X
    [4X gap> SCNSFpBettiNumbers(ns,2);[0X
    [4X [ 2, 14, 2 ][0X
    [4X gap>[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X8.3-7 SCNSGenus[0m
  
  [2X> SCNSGenus( [0X[3Xnormalsurface[0X[2X ) _______________________________________[0Xfunction
  [6XReturns:[0X  a non-negative integer upon success, [9Xfail[0m otherwise.
  
  Computes the genus of a normal surface.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCLib.SearchByName("(S^2xS^1)#20");[0X
    [4X [ [ 688, "(S^2xS^1)#20" ] ][0X
    [4X gap> c:=SCLib.Load(688);;               [0X
    [4X gap> c.F;                               [0X
    [4X [ 27, 298, 542, 271 ][0X
    [4X gap> ns:=c.Slicing([[1..12],[13..27]]);;[0X
    [4X gap> SCIsConnected(ns);[0X
    [4X true[0X
    [4X gap> SCNSGenus(ns);                     [0X
    [4X 7[0X
    [4X gap> [0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X8.3-8 SCNSHomology[0m
  
  [2X> SCNSHomology( [0X[3Xnormalsurface[0X[2X ) ____________________________________[0Xfunction
  [6XReturns:[0X  a list of homology groups upon success, [9Xfail[0m otherwise
  
  Computes   the  homology  of  [3Xnormalsurface[0m.  Internally,  [3Xnormalsurface[0m  is
  subdivided  and  simplicial  homology  is  computed  on the subdivision (cf.
  [2XSCNSSubdivision[0m ([14X8.2-2[0m)).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCLib.SearchByName("(S^2xS^1)#20");       [0X
    [4X [ [ 688, "(S^2xS^1)#20" ] ][0X
    [4X gap> c:=SCLib.Load(688);;[0X
    [4X gap> c.F;[0X
    [4X [ 27, 298, 542, 271 ][0X
    [4X gap> ns:=c.Slicing([[1..12],[13..27]]);;   [0X
    [4X gap> ns.Homology;[0X
    [4X [ [ 0, [  ] ], [ 14, [  ] ], [ 1, [  ] ] ][0X
    [4X gap> ns:=c.Slicing([[1..13],[14..27]]);;[0X
    [4X gap> ns.Homology;                       [0X
    [4X [ [ 1, [  ] ], [ 14, [  ] ], [ 2, [  ] ] ][0X
    [4X gap> [0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X8.3-9 SCNSSkel[0m
  
  [2X> SCNSSkel( [0X[3Xnormalsurface, dim[0X[2X ) ___________________________________[0Xfunction
  [6XReturns:[0X  a facet list of dimension [3Xdim[0m upon success, [9Xfail[0m otherwise.
  
  Computes  all  faces  of one type in original labeling: [3Xdim[0m = 0 computes the
  vertices,  [3Xdim[0m = 1 computes the edges, [3Xdim[0m = 2 computes the triangles, [3Xdim[0m =
  3 computes the quadrilaterals,
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=SCBdSimplex(4);;              [0X
    [4X gap> ns:=SCNSSlicing(c,[[1],[2..5]]);;[0X
    [4X gap> SCNSSkel(ns,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 gap> [0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=SCBdSimplex(4);;              [0X
    [4X gap> ns:=SCNSSlicing(c,[[1],[2..5]]);;[0X
    [4X gap> SCNSSkel(ns,3);                            [0X
    [4X [ ][0X
    [4X gap> ns:=SCNSSlicing(c,[[1,2],[3..5]]);;[0X
    [4X gap> SCNSSkelEx(ns,3);                            [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> [0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X8.3-10 SCNSSkelEx[0m
  
  [2X> SCNSSkelEx( [0X[3Xnormalsurface, dim[0X[2X ) _________________________________[0Xfunction
  [6XReturns:[0X  a facet list of dimension [3Xdim[0m upon success, [9Xfail[0m otherwise.
  
  Computes  all  faces  of one type in standard labeling: [3Xdim[0m = 0 computes the
  vertices,  [3Xdim[0m = 1 computes the edges, [3Xdim[0m = 2 computes the triangles, [3Xdim[0m =
  3 computes the quadrilaterals,
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=SCBdSimplex(4);;              [0X
    [4X gap> ns:=SCNSSlicing(c,[[1],[2..5]]);;[0X
    [4X gap> SCNSSkelEx(ns,1);                            [0X
    [4X [ [ 1, 2 ], [ 1, 3 ], [ 1, 4 ], [ 2, 3 ], [ 2, 4 ], [ 3, 4 ] ][0X
    [4X gap> [0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=SCBdSimplex(4);;              [0X
    [4X gap> ns:=SCNSSlicing(c,[[1],[2..5]]);;[0X
    [4X gap> SCNSSkelEx(ns,3);                            [0X
    [4X [ ][0X
    [4X gap> ns:=SCNSSlicing(c,[[1,2],[3..5]]);;[0X
    [4X gap> SCNSSkelEx(ns,3);                            [0X
    [4X [ [ 1, 2, 4, 5 ], [ 1, 3, 4, 6 ], [ 2, 3, 5, 6 ] ][0X
    [4X gap> [0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X8.3-11 SCNSTopologicalType[0m
  
  [2X> SCNSTopologicalType( [0X[3Xns[0X[2X ) ________________________________________[0Xfunction
  [6XReturns:[0X  a string upon success, [9Xfail[0m otherwise.
  
  Determines  the  topological  type  of [3Xns[0m via the classification theorem for
  closed  surfaces.  If  [3Xns[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 [ [ 688, "(S^2xS^1)#20" ] ][0X
    [4X gap> c:=SCLib.Load(688);;[0X
    [4X gap> c.F;[0X
    [4X [ 27, 298, 542, 271 ][0X
    [4X gap> for i in [1..26] do [0X
    [4X > ns:=SCNSSlicing(c,[[1..i],[i+1..27]]); [0X
    [4X > Print(ns.TopologicalType,"\n"); [0X
    [4X > od;                                           [0X
    [4X S^2[0X
    [4X S^2[0X
    [4X S^2[0X
    [4X S^2[0X
    [4X S^2 U S^2[0X
    [4X S^2 U S^2[0X
    [4X S^2[0X
    [4X (T^2)#3[0X
    [4X (T^2)#5[0X
    [4X (T^2)#4[0X
    [4X (T^2)#3[0X
    [4X (T^2)#7[0X
    [4X (T^2)#7 U S^2[0X
    [4X (T^2)#7 U S^2[0X
    [4X (T^2)#7 U S^2[0X
    [4X (T^2)#8 U S^2[0X
    [4X (T^2)#7 U S^2[0X
    [4X (T^2)#8[0X
    [4X (T^2)#6[0X
    [4X (T^2)#6[0X
    [4X (T^2)#5[0X
    [4X (T^2)#3[0X
    [4X (T^2)#2[0X
    [4X T^2[0X
    [4X S^2[0X
    [4X S^2[0X
    [4X gap> [0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  
  [1X8.4 Polyhedral Morse theory for normal surfaces[0X
  
  As  mentioned  in  Section  [14X2.4[0m  and  [14X2.5[0m  the theory of normal surfaces and
  slicings  are  closely  related.  In  this  section  we  present some useful
  functions dealing with polyhedral Morse theory.
  
