  
  [1X11 Polyhedral Morse theory[0X
  
  In  this  chapter  we  present some useful functions dealing with polyhedral
  Morse  theory.  See  Section [14X2.5[0m for a very short introduction to the field,
  see  [K{\95]  for  more  information.  Note: this is not to be confused with
  Robin Forman's discrete Morse theory for cell complexes [For95].
  
  If  M  is  a combinatorial d-manifold with n-vertices a rsl-function will be
  represented  as an ordering on the set of vertices, i. e. a list of length n
  containing all vertex labels of the corresponding simplicial complex.
  
  
  [1X11.1 Polyhedral Morse theory related functions[0X
  
  [1X11.1-1 SCIsTight[0m
  
  [2X> SCIsTight( [0X[3Xcomplex[0X[2X ) _______________________________________________[0Xmethod
  [6XReturns:[0X  [9Xtrue[0m or [9Xfalse[0m upon success, [9Xfail[0m otherwise.
  
  Checks whether a simplicial complex [10Xcomplex[0m is a tight triangulation or not.
  A  simplicial complex with n vertices is said to be a tight triangulation if
  it  can  be  tightly  embedded into the (n-1)-simplex. See Section [14X2.6[0m for a
  short introduction to the field of tightness.
  
  First,  if [10Xcomplex[0m is a (k+1)-neighborly 2k-manifold (cf. [K{\95], Corollary
  4.7)  or  if  [10Xcomplex[0m is of dimension d>= 4, 2-neighborly and all its vertex
  links  are  stacked spheres (i.e. the complex is in Walkup's class K(d), see
  [Eff11b]), [9Xtrue[0m is returned as the complex is a tight triangulation in these
  cases.   Note  that  it  is  not  computed  whether  or  not  [10Xcomplex[0m  is  a
  combinatorial  manifold  as  this computation might take a long time. Hence,
  only  if  the  manifold  flag of the complex is set (this can be achieved by
  calling  [2XSCIsManifold[0m  ([14X9.2-6[0m)  and  the  complex  indeed is a combinatorial
  manifold)  these checks are performed. In a second step, the algorithm first
  checks certain rsl-functions allowing slicings between minimal non faces and
  the  rest  of the complex. In most cases where [10Xcomplex[0m is not tight at least
  one  of these rsl-functions is not perfect and thus [10Xfalse[0m is returned as the
  complex is not a tight triangulation.
  
  If  the  complex  passed  all checks so far, the remaining rsl-functions are
  checked  for  being  perfect  functions. As there are ``only'' 2^n different
  multiplicity  vectors,  but  n!  different  rsl-functions,  a  lookup  table
  containing  all  possible  multiplicity vectors is computed first. Note that
  nonetheless the complexity of this algorithm is O(n!).
  
  In  order to reduce the number of rsl-functions that need to be checked, the
  automorphism  group  of  [10Xcomplex[0m is computed first using [2XSCAutomorphismGroup[0m
  ([14X6.6-2[0m). In case it is k-transitive, the complexity is reduced by the factor
  of n * (n-1) * dots * (n-k+1).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> list:=SCLib.SearchByName("S^2~S^1 (VT)");[0X
    [4X [ [ 12, "S^2~S^1 (VT)" ], [ 27, "S^2~S^1 (VT)" ], [ 28, "S^2~S^1 (VT)" ], [0X
    [4X   [ 43, "S^2~S^1 (VT)" ], [ 47, "S^2~S^1 (VT)" ], [ 49, "S^2~S^1 (VT)" ], [0X
    [4X   [ 89, "S^2~S^1 (VT)" ], [ 90, "S^2~S^1 (VT)" ], [ 111, "S^2~S^1 (VT)" ], [0X
    [4X   [ 140, "S^2~S^1 (VT)" ], [ 146, "S^2~S^1 (VT)" ], [ 147, "S^2~S^1 (VT)" ], [0X
    [4X   [ 148, "S^2~S^1 (VT)" ], [ 149, "S^2~S^1 (VT)" ], [ 150, "S^2~S^1 (VT)" ], [0X
    [4X   [ 156, "S^2~S^1 (VT)" ], [ 157, "S^2~S^1 (VT)" ], [ 391, "S^2~S^1 (VT)" ], [0X
    [4X   [ 393, "S^2~S^1 (VT)" ], [ 394, "S^2~S^1 (VT)" ], [ 396, "S^2~S^1 (VT)" ], [0X
    [4X   [ 407, "S^2~S^1 (VT)" ], [ 408, "S^2~S^1 (VT)" ], [ 410, "S^2~S^1 (VT)" ], [0X
    [4X   [ 412, "S^2~S^1 (VT)" ], [ 413, "S^2~S^1 (VT)" ], [ 578, "S^2~S^1 (VT)" ], [0X
    [4X   [ 579, "S^2~S^1 (VT)" ], [ 582, "S^2~S^1 (VT)" ], [ 596, "S^2~S^1 (VT)" ], [0X
    [4X   [ 597, "S^2~S^1 (VT)" ], [ 598, "S^2~S^1 (VT)" ], [ 640, "S^2~S^1 (VT)" ], [0X
    [4X   [ 642, "S^2~S^1 (VT)" ], [ 644, "S^2~S^1 (VT)" ], [ 645, "S^2~S^1 (VT)" ], [0X
    [4X   [ 769, "S^2~S^1 (VT)" ], [ 770, "S^2~S^1 (VT)" ], [ 774, "S^2~S^1 (VT)" ], [0X
    [4X   [ 775, "S^2~S^1 (VT)" ], [ 776, "S^2~S^1 (VT)" ], [ 2401, "S^2~S^1 (VT)" ], [0X
    [4X   [ 2409, "S^2~S^1 (VT)" ], [ 2410, "S^2~S^1 (VT)" ], [0X
    [4X   [ 2411, "S^2~S^1 (VT)" ], [ 2428, "S^2~S^1 (VT)" ], [0X
    [4X   [ 2429, "S^2~S^1 (VT)" ], [ 2430, "S^2~S^1 (VT)" ], [0X
    [4X   [ 2431, "S^2~S^1 (VT)" ], [ 2432, "S^2~S^1 (VT)" ], [0X
    [4X   [ 2433, "S^2~S^1 (VT)" ], [ 2434, "S^2~S^1 (VT)" ], [0X
    [4X   [ 2435, "S^2~S^1 (VT)" ], [ 2500, "S^2~S^1 (VT)" ], [0X
    [4X   [ 2501, "S^2~S^1 (VT)" ], [ 2504, "S^2~S^1 (VT)" ], [0X
    [4X   [ 2505, "S^2~S^1 (VT)" ], [ 2506, "S^2~S^1 (VT)" ], [0X
    [4X   [ 2510, "S^2~S^1 (VT)" ], [ 2511, "S^2~S^1 (VT)" ], [0X
    [4X   [ 2512, "S^2~S^1 (VT)" ], [ 2513, "S^2~S^1 (VT)" ], [0X
    [4X   [ 2514, "S^2~S^1 (VT)" ], [ 2515, "S^2~S^1 (VT)" ] ][0X
    [4X gap> s2s1:=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^2~S^1 (VT)"[0X
    [4X  Dim=3[0X
    [4X  AltshulerSteinberg=250838208[0X
    [4X  AutomorphismGroupSize=18[0X
    [4X  AutomorphismGroupStructure="D18"[0X
    [4X  AutomorphismGroupTransitivity=1[0X
    [4X  EulerCharacteristic=0[0X
    [4X  FVector=[ 9, 36, 54, 27 ][0X
    [4X  GVector=[ 4, 10 ][0X
    [4X  HVector=[ 5, 15, 5, 1 ][0X
    [4X  HasBoundary=false[0X
    [4X  HasInterior=true[0X
    [4X  Homology=[ [ 0, [ ] ], [ 1, [ ] ], [ 0, [ 2 ] ], [ 0, [ ] ] ][0X
    [4X  IsCentrallySymmetric=false[0X
    [4X  IsConnected=true[0X
    [4X  IsEulerianManifold=true[0X
    [4X  IsOrientable=false[0X
    [4X  IsPseudoManifold=true[0X
    [4X  IsPure=true[0X
    [4X  IsStronglyConnected=true[0X
    [4X  Neighborliness=2[0X
    [4X [0X
    [4X /SimplicialComplex][0X
    [4X gap> SCInfoLevel(2); # print information while running[0X
    [4X true[0X
    [4X gap> SCIsTight(s2s1); time;[0X
    [4X #I  SCIsTight: checking non faces...[0X
    [4X #I  SCIsTight: found no contradiction so far.[0X
    [4X #I  SCIsTight: generating lookup table...[0X
    [4X #I  SCIsTight: lookup table done, size = 2304.[0X
    [4X #I  SCIsTight: computing automorphism group...[0X
    [4X #I  SCIsTight: automorphism group done, transitivity = 1.[0X
    [4X #I  SCIsTight: checking rsl-functions...[0X
    [4X #I  SCIsTight: processed 10000 of 40320 rsl-functions so far, all perfect.[0X
    [4X #I  SCIsTight: processed 20000 of 40320 rsl-functions so far, all perfect.[0X
    [4X #I  SCIsTight: processed 30000 of 40320 rsl-functions so far, all perfect.[0X
    [4X #I  SCIsTight: processed 40000 of 40320 rsl-functions so far, all perfect.[0X
    [4X true[0X
    [4X 12529[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCLib.SearchByAttribute("F[1] = 120");[0X
    [4X [ [ 7648, "Bd(600-cell)" ] ][0X
    [4X gap> id:=last[1][1];;[0X
    [4X gap> c:=SCLib.Load(id);;[0X
    [4X gap> SCIsTight(c); time;[0X
    [4X #I  SCIsTight: checking non faces...[0X
    [4X #I  SCIsTight: found non perfect rsl-function: [0X
    [4X [ 1, 3, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, [0X
    [4X   22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, [0X
    [4X   41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, [0X
    [4X   60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, [0X
    [4X   79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, [0X
    [4X   98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, [0X
    [4X   113, 114, 115, 116, 117, 118, 119, 120 ], complex not tight.[0X
    [4X false[0X
    [4X 16[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCInfoLevel(0);[0X
    [4X true[0X
    [4X gap> SCLib.SearchByName("K3");  [0X
    [4X [ [ 7494, "K3 surface" ] ][0X
    [4X gap> c:=SCLib.Load(last[1][1]);;[0X
    [4X gap> SCIsManifold(c);[0X
    [4X true[0X
    [4X gap> SCInfoLevel(2);[0X
    [4X true[0X
    [4X gap> c.IsTight;                 [0X
    [4X #I  SCIsTight: complex is (k+1)-neighborly 2k-manifold and thus tight.[0X
    [4X true[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> list:=SCLib.SearchByName("S^3xS^1");[0X
    [4X [ [ 55, "S^3xS^1 (VT)" ], [ 128, "S^3xS^1 (VT)" ], [ 399, "S^3xS^1 (VT)" ], [0X
    [4X   [ 459, "S^3xS^1 (VT)" ], [ 460, "S^3xS^1 (VT)" ], [ 461, "S^3xS^1 (VT)" ], [0X
    [4X   [ 462, "S^3xS^1 (VT)" ], [ 588, "S^3xS^1 (VT)" ], [ 612, "S^3xS^1 (VT)" ], [0X
    [4X   [ 699, "S^3xS^1 (VT)" ], [ 700, "S^3xS^1 (VT)" ], [ 701, "S^3xS^1 (VT)" ], [0X
    [4X   [ 703, "S^3xS^1 (VT)" ], [ 1078, "S^3xS^1 (VT)" ], [ 1080, "S^3xS^1 (VT)" ],[0X
    [4X   [ 1081, "S^3xS^1 (VT)" ], [ 1082, "S^3xS^1 (VT)" ], [0X
    [4X   [ 1083, "S^3xS^1 (VT)" ], [ 1084, "S^3xS^1 (VT)" ], [0X
    [4X   [ 1085, "S^3xS^1 (VT)" ], [ 1086, "S^3xS^1 (VT)" ], [0X
    [4X   [ 1087, "S^3xS^1 (VT)" ], [ 1088, "S^3xS^1 (VT)" ], [0X
    [4X   [ 1089, "S^3xS^1 (VT)" ], [ 1091, "S^3xS^1 (VT)" ], [0X
    [4X   [ 2413, "S^3xS^1 (VT)" ], [ 2470, "S^3xS^1 (VT)" ], [0X
    [4X   [ 2471, "S^3xS^1 (VT)" ], [ 2472, "S^3xS^1 (VT)" ], [0X
    [4X   [ 2473, "S^3xS^1 (VT)" ], [ 2474, "S^3xS^1 (VT)" ], [0X
    [4X   [ 2475, "S^3xS^1 (VT)" ], [ 2476, "S^3xS^1 (VT)" ], [0X
    [4X   [ 3413, "S^3xS^1 (VT)" ], [ 3414, "S^3xS^1 (VT)" ], [0X
    [4X   [ 3415, "S^3xS^1 (VT)" ], [ 3416, "S^3xS^1 (VT)" ], [0X
    [4X   [ 3417, "S^3xS^1 (VT)" ], [ 3418, "S^3xS^1 (VT)" ], [0X
    [4X   [ 3419, "S^3xS^1 (VT)" ], [ 3420, "S^3xS^1 (VT)" ], [0X
    [4X   [ 3421, "S^3xS^1 (VT)" ], [ 3422, "S^3xS^1 (VT)" ], [0X
    [4X   [ 3423, "S^3xS^1 (VT)" ], [ 3424, "S^3xS^1 (VT)" ], [0X
    [4X   [ 3425, "S^3xS^1 (VT)" ], [ 3426, "S^3xS^1 (VT)" ], [0X
    [4X   [ 3427, "S^3xS^1 (VT)" ], [ 3428, "S^3xS^1 (VT)" ], [0X
    [4X   [ 3429, "S^3xS^1 (VT)" ], [ 3430, "S^3xS^1 (VT)" ], [0X
    [4X   [ 3431, "S^3xS^1 (VT)" ], [ 3432, "S^3xS^1 (VT)" ], [0X
    [4X   [ 3433, "S^3xS^1 (VT)" ], [ 3434, "S^3xS^1 (VT)" ] ][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^3xS^1 (VT)"[0X
    [4X  Dim=4[0X
    [4X  AltshulerSteinberg=737125273600[0X
    [4X  AutomorphismGroupSize=22[0X
    [4X  AutomorphismGroupStructure="D22"[0X
    [4X  AutomorphismGroupTransitivity=1[0X
    [4X  EulerCharacteristic=0[0X
    [4X  FVector=[ 11, 55, 110, 110, 44 ][0X
    [4X  GVector=[ 5, 15, -20 ][0X
    [4X  HVector=[ 6, 21, 1, 16, -1 ][0X
    [4X  HasBoundary=false[0X
    [4X  HasInterior=true[0X
    [4X  Homology=[ [ 0, [ ] ], [ 1, [ ] ], [ 0, [ ] ], [ 1, [ ] ], [ 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=2[0X
    [4X [0X
    [4X /SimplicialComplex][0X
    [4X gap> SCInfoLevel(0);[0X
    [4X true[0X
    [4X gap> SCIsManifold(c);[0X
    [4X true[0X
    [4X gap> SCInfoLevel(2); [0X
    [4X true[0X
    [4X gap> c.IsTight;                [0X
    [4X #I  SCIsInKd: complex has transitive automorphism group, only checking one lin\[0X
    [4X k.[0X
    [4X #I  SCIsInKd: checking link 1/1[0X
    [4X #I  SCIsKStackedSphere: checking if complex is a 1-stacked sphere...[0X
    [4X #I  SCIsKStackedSphere: try 1/50[0X
    [4X #I  round 0[0X
    [4X Reduced complex, F: [ 9, 26, 34, 17 ][0X
    [4X #I  round 1[0X
    [4X Reduced complex, F: [ 8, 22, 28, 14 ][0X
    [4X #I  round 2[0X
    [4X Reduced complex, F: [ 7, 18, 22, 11 ][0X
    [4X #I  round 3[0X
    [4X Reduced complex, F: [ 6, 14, 16, 8 ][0X
    [4X #I  round 4[0X
    [4X Reduced complex, F: [ 5, 10, 10, 5 ][0X
    [4X #I  SCReduceComplexEx: computed locally minimal complex after 5 rounds.[0X
    [4X #I  SCIsKStackedSphere: complex is a 1-stacked sphere.[0X
    [4X #I  SCIsInKd: complex has transitive automorphism group, all links are [0X
    [4X 1-stacked.[0X
    [4X #I  SCIsTight: complex is in class K(1) and 2-neighborly, thus tight.[0X
    [4X true[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X11.1-2 SCMorseIsPerfect[0m
  
  [2X> SCMorseIsPerfect( [0X[3Xc, f[0X[2X ) ___________________________________________[0Xmethod
  [6XReturns:[0X  [9Xtrue[0m or [9Xfalse[0m upon success, [9Xfail[0m otherwise.
  
  Checks  whether the rsl-function [10Xf[0m is perfect on the simplicial complex [10Xc[0m or
  not.  A  rsl-function is said to be perfect, if it has the minimum number of
  critical  points,  i. e. if the sum of its critical points equals the sum of
  the Betti numbers of [10Xc[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=SCBdCyclicPolytope(4,6);;[0X
    [4X gap> SCMinimalNonFaces(c);[0X
    [4X [ [  ], [  ], [ [ 1, 3, 5 ], [ 2, 4, 6 ] ] ][0X
    [4X gap> SCMorseIsPerfect(c,[1..6]);[0X
    [4X true[0X
    [4X gap> SCMorseIsPerfect(c,[1,3,5,2,4,6]);   [0X
    [4X false[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X11.1-3 SCSlicing[0m
  
  [2X> SCSlicing( [0X[3Xcomplex, slicing[0X[2X ) ______________________________________[0Xmethod
  [6XReturns:[0X  a  facet  list of a polyhedral complex or a [10XSCNormalSurface[0m object
            upon success, [9Xfail[0m otherwise.
  
  Returns  the  pre-image  f^-1 (alpha ) of a rsl-function f on the simplicial
  complex  [3Xcomplex[0m  where  f  is  given  in  the  second argument [3Xslicing[0m by a
  partition  of  the  set  of  vertices [3Xslicing[0m=[ V_1 , V_2 ] such that f(v_1)
  (f(v_2)) is smaller (greater) than alpha for all v_1 in V_1 (v_2 in V_2).
  
  If  [3Xcomplex[0m  is  of  dimension  3,  a  [5XGAP[0m object of type [10XSCNormalSurface[0m is
  returned.  Otherwise  only  the facet list is returned. See also [2XSCNSSlicing[0m
  ([14X7.1-4[0m).
  
  The  vertex labels of the returned slicing are of the form (v_1 , v_2) where
  v_1  in  V_1 and v_2 in V_2. They represent the center points of the edges >
  v_1 , v_2 < defined by the intersection of [3Xslicing[0m with [3Xcomplex[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=SCBdCyclicPolytope(4,6);;[0X
    [4X gap> v:=SCVertices(c);[0X
    [4X [ 1, 2, 3, 4, 5, 6 ][0X
    [4X gap> SCMinimalNonFaces(c);[0X
    [4X [ [  ], [  ], [ [ 1, 3, 5 ], [ 2, 4, 6 ] ] ][0X
    [4X gap> ns:=SCSlicing(c,[v{[1,3,5]},v{[2,4,6]}]);     [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 ], [ 2, 4, 6 ] ] of Bd(C_4(6))"[0X
    [4X  Dim=2[0X
    [4X  FVector=[ 9, 18, 0, 9 ][0X
    [4X  EulerCharacteristic=0[0X
    [4X  IsOrientable=true[0X
    [4X  TopologicalType="T^2"[0X
    [4X [0X
    [4X /NormalSurface][0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> c:=SCBdSimplex(5);;[0X
    [4X gap> v:=SCVertices(c);[0X
    [4X [ 1, 2, 3, 4, 5, 6 ][0X
    [4X gap> slicing:=SCSlicing(c,[v{[1,3,5]},v{[2,4,6]}]);[0X
    [4X [ [ [ 1, 2 ], [ 1, 4 ], [ 3, 2 ], [ 3, 4 ], [ 5, 2 ], [ 5, 4 ] ], [0X
    [4X   [ [ 1, 2 ], [ 1, 4 ], [ 1, 6 ], [ 3, 2 ], [ 3, 4 ], [ 3, 6 ] ], [0X
    [4X   [ [ 1, 2 ], [ 1, 6 ], [ 3, 2 ], [ 3, 6 ], [ 5, 2 ], [ 5, 6 ] ], [0X
    [4X   [ [ 1, 2 ], [ 1, 4 ], [ 1, 6 ], [ 5, 2 ], [ 5, 4 ], [ 5, 6 ] ], [0X
    [4X   [ [ 1, 4 ], [ 1, 6 ], [ 3, 4 ], [ 3, 6 ], [ 5, 4 ], [ 5, 6 ] ], [0X
    [4X   [ [ 3, 2 ], [ 3, 4 ], [ 3, 6 ], [ 5, 2 ], [ 5, 4 ], [ 5, 6 ] ] ][0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X11.1-4 SCMorseMultiplicityVector[0m
  
  [2X> SCMorseMultiplicityVector( [0X[3Xc, f[0X[2X ) __________________________________[0Xmethod
  [6XReturns:[0X  a  list of (d+1)-tuples if [10Xc[0m is a d-dimensional simplicial complex
            upon success, [9Xfail[0m otherwise.
  
  Computes  all  multiplicity  vectors  of  a  rsl-function  [10Xf[0m on a simplicial
  complex  [10Xc[0m. [10Xf[0m is given as an ordered list (v_1 , ... v_n) of all vertices of
  [10Xc[0m  where [10Xf[0m is defined by [10Xf[0m(v_i) = fraci-1n-1. The i-th entry of the returned
  list denotes the multiplicity vector of vertex v_i.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCLib.SearchByName("K3");      [0X
    [4X [ [ 7494, "K3 surface" ] ][0X
    [4X gap> c:=SCLib.Load(last[1][1]);;    [0X
    [4X gap> f:=SCVertices(c);              [0X
    [4X [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ][0X
    [4X gap> SCMorseMultiplicityVector(c,f);[0X
    [4X [ [ 1, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0 ], [ 0, 0, 1, 0, 0 ], [0X
    [4X   [ 0, 0, 2, 0, 0 ], [ 0, 0, 1, 0, 0 ], [ 0, 0, 4, 0, 0 ], [ 0, 0, 3, 0, 0 ], [0X
    [4X   [ 0, 0, 3, 0, 0 ], [ 0, 0, 4, 0, 0 ], [ 0, 0, 1, 0, 0 ], [ 0, 0, 2, 0, 0 ], [0X
    [4X   [ 0, 0, 1, 0, 0 ], [ 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 1 ] ][0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X11.1-5 SCMorseNumberOfCriticalPoints[0m
  
  [2X> SCMorseNumberOfCriticalPoints( [0X[3Xc, f[0X[2X ) ______________________________[0Xmethod
  [6XReturns:[0X  an integer and a list upon success, [9Xfail[0m otherwise.
  
  Computes  the number of critical points of each index of a rsl-function [10Xf[0m on
  a simplicial complex [10Xc[0m as well as the total number of critical points.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X gap> SCLib.SearchByName("K3");      [0X
    [4X [ [ 7494, "K3 surface" ] ][0X
    [4X gap> c:=SCLib.Load(last[1][1]);;    [0X
    [4X gap> f:=SCVertices(c);              [0X
    [4X [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ][0X
    [4X gap> SCMorseNumberOfCriticalPoints(c,f);[0X
    [4X [ 24, [ 1, 0, 22, 0, 1 ] ][0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
