  
  [1X9 [33X[0;0YBistellar flips[133X[101X
  
  
  [1X9.1 [33X[0;0YTheory[133X[101X
  
  [33X[0;0YSince  two  combinatorial  manifolds are already considered distinct to each
  other  as  soon  as  they  are not combinatorially isomorphic, a topological
  PL-manifold  is  represented  by  a  whole class of combinatorial manifolds.
  Thus,  a  frequent  question  when  working  with combinatorial manifolds is
  whether  two  such  objects  are  PL-homeomorphic or not. One possibility to
  approach this problem, i. e. to find combinatorially distinct members of the
  class  of  a  PL-manifold,  is  a  heuristic  algorithm using the concept of
  bistellar moves.[133X
  [33X[0;0Y[12XDefinition[112X (Bistellar moves [Pac87])[133X
  [33X[0;0YLet  [22XM[122X  be  a combinatorial [22Xd[122X-manifold ([22Xd[122X-pseudomanifold), [22Xγ = ⟨ v_0 , ... ,
  v_k  ⟩[122X a [22Xk[122X-face and [22Xδ = ⟨ w_0 , ... , w_d-k ⟩[122X a [22X(d-k+1)[122X-tuple of vertices of
  [22XM[122X  that  does  not span a [22X(d-k)[122X-face in [22XM[122X, [22X0 ≤ k ≤ d[122X, such that [22X{ v_0 , ...,
  v_k  }  ∩ { w_0 , ... , w_d-k } = ∅[122X and [22X{ v_0 , ... , v_k, w_0 , ... w_k-d }[122X
  spans exactly [22Xd-k+1[122X facets. Then the operation[133X
  [33X[0;0Y[22Xκ_(γ,δ) ( M ) = M ∖ (γ ⋆ ∂ δ) ∪ (∂ γ ⋆ δ)[122X[133X
  [33X[0;0Yis called a [13Xbistellar [22X(d-k)[122X-move[113X.[133X
  [33X[0;0YIn  other words: If there exists a bouquet [22XD ⊂ M[122X of [22Xd-k+1[122X facets on a subset
  of  vertices  [22XW ⊂ V[122X of order [22Xd+2[122X with a common [22Xk[122X-face [22Xγ[122X and the complement [22Xδ[122X
  of  the  vertices  of [22Xγ[122X in [22XW[122X does not span a [22X(d-k)[122X-face in [22XM[122X we can remove [22XD[122X
  and  replace  it  by  a bouquet of [22Xk+1[122X facets [22XE ⊂ M[122X with vertex set [22XW[122X with a
  common  face spanned by [22Xδ[122X. By construction [22X∂ D = ∂ E[122X and the altered complex
  is  again  a  combinatorial [22Xd[122X-manifold ([22Xd[122X-pseudomanifold). See Fig. 11 for a
  bistellar  [22X1[122X-move  of a [22X2[122X-dimensional complex, see Fig. 12 for all bistellar
  moves in dimension [22X3[122X.[133X
  
  [33X[0;0YA  bistellar  [22X0[122X-move  is  a  [13Xstellar subdivision[113X, i. e. the subdivision of a
  facet  [22Xδ[122X  into [22Xd+1[122X new facets by introducing a new vertex at the center of [22Xδ[122X
  (cf.  Fig. 12 on the left). In particular, the vertex set of a combinatorial
  manifold  (pseudomanifold)  is  not invariant under bistellar moves. For any
  bistellar  [22X(d-k)[122X-move [22Xκ_(γ,δ)[122X we have an inverse bistellar [22Xk[122X-move [22Xκ^-1_(γ,δ)
  =  κ_(δ,γ)[122X  such  that  [22Xκ_(δ,γ) ( κ_(γ,δ) (M)) = M[122X. If for two combinatorial
  manifolds  [22XM[122X and [22XN[122X there exist a sequence of bistellar moves that transforms
  one  into  the  other,  [22XM[122X  and  [22XN[122X  are called [13Xbistellarly equivalent[113X. So far
  bistellar  moves are local operations on combinatorial manifolds that change
  its   combinatorial   type.   However,   the  strength  of  the  concept  in
  combinatorial topology is a consequence of the following[133X
  [33X[0;0Y[12XTheorem[112X (Bistellar moves [Pac87])[133X
  [33X[0;0YTwo combinatorial manifolds (pseudomanifolds) [22XM[122X and [22XN[122X are PL homeomorphic if
  and only if they are bistellarly equivalent.[133X
  [33X[0;0YUnfortunately  Pachners  theorem  does  not  guarantee that the search for a
  connecting  sequence  of  bistellar moves between [22XM[122X and [22XN[122X terminates. Hence,
  using   bistellar   moves,   we   can  not  prove  that  [22XM[122X  and  [22XN[122X  are  not
  PL-homeomorphic.  However,  there  is  a  very effective simulated annealing
  approach  that  is  able  to  give  a positive answer in a lot of cases. The
  heuristic  was  first  implemented  by  Bjoerner  and  Lutz  in  [BL00]. The
  functions presented in this chapter are based on this code which can be used
  for several tasks:[133X
  
  [33X[0;0YIn many cases the heuristic reduces a given triangulation but does not reach
  a minimal triangulation after a reasonable amount of flips. Thus, we usually
  can  not  expect  the  algorithm  to  terminate.  However, in some cases the
  program normally stops after a small number of flips:[133X
  
  [33X[0;0YTechnical  note:  Since  bistellar  flips  do  not respect the combinatorial
  properties  of  a  complex,  no  attention  to the original vertex labels is
  payed,  i.  e.  the  flipped  complex  will be relabeled whenever its vertex
  labels  become different from the standard labeling (for example after every
  reverse 0-move).[133X
  
  
  [1X9.2 [33X[0;0YFunctions for bistellar flips[133X[101X
  
  [1X9.2-1 SCBistellarOptions[101X
  
  [33X[1;0Y[29X[2XSCBistellarOptions[102X[32X global variable[133X
  
  [33X[0;0YRecord  of  global variables to adjust output an behavior of bistellar moves
  in    [2XSCIntFunc.SCChooseMove[102X    ([14X9.2-4[114X)   and   [2XSCReduceComplexEx[102X   ([14X9.2-14[114X)
  respectively.[133X
  
  [31X1[131X   [33X[0;6Y[10XBaseRelaxation[110X:  determines  the  length  of  the  relaxation  period.
        Default: [22X3[122X[133X
  
  [31X2[131X   [33X[0;6Y[10XBaseHeating[110X: determines the length of the heating period. Default: [22X4[122X[133X
  
  [31X3[131X   [33X[0;6Y[10XRelaxation[110X: value of the current relaxation period. Default: [22X0[122X[133X
  
  [31X4[131X   [33X[0;6Y[10XHeating[110X: value of the current heating period. Default: [22X0[122X[133X
  
  [31X5[131X   [33X[0;6Y[10XMaxRounds[110X:  maximal  over  all  number of bistellar flips that will be
        performed. Default: [22X500000[122X[133X
  
  [31X6[131X   [33X[0;6Y[10XMaxInterval[110X:  maximal number of bistellar flips that will be performed
        without a change of the [22Xf[122X-vector of the moved complex. Default: [22X100000[122X[133X
  
  [31X7[131X   [33X[0;6Y[10XMode[110X:  flip  mode,  [22X0[122X=reducing,  [22X1[122X=comparing, [22X2[122X=reduce as sub-complex,
        [22X3[122X=randomize. Default: [22X0[122X[133X
  
  [31X8[131X   [33X[0;6Y[10XWriteLevel[110X:  [22X0[122X=no output, [22X1[122X=storing of every vertex minimal complex to
        user library, [22X2[122X=e-mail notification. Default: [22X1[122X[133X
  
  [31X9[131X   [33X[0;6Y[10XMailNotifyIntervall[110X:  (minimum)  number  of seconds between two e-mail
        notifications. Default: [22X24 ⋅ 60 ⋅ 60[122X (one day)[133X
  
  [31X10[131X  [33X[0;6Y[10XMaxIntervalIsManifold[110X:  maximal number of bistellar flips that will be
        performed  without  a  change  of  the [22Xf[122X-vector of a vertex link while
        trying to prove that the complex is a combinatorial manifold. Default:
        [22X5000[122X[133X
  
  [31X11[131X  [33X[0;6Y[10XMaxIntervalRandomize  :=  50[110X:  number  of  flips performed to create a
        randomized sphere. Default: [22X50[122X[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> SCBistellarOptions.BaseRelaxation;[128X[104X
    [4X[28X 3[128X[104X
    [4X[28X gap> SCBistellarOptions.BaseHeating;[128X[104X
    [4X[28X 4[128X[104X
    [4X[28X gap> SCBistellarOptions.Relaxation;[128X[104X
    [4X[28X 0[128X[104X
    [4X[28X gap> SCBistellarOptions.Heating;[128X[104X
    [4X[28X 0[128X[104X
    [4X[28X gap> SCBistellarOptions.MaxRounds;[128X[104X
    [4X[28X 500000[128X[104X
    [4X[28X gap> SCBistellarOptions.MaxInterval;[128X[104X
    [4X[28X 100000[128X[104X
    [4X[28X gap> SCBistellarOptions.Mode;[128X[104X
    [4X[28X 0[128X[104X
    [4X[28X gap> SCBistellarOptions.WriteLevel;[128X[104X
    [4X[28X 0[128X[104X
    [4X[28X gap> SCBistellarOptions.MailNotifyInterval;[128X[104X
    [4X[28X 86400[128X[104X
    [4X[28X gap> SCBistellarOptions.MaxIntervalIsManifold;[128X[104X
    [4X[28X 5000[128X[104X
    [4X[28X gap> SCBistellarOptions.MaxIntervalRandomize;[128X[104X
    [4X[28X 50[128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X9.2-2 SCEquivalent[101X
  
  [33X[1;0Y[29X[2XSCEquivalent[102X( [3Xcomplex1[103X, [3Xcomplex2[103X ) [32X method[133X
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X  or  [9Xfalse[109X  upon  success,  [9Xfail[109X  or  a  list of type [10X[ fail,
            SCSimplicialComplex, Integer, facet list][110X otherwise.[133X
  
  [33X[0;0YChecks  if  the  simplicial  complex [3Xcomplex1[103X (which has to fulfill the weak
  pseudomanifold   property  with  empty  boundary)  can  be  reduced  to  the
  simplicial  complex  [3Xcomplex2[103X  via  bistellar  moves,  i. e. if [3Xcomplex1[103X and
  [3Xcomplex2[103X   are   [22XPL[122X-homeomorphic.  Note  that  in  general  the  problem  is
  undecidable. In this case [9Xfail[109X is returned.[133X
  
  [33X[0;0YIt  is  recommended to use a minimal triangulation [3Xcomplex2[103X for the check if
  possible.[133X
  
  [33X[0;0YInternally            calls            [2XSCReduceComplexEx[102X            ([14X9.2-14[114X)
  [10X(complex1,complex2,1,SCIntFunc.SCChooseMove);[110X[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> SCBistellarOptions.WriteLevel:=0;; # do not save complexes to disk[128X[104X
    [4X[28X gap> obj:=SC([[1,2],[2,3],[3,4],[4,5],[5,6],[6,1]]);; # hexagon[128X[104X
    [4X[28X gap> refObj:=SCBdSimplex(2);; # triangle as a (minimal) reference object[128X[104X
    [4X[28X gap> SCEquivalent(obj,refObj);[128X[104X
    [4X[28X #I  SCReduceComplexEx: complexes are bistellarly equivalent.[128X[104X
    [4X[28X true[128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X9.2-3 SCExamineComplexBistellar[101X
  
  [33X[1;0Y[29X[2XSCExamineComplexBistellar[102X( [3Xcomplex[103X ) [32X method[133X
  [6XReturns:[106X  [33X[0;10Ysimplicial  complex  passed as argument with additional properties
            upon success, [9Xfail[109X otherwise.[133X
  
  [33X[0;0YComputes  the  face lattice, the [22Xf[122X-vector, the AS-determinant, the dimension
  and the maximal vertex label of [3Xcomplex[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> obj:=SC([[1,2],[2,3],[3,4],[4,5],[5,6],[6,1]]);[128X[104X
    [4X[28X [SimplicialComplex[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Properties known: Dim, FacetsEx, Name, Vertices.[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Name="unnamed complex 7"[128X[104X
    [4X[28X  Dim=1[128X[104X
    [4X[28X [128X[104X
    [4X[28X /SimplicialComplex][128X[104X
    [4X[28X gap> SCExamineComplexBistellar(obj);[128X[104X
    [4X[28X [SimplicialComplex[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Properties known: AltshulerSteinberg, BoundaryEx, Dim, FVector, [128X[104X
    [4X[28X                    FacetsEx, HasBoundary, IsPseudoManifold, IsPure, [128X[104X
    [4X[28X                    Name, NumFaces[], SkelExs[], Vertices.[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Name="unnamed complex 7"[128X[104X
    [4X[28X  Dim=1[128X[104X
    [4X[28X  AltshulerSteinberg=0[128X[104X
    [4X[28X  FVector=[ 6, 6 ][128X[104X
    [4X[28X  HasBoundary=false[128X[104X
    [4X[28X  IsPseudoManifold=true[128X[104X
    [4X[28X  IsPure=true[128X[104X
    [4X[28X [128X[104X
    [4X[28X /SimplicialComplex][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X9.2-4 SCIntFunc.SCChooseMove[101X
  
  [33X[1;0Y[29X[2XSCIntFunc.SCChooseMove[102X( [3Xdim[103X, [3Xmoves[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ya  bistellar  move,  i.  e.  a  pair  of  lists upon success, [9Xfail[109X
            otherwise.[133X
  
  [33X[0;0YSince  the  problem  of  finding  a  bistellar  flip sequence that reduces a
  simplicial  complex  is undecidable, we have to use an heuristic approach to
  choose the next move.[133X
  
  [33X[0;0YThe  implemented  strategy  [10XSCIntFunc.SCChooseMove[110X  first  tries to directly
  remove  vertices, edges, [22Xi[122X-faces in increasing dimension etc. If this is not
  possible it inserts high dimensional faces in decreasing co-dimension. To do
  this  in an efficient way a number of parameters have to be adjusted, namely
  [10XSCBistellarOptions.BaseHeating[110X  and  [10XSCBistellarOptions.BaseRelaxation[110X.  See
  [2XSCBistellarOptions[102X ([14X9.2-1[114X) for further options.[133X
  
  [33X[0;0YIf this strategy does not work for you, just implement a customized strategy
  and pass it to [2XSCReduceComplexEx[102X ([14X9.2-14[114X).[133X
  
  [33X[0;0YSee [2XSCRMoves[102X ([14X9.2-10[114X) for further information.[133X
  
  [1X9.2-5 SCIsKStackedSphere[101X
  
  [33X[1;0Y[29X[2XSCIsKStackedSphere[102X( [3Xcomplex[103X, [3Xk[103X ) [32X method[133X
  [6XReturns:[106X  [33X[0;10Ya list upon success, [9Xfail[109X otherwise.[133X
  
  [33X[0;0YChecks,  whether  the  given  simplicial  complex  [3Xcomplex[103X that must be a PL
  [22Xd[122X-sphere  is  a  [3Xk[103X-stacked  sphere  with [22X1≤ k≤ ⌊fracd+22⌋[122X using a randomized
  algorithm based on bistellar moves (see [Eff11b], [Eff11a]). Note that it is
  not checked whether [3Xcomplex[103X is a PL sphere -- if not, the algorithm will not
  succeed.  Returns  a  list upon success: the first entry is a boolean, where
  [9Xtrue[109X  means  that  the complex is [10Xk[110X-stacked and [9Xfalse[109X means that the complex
  cannot  be  [3Xk[103X-stacked.  A  value  of -1 means that the question could not be
  decided.  The second argument contains a simplicial complex that, in case of
  success,   contains   the   trigangulated   [22X(d+1)[122X-ball  [22XB[122X  with  [22X∂  B=S[122X  and
  [22Xoperatornameskel_d-k(B)=operatornameskel_d-k(S)[122X,   where   [22XS[122X   denotes   the
  simplicial complex passed in [3Xcomplex[103X.[133X
  
  [33X[0;0YInternally calls [2XSCReduceComplexEx[102X ([14X9.2-14[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> SCLib.SearchByName("S^4~S^1");[128X[104X
    [4X[28X [ [ 463, "S^4~S^1 (VT)" ], [ 1474, "S^4~S^1 (VT)" ], [ 1475, "S^4~S^1 (VT)" ],[128X[104X
    [4X[28X   [ 2477, "S^4~S^1 (VT)" ], [ 4395, "S^4~S^1 (VT)" ], [128X[104X
    [4X[28X   [ 4396, "S^4~S^1 (VT)" ], [ 4397, "S^4~S^1 (VT)" ], [128X[104X
    [4X[28X   [ 4398, "S^4~S^1 (VT)" ], [ 4399, "S^4~S^1 (VT)" ], [128X[104X
    [4X[28X   [ 4402, "S^4~S^1 (VT)" ], [ 4403, "S^4~S^1 (VT)" ], [128X[104X
    [4X[28X   [ 4404, "S^4~S^1 (VT)" ] ][128X[104X
    [4X[28X gap> c:=SCLib.Load(last[1][1]);;[128X[104X
    [4X[28X gap> l:=SCLink(c,1);[128X[104X
    [4X[28X [SimplicialComplex[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Properties known: Dim, FacetsEx, Name, Vertices.[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Name="lk([ 1 ]) in S^4~S^1 (VT)"[128X[104X
    [4X[28X  Dim=4[128X[104X
    [4X[28X [128X[104X
    [4X[28X /SimplicialComplex][128X[104X
    [4X[28X gap> SCIsKStackedSphere(l,1);[128X[104X
    [4X[28X #I  SCIsKStackedSphere: checking if complex is a 1-stacked sphere...[128X[104X
    [4X[28X #I  SCIsKStackedSphere: try 1/1[128X[104X
    [4X[28X #I  SCIsKStackedSphere: complex is a 1-stacked sphere.[128X[104X
    [4X[28X [ true, [SimplicialComplex[128X[104X
    [4X[28X     [128X[104X
    [4X[28X      Properties known: Dim, FacetsEx, Name, Vertices.[128X[104X
    [4X[28X     [128X[104X
    [4X[28X      Name="Filled 1-stacked sphere (lk([ 1 ]) in S^4~S^1 (VT))"[128X[104X
    [4X[28X      Dim=5[128X[104X
    [4X[28X     [128X[104X
    [4X[28X     /SimplicialComplex] ][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X9.2-6 SCBistellarIsManifold[101X
  
  [33X[1;0Y[29X[2XSCBistellarIsManifold[102X( [3Xcomplex[103X ) [32X method[133X
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X upon success, [9Xfail[109X otherwise.[133X
  
  [33X[0;0YTries  to prove that a closed simplicial [22Xd[122X-pseudomanifold is a combinatorial
  manifold by reducing its vertex links to the boundary of the d-simplex.[133X
  
  [33X[0;0Y[9Xfalse[109X  is returned if it can be proven that there exists a vertex link which
  is  not  PL-homeomorphic  to the standard PL-sphere, [9Xtrue[109X is returned if all
  vertex links are bistellarly equivalent to the boundary of the simplex, [9Xfail[109X
  is  returned  if the algorithm does not terminate after the number of rounds
  indicated by [10XSCBistellarOptions.MaxIntervallIsManifold[110X.[133X
  
  [33X[0;0YInternally            calls            [2XSCReduceComplexEx[102X            ([14X9.2-14[114X)
  [10X(link,SCEmpty(),0,SCIntFunc.SCChooseMove);[110X  for  every link of [3Xcomplex[103X. Note
  that [9Xfalse[109X is returned in case of a bounded manifold.[133X
  
  [33X[0;0YSee  [2XSCIsManifoldEx[102X  ([14X12.1-18[114X)  and  [2XSCIsManifold[102X  ([14X12.1-17[114X) for alternative
  methods for manifold verification.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> c:=SCBdCrossPolytope(3);;[128X[104X
    [4X[28X gap> SCBistellarIsManifold(c);[128X[104X
    [4X[28X true[128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X9.2-7 SCIsMovableComplex[101X
  
  [33X[1;0Y[29X[2XSCIsMovableComplex[102X( [3Xcomplex[103X ) [32X method[133X
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X upon success, [9Xfail[109X otherwise.[133X
  
  [33X[0;0YChecks  if  a simplicial complex [3Xcomplex[103X can be modified by bistellar moves,
  i.  e.  if  it  is  a  pure  simplicial  complex  which  fulfills  the  weak
  pseudomanifold property with empty boundary.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> c:=SCBdCrossPolytope(3);;[128X[104X
    [4X[28X gap> SCIsMovableComplex(c);[128X[104X
    [4X[28X true[128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [33X[0;0YComplex with non-empty boundary:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> c:=SC([[1,2],[2,3],[3,4],[3,1]]);;[128X[104X
    [4X[28X gap> SCIsMovableComplex(c);[128X[104X
    [4X[28X false[128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X9.2-8 SCMove[101X
  
  [33X[1;0Y[29X[2XSCMove[102X( [3Xc[103X, [3Xmove[103X ) [32X method[133X
  [6XReturns:[106X  [33X[0;10Ysimplicial  complex of type [10XSCSimplicialComplex[110X upon success, [9Xfail[109X
            otherwise.[133X
  
  [33X[0;0YApplies  the bistellar move [3Xmove[103X to a simplicial complex [3Xc[103X. [3Xmove[103X is given as
  a  [22X(r+1)[122X-tuple  together with a [22X(d+1-r)[122X-tuple if [22Xd[122X is the dimension of [3Xc[103X and
  if  [3Xmove[103X  is  a [22Xr[122X-move. See [2XSCRMoves[102X ([14X9.2-10[114X) for detailed information about
  bistellar [22Xr[122X-moves.[133X
  
  [33X[0;0YNote:  [3Xmove[103X  and  [3Xc[103X should be given in standard labeling to ensure a correct
  result.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> obj:=SC([[1,2],[2,3],[3,4],[4,1]]);[128X[104X
    [4X[28X [SimplicialComplex[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Properties known: Dim, FacetsEx, Name, Vertices.[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Name="unnamed complex 5"[128X[104X
    [4X[28X  Dim=1[128X[104X
    [4X[28X [128X[104X
    [4X[28X /SimplicialComplex][128X[104X
    [4X[28X gap> moves:=SCMoves(obj);[128X[104X
    [4X[28X [ [ [ [ 1, 2 ], [  ] ], [ [ 1, 4 ], [  ] ], [ [ 2, 3 ], [  ] ], [128X[104X
    [4X[28X       [ [ 3, 4 ], [  ] ] ], [128X[104X
    [4X[28X   [ [ [ 1 ], [ 2, 4 ] ], [ [ 2 ], [ 1, 3 ] ], [ [ 3 ], [ 2, 4 ] ], [128X[104X
    [4X[28X       [ [ 4 ], [ 1, 3 ] ] ] ][128X[104X
    [4X[28X gap> obj:=SCMove(obj,last[2][1]);[128X[104X
    [4X[28X [SimplicialComplex[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Properties known: Dim, FacetsEx, Name, NumFaces[], SkelExs[], [128X[104X
    [4X[28X                    Vertices.[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Name="unnamed complex 6"[128X[104X
    [4X[28X  Dim=1[128X[104X
    [4X[28X [128X[104X
    [4X[28X /SimplicialComplex][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X9.2-9 SCMoves[101X
  
  [33X[1;0Y[29X[2XSCMoves[102X( [3Xcomplex[103X ) [32X method[133X
  [6XReturns:[106X  [33X[0;10Ya list of list of pairs of lists upon success, [9Xfail[109X otherwise.[133X
  
  [33X[0;0YSee [2XSCRMoves[102X ([14X9.2-10[114X) for further information.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> c:=SCBdCrossPolytope(3);;[128X[104X
    [4X[28X gap> moves:=SCMoves(c);[128X[104X
    [4X[28X [ [ [ [ 1, 3, 5 ], [  ] ], [ [ 1, 3, 6 ], [  ] ], [ [ 1, 4, 5 ], [  ] ], [128X[104X
    [4X[28X       [ [ 1, 4, 6 ], [  ] ], [ [ 2, 3, 5 ], [  ] ], [ [ 2, 3, 6 ], [  ] ], [128X[104X
    [4X[28X       [ [ 2, 4, 5 ], [  ] ], [ [ 2, 4, 6 ], [  ] ] ], [128X[104X
    [4X[28X   [ [ [ 1, 3 ], [ 5, 6 ] ], [ [ 1, 4 ], [ 5, 6 ] ], [ [ 1, 5 ], [ 3, 4 ] ], [128X[104X
    [4X[28X       [ [ 1, 6 ], [ 3, 4 ] ], [ [ 2, 3 ], [ 5, 6 ] ], [ [ 2, 4 ], [ 5, 6 ] ], [128X[104X
    [4X[28X       [ [ 2, 5 ], [ 3, 4 ] ], [ [ 2, 6 ], [ 3, 4 ] ], [ [ 3, 5 ], [ 1, 2 ] ], [128X[104X
    [4X[28X       [ [ 3, 6 ], [ 1, 2 ] ], [ [ 4, 5 ], [ 1, 2 ] ], [ [ 4, 6 ], [ 1, 2 ] ] ][128X[104X
    [4X[28X     , [  ] ][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X9.2-10 SCRMoves[101X
  
  [33X[1;0Y[29X[2XSCRMoves[102X( [3Xcomplex[103X, [3Xr[103X ) [32X method[133X
  [6XReturns:[106X  [33X[0;10Ya list of pairs of the form [10X[ list, list ][110X, [9Xfail[109X otherwise.[133X
  
  [33X[0;0YA  bistellar  [22Xr[122X-move  of a [22Xd[122X-dimensional combinatorial manifold [3Xcomplex[103X is a
  [22Xr[122X-face  [22Xm_1[122X  together  with  a  [22Xd-r[122X-tuple  [22Xm_2[122X where [22Xm_1[122X is a common face of
  exactly [22X(d+1-r)[122X facets and [22Xm_2[122X is not a face of [3Xcomplex[103X.[133X
  
  [33X[0;0YThe  [22Xr[122X-move removes all facets containing [22Xm_1[122X and replaces them by the [22X(r+1)[122X
  faces obtained by uniting [22Xm_2[122X with any subset of [22Xm_1[122X of order [22Xr[122X.[133X
  
  [33X[0;0YThe resulting complex is PL-homeomorphic to [3Xcomplex[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> c:=SCBdCrossPolytope(3);;[128X[104X
    [4X[28X gap> moves:=SCRMoves(c,1);[128X[104X
    [4X[28X [ [ [ 1, 3 ], [ 5, 6 ] ], [ [ 1, 4 ], [ 5, 6 ] ], [ [ 1, 5 ], [ 3, 4 ] ], [128X[104X
    [4X[28X   [ [ 1, 6 ], [ 3, 4 ] ], [ [ 2, 3 ], [ 5, 6 ] ], [ [ 2, 4 ], [ 5, 6 ] ], [128X[104X
    [4X[28X   [ [ 2, 5 ], [ 3, 4 ] ], [ [ 2, 6 ], [ 3, 4 ] ], [ [ 3, 5 ], [ 1, 2 ] ], [128X[104X
    [4X[28X   [ [ 3, 6 ], [ 1, 2 ] ], [ [ 4, 5 ], [ 1, 2 ] ], [ [ 4, 6 ], [ 1, 2 ] ] ][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X9.2-11 SCRandomize[101X
  
  [33X[1;0Y[29X[2XSCRandomize[102X( [3Xcomplex[103X[[, [3Xrounds[103X][, [3Xallowedmoves[103X]] ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ya simplicial complex upon success, [9Xfail[109X otherwise.[133X
  
  [33X[0;0YRandomizes  the  given simplicial complex [3Xcomplex[103X via bistellar moves chosen
  at  random.  By  passing  the optional array [3Xallowedmoves[103X, which has to be a
  dense array of integer values of length [10XSCDim(complex)[110X, certain moves can be
  allowed  or  forbidden  in  the  proccess. An entry [10Xallowedmoves[i]=1[110X allows
  [22X(i-1)[122X-moves  and  an  entry  [10Xallowedmoves[i]=0[110X  forbids  [22X(i-1)[122X-moves  in the
  randomization process.[133X
  
  [33X[0;0YWith  optional positive integer argument [3Xrounds[103X, the amount of randomization
  can  be controlled. The higher the value of [3Xrounds[103X, the more bistellar moves
  will  be  randomly  performed  on  [3Xcomplex[103X.  Note  that  the argument [3Xrounds[103X
  overrides  the  global setting [10XSCBistellarOptions.MaxIntervalRandomize[110X (this
  value   is   used,   if   [3Xrounds[103X   is   not   specified).  Internally  calls
  [2XSCReduceComplexEx[102X ([14X9.2-14[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> c:=SCRandomize(SCBdSimplex(4));[128X[104X
    [4X[28X [SimplicialComplex[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Properties known: Dim, FacetsEx, Name, Vertices.[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Name="Randomized S^3_5"[128X[104X
    [4X[28X  Dim=3[128X[104X
    [4X[28X [128X[104X
    [4X[28X /SimplicialComplex][128X[104X
    [4X[28X gap> c.F;[128X[104X
    [4X[28X [ 16, 65, 98, 49 ][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X9.2-12 SCReduceAsSubcomplex[101X
  
  [33X[1;0Y[29X[2XSCReduceAsSubcomplex[102X( [3Xcomplex1[103X, [3Xcomplex2[103X ) [32X method[133X
  [6XReturns:[106X  [33X[0;10Y[10XSCBistellarOptions.WriteLevel=0[110X:  a  triple of the form [10X[ boolean,
            simplicial  complex,  rounds  performed  ][110X upon termination of the
            algorithm.[133X
  
            [33X[0;10Y[10XSCBistellarOptions.WriteLevel=1[110X: A library of simplicial complexes
            with  a  number  of  complexes from the reducing process and (upon
            termination)  a  triple of the form [10X[ boolean, simplicial complex,
            rounds performed ][110X.[133X
  
            [33X[0;10Y[10XSCBistellarOptions.WriteLevel=2[110X:  A mail in case a smaller version
            of  [3Xcomplex1[103X  was  found, a library of simplicial complexes with a
            number   of   complexes   from  the  reducing  process  and  (upon
            termination)  a  triple of the form [10X[ boolean, simplicial complex,
            rounds performed ][110X.[133X
  
            [33X[0;10YReturns [9Xfail[109X upon an error.[133X
  
  [33X[0;0YReduces  a  simplicial  complex [3Xcomplex1[103X (satisfying the weak pseudomanifold
  property  with  empty  boundary)  as a sub-complex of the simplicial complex
  [3Xcomplex2[103X.[133X
  
  [33X[0;0YMain  application:  Reduce  a  sub-complex  of  the  cross  polytope without
  introducing diagonals.[133X
  
  [33X[0;0YInternally            calls            [2XSCReduceComplexEx[102X            ([14X9.2-14[114X)
  [10X(complex1,complex2,2,SCIntFunc.SCChooseMove);[110X[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> c:=SCFromFacets([[1,3],[3,5],[4,5],[4,1]]);;[128X[104X
    [4X[28X gap> SCBistellarOptions.WriteLevel:=0;; # do not save complexes                      [128X[104X
    [4X[28X gap> SCReduceAsSubcomplex(c,SCBdCrossPolytope(3));[128X[104X
    [4X[28X [ true, [SimplicialComplex[128X[104X
    [4X[28X     [128X[104X
    [4X[28X      Properties known: Dim, FacetsEx, Name, Vertices.[128X[104X
    [4X[28X     [128X[104X
    [4X[28X      Name="unnamed complex 36"[128X[104X
    [4X[28X      Dim=1[128X[104X
    [4X[28X     [128X[104X
    [4X[28X     /SimplicialComplex], 1 ][128X[104X
  [4X[32X[104X
  
  [1X9.2-13 SCReduceComplex[101X
  
  [33X[1;0Y[29X[2XSCReduceComplex[102X( [3Xcomplex[103X ) [32X method[133X
  [6XReturns:[106X  [33X[0;10Y[10XSCBistellarOptions.WriteLevel=0[110X:  a  triple of the form [10X[ boolean,
            simplicial  complex,  rounds  performed  ][110X upon termination of the
            algorithm.[133X
  
            [33X[0;10Y[10XSCBistellarOptions.WriteLevel=1[110X: A library of simplicial complexes
            with  a  number  of  complexes from the reducing process and (upon
            termination)  a  triple of the form [10X[ boolean, simplicial complex,
            rounds performed ][110X.[133X
  
            [33X[0;10Y[10XSCBistellarOptions.WriteLevel=2[110X:  A mail in case a smaller version
            of  [3Xcomplex1[103X  was  found, a library of simplicial complexes with a
            number   of   complexes   from  the  reducing  process  and  (upon
            termination)  a  triple of the form [10X[ boolean, simplicial complex,
            rounds performed ][110X.[133X
  
            [33X[0;10YReturns [9Xfail[109X upon an error..[133X
  
  [33X[0;0YReduces a pure simplicial complex [3Xcomplex[103X satisfying the weak pseudomanifold
  property  via  bistellar  moves. Internally calls [2XSCReduceComplexEx[102X ([14X9.2-14[114X)
  [10X(complex,SCEmpty(),0,SCIntFunc.SCChooseMove);[110X[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> obj:=SC([[1,2],[2,3],[3,4],[4,5],[5,6],[6,1]]);; # hexagon[128X[104X
    [4X[28X gap> SCBistellarOptions.WriteLevel:=0;; # do not save complexes                      [128X[104X
    [4X[28X gap> tmp := SCReduceComplex(obj);[128X[104X
    [4X[28X [ true, [SimplicialComplex[128X[104X
    [4X[28X     [128X[104X
    [4X[28X      Properties known: Dim, FacetsEx, Name, Vertices.[128X[104X
    [4X[28X     [128X[104X
    [4X[28X      Name="unnamed complex 27"[128X[104X
    [4X[28X      Dim=1[128X[104X
    [4X[28X     [128X[104X
    [4X[28X     /SimplicialComplex], 3 ][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X9.2-14 SCReduceComplexEx[101X
  
  [33X[1;0Y[29X[2XSCReduceComplexEx[102X( [3Xcomplex[103X, [3XrefComplex[103X, [3Xmode[103X, [3Xchoosemove[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Y[10XSCBistellarOptions.WriteLevel=0[110X:  a  triple of the form [10X[ boolean,
            simplicial complex, rounds ][110X upon termination of the algorithm.[133X
  
            [33X[0;10Y[10XSCBistellarOptions.WriteLevel=1[110X: A library of simplicial complexes
            with  a  number  of  complexes from the reducing process and (upon
            termination)  a  triple of the form [10X[ boolean, simplicial complex,
            rounds ][110X.[133X
  
            [33X[0;10Y[10XSCBistellarOptions.WriteLevel=2[110X:  A mail in case a smaller version
            of  [3Xcomplex1[103X  was  found, a library of simplicial complexes with a
            number   of   complexes   from  the  reducing  process  and  (upon
            termination)  a  triple of the form [10X[ boolean, simplicial complex,
            rounds ][110X.[133X
  
            [33X[0;10YReturns [9Xfail[109X upon an error.[133X
  
  [33X[0;0YReduces a pure simplicial complex [3Xcomplex[103X satisfying the weak pseudomanifold
  property via bistellar moves [3Xmode = 0[103X, compares it to the simplicial complex
  [3XrefComplex[103X  ([3Xmode  = 1[103X) or reduces it as a sub-complex of [3XrefComplex[103X ([3Xmode =
  2[103X).[133X
  
  [33X[0;0Y[3Xchoosemove[103X   is   a   function   containing   a   flip  strategy,  see  also
  [2XSCIntFunc.SCChooseMove[102X ([14X9.2-4[114X).[133X
  
  [33X[0;0YThe  currently  smallest  complex  is stored to the variable [10XminComplex[110X, the
  currently smallest [22Xf[122X-vector to [10XminF[110X. Note that in general the algorithm will
  not  stop  until the maximum number of rounds is reached. You can adjust the
  maximum  number  of  rounds via the property [2XSCBistellarOptions[102X ([14X9.2-1[114X). The
  number  of  rounds  performed  is  returned in the third entry of the triple
  returned by this function.[133X
  
  [33X[0;0YThis function is called by[133X
  
  [31X1[131X   [33X[0;6Y[2XSCReduceComplex[102X ([14X9.2-13[114X),[133X
  
  [31X2[131X   [33X[0;6Y[2XSCEquivalent[102X ([14X9.2-2[114X),[133X
  
  [31X3[131X   [33X[0;6Y[2XSCReduceAsSubcomplex[102X ([14X9.2-12[114X),[133X
  
  [31X4[131X   [33X[0;6Y[2XSCBistellarIsManifold[102X ([14X9.2-6[114X).[133X
  
  [31X5[131X   [33X[0;6Y[2XSCRandomize[102X ([14X9.2-11[114X).[133X
  
  [33X[0;0YPlease  see [2XSCMailIsPending[102X ([14X15.2-3[114X) for further information about the email
  notification system in case [10XSCBistellarOptions.WriteLevel[110X is set to [22X2[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> c:=SCBdCrossPolytope(4);;[128X[104X
    [4X[28X gap> SCBistellarOptions.WriteLevel:=0;; # do not save complexes                      [128X[104X
    [4X[28X gap> SCReduceComplexEx(c,SCEmpty(),0,SCIntFunc.SCChooseMove);[128X[104X
    [4X[28X [ true, [SimplicialComplex[128X[104X
    [4X[28X     [128X[104X
    [4X[28X      Properties known: Dim, FacetsEx, Name, Vertices.[128X[104X
    [4X[28X     [128X[104X
    [4X[28X      Name="unnamed complex 13"[128X[104X
    [4X[28X      Dim=3[128X[104X
    [4X[28X     [128X[104X
    [4X[28X     /SimplicialComplex], 7 ][128X[104X
    [4X[28X gap> SCReduceComplexEx(c,SCEmpty(),0,SCIntFunc.SCChooseMove);[128X[104X
    [4X[28X [ true, [SimplicialComplex[128X[104X
    [4X[28X     [128X[104X
    [4X[28X      Properties known: Dim, FacetsEx, Name, Vertices.[128X[104X
    [4X[28X     [128X[104X
    [4X[28X      Name="unnamed complex 18"[128X[104X
    [4X[28X      Dim=3[128X[104X
    [4X[28X     [128X[104X
    [4X[28X     /SimplicialComplex], 9 ][128X[104X
    [4X[28X gap> SCMailSetAddress("johndoe@somehost");   [128X[104X
    [4X[28X true[128X[104X
    [4X[28X gap> SCMailIsEnabled();                     [128X[104X
    [4X[28X true[128X[104X
    [4X[28X gap> SCReduceComplexEx(c,SCEmpty(),0,SCIntFunc.SCChooseMove);[128X[104X
    [4X[28X [ true, [SimplicialComplex[128X[104X
    [4X[28X     [128X[104X
    [4X[28X      Properties known: Dim, FacetsEx, Name, Vertices.[128X[104X
    [4X[28X     [128X[104X
    [4X[28X      Name="unnamed complex 23"[128X[104X
    [4X[28X      Dim=3[128X[104X
    [4X[28X     [128X[104X
    [4X[28X     /SimplicialComplex], 7 ][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [33X[0;0YContent of sent mail:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X Greetings master,[128X[104X
    [4X[28X [128X[104X
    [4X[28X this is simpcomp 2.1.9 running on comp01.maths.fancytown.edu[128X[104X
    [4X[28X[128X[104X
    [4X[28X I have been working hard for 0 seconds and have a message for you, see below.[128X[104X
    [4X[28X [128X[104X
    [4X[28X #### START MESSAGE ####[128X[104X
    [4X[28X [128X[104X
    [4X[28X SCReduceComplex:[128X[104X
    [4X[28X [128X[104X
    [4X[28X Computed locally minimal complex after 7 rounds:[128X[104X
    [4X[28X [128X[104X
    [4X[28X [SimplicialComplex[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Properties known: Boundary, Chi, Date, Dim, F, Faces, Facets, G, H,[128X[104X
    [4X[28X  HasBoundary, Homology, IsConnected, IsManifold, IsPM, Name, SCVertices,[128X[104X
    [4X[28X  Vertices.[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Name="ReducedComplex_5_vertices_7"[128X[104X
    [4X[28X  Dim=3[128X[104X
    [4X[28X  Chi=0[128X[104X
    [4X[28X  F=[ 5, 10, 10, 5 ][128X[104X
    [4X[28X  G=[ 0, 0 ][128X[104X
    [4X[28X  H=[ 1, 1, 1, 1 ][128X[104X
    [4X[28X  HasBoundary=false[128X[104X
    [4X[28X  Homology=[ [ 0, [ ] ], [ 0, [ ] ], [ 0, [ ] ], [ 1, [ ] ] ][128X[104X
    [4X[28X  IsConnected=true[128X[104X
    [4X[28X  IsPM=true[128X[104X
    [4X[28X [128X[104X
    [4X[28X /SimplicialComplex][128X[104X
    [4X[28X [128X[104X
    [4X[28X ##### END MESSAGE #####[128X[104X
    [4X[28X [128X[104X
    [4X[28X That's all, I hope this is good news! Have a nice day.[128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X9.2-15 SCReduceComplexFast[101X
  
  [33X[1;0Y[29X[2XSCReduceComplexFast[102X( [3Xcomplex[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ya simplicial complex upon success, [9Xfail[109X otherwise.[133X
  
  [33X[0;0YSame as [2XSCReduceComplex[102X ([14X9.2-13[114X), but calls an external binary provided with
  the simpcomp package.[133X
  
