This is Triangulations.info, produced by Macaulay2, version 1.26.06

Triangulations -- generating and manipulating triangulations of point or vector configurations
**********************************************************************************************

Description
===========

Warning! This package is experimental, and the interface may still be cleaned
up and changed (including defaults of optional arguments).  Use only if that
bothers you not!

Data of a triangulation
=======================

  * Triangulation -- a triangulation of a point or vector
    configuration
  * triangulation(Matrix,List) -- make a Triangulation
    object
  * max(Triangulation) -- the maximal simplices
    of a triangulation
  * vectors(Triangulation) -- the column vectors of the
    configuration underlying a triangulation
  * matrix(Triangulation) -- the matrix whose
    columns are the points of a triangulation

Creating triangulations
=======================

  * allTriangulations(Matrix) -- use
    topcom to generate all triangulations of a point or vector configuration
  * someTriangulation(Matrix) -- a triangulation of a
    point or vector configuration, not necessarily fine or regular
  * regularFineTriangulation -- a regular fine
    triangulation of a point or vector configuration
  * regularFineStarTriangulation(Matrix),
    -- a regular fine star triangulation of a polytope's boundary
  * regularFineFanTriangulation(Matrix), --
    a regular fine star fan triangulation of a vector configuration
  * fineStarTriangulation(Matrix,List) -- refine
    a triangulation to a fine star triangulation by coning over a center
  * makeFine(Triangulation) -- walk to a fine triangulation by
    support-increasing bistellar flips
  * generateTriangulations(Triangulation) (missing documentation)

Properties of triangulations
============================

  * isWellDefined(Triangulation), --
    test whether the simplices of a triangulation form a valid triangulation
  * isRegularTriangulation(Triangulation), --
    determine if a given triangulation is a regular triangulation
  * regularTriangulationWeights(Triangulation)
    -- height vector inducing a regular
    triangulation, if one exists
  * isStar(Triangulation) -- test whether a triangulation is a
    star with respect to its last point
  * isFine(Triangulation) -- test whether a triangulation uses
    every point in the configuration

Exploring the set of triangulations
===================================

  * flipCandidates(Triangulation) -- candidate affine
    circuits for bistellar flips of a triangulation
  * flips(Triangulation) -- legal bistellar flips of a
    triangulation, computed via topcom
  * bistellarFlip(Triangulation,List) -- perform a
    bistellar flip on a triangulation
  * neighbors(Triangulation) -- triangulations adjacent to a
    given one in the bistellar-flip graph
  * flipGraph(Triangulation) -- bistellar-flip graph of a
    point or vector configuration

Volumes and GKZ vectors
=======================

  * volumeVector(Triangulation) -- the GKZ vector
    (per-vertex/per-ray volume sum) of a triangulation

Delaunay subdivisions
=====================

  * delaunayWeights(Matrix) -- squared-norm weights
    inducing the Delaunay subdivision of a point set
  * delaunaySubdivision(Matrix) -- the Delaunay
    subdivision of a point set

Chirotopes
==========

  * Chirotope -- the chirotope (oriented matroid) of a point
    or vector configuration
  * chirotope(Matrix) -- compute the chirotope of a point or
    vector configuration
  * naiveChirotope(Matrix) -- compute the chirotope of a
    configuration via determinants in Macaulay2

This package is designed to help compute and explore the set of all (or many)
triangulations of a point set or a vector configuration.

We give a sample use of this package.

+-----------------------------------------------------------------------------+
|i1 : LP = {{-1, 0, -1, 1}, {-1, 0, 1, 0}, {-1, 0, 2, -1}, {-1, 1, -1, 0}, {1,|
|                                                                             |
|o1 = {{-1, 0, -1, 1}, {-1, 0, 1, 0}, {-1, 0, 2, -1}, {-1, 1, -1, 0}, {1, 0,  |
|     ------------------------------------------------------------------------|
|     -1, 0}, {1, 0, 1, 0}, {2, -1, -1, 0}, {0, 0, 1, 0}, {1, 0, 0, 0}, {0, 0,|
|     ------------------------------------------------------------------------|
|     0, 0}}                                                                  |
|                                                                             |
|o1 : List                                                                    |
|-----------------------------------------------------------------------------|
|0, -1, 0}, {1, 0, 1, 0}, {2, -1, -1, 0}, {0, 0, 1, 0}, {1, 0, 0, 0},         |
|-----------------------------------------------------------------------------|
|{0,0,0,0}}                                                                   |
+-----------------------------------------------------------------------------+
|i2 : A = transpose matrix LP                                                 |
|                                                                             |
|o2 = | -1 -1 -1 -1 1  1 2  0 1 0 |                                           |
|     | 0  0  0  1  0  0 -1 0 0 0 |                                           |
|     | -1 1  2  -1 -1 1 -1 1 0 0 |                                           |
|     | 1  0  -1 0  0  0 0  0 0 0 |                                           |
|                                                                             |
|              4       10                                                     |
|o2 : Matrix ZZ  <-- ZZ                                                       |
+-----------------------------------------------------------------------------+
|i3 : elapsedTime Ts = allTriangulations(A, Fine => true);                    |
| -- .105944s elapsed                                                         |
+-----------------------------------------------------------------------------+
|i4 : select(Ts, T -> isStar T)                                               |
|                                                                             |
|o4 = {triangulation {{0, 1, 2, 3, 9}, {0, 1, 2, 6, 9}, {0, 1, 3, 7, 9}, {0,  |
|     ------------------------------------------------------------------------|
|     1, 6, 7, 9}, {0, 2, 3, 6, 9}, {0, 3, 4, 6, 9}, {0, 3, 4, 8, 9}, {0, 3,  |
|     ------------------------------------------------------------------------|
|     5, 7, 9}, {0, 3, 5, 8, 9}, {0, 4, 6, 8, 9}, {0, 5, 6, 7, 9}, {0, 5, 6,  |
|     ------------------------------------------------------------------------|
|     8, 9}, {1, 2, 3, 7, 9}, {1, 2, 6, 7, 9}, {2, 3, 4, 6, 9}, {2, 3, 4, 8,  |
|     ------------------------------------------------------------------------|
|     9}, {2, 3, 5, 7, 9}, {2, 3, 5, 8, 9}, {2, 4, 6, 8, 9}, {2, 5, 6, 7, 9}, |
|     ------------------------------------------------------------------------|
|     {2, 5, 6, 8, 9}}}                                                       |
|                                                                             |
|o4 : List                                                                    |
+-----------------------------------------------------------------------------+
|i5 : #oo == 1                                                                |
|                                                                             |
|o5 = true                                                                    |
+-----------------------------------------------------------------------------+
|i6 : #Ts == 51                                                               |
|                                                                             |
|o6 = true                                                                    |
+-----------------------------------------------------------------------------+
|i7 : T = regularFineTriangulation A                                          |
|                                                                             |
|o7 = triangulation {{0, 1, 2, 3, 9}, {0, 1, 2, 6, 9}, {0, 1, 3, 7, 9}, {0, 1,|
|                                                                             |
|o7 : Triangulation                                                           |
|-----------------------------------------------------------------------------|
|6, 7, 9}, {0, 2, 3, 4, 6}, {0, 2, 3, 4, 9}, {0, 2, 4, 6, 9}, {0, 3, 4, 7, 8},|
|-----------------------------------------------------------------------------|
|{0, 3, 4, 7, 9}, {0, 3, 5, 7, 8}, {0, 4, 6, 7, 8}, {0, 4, 6, 7, 9}, {0, 5, 6,|
|-----------------------------------------------------------------------------|
|7, 8}, {1, 2, 3, 7, 9}, {1, 2, 6, 7, 9}, {2, 3, 4, 7, 8}, {2, 3, 4, 7, 9},   |
|-----------------------------------------------------------------------------|
|{2, 3, 5, 7, 8}, {2, 4, 6, 7, 8}, {2, 4, 6, 7, 9}, {2, 5, 6, 7, 8}}          |
+-----------------------------------------------------------------------------+
|i8 : elapsedTime Ts2 = generateTriangulations T;                             |
| -- 2.28265s elapsed                                                         |
+-----------------------------------------------------------------------------+
|i9 : #Ts2 == #Ts                                                             |
|                                                                             |
|o9 = true                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * Polyhedra -- convex polyhedra
  * Topcom -- interface to the topcom software package
    which in particular computes triangulations
  * ReflexivePolytopesDB -- simple access to
    Kreuzer-Skarke database of reflexive polytopes of dimensions 3 and 4

Author
======

  * Mike Stillman (see https://mikestillman.github.io ) <mike@math.cornell.edu>

Version
=======

This documentation describes version 0.6 of Triangulations, released 5 June
2026.

Citation
========

If you have used this package in your research, please cite it as follows:

+-----------------------------------------------------------------------------+
|@misc{TriangulationsSource,                                                  |
|  title = {{Triangulations: triangulations of polyhedra and point            |
|  author = {Mike Stillman},                                                  |
|  howpublished = {A \emph{Macaulay2} package available at                    |
|    \url{https://github.com/Macaulay2/M2/tree/stable/M2/Macaulay2/           |
|}                                                                            |
|-----------------------------------------------------------------------------|
|sets. Version~0.6}},                                                         |
|                                                                             |
|                                                                             |
|packages}}                                                                   |
+-----------------------------------------------------------------------------+

Exports
=======

  * Types
      * Chirotope -- the chirotope (oriented matroid) of a
        point or vector configuration
      * Triangulation -- a triangulation of a point or
        vector configuration
  * Functions and commands
      * "allTriangulations" -- see allTriangulations(Matrix),
        -- use topcom to generate all
        triangulations of a point or vector configuration
      * bistellarFlip -- perform a bistellar flip on a
        triangulation
      * chirotope -- compute the chirotope of a point or
        vector configuration
      * degreeMatrix -- charge matrix Q whose rows
        generate ker A
      * delaunaySubdivision -- the Delaunay
        subdivision of a point set
      * delaunayWeights -- squared-norm weights
        inducing the Delaunay subdivision of a point set
      * fineStarTriangulation -- refine a
        triangulation to a fine star triangulation by coning over a center
      * flipCandidates -- candidate affine circuits for
        bistellar flips of a triangulation
      * flipGraph -- bistellar-flip graph of a point or
        vector configuration
      * flips -- legal bistellar flips of a triangulation,
        computed via topcom
      * generateTriangulations -- generate all
        triangulations with certain properties
      * gkzVector (missing documentation)
      * isFine -- test whether a triangulation uses every point
        in the configuration
      * isRegularTriangulation -- determine if a
        given triangulation is a regular triangulation
      * isStar -- test whether a triangulation is a star with
        respect to its last point
      * makeFine -- walk to a fine triangulation by
        support-increasing bistellar flips
      * naiveChirotope -- compute the chirotope of a
        configuration via determinants in Macaulay2
      * neighbors -- triangulations adjacent to a given one
        in the bistellar-flip graph
      * regularFineFanTriangulation -- a
        regular fine star fan triangulation of a vector configuration
      * regularFineStarTriangulation -- a
        regular fine star triangulation of a polytope's boundary
      * regularFineTriangulation -- a regular
        fine triangulation of a point or vector configuration
      * regularTriangulationWeights, --
        height vector inducing a regular triangulation, if one exists
      * secondaryCone -- secondary cone of a
        triangulation, in charge-lattice coordinates
      * someTriangulation -- a triangulation of a
        point or vector configuration, not necessarily fine or regular
      * triangulation -- make a Triangulation object
      * vectors -- the column vectors of the configuration
        underlying a triangulation
      * volumeVector -- the GKZ vector (per-vertex/per-ray
        volume sum) of a triangulation
      * wallCircuits -- distinct codim-2 wall circuits of
        a triangulation, with sign convention
  * Methods
      * allTriangulations(Matrix) -- use
        topcom to generate all triangulations of a point or vector
        configuration
      * "bistellarFlip(List,List)" -- see bistellarFlip,
        -- perform a bistellar flip on a triangulation
      * "bistellarFlip(Triangulation,List)" -- see bistellarFlip,
        -- perform a bistellar flip on a triangulation
      * "chirotope(Matrix)" -- see chirotope, -- compute the
        chirotope of a point or vector configuration
      * "chirotope(String)" -- see chirotope, -- compute the
        chirotope of a point or vector configuration
      * Chirotope == Chirotope (missing documentation)
      * "degreeMatrix(Matrix)" -- see degreeMatrix, --
        charge matrix Q whose rows generate ker A
      * "degreeMatrix(Triangulation)" -- see degreeMatrix,
        -- charge matrix Q whose rows generate ker A
      * "delaunaySubdivision(Matrix)" -- see delaunaySubdivision,
        -- the Delaunay subdivision of a point set
      * "delaunayWeights(Matrix)" -- see delaunayWeights,
        -- squared-norm weights inducing the Delaunay
        subdivision of a point set
      * "fineStarTriangulation(Matrix,List)" -- see
        fineStarTriangulation, -- refine a triangulation
        to a fine star triangulation by coning over a center
      * "flipCandidates(Matrix,List)" -- see flipCandidates,
        -- candidate affine circuits for bistellar flips of a
        triangulation
      * "flipCandidates(Triangulation)" -- see flipCandidates,
        -- candidate affine circuits for bistellar flips of a
        triangulation
      * "flipGraph(Matrix)" -- see flipGraph, --
        bistellar-flip graph of a point or vector configuration
      * "flipGraph(Matrix,List)" -- see flipGraph, --
        bistellar-flip graph of a point or vector configuration
      * "flipGraph(Triangulation)" -- see flipGraph, --
        bistellar-flip graph of a point or vector configuration
      * "flips(Triangulation)" -- see flips, -- legal bistellar
        flips of a triangulation, computed via topcom
      * "generateTriangulations(Matrix)" -- see generateTriangulations,
        -- generate all triangulations with certain
        properties
      * generateTriangulations(Matrix,List) (missing documentation)
      * generateTriangulations(Triangulation) (missing documentation)
      * "isFine(Matrix,List)" -- see isFine, -- test whether a
        triangulation uses every point in the configuration
      * "isFine(Triangulation)" -- see isFine, -- test whether a
        triangulation uses every point in the configuration
      * "isRegularTriangulation(Matrix,List)" -- see
        isRegularTriangulation, -- determine if a given
        triangulation is a regular triangulation
      * "isRegularTriangulation(Triangulation)" -- see
        isRegularTriangulation, -- determine if a given
        triangulation is a regular triangulation
      * "isStar(Matrix,List)" -- see isStar, -- test whether a
        triangulation is a star with respect to its last point
      * "isStar(Triangulation)" -- see isStar, -- test whether a
        triangulation is a star with respect to its last point
      * isWellDefined(Triangulation),
        -- test whether the simplices of a triangulation form a valid
        triangulation
      * "makeFine(Triangulation)" -- see makeFine, -- walk to a
        fine triangulation by support-increasing bistellar flips
      * matrix(Triangulation) -- the matrix
        whose columns are the points of a triangulation
      * max(Triangulation) -- the maximal
        simplices of a triangulation
      * "naiveChirotope(Matrix)" -- see naiveChirotope,
        -- compute the chirotope of a configuration via determinants in
        Macaulay2
      * "neighbors(Triangulation)" -- see neighbors, --
        triangulations adjacent to a given one in the bistellar-flip graph
      * net(Triangulation) (missing documentation)
      * "regularFineFanTriangulation(Matrix)" -- see
        regularFineFanTriangulation, -- a regular
        fine star fan triangulation of a vector configuration
      * "regularFineStarTriangulation(Matrix)" -- see
        regularFineStarTriangulation, -- a
        regular fine star triangulation of a polytope's boundary
      * "regularFineTriangulation(Matrix)" -- see
        regularFineTriangulation, -- a regular fine
        triangulation of a point or vector configuration
      * "regularFineTriangulation(Triangulation)" -- see
        regularFineTriangulation, -- a regular fine
        triangulation of a point or vector configuration
      * "regularTriangulationWeights(Matrix,List)" -- see
        regularTriangulationWeights, -- height
        vector inducing a regular triangulation, if one exists
      * "regularTriangulationWeights(Triangulation)" -- see
        regularTriangulationWeights, -- height
        vector inducing a regular triangulation, if one exists
      * "secondaryCone(Matrix,List)" -- see secondaryCone,
        -- secondary cone of a triangulation, in charge-lattice coordinates
      * "secondaryCone(Triangulation)" -- see secondaryCone,
        -- secondary cone of a triangulation, in charge-lattice
        coordinates
      * "someTriangulation(Matrix)" -- see someTriangulation,
        -- a triangulation of a point or vector
        configuration, not necessarily fine or regular
      * toExternalString(Triangulation) (missing documentation)
      * topcomIsRegularTriangulation(Triangulation) (missing documentation)
      * topcomRegularTriangulationWeights(Triangulation) (missing
        documentation)
      * toString(Chirotope) (missing documentation)
      * toString(Triangulation) (missing documentation)
      * "triangulation(List,List)" -- see triangulation,
        -- make a Triangulation object
      * "triangulation(Matrix,List)" -- see triangulation,
        -- make a Triangulation object
      * Triangulation == Triangulation (missing documentation)
      * "vectors(Triangulation)" -- see vectors, -- the column
        vectors of the configuration underlying a triangulation
      * "volumeVector(Matrix,List)" -- see volumeVector, --
        the GKZ vector (per-vertex/per-ray volume sum) of a triangulation
      * "volumeVector(Triangulation)" -- see volumeVector,
        -- the GKZ vector (per-vertex/per-ray volume sum) of a triangulation
      * "wallCircuits(Matrix,List)" -- see wallCircuits, --
        distinct codim-2 wall circuits of a triangulation, with sign convention
      * "wallCircuits(Triangulation)" -- see wallCircuits,
        -- distinct codim-2 wall circuits of a triangulation, with sign
        convention
  * Symbols
      * ConeIndex -- optional argument: index of the cone
        center for star triangulations
      * Edges (missing documentation)
      * "DegreeMatrix" -- see secondaryCone, -- secondary
        cone of a triangulation, in charge-lattice coordinates

For the programmer
==================

The object Triangulations, is a package (Macaulay2Doc),
defined in Triangulations.m2.

-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:1094:0.

allTriangulations(Matrix) -- use topcom to generate all triangulations of a point or vector configuration
*********************************************************************************************************

  * Function: allTriangulations,
  * Usage:
        allTriangulations A
        allTriangulations(A, Homogenize => true, Fine => true, RegularOnly => true)
  * Inputs:
      * A, a matrix (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * Homogenize => a Boolean value (Macaulay2Doc), default
        value true
      * ConnectedToRegular => a Boolean value (Macaulay2Doc),
        default value true
      * Fine => a Boolean value (Macaulay2Doc), default value
        false
      * RegularOnly => a Boolean value (Macaulay2Doc), default
        value true
  * Outputs:
      * a list (Macaulay2Doc),

Description
===========

This function constructs all triangulations of the point set corresponding to
$A$ (or triangulation of the cone over $A$, if Homogenize => false is given.
With no optional arguments, the default is to construct all regular
triangulations.

This function is a wrapper for the topcom function
topcomAllTriangulations (Topcom), and has
the same optional arguments as that function. This function returns a list of
Triangulation,'s.

A triangulation is a list of list of the indices of the maximal simplices in
the triangulation. (the index of the point corresponding to the $i$-th column
(starting at $0$) is simply $i$.

For example, the following point set is the smallest which has a non-regular
triangulation.

+-----------------------------------------------------------------------------+
|i1 : A = transpose matrix {{0,3},{0,1},{-1,-1},{1,-1},{-4,-2},{4,-2}}        |
|                                                                             |
|o1 = | 0 0 -1 1  -4 4  |                                                     |
|     | 3 1 -1 -1 -2 -2 |                                                     |
|                                                                             |
|              2       6                                                      |
|o1 : Matrix ZZ  <-- ZZ                                                       |
+-----------------------------------------------------------------------------+
|i2 : Ts = allTriangulations A                                                |
|                                                                             |
|o2 = {triangulation {{0, 1, 2}, {0, 1, 3}, {0, 2, 4}, {0, 3, 5}, {1, 2, 3},  |
|     ------------------------------------------------------------------------|
|     {2, 3, 4}, {3, 4, 5}}, triangulation {{0, 1, 2}, {0, 1, 3}, {0, 2, 4},  |
|     ------------------------------------------------------------------------|
|     {0, 3, 5}, {1, 2, 3}, {2, 3, 5}, {2, 4, 5}}, triangulation {{0, 1, 3},  |
|     ------------------------------------------------------------------------|
|     {0, 1, 4}, {0, 3, 5}, {1, 2, 3}, {1, 2, 4}, {2, 3, 4}, {3, 4, 5}},      |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 2, 3}, {0, 2, 4}, {0, 3, 5}, {2, 3, 4}, {3, 4, 5}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 3, 4}, {0, 3, 5}, {3, 4, 5}}, triangulation {{0, 2,  |
|     ------------------------------------------------------------------------|
|     3}, {0, 2, 4}, {0, 3, 5}, {2, 3, 5}, {2, 4, 5}}, triangulation {{0, 1,  |
|     ------------------------------------------------------------------------|
|     3}, {0, 1, 4}, {0, 3, 5}, {1, 3, 4}, {3, 4, 5}}, triangulation {{0, 1,  |
|     ------------------------------------------------------------------------|
|     4}, {0, 1, 5}, {1, 2, 3}, {1, 2, 4}, {1, 3, 5}, {2, 3, 4}, {3, 4, 5}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 2}, {0, 1, 5}, {0, 2, 4}, {1, 2, 3}, {1, 3, 5},   |
|     ------------------------------------------------------------------------|
|     {2, 3, 5}, {2, 4, 5}}, triangulation {{0, 1, 2}, {0, 1, 5}, {0, 2, 4},  |
|     ------------------------------------------------------------------------|
|     {1, 2, 5}, {2, 4, 5}}, triangulation {{0, 1, 4}, {0, 1, 5}, {1, 2, 3},  |
|     ------------------------------------------------------------------------|
|     {1, 2, 4}, {1, 3, 5}, {2, 3, 5}, {2, 4, 5}}, triangulation {{0, 1, 4},  |
|     ------------------------------------------------------------------------|
|     {0, 1, 5}, {1, 3, 4}, {1, 3, 5}, {3, 4, 5}}, triangulation {{0, 2, 4},  |
|     ------------------------------------------------------------------------|
|     {0, 2, 5}, {2, 4, 5}}, triangulation {{0, 4, 5}}, triangulation {{0, 1, |
|     ------------------------------------------------------------------------|
|     4}, {0, 1, 5}, {1, 4, 5}}, triangulation {{0, 1, 4}, {0, 1, 5}, {1, 2,  |
|     ------------------------------------------------------------------------|
|     4}, {1, 2, 5}, {2, 4, 5}}}                                              |
|                                                                             |
|o2 : List                                                                    |
+-----------------------------------------------------------------------------+
|i3 : #Ts == 16                                                               |
|                                                                             |
|o3 = true                                                                    |
+-----------------------------------------------------------------------------+
|i4 : netList Ts                                                              |
|                                                                             |
|     +-----------------------------------------------------------------------|
|o4 = |triangulation {{0, 1, 2}, {0, 1, 3}, {0, 2, 4}, {0, 3, 5}, {1, 2, 3}, {|
|     +-----------------------------------------------------------------------|
|     |triangulation {{0, 1, 2}, {0, 1, 3}, {0, 2, 4}, {0, 3, 5}, {1, 2, 3}, {|
|     +-----------------------------------------------------------------------|
|     |triangulation {{0, 1, 3}, {0, 1, 4}, {0, 3, 5}, {1, 2, 3}, {1, 2, 4}, {|
|     +-----------------------------------------------------------------------|
|     |triangulation {{0, 2, 3}, {0, 2, 4}, {0, 3, 5}, {2, 3, 4}, {3, 4, 5}}  |
|     +-----------------------------------------------------------------------|
|     |triangulation {{0, 3, 4}, {0, 3, 5}, {3, 4, 5}}                        |
|     +-----------------------------------------------------------------------|
|     |triangulation {{0, 2, 3}, {0, 2, 4}, {0, 3, 5}, {2, 3, 5}, {2, 4, 5}}  |
|     +-----------------------------------------------------------------------|
|     |triangulation {{0, 1, 3}, {0, 1, 4}, {0, 3, 5}, {1, 3, 4}, {3, 4, 5}}  |
|     +-----------------------------------------------------------------------|
|     |triangulation {{0, 1, 4}, {0, 1, 5}, {1, 2, 3}, {1, 2, 4}, {1, 3, 5}, {|
|     +-----------------------------------------------------------------------|
|     |triangulation {{0, 1, 2}, {0, 1, 5}, {0, 2, 4}, {1, 2, 3}, {1, 3, 5}, {|
|     +-----------------------------------------------------------------------|
|     |triangulation {{0, 1, 2}, {0, 1, 5}, {0, 2, 4}, {1, 2, 5}, {2, 4, 5}}  |
|     +-----------------------------------------------------------------------|
|     |triangulation {{0, 1, 4}, {0, 1, 5}, {1, 2, 3}, {1, 2, 4}, {1, 3, 5}, {|
|     +-----------------------------------------------------------------------|
|     |triangulation {{0, 1, 4}, {0, 1, 5}, {1, 3, 4}, {1, 3, 5}, {3, 4, 5}}  |
|     +-----------------------------------------------------------------------|
|     |triangulation {{0, 2, 4}, {0, 2, 5}, {2, 4, 5}}                        |
|     +-----------------------------------------------------------------------|
|     |triangulation {{0, 4, 5}}                                              |
|     +-----------------------------------------------------------------------|
|     |triangulation {{0, 1, 4}, {0, 1, 5}, {1, 4, 5}}                        |
|     +-----------------------------------------------------------------------|
|     |triangulation {{0, 1, 4}, {0, 1, 5}, {1, 2, 4}, {1, 2, 5}, {2, 4, 5}}  |
|     +-----------------------------------------------------------------------|
|-----------------------------------------------------------------------------|
|--------------------+                                                        |
|2, 3, 4}, {3, 4, 5}}|                                                        |
|--------------------+                                                        |
|2, 3, 5}, {2, 4, 5}}|                                                        |
|--------------------+                                                        |
|2, 3, 4}, {3, 4, 5}}|                                                        |
|--------------------+                                                        |
|                    |                                                        |
|--------------------+                                                        |
|                    |                                                        |
|--------------------+                                                        |
|                    |                                                        |
|--------------------+                                                        |
|                    |                                                        |
|--------------------+                                                        |
|2, 3, 4}, {3, 4, 5}}|                                                        |
|--------------------+                                                        |
|2, 3, 5}, {2, 4, 5}}|                                                        |
|--------------------+                                                        |
|                    |                                                        |
|--------------------+                                                        |
|2, 3, 5}, {2, 4, 5}}|                                                        |
|--------------------+                                                        |
|                    |                                                        |
|--------------------+                                                        |
|                    |                                                        |
|--------------------+                                                        |
|                    |                                                        |
|--------------------+                                                        |
|                    |                                                        |
|--------------------+                                                        |
|                    |                                                        |
|--------------------+                                                        |
+-----------------------------------------------------------------------------+
|i5 : tri = Ts#0                                                              |
|                                                                             |
|o5 = triangulation {{0, 1, 2}, {0, 1, 3}, {0, 2, 4}, {0, 3, 5}, {1, 2, 3},   |
|                                                                             |
|o5 : Triangulation                                                           |
|-----------------------------------------------------------------------------|
|{2, 3, 4}, {3, 4, 5}}                                                        |
+-----------------------------------------------------------------------------+
|i6 : isWellDefined tri                                                       |
|                                                                             |
|o6 = true                                                                    |
+-----------------------------------------------------------------------------+
|i7 : isRegularTriangulation tri                                              |
|                                                                             |
|o7 = true                                                                    |
+-----------------------------------------------------------------------------+
|i8 : Ts/isRegularTriangulation                                               |
|                                                                             |
|o8 = {true, true, true, true, true, true, true, true, true, true, true, true,|
|     ------------------------------------------------------------------------|
|     true, true, true, true}                                                 |
|                                                                             |
|o8 : List                                                                    |
+-----------------------------------------------------------------------------+
|i9 : regularTriangulationWeights tri                                         |
|                                                                             |
|      97  47  1                                                              |
|o9 = {--, --, -, 0, 0, 0}                                                    |
|      16  16  8                                                              |
|                                                                             |
|o9 : List                                                                    |
+-----------------------------------------------------------------------------+

The following code determines the support of each triangulation, and tallies
them. Thus for example, we see that there are 6 regular fine triangulations.

+----------------------------------------------------------+
|i10 : tally for tri in Ts list sort unique flatten max tri|
|                                                          |
|o10 = Tally{{0, 1, 2, 3, 4, 5} => 6}                      |
|            {0, 1, 2, 4, 5} => 2                          |
|            {0, 1, 3, 4, 5} => 2                          |
|            {0, 1, 4, 5} => 1                             |
|            {0, 2, 3, 4, 5} => 2                          |
|            {0, 2, 4, 5} => 1                             |
|            {0, 3, 4, 5} => 1                             |
|            {0, 4, 5} => 1                                |
|                                                          |
|o10 : Tally                                               |
+----------------------------------------------------------+

The method that topcom uses depends on the optional arguments Fine,
ConnectedToRegular and RegularOnly.

+---------------------------------------------+
|i11 : options allTriangulations              |
|                                             |
|o11 = OptionTable{ConnectedToRegular => true}|
|                  Fine => false              |
|                  Homogenize => true         |
|                  RegularOnly => true        |
|                                             |
|o11 : OptionTable                            |
+---------------------------------------------+

If the optional argument Fine is set to true, then only fine triangulations
(i.e. those that involve every column of $A$) will be generated.

+----------------------------------------------+
|i12 : Ts = allTriangulations(A, Fine => true);|
+----------------------------------------------+
|i13 : #Ts == 6                                |
|                                              |
|o13 = true                                    |
+----------------------------------------------+

If the optional argument RegularOnly is set to false, but ConnectedToRegular is
true, it will generally take less time, as the program doesn't need to check
each triangulation to see if it is regular.

+-----------------------------------------------------------------------------+
|i14 : T1s = allTriangulations(A, RegularOnly => true)                        |
|                                                                             |
|o14 = {triangulation {{0, 1, 2}, {0, 1, 3}, {0, 2, 4}, {0, 3, 5}, {1, 2, 3}, |
|      -----------------------------------------------------------------------|
|      {2, 3, 4}, {3, 4, 5}}, triangulation {{0, 1, 2}, {0, 1, 3}, {0, 2, 4}, |
|      -----------------------------------------------------------------------|
|      {0, 3, 5}, {1, 2, 3}, {2, 3, 5}, {2, 4, 5}}, triangulation {{0, 1, 3}, |
|      -----------------------------------------------------------------------|
|      {0, 1, 4}, {0, 3, 5}, {1, 2, 3}, {1, 2, 4}, {2, 3, 4}, {3, 4, 5}},     |
|      -----------------------------------------------------------------------|
|      triangulation {{0, 2, 3}, {0, 2, 4}, {0, 3, 5}, {2, 3, 4}, {3, 4, 5}}, |
|      -----------------------------------------------------------------------|
|      triangulation {{0, 3, 4}, {0, 3, 5}, {3, 4, 5}}, triangulation {{0, 2, |
|      -----------------------------------------------------------------------|
|      3}, {0, 2, 4}, {0, 3, 5}, {2, 3, 5}, {2, 4, 5}}, triangulation {{0, 1, |
|      -----------------------------------------------------------------------|
|      3}, {0, 1, 4}, {0, 3, 5}, {1, 3, 4}, {3, 4, 5}}, triangulation {{0, 1, |
|      -----------------------------------------------------------------------|
|      4}, {0, 1, 5}, {1, 2, 3}, {1, 2, 4}, {1, 3, 5}, {2, 3, 4}, {3, 4, 5}}, |
|      -----------------------------------------------------------------------|
|      triangulation {{0, 1, 2}, {0, 1, 5}, {0, 2, 4}, {1, 2, 3}, {1, 3, 5},  |
|      -----------------------------------------------------------------------|
|      {2, 3, 5}, {2, 4, 5}}, triangulation {{0, 1, 2}, {0, 1, 5}, {0, 2, 4}, |
|      -----------------------------------------------------------------------|
|      {1, 2, 5}, {2, 4, 5}}, triangulation {{0, 1, 4}, {0, 1, 5}, {1, 2, 3}, |
|      -----------------------------------------------------------------------|
|      {1, 2, 4}, {1, 3, 5}, {2, 3, 5}, {2, 4, 5}}, triangulation {{0, 1, 4}, |
|      -----------------------------------------------------------------------|
|      {0, 1, 5}, {1, 3, 4}, {1, 3, 5}, {3, 4, 5}}, triangulation {{0, 2, 4}, |
|      -----------------------------------------------------------------------|
|      {0, 2, 5}, {2, 4, 5}}, triangulation {{0, 4, 5}}, triangulation {{0, 1,|
|      -----------------------------------------------------------------------|
|      4}, {0, 1, 5}, {1, 4, 5}}, triangulation {{0, 1, 4}, {0, 1, 5}, {1, 2, |
|      -----------------------------------------------------------------------|
|      4}, {1, 2, 5}, {2, 4, 5}}}                                             |
|                                                                             |
|o14 : List                                                                   |
+-----------------------------------------------------------------------------+
|i15 : T2s = allTriangulations(A, RegularOnly => false)                       |
|                                                                             |
|o15 = {triangulation {{0, 1, 2}, {0, 1, 3}, {0, 2, 4}, {0, 3, 5}, {1, 2, 3}, |
|      -----------------------------------------------------------------------|
|      {2, 3, 4}, {3, 4, 5}}, triangulation {{0, 1, 2}, {0, 1, 3}, {0, 2, 4}, |
|      -----------------------------------------------------------------------|
|      {0, 3, 5}, {1, 2, 3}, {2, 3, 5}, {2, 4, 5}}, triangulation {{0, 1, 2}, |
|      -----------------------------------------------------------------------|
|      {0, 1, 5}, {0, 2, 4}, {1, 2, 3}, {1, 3, 5}, {2, 3, 4}, {3, 4, 5}},     |
|      -----------------------------------------------------------------------|
|      triangulation {{0, 1, 3}, {0, 1, 4}, {0, 3, 5}, {1, 2, 3}, {1, 2, 4},  |
|      -----------------------------------------------------------------------|
|      {2, 3, 4}, {3, 4, 5}}, triangulation {{0, 2, 3}, {0, 2, 4}, {0, 3, 5}, |
|      -----------------------------------------------------------------------|
|      {2, 3, 4}, {3, 4, 5}}, triangulation {{0, 3, 4}, {0, 3, 5}, {3, 4, 5}},|
|      -----------------------------------------------------------------------|
|      triangulation {{0, 2, 3}, {0, 2, 4}, {0, 3, 5}, {2, 3, 5}, {2, 4, 5}}, |
|      -----------------------------------------------------------------------|
|      triangulation {{0, 1, 3}, {0, 1, 4}, {0, 3, 5}, {1, 3, 4}, {3, 4, 5}}, |
|      -----------------------------------------------------------------------|
|      triangulation {{0, 1, 3}, {0, 1, 4}, {0, 3, 5}, {1, 2, 3}, {1, 2, 4},  |
|      -----------------------------------------------------------------------|
|      {2, 3, 5}, {2, 4, 5}}, triangulation {{0, 1, 4}, {0, 1, 5}, {1, 2, 3}, |
|      -----------------------------------------------------------------------|
|      {1, 2, 4}, {1, 3, 5}, {2, 3, 4}, {3, 4, 5}}, triangulation {{0, 1, 2}, |
|      -----------------------------------------------------------------------|
|      {0, 1, 5}, {0, 2, 4}, {1, 2, 3}, {1, 3, 5}, {2, 3, 5}, {2, 4, 5}},     |
|      -----------------------------------------------------------------------|
|      triangulation {{0, 1, 2}, {0, 1, 5}, {0, 2, 4}, {1, 2, 5}, {2, 4, 5}}, |
|      -----------------------------------------------------------------------|
|      triangulation {{0, 1, 4}, {0, 1, 5}, {1, 2, 3}, {1, 2, 4}, {1, 3, 5},  |
|      -----------------------------------------------------------------------|
|      {2, 3, 5}, {2, 4, 5}}, triangulation {{0, 1, 4}, {0, 1, 5}, {1, 3, 4}, |
|      -----------------------------------------------------------------------|
|      {1, 3, 5}, {3, 4, 5}}, triangulation {{0, 2, 4}, {0, 2, 5}, {2, 4, 5}},|
|      -----------------------------------------------------------------------|
|      triangulation {{0, 4, 5}}, triangulation {{0, 1, 4}, {0, 1, 5}, {1, 4, |
|      -----------------------------------------------------------------------|
|      5}}, triangulation {{0, 1, 4}, {0, 1, 5}, {1, 2, 4}, {1, 2, 5}, {2, 4, |
|      -----------------------------------------------------------------------|
|      5}}}                                                                   |
|                                                                             |
|o15 : List                                                                   |
+-----------------------------------------------------------------------------+
|i16 : #T1s                                                                   |
|                                                                             |
|o16 = 16                                                                     |
+-----------------------------------------------------------------------------+
|i17 : #T2s                                                                   |
|                                                                             |
|o17 = 18                                                                     |
+-----------------------------------------------------------------------------+

The following search would also yield all triangulations, even those not
connected via bistellar flips to regular triangulations.

+-----------------------------------------------------------------------------+
|i18 : T3s = allTriangulations(A, RegularOnly => false, ConnectedToRegular => |
|                                                                             |
|o18 = {triangulation {{0, 1, 2}, {0, 1, 3}, {0, 2, 4}, {0, 3, 5}, {1, 2, 3}, |
|      -----------------------------------------------------------------------|
|      {2, 3, 4}, {3, 4, 5}}, triangulation {{0, 1, 2}, {0, 1, 3}, {0, 2, 4}, |
|      -----------------------------------------------------------------------|
|      {0, 3, 5}, {1, 2, 3}, {2, 3, 5}, {2, 4, 5}}, triangulation {{0, 1, 2}, |
|      -----------------------------------------------------------------------|
|      {0, 1, 5}, {0, 2, 4}, {1, 2, 3}, {1, 3, 5}, {2, 3, 4}, {3, 4, 5}},     |
|      -----------------------------------------------------------------------|
|      triangulation {{0, 1, 2}, {0, 1, 5}, {0, 2, 4}, {1, 2, 3}, {1, 3, 5},  |
|      -----------------------------------------------------------------------|
|      {2, 3, 5}, {2, 4, 5}}, triangulation {{0, 1, 2}, {0, 1, 5}, {0, 2, 4}, |
|      -----------------------------------------------------------------------|
|      {1, 2, 5}, {2, 4, 5}}, triangulation {{0, 1, 3}, {0, 1, 4}, {0, 3, 5}, |
|      -----------------------------------------------------------------------|
|      {1, 2, 3}, {1, 2, 4}, {2, 3, 4}, {3, 4, 5}}, triangulation {{0, 1, 3}, |
|      -----------------------------------------------------------------------|
|      {0, 1, 4}, {0, 3, 5}, {1, 2, 3}, {1, 2, 4}, {2, 3, 5}, {2, 4, 5}},     |
|      -----------------------------------------------------------------------|
|      triangulation {{0, 1, 3}, {0, 1, 4}, {0, 3, 5}, {1, 3, 4}, {3, 4, 5}}, |
|      -----------------------------------------------------------------------|
|      triangulation {{0, 1, 4}, {0, 1, 5}, {1, 2, 3}, {1, 2, 4}, {1, 3, 5},  |
|      -----------------------------------------------------------------------|
|      {2, 3, 4}, {3, 4, 5}}, triangulation {{0, 1, 4}, {0, 1, 5}, {1, 2, 3}, |
|      -----------------------------------------------------------------------|
|      {1, 2, 4}, {1, 3, 5}, {2, 3, 5}, {2, 4, 5}}, triangulation {{0, 1, 4}, |
|      -----------------------------------------------------------------------|
|      {0, 1, 5}, {1, 2, 4}, {1, 2, 5}, {2, 4, 5}}, triangulation {{0, 1, 4}, |
|      -----------------------------------------------------------------------|
|      {0, 1, 5}, {1, 3, 4}, {1, 3, 5}, {3, 4, 5}}, triangulation {{0, 1, 4}, |
|      -----------------------------------------------------------------------|
|      {0, 1, 5}, {1, 4, 5}}, triangulation {{0, 2, 3}, {0, 2, 4}, {0, 3, 5}, |
|      -----------------------------------------------------------------------|
|      {2, 3, 4}, {3, 4, 5}}, triangulation {{0, 2, 3}, {0, 2, 4}, {0, 3, 5}, |
|      -----------------------------------------------------------------------|
|      {2, 3, 5}, {2, 4, 5}}, triangulation {{0, 2, 4}, {0, 2, 5}, {2, 4, 5}},|
|      -----------------------------------------------------------------------|
|      triangulation {{0, 3, 4}, {0, 3, 5}, {3, 4, 5}}, triangulation {{0, 4, |
|      -----------------------------------------------------------------------|
|      5}}}                                                                   |
|                                                                             |
|o18 : List                                                                   |
|-----------------------------------------------------------------------------|
|false)                                                                       |
+-----------------------------------------------------------------------------+
|i19 : #T3s                                                                   |
|                                                                             |
|o19 = 18                                                                     |
+-----------------------------------------------------------------------------+

Given the list of triangulations, we can query them using other topcom
functions. See also Triangulations, for other functionality.

+-----------------------------------------------------------------------------+
|i20 : netList Ts                                                             |
|                                                                             |
|      +----------------------------------------------------------------------|
|o20 = |triangulation {{0, 1, 2}, {0, 1, 3}, {0, 2, 4}, {0, 3, 5}, {1, 2, 3}, |
|      +----------------------------------------------------------------------|
|      |triangulation {{0, 1, 2}, {0, 1, 3}, {0, 2, 4}, {0, 3, 5}, {1, 2, 3}, |
|      +----------------------------------------------------------------------|
|      |triangulation {{0, 1, 3}, {0, 1, 4}, {0, 3, 5}, {1, 2, 3}, {1, 2, 4}, |
|      +----------------------------------------------------------------------|
|      |triangulation {{0, 1, 4}, {0, 1, 5}, {1, 2, 3}, {1, 2, 4}, {1, 3, 5}, |
|      +----------------------------------------------------------------------|
|      |triangulation {{0, 1, 2}, {0, 1, 5}, {0, 2, 4}, {1, 2, 3}, {1, 3, 5}, |
|      +----------------------------------------------------------------------|
|      |triangulation {{0, 1, 4}, {0, 1, 5}, {1, 2, 3}, {1, 2, 4}, {1, 3, 5}, |
|      +----------------------------------------------------------------------|
|-----------------------------------------------------------------------------|
|---------------------+                                                       |
|{2, 3, 4}, {3, 4, 5}}|                                                       |
|---------------------+                                                       |
|{2, 3, 5}, {2, 4, 5}}|                                                       |
|---------------------+                                                       |
|{2, 3, 4}, {3, 4, 5}}|                                                       |
|---------------------+                                                       |
|{2, 3, 4}, {3, 4, 5}}|                                                       |
|---------------------+                                                       |
|{2, 3, 5}, {2, 4, 5}}|                                                       |
|---------------------+                                                       |
|{2, 3, 5}, {2, 4, 5}}|                                                       |
|---------------------+                                                       |
+-----------------------------------------------------------------------------+
|i21 : for tri in Ts list isWellDefined tri                                   |
|                                                                             |
|o21 = {true, true, true, true, true, true}                                   |
|                                                                             |
|o21 : List                                                                   |
+-----------------------------------------------------------------------------+
|i22 : for tri in Ts list isRegularTriangulation tri                          |
|                                                                             |
|o22 = {true, true, true, true, true, true}                                   |
|                                                                             |
|o22 : List                                                                   |
+-----------------------------------------------------------------------------+
|i23 : for tri in Ts list regularTriangulationWeights tri                     |
|                                                                             |
|        97  47  1             87  41    1             157  15  1             |
|o23 = {{--, --, -, 0, 0, 0}, {--, --, - -, 0, 0, 0}, {---, --, -, 0, 0, 0},  |
|        16  16  8             16  16    8              40   8  4             |
|      -----------------------------------------------------------------------|
|       45  19  1             107  9    1             35  13    1             |
|      {--, --, -, 0, 0, 0}, {---, -, - -, 0, 0, 0}, {--, --, - -, 0, 0, 0}}  |
|       16  16  8              40  8    4             16  16    8             |
|                                                                             |
|o23 : List                                                                   |
+-----------------------------------------------------------------------------+

See also
========

  * topcomNumTriangulations(Matrix) (Topcom)
    -- the number of
    triangulations of a point or vector configuration
  * generateTriangulations -- generate all
    triangulations with certain properties

Ways to use this method:
========================

  * allTriangulations(Matrix) -- use
    topcom to generate all triangulations of a point or vector configuration
-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:1974:0.

bistellarFlip -- perform a bistellar flip on a triangulation
************************************************************

  * Usage:
        T' = bistellarFlip(T, c)
        tri' = bistellarFlip(tri, c)
  * Inputs:
      * T, an instance of the type Triangulation,
      * tri, a list (Macaulay2Doc), a triangulation, given as a
        list of lists of column indices
      * c, a list (Macaulay2Doc), a pair $\{neg, pos\}$ of disjoint
        lists of column indices: the signed parts of an affine circuit,
        typically an entry of flipCandidates,
  * Outputs:
      * a thing (Macaulay2Doc), a Triangulation,
        (or, in the (List, List) form, a List) obtained from $T$
        by flipping along $c$, or null (Macaulay2Doc), if the
        circuit is not flippable in $T$

Description
===========

A circuit on $d{+}1$ points admits two triangulations of its convex hull:
$T_-$, omitting each vertex listed in neg, and $T_+$, omitting each vertex
listed in pos.  Exactly one of these (say $T_-$) sits inside $T$, supported on
a common link $L$; the bistellar flip replaces $L \star T_-$ with $L \star
T_+$.

If neither side has a common link in $T$ -- for example, the simplices of one
side appear with mismatched links, or one side is only partially present -- the
flip is undefined and this returns null (Macaulay2Doc).

+-----------------------------------------------------------------------------+
|i1 : A = transpose matrix {{0,3},{0,1},{-1,-1},{1,-1},{-4,-2},{4,-2}}        |
|                                                                             |
|o1 = | 0 0 -1 1  -4 4  |                                                     |
|     | 3 1 -1 -1 -2 -2 |                                                     |
|                                                                             |
|              2       6                                                      |
|o1 : Matrix ZZ  <-- ZZ                                                       |
+-----------------------------------------------------------------------------+
|i2 : T = regularFineTriangulation A                                          |
|                                                                             |
|o2 = triangulation {{0, 1, 2}, {0, 1, 3}, {0, 2, 4}, {0, 3, 5}, {1, 2, 3},   |
|                                                                             |
|o2 : Triangulation                                                           |
|-----------------------------------------------------------------------------|
|{2, 3, 4}, {3, 4, 5}}                                                        |
+-----------------------------------------------------------------------------+
|i3 : cs = flipCandidates T                                                   |
|                                                                             |
|o3 = {{{1}, {0, 2, 3}}, {{1, 4}, {0, 2}}, {{1, 5}, {0, 3}}, {{2}, {0, 3, 4}},|
|     ------------------------------------------------------------------------|
|     {{2}, {1, 3, 4}}, {{3}, {0, 4, 5}}, {{3, 4}, {2, 5}}}                   |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+
|i4 : T' = bistellarFlip(T, cs#0)                                             |
|                                                                             |
|o4 = triangulation {{0, 2, 3}, {0, 2, 4}, {0, 3, 5}, {2, 3, 4}, {3, 4, 5}}   |
|                                                                             |
|o4 : Triangulation                                                           |
+-----------------------------------------------------------------------------+
|i5 : max T'                                                                  |
|                                                                             |
|o5 = {{0, 2, 3}, {0, 2, 4}, {0, 3, 5}, {2, 3, 4}, {3, 4, 5}}                 |
|                                                                             |
|o5 : List                                                                    |
+-----------------------------------------------------------------------------+
|i6 : isWellDefined T'                                                        |
|                                                                             |
|o6 = true                                                                    |
+-----------------------------------------------------------------------------+

Many candidate circuits returned by flipCandidates, are
not flippable in any given $T$; those return null (Macaulay2Doc).

+-----------------------------------------------------------------------------+
|i7 : for c in cs list bistellarFlip(T, c)                                    |
|                                                                             |
|o7 = {triangulation {{0, 2, 3}, {0, 2, 4}, {0, 3, 5}, {2, 3, 4}, {3, 4, 5}}, |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3}, {0, 1, 4}, {0, 3, 5}, {1, 2, 3}, {1, 2, 4},   |
|     ------------------------------------------------------------------------|
|     {2, 3, 4}, {3, 4, 5}}, triangulation {{0, 1, 2}, {0, 1, 5}, {0, 2, 4},  |
|     ------------------------------------------------------------------------|
|     {1, 2, 3}, {1, 3, 5}, {2, 3, 4}, {3, 4, 5}}, , , , triangulation {{0, 1,|
|     ------------------------------------------------------------------------|
|     2}, {0, 1, 3}, {0, 2, 4}, {0, 3, 5}, {1, 2, 3}, {2, 3, 5}, {2, 4, 5}}}  |
|                                                                             |
|o7 : List                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * flipCandidates -- candidate affine circuits for
    bistellar flips of a triangulation
  * flips -- legal bistellar flips of a triangulation, computed
    via topcom
  * neighbors -- triangulations adjacent to a given one in
    the bistellar-flip graph
  * flipGraph -- bistellar-flip graph of a point or vector
    configuration

Ways to use bistellarFlip:
==========================

  * "bistellarFlip(List,List)"
  * "bistellarFlip(Triangulation,List)"

For the programmer
==================

The object bistellarFlip, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:2103:0.

Chirotope -- the chirotope (oriented matroid) of a point or vector configuration
********************************************************************************

Description
===========

A Chirotope packages the chirotope of a configuration: for each $d$-subset $S$
of the columns, the sign of $\det A_S$, stored as a topcom-format string.  Two
configurations have the same chirotope iff they have the same oriented matroid
-- in particular, the same set of triangulations.

Construct one with chirotope, from a matrix (via topcom) or
with naiveChirotope, (a slower pure-Macaulay2
alternative, useful for verification).  The String form of chirotope,
wraps a precomputed topcom string.

+---------------------------------------------------------------------+
|i1 : A = transpose matrix {{0,3},{0,1},{-1,-1},{1,-1},{-4,-2},{4,-2}}|
|                                                                     |
|o1 = | 0 0 -1 1  -4 4  |                                             |
|     | 3 1 -1 -1 -2 -2 |                                             |
|                                                                     |
|              2       6                                              |
|o1 : Matrix ZZ  <-- ZZ                                               |
+---------------------------------------------------------------------+
|i2 : C = chirotope A                                                 |
|                                                                     |
|o2 = Chirotope{cache => CacheTable{}         }                       |
|               String => 6,3:                                        |
|                         -+-++-+-+++-+-++--++                        |
|                                                                     |
|                                                                     |
|o2 : Chirotope                                                       |
+---------------------------------------------------------------------+
|i3 : C == naiveChirotope A                                           |
|                                                                     |
|o3 = true                                                            |
+---------------------------------------------------------------------+

See also
========

  * chirotope -- compute the chirotope of a point or vector
    configuration
  * naiveChirotope -- compute the chirotope of a
    configuration via determinants in Macaulay2
  * chirotopeString (Topcom) -- compute the
    chirotope string of a point or vector configuration

Functions and methods returning an object of class Chirotope:
=============================================================

  * "chirotope(Matrix)" -- see chirotope, -- compute the
    chirotope of a point or vector configuration
  * "chirotope(String)" -- see chirotope, -- compute the
    chirotope of a point or vector configuration
  * "naiveChirotope(Matrix)" -- see naiveChirotope, --
    compute the chirotope of a configuration via determinants in Macaulay2

Methods that use an object of class Chirotope:
==============================================

  * Chirotope == Chirotope (missing documentation)
  * toString(Chirotope) (missing documentation)

For the programmer
==================

The object Chirotope, is a type (Macaulay2Doc),
with ancestor classes HashTable (Macaulay2Doc), < Thing (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:2768:0.

chirotope -- compute the chirotope of a point or vector configuration
*********************************************************************

  * Usage:
        C = chirotope A
        C = chirotope s
  * Inputs:
      * A, a matrix (Macaulay2Doc), whose columns are the points
        (or vectors) of the configuration
      * s, a string (Macaulay2Doc), a precomputed topcom-format
        chirotope string
  * Optional inputs (Macaulay2Doc),:
      * Homogenize => a Boolean value (Macaulay2Doc), default
        value true, if true (default), augment $A$ with a final row of $1$'s
        before computing (treating columns of $A$ as a point set); if false,
        treat the columns of $A$ as a vector configuration as-is
  * Outputs:
      * C, an instance of the type Chirotope,

Description
===========

Computes the chirotope by calling chirotopeString (Topcom).
The String form is a thin wrapper that
lets you construct a Chirotope from an already-computed topcom string -- useful
when caching results.

+---------------------------------------------------------------------+
|i1 : A = transpose matrix {{0,3},{0,1},{-1,-1},{1,-1},{-4,-2},{4,-2}}|
|                                                                     |
|o1 = | 0 0 -1 1  -4 4  |                                             |
|     | 3 1 -1 -1 -2 -2 |                                             |
|                                                                     |
|              2       6                                              |
|o1 : Matrix ZZ  <-- ZZ                                               |
+---------------------------------------------------------------------+
|i2 : C = chirotope A                                                 |
|                                                                     |
|o2 = Chirotope{cache => CacheTable{}         }                       |
|               String => 6,3:                                        |
|                         -+-++-+-+++-+-++--++                        |
|                                                                     |
|                                                                     |
|o2 : Chirotope                                                       |
+---------------------------------------------------------------------+
|i3 : toString C                                                      |
|                                                                     |
|o3 = 6,3:                                                            |
|     -+-++-+-+++-+-++--++                                            |
+---------------------------------------------------------------------+

See also
========

  * Chirotope -- the chirotope (oriented matroid) of a point
    or vector configuration
  * naiveChirotope -- compute the chirotope of a
    configuration via determinants in Macaulay2
  * chirotopeString (Topcom) -- compute the
    chirotope string of a point or vector configuration

Ways to use chirotope:
======================

  * "chirotope(Matrix)"
  * "chirotope(String)"

For the programmer
==================

The object chirotope, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:2806:0.

ConeIndex -- optional argument: index of the cone center for star triangulations
********************************************************************************

Description
===========

Used by fineStarTriangulation, and
regularFineStarTriangulation, to specify which
column of the input matrix should serve as the cone center.  If null (the
default), the functions treat the cone center as a new point at index
numColumns A; otherwise the value must be an integer in $0, \ldots, n$, where
$n$ is the number of columns.

See also
========

  * fineStarTriangulation -- refine a
    triangulation to a fine star triangulation by coning over a center
  * regularFineStarTriangulation -- a
    regular fine star triangulation of a polytope's boundary

Functions with optional argument named ConeIndex:
=================================================

  * "fineStarTriangulation(...,ConeIndex=>...)" -- see
    fineStarTriangulation, -- refine a triangulation to
    a fine star triangulation by coning over a center
  * "regularFineStarTriangulation(...,ConeIndex=>...)" -- see
    regularFineStarTriangulation, -- a regular
    fine star triangulation of a polytope's boundary

For the programmer
==================

The object ConeIndex, is a symbol (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:2741:0.

degreeMatrix -- charge matrix Q whose rows generate ker A
*********************************************************

  * Usage:
        Q = degreeMatrix A
        Q = degreeMatrix T
  * Inputs:
      * A, a matrix (Macaulay2Doc), a $d \times N$ integer
        configuration matrix
      * T, an instance of the type Triangulation,
  * Outputs:
      * a matrix (Macaulay2Doc), an integer matrix of shape $(N -
        d) \times N$ whose rows are a $\mathbb{Z}$-basis of $\ker A$

Description
===========

The charge matrix is computed as transpose syz A.  In the GLSM/Calabi-Yau
context the rows of $Q$ are the U(1) charges of the chiral fields under the
gauge symmetries.  Mathematically, $Q$ provides explicit coordinates on the
quotient $\mathbb{R}^N / \mathrm{rowspan}(A)$, which is where the secondary
cone naturally lives.

For $T = $ triangulation(A, tri), degreeMatrix T uses the stored configuration
matrix matrix T (which is $A$ auto-homogenized to one extra row of $1$'s when
$A$ was supplied as a point set).

Users who want a reduced basis (for instance, an LLL-reduced one with smaller
integer entries) can compute it themselves from syz A and pass it to
secondaryCone, via the DegreeMatrix option.

+---------------------------------------------------+
|i1 : A = transpose matrix {{0,0},{1,0},{0,1},{1,1}}|
|                                                   |
|o1 = | 0 1 0 1 |                                   |
|     | 0 0 1 1 |                                   |
|                                                   |
|              2       4                            |
|o1 : Matrix ZZ  <-- ZZ                             |
+---------------------------------------------------+
|i2 : T = triangulation(A, {{0,1,3},{0,2,3}})       |
|                                                   |
|o2 = triangulation {{0, 1, 3}, {0, 2, 3}}          |
|                                                   |
|o2 : Triangulation                                 |
+---------------------------------------------------+
|i3 : degreeMatrix T                                |
|                                                   |
|o3 = | 1 -1 -1 1 |                                 |
|                                                   |
|              1       4                            |
|o3 : Matrix ZZ  <-- ZZ                             |
+---------------------------------------------------+

See also
========

  * secondaryCone -- secondary cone of a triangulation,
    in charge-lattice coordinates
  * syz (Macaulay2Doc) -- the syzygy matrix

Ways to use degreeMatrix:
=========================

  * "degreeMatrix(Matrix)"
  * "degreeMatrix(Triangulation)"

For the programmer
==================

The object degreeMatrix, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:2264:0.

delaunaySubdivision -- the Delaunay subdivision of a point set
**************************************************************

  * Usage:
        delaunaySubdivision A
  * Inputs:
      * A, a matrix (Macaulay2Doc), whose columns are points in
        $\mathbb{R}^d$
  * Outputs:
      * a list (Macaulay2Doc), of lists of column indices: the
        maximal cells of the Delaunay subdivision of the columns of $A$

Description
===========

The Delaunay subdivision of a finite point set $P \subset \mathbb{R}^d$ is the
polyhedral subdivision of the convex hull of $P$ characterized by the
empty-sphere property: a $d$-simplex with vertices in $P$ is a maximal cell iff
the open ball circumscribed about it contains no point of $P$ in its interior.
Equivalently, it is the projection of the lower faces of the lifted paraboloid
-- the convex hull of the points $(v_i, \|v_i\|^2) \in \mathbb{R}^{d+1}$.  When
the points are in general position (no $d{+}2$ of them cospherical), the
Delaunay subdivision is a triangulation; otherwise some cells may be
non-simplicial.  It is dual to the Voronoi diagram of $P$ and is widely used in
computational geometry, mesh generation, and interpolation.

This function realises the lifted-paraboloid construction by calling
regularSubdivision (Polyhedra), with the squared norms
produced by delaunayWeights,: lifting heights to
$\|v_i\|^2$, taking the lower envelope, and projecting back.

+---------------------------------------------------+
|i1 : A = transpose matrix {{0,0},{1,0},{0,1},{1,1}}|
|                                                   |
|o1 = | 0 1 0 1 |                                   |
|     | 0 0 1 1 |                                   |
|                                                   |
|              2       4                            |
|o1 : Matrix ZZ  <-- ZZ                             |
+---------------------------------------------------+
|i2 : delaunaySubdivision A                         |
|                                                   |
|o2 = {{0, 1, 2, 3}}                                |
|                                                   |
|o2 : List                                          |
+---------------------------------------------------+

Caveat
======

Like delaunayWeights, this function is meaningful only
for point configurations, not vector configurations.

See also
========

  * delaunayWeights -- squared-norm weights inducing
    the Delaunay subdivision of a point set
  * regularSubdivision (Polyhedra) -- Computes the
    regular cell decomposition

Ways to use delaunaySubdivision:
================================

  * "delaunaySubdivision(Matrix)"

For the programmer
==================

The object delaunaySubdivision, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:2723:0.

delaunayWeights -- squared-norm weights inducing the Delaunay subdivision of a point set
****************************************************************************************

  * Usage:
        w = delaunayWeights A
  * Inputs:
      * A, a matrix (Macaulay2Doc), whose columns are points in
        $\mathbb{R}^d$
  * Outputs:
      * w, a matrix (Macaulay2Doc), a $1 \times n$ matrix whose
        $i$-th entry is $\|v_i\|^2$, the squared Euclidean norm of the $i$-th
        column of $A$

Description
===========

Returns the standard weight vector for the delaunaySubdivision,
of a point set: the $i$-th entry is $\|v_i\|^2$, the
squared Euclidean norm of the $i$-th column of $A$.  Lifting each point $v_i$
to $(v_i, \|v_i\|^2) \in \mathbb{R}^{d+1}$ and projecting the lower faces of
the resulting convex hull back to $\mathbb{R}^d$ yields the Delaunay
subdivision; passing these weights to regularSubdivision (Polyhedra),
is the standard way to realise that
construction.

+---------------------------------------------------------------+
|i1 : A = transpose matrix {{0,0},{1,0},{2,0},{0,1},{1,1},{2,1}}|
|                                                               |
|o1 = | 0 1 2 0 1 2 |                                           |
|     | 0 0 0 1 1 1 |                                           |
|                                                               |
|              2       6                                        |
|o1 : Matrix ZZ  <-- ZZ                                         |
+---------------------------------------------------------------+
|i2 : delaunayWeights A                                         |
|                                                               |
|o2 = | 0 1 4 1 2 5 |                                           |
|                                                               |
|              1       6                                        |
|o2 : Matrix ZZ  <-- ZZ                                         |
+---------------------------------------------------------------+

Caveat
======

Delaunay is intrinsically a Euclidean concept on a point set, so this function
is meaningful only for point configurations -- not for vector configurations.
No input-shape check is performed.

See also
========

  * delaunaySubdivision -- the Delaunay subdivision
    of a point set
  * regularSubdivision (Polyhedra) -- Computes the
    regular cell decomposition

Ways to use delaunayWeights:
============================

  * "delaunayWeights(Matrix)"

For the programmer
==================

The object delaunayWeights, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:2677:0.

Edges
*****

For the programmer
==================

The object Edges (missing documentation) is a symbol (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in currentString:1:380.

fineStarTriangulation -- refine a triangulation to a fine star triangulation by coning over a center
****************************************************************************************************

  * Usage:
        star = fineStarTriangulation(A, tri)
  * Inputs:
      * A, a matrix (Macaulay2Doc), whose columns are the
        boundary points of a polytope (and possibly an interior cone center)
      * tri, a list (Macaulay2Doc), a triangulation of the columns
        of $A$, typically a triangulation of the boundary
  * Optional inputs (Macaulay2Doc),:
      * ConeIndex => an integer (Macaulay2Doc), default value null,
        the column index to use as the cone center; if null (default), uses
        numColumns A, treating the cone center as a new point to be appended
  * Outputs:
      * a list (Macaulay2Doc), a list of simplices forming a star
        triangulation centered at the chosen index: each maximal simplex of
        tri, intersected with each facet of $\mathrm{conv}(A)$, is appended
        with the cone index

Description
===========

Given a triangulation tri of (the boundary of) a polytope and an interior cone
center, this function refines tri into a star triangulation by joining each
boundary simplex to the center.  The center is identified by its column index
in $A$ (or, by default, treated as a new point at index numColumns A).

+-------------------------------------------------------+
|i1 : A = transpose matrix {{1,1},{-1,1},{-1,-1},{1,-1}}|
|                                                       |
|o1 = | 1 -1 -1 1  |                                    |
|     | 1 1  -1 -1 |                                    |
|                                                       |
|              2       4                                |
|o1 : Matrix ZZ  <-- ZZ                                 |
+-------------------------------------------------------+
|i2 : tri = topcomRegularFineTriangulation A            |
|                                                       |
|o2 = {{0, 1, 2}, {0, 2, 3}}                            |
|                                                       |
|o2 : List                                              |
+-------------------------------------------------------+
|i3 : fineStarTriangulation(A, tri)                     |
|                                                       |
|o3 = {{0, 1, 4}, {0, 3, 4}, {1, 2, 4}, {2, 3, 4}}      |
|                                                       |
|o3 : List                                              |
+-------------------------------------------------------+

Caveat
======

Returns a List of simplices, not a Triangulation,; wrap
with triangulation, to attach the configuration matrix.

See also
========

  * regularFineStarTriangulation -- a
    regular fine star triangulation of a polytope's boundary
  * isStar -- test whether a triangulation is a star with
    respect to its last point
  * triangulation -- make a Triangulation object

Ways to use fineStarTriangulation:
==================================

  * "fineStarTriangulation(Matrix,List)"

For the programmer
==================

The object fineStarTriangulation, is a
method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:1534:0.

flipCandidates -- candidate affine circuits for bistellar flips of a triangulation
**********************************************************************************

  * Usage:
        cs = flipCandidates T
        cs = flipCandidates(A, tri)
  * Inputs:
      * T, an instance of the type Triangulation,
      * A, a matrix (Macaulay2Doc), whose columns are the points
        of the configuration, either of size $d \times n$ (homogenized, with
        last row all 1's) or $(d{-}1) \times n$ (which is auto-homogenized
        internally)
      * tri, a list (Macaulay2Doc), a triangulation of the columns
        of $A$
  * Outputs:
      * a list (Macaulay2Doc), of pairs $\{neg, pos\}$ of disjoint
        column-index lists, the negative and positive parts of an affine
        circuit supported on a $(d{+}1)$-set of columns relevant to flipping
        $T$

Description
===========

Two kinds of $(d{+}1)$-sets are considered:

$\bullet$ codim-2 walls of $T$ -- $(d{+}1)$-sets formed as the union of two
adjacent maximal simplices of $T$.  These support the standard "fine" flips
that preserve the vertex set.

$\bullet$ $\sigma \cup \{v\}$ for each maximal simplex $\sigma$ of $T$ and each
column $v$ not used in $T$.  These are not walls of $T$, but they are the
supports of bistellar flips that insert $v$; in non-acyclic configurations
(e.g., complete simplicial fans) such insertion flips can be the only non-fine
neighbors of $T$.

For each $(d{+}1)$-set $c$, the function returns the signed kernel partition of
those columns as a pair $\{neg, pos\}$ of column indices.

Each returned circuit is a candidate input for bistellarFlip,
but not all candidates yield a valid flip in $T$; see
bistellarFlip. In contrast, see orientedCircuits (Topcom),
returns all circuits of the underlying point
configuration (most of which are not supported on walls of $T$), and
flips, -- a wrapper around topcomFlips (Topcom),
-- returns only those circuits that are
actually flippable in $T$.

+-----------------------------------------------------------------------------+
|i1 : A = transpose matrix {{0,3},{0,1},{-1,-1},{1,-1},{-4,-2},{4,-2}}        |
|                                                                             |
|o1 = | 0 0 -1 1  -4 4  |                                                     |
|     | 3 1 -1 -1 -2 -2 |                                                     |
|                                                                             |
|              2       6                                                      |
|o1 : Matrix ZZ  <-- ZZ                                                       |
+-----------------------------------------------------------------------------+
|i2 : T = regularFineTriangulation A                                          |
|                                                                             |
|o2 = triangulation {{0, 1, 2}, {0, 1, 3}, {0, 2, 4}, {0, 3, 5}, {1, 2, 3},   |
|                                                                             |
|o2 : Triangulation                                                           |
|-----------------------------------------------------------------------------|
|{2, 3, 4}, {3, 4, 5}}                                                        |
+-----------------------------------------------------------------------------+
|i3 : flipCandidates T                                                        |
|                                                                             |
|o3 = {{{1}, {0, 2, 3}}, {{1, 4}, {0, 2}}, {{1, 5}, {0, 3}}, {{2}, {0, 3, 4}},|
|     ------------------------------------------------------------------------|
|     {{2}, {1, 3, 4}}, {{3}, {0, 4, 5}}, {{3, 4}, {2, 5}}}                   |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * bistellarFlip -- perform a bistellar flip on a
    triangulation
  * flips -- legal bistellar flips of a triangulation, computed
    via topcom
  * neighbors -- triangulations adjacent to a given one in
    the bistellar-flip graph
  * orientedCircuits (Topcom) -- compute the oriented
    circuits of an oriented matroid or point or vector configuration

Ways to use flipCandidates:
===========================

  * "flipCandidates(Matrix,List)"
  * "flipCandidates(Triangulation)"

For the programmer
==================

The object flipCandidates, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:2161:0.

flipGraph -- bistellar-flip graph of a point or vector configuration
********************************************************************

  * Usage:
        G = flipGraph T
        G = flipGraph A
        G = flipGraph(A, tri)
  * Inputs:
      * T, an instance of the type Triangulation,
      * A, a matrix (Macaulay2Doc), whose columns are the points
        (or vectors) to triangulate
      * tri, a list (Macaulay2Doc), a triangulation of the columns
        of $A$
  * Optional inputs (Macaulay2Doc),:
      * Limit => an integer (Macaulay2Doc), default value infinity,
        stop after this many triangulations have been visited
      * RegularOnly => a Boolean value (Macaulay2Doc), default
        value false, restrict the graph to regular triangulations
      * Fine => a Boolean value (Macaulay2Doc), default value
        true, if true (default), restrict to support-preserving flips
      * Homogenize => a Boolean value (Macaulay2Doc), default
        value true, used only by the Matrix and (Matrix, List) forms; see
        triangulation,
      * Strategy => ..., default value Topcom
  * Outputs:
      * G, a hash table (Macaulay2Doc), with keys
        Triangulations and Edges: G.Triangulations is the list of
        Triangulation,'s reached, and G.Edges is a list of
        triples $(i, j, c)$ with $i < j$, where $i$ and $j$ index into
        G.Triangulations and $c$ is the affine circuit of the flip between them

Description
===========

Performs a breadth-first search over the bistellar-flip graph starting at $T$
(or at a regular fine triangulation of $A$ if no triangulation is given),
recording both the triangulations reached and the edges between them.  Each
undirected edge is recorded once, when discovered from its lower-indexed
endpoint.

This is the edge-aware companion of generateTriangulations,
which returns the same triangulations but discards the
connectivity.

+-----------------------------------------------------------------------------+
|i1 : A = transpose matrix {{0,3},{0,1},{-1,-1},{1,-1},{-4,-2},{4,-2}}        |
|                                                                             |
|o1 = | 0 0 -1 1  -4 4  |                                                     |
|     | 3 1 -1 -1 -2 -2 |                                                     |
|                                                                             |
|              2       6                                                      |
|o1 : Matrix ZZ  <-- ZZ                                                       |
+-----------------------------------------------------------------------------+
|i2 : T = regularFineTriangulation A                                          |
|                                                                             |
|o2 = triangulation {{0, 1, 2}, {0, 1, 3}, {0, 2, 4}, {0, 3, 5}, {1, 2, 3},   |
|                                                                             |
|o2 : Triangulation                                                           |
|-----------------------------------------------------------------------------|
|{2, 3, 4}, {3, 4, 5}}                                                        |
+-----------------------------------------------------------------------------+
|i3 : G = flipGraph T                                                         |
|                                                                             |
|o3 = HashTable{Edges => {(0, 1, {{1, 4}, {0, 2}}), (0, 2, {{1, 5}, {0,       |
|               Triangulations => {triangulation {{0, 1, 2}, {0, 1, 3},       |
|                                                                             |
|o3 : HashTable                                                               |
|-----------------------------------------------------------------------------|
|3}}), (0, 3, {{3, 4}, {2, 5}}), (1, 4, {{1, 5}, {0, 3}}), (1, 5, {{3, 4}, {2,|
|{0, 2, 4}, {0, 3, 5}, {1, 2, 3}, {2, 3, 4}, {3, 4, 5}}, triangulation {{0, 1,|
|-----------------------------------------------------------------------------|
|5}}), (2, 4, {{1, 4}, {0, 2}}), (2, 6, {{3, 4}, {2,                          |
|3}, {0, 1, 4}, {0, 3, 5}, {1, 2, 3}, {1, 2, 4}, {2,                          |
|-----------------------------------------------------------------------------|
|5}}), (3, 5, {{1, 4}, {0, 2}}), (3, 6, {{1, 5}, {0, 3}}), (4, 7, {{3, 4}, {2,|
|3, 4}, {3, 4, 5}}, triangulation {{0, 1, 2}, {0, 1, 5}, {0, 2, 4}, {1, 2, 3},|
|-----------------------------------------------------------------------------|
|5}}), (5, 7, {{1, 5}, {0, 3}}), (6, 7, {{1, 4}, {0, 2}})}                    |
|{1, 3, 5}, {2, 3, 4}, {3, 4, 5}}, triangulation {{0, 1, 2}, {0, 1, 3}, {0, 2,|
|-----------------------------------------------------------------------------|
|                                                                             |
|4}, {0, 3, 5}, {1, 2, 3}, {2, 3, 5}, {2, 4, 5}}, triangulation {{0, 1, 4},   |
|-----------------------------------------------------------------------------|
|                                                                             |
|{0, 1, 5}, {1, 2, 3}, {1, 2, 4}, {1, 3, 5}, {2, 3, 4}, {3, 4, 5}},           |
|-----------------------------------------------------------------------------|
|                                                                             |
|triangulation {{0, 1, 3}, {0, 1, 4}, {0, 3, 5}, {1, 2, 3}, {1, 2, 4}, {2, 3, |
|-----------------------------------------------------------------------------|
|                                                                             |
|5}, {2, 4, 5}}, triangulation {{0, 1, 2}, {0, 1, 5}, {0, 2, 4}, {1, 2, 3},   |
|-----------------------------------------------------------------------------|
|                                                                             |
|{1, 3, 5}, {2, 3, 5}, {2, 4, 5}}, triangulation {{0, 1, 4}, {0, 1, 5}, {1, 2,|
|-----------------------------------------------------------------------------|
|                                                }                            |
|3}, {1, 2, 4}, {1, 3, 5}, {2, 3, 5}, {2, 4, 5}}}                             |
+-----------------------------------------------------------------------------+
|i4 : #G.Triangulations                                                       |
|                                                                             |
|o4 = 8                                                                       |
+-----------------------------------------------------------------------------+
|i5 : #G.Edges                                                                |
|                                                                             |
|o5 = 12                                                                      |
+-----------------------------------------------------------------------------+
|i6 : first G.Edges                                                           |
|                                                                             |
|o6 = (0, 1, {{1, 4}, {0, 2}})                                                |
|                                                                             |
|o6 : Sequence                                                                |
+-----------------------------------------------------------------------------+

Caveat
======

Like generateTriangulations, this function is
implemented in the top-level Macaulay2 language and is much slower than the
topcom-based allTriangulations.  It does,
however, expose the flip-graph structure that allTriangulations discards, and
it accepts a Limit for incremental exploration.

See also
========

  * generateTriangulations -- generate all
    triangulations with certain properties
  * neighbors -- triangulations adjacent to a given one in
    the bistellar-flip graph
  * bistellarFlip -- perform a bistellar flip on a
    triangulation
  * allTriangulations -- use topcom to
    generate all triangulations of a point or vector configuration

Ways to use flipGraph:
======================

  * "flipGraph(Matrix)"
  * "flipGraph(Matrix,List)"
  * "flipGraph(Triangulation)"

For the programmer
==================

The object flipGraph, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:2488:0.

flips -- legal bistellar flips of a triangulation, computed via topcom
**********************************************************************

  * Usage:
        flips T
  * Inputs:
      * T, an instance of the type Triangulation,
  * Optional inputs (Macaulay2Doc),:
      * RegularOnly => a Boolean value (Macaulay2Doc), default
        value true, restrict to flips between regular triangulations (default
        true)
  * Outputs:
      * a list (Macaulay2Doc), of circuit pairs $\{neg, pos\}$, one
        per legal bistellar flip of $T$

Description
===========

This is a thin wrapper around topcomFlips (Topcom).
Unlike flipCandidates,
which returns every circuit on a codim-2 wall of $T$ (not all
of which are flippable), this function returns only the circuits that
correspond to a legal bistellar flip of $T$, including support-changing flips.

+-----------------------------------------------------------------------------+
|i1 : A = transpose matrix {{0,3},{0,1},{-1,-1},{1,-1},{-4,-2},{4,-2}}        |
|                                                                             |
|o1 = | 0 0 -1 1  -4 4  |                                                     |
|     | 3 1 -1 -1 -2 -2 |                                                     |
|                                                                             |
|              2       6                                                      |
|o1 : Matrix ZZ  <-- ZZ                                                       |
+-----------------------------------------------------------------------------+
|i2 : T = regularFineTriangulation A                                          |
|                                                                             |
|o2 = triangulation {{0, 1, 2}, {0, 1, 3}, {0, 2, 4}, {0, 3, 5}, {1, 2, 3},   |
|                                                                             |
|o2 : Triangulation                                                           |
|-----------------------------------------------------------------------------|
|{2, 3, 4}, {3, 4, 5}}                                                        |
+-----------------------------------------------------------------------------+
|i3 : flips T                                                                 |
|                                                                             |
|o3 = {{{0, 2, 3}, {1}}, {{1, 4}, {0, 2}}, {{1, 5}, {0, 3}}, {{2, 5}, {3, 4}}}|
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * flipCandidates -- candidate affine circuits for
    bistellar flips of a triangulation
  * bistellarFlip -- perform a bistellar flip on a
    triangulation
  * neighbors -- triangulations adjacent to a given one in
    the bistellar-flip graph
  * topcomFlips (Topcom) -- find the
    neighboring triangulations (bistellar flips) of a triangulation

Ways to use flips:
==================

  * "flips(Triangulation)"

For the programmer
==================

The object flips, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:2374:0.

generateTriangulations -- generate all triangulations with certain properties
*****************************************************************************

  * Usage:
        Ts = generateTriangulations A
        Ts = generateTriangulations(A, tri)
        Ts = generateTriangulations T
  * Inputs:
      * A, a matrix (Macaulay2Doc), over the integers (or
        rationals?), whose columns are the points to use
      * tri, a list (Macaulay2Doc), A list of lists of indices
        representing a triangulation of the columns of $A$
      * T, an instance of the type Triangulation,
        packages both $A$ and tri in one object
  * Optional inputs (Macaulay2Doc),:
      * Limit => an integer (Macaulay2Doc), default value infinity,
        Stop after constructing this many triangulations
      * RegularOnly => a Boolean value (Macaulay2Doc), default
        value false, Only generate regular triangulations
      * Homogenize => a Boolean value (Macaulay2Doc), default
        value true, set to false in the case the columns form a vector
        configuration. The default case is that the columns of $A$ are
        considered a point configuration (not used in the variant
        generateTriangulations T)
      * Fine => ..., default value true
      * Strategy => ..., default value Topcom
  * Outputs:
      * Ts, a list (Macaulay2Doc), of lists of integers, each such
        list represents a triangulation

Description
===========

This function can be used to generate a set of triangulations of a point set or
vector configuration $A$ (the points are the columns of $A$).

It operates by starting with one triangulation (tri or T), if one is given, and
if not, it constructs a fine triangulation of the set of columns of $A$.

After this, it uses bistellar flips to generate neighbors, and continues, until
the limit is reached, or no new ones can be constructed.

Important note! This function generally starts with a fine triangulation (i.e.
one using all of the points in $A$), and only considers bistellar flips that
give fine triangulations.

+-----------------------------------------------------------------------------+
|i1 : A = vertices hypercube 3                                                |
|                                                                             |
|o1 = | -1 1  -1 1  -1 1  -1 1 |                                              |
|     | -1 -1 1  1  -1 -1 1  1 |                                              |
|     | -1 -1 -1 -1 1  1  1  1 |                                              |
|                                                                             |
|              3       8                                                      |
|o1 : Matrix QQ  <-- QQ                                                       |
+-----------------------------------------------------------------------------+
|i2 : T = topcomRegularFineTriangulation A                                    |
|                                                                             |
|o2 = {{0, 1, 2, 4}, {1, 2, 3, 4}, {1, 3, 4, 5}, {2, 3, 4, 6}, {3, 4, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {3, 5, 6, 7}}                                                           |
|                                                                             |
|o2 : List                                                                    |
+-----------------------------------------------------------------------------+
|i3 : tri = regularFineTriangulation A                                        |
|                                                                             |
|o3 = triangulation {{0, 1, 2, 4}, {1, 2, 3, 4}, {1, 3, 4, 5}, {2, 3, 4, 6},  |
|                                                                             |
|o3 : Triangulation                                                           |
|-----------------------------------------------------------------------------|
|{3, 4, 5, 6}, {3, 5, 6, 7}}                                                  |
+-----------------------------------------------------------------------------+
|i4 : Ts1 = generateTriangulations A -- list of Triangulation's.              |
|                                                                             |
|o4 = {triangulation {{0, 1, 2, 4}, {1, 2, 3, 4}, {1, 3, 4, 5}, {2, 3, 4, 6}, |
|     ------------------------------------------------------------------------|
|     {3, 4, 5, 6}, {3, 5, 6, 7}}, triangulation {{0, 1, 3, 4}, {0, 2, 3, 4}, |
|     ------------------------------------------------------------------------|
|     {1, 3, 4, 5}, {2, 3, 4, 6}, {3, 4, 5, 6}, {3, 5, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 4}, {1, 2, 3, 5}, {1, 2, 4, 5}, {2, 3, 5, 6}, {2, 4, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {3, 5, 6, 7}}, triangulation {{0, 1, 2, 4}, {1, 2, 3, 6}, {1, 2, 4, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 3, 5, 6}, {1, 4, 5, 6}, {3, 5, 6, 7}}, triangulation {{0, 1, 2, 4}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 4}, {1, 3, 4, 5}, {2, 3, 4, 6}, {3, 4, 5, 7}, {3, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3, 5}, {0, 2, 3, 4}, {0, 3, 4, 5}, {2, 3, 4, 6},  |
|     ------------------------------------------------------------------------|
|     {3, 4, 5, 6}, {3, 5, 6, 7}}, triangulation {{0, 1, 3, 4}, {0, 2, 3, 6}, |
|     ------------------------------------------------------------------------|
|     {0, 3, 4, 6}, {1, 3, 4, 5}, {3, 4, 5, 6}, {3, 5, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 3, 4}, {0, 2, 3, 4}, {1, 3, 4, 5}, {2, 3, 4, 6}, {3, 4, 5, 7},  |
|     ------------------------------------------------------------------------|
|     {3, 4, 6, 7}}, triangulation {{0, 1, 2, 5}, {0, 2, 4, 5}, {1, 2, 3, 5}, |
|     ------------------------------------------------------------------------|
|     {2, 3, 5, 6}, {2, 4, 5, 6}, {3, 5, 6, 7}}, triangulation {{0, 1, 2, 4}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 5}, {1, 2, 4, 5}, {2, 3, 5, 7}, {2, 4, 5, 6}, {2, 5, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 2, 6}, {0, 1, 4, 6}, {1, 2, 3, 6}, {1, 3, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {1, 4, 5, 6}, {3, 5, 6, 7}}, triangulation {{0, 1, 2, 4}, {1, 2, 3, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 4, 6}, {1, 3, 6, 7}, {1, 4, 5, 6}, {1, 5, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 4}, {1, 2, 3, 4}, {1, 3, 4, 7}, {1, 4, 5, 7}, {2, 3, 4, 6},  |
|     ------------------------------------------------------------------------|
|     {3, 4, 6, 7}}, triangulation {{0, 1, 2, 4}, {1, 2, 3, 4}, {1, 3, 4, 5}, |
|     ------------------------------------------------------------------------|
|     {2, 3, 4, 7}, {2, 4, 6, 7}, {3, 4, 5, 7}}, triangulation {{0, 1, 3, 5}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 3, 5}, {0, 2, 4, 5}, {2, 3, 5, 6}, {2, 4, 5, 6}, {3, 5, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3, 5}, {0, 2, 3, 6}, {0, 3, 4, 5}, {0, 3, 4, 6},  |
|     ------------------------------------------------------------------------|
|     {3, 4, 5, 6}, {3, 5, 6, 7}}, triangulation {{0, 1, 3, 5}, {0, 2, 3, 4}, |
|     ------------------------------------------------------------------------|
|     {0, 3, 4, 5}, {2, 3, 4, 6}, {3, 4, 5, 7}, {3, 4, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 3, 6}, {0, 1, 4, 6}, {0, 2, 3, 6}, {1, 3, 5, 6}, {1, 4, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {3, 5, 6, 7}}, triangulation {{0, 1, 3, 4}, {0, 2, 3, 6}, {0, 3, 4, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 3, 4, 5}, {3, 4, 5, 7}, {3, 4, 6, 7}}, triangulation {{0, 1, 3, 4}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 3, 4}, {1, 3, 4, 7}, {1, 4, 5, 7}, {2, 3, 4, 6}, {3, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3, 4}, {0, 2, 3, 4}, {1, 3, 4, 5}, {2, 3, 4, 7},  |
|     ------------------------------------------------------------------------|
|     {2, 4, 6, 7}, {3, 4, 5, 7}}, triangulation {{0, 1, 2, 5}, {0, 2, 5, 6}, |
|     ------------------------------------------------------------------------|
|     {0, 4, 5, 6}, {1, 2, 3, 5}, {2, 3, 5, 6}, {3, 5, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 5}, {0, 2, 4, 5}, {1, 2, 3, 5}, {2, 3, 5, 7}, {2, 4, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {2, 5, 6, 7}}, triangulation {{0, 1, 2, 4}, {1, 2, 3, 7}, {1, 2, 4, 5}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 5, 7}, {2, 4, 5, 6}, {2, 5, 6, 7}}, triangulation {{0, 1, 2, 4}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 5}, {1, 2, 4, 5}, {2, 3, 5, 7}, {2, 4, 5, 7}, {2, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 2, 6}, {0, 1, 5, 6}, {0, 4, 5, 6}, {1, 2, 3, 6},  |
|     ------------------------------------------------------------------------|
|     {1, 3, 5, 6}, {3, 5, 6, 7}}, triangulation {{0, 1, 2, 6}, {0, 1, 4, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 6}, {1, 3, 6, 7}, {1, 4, 5, 6}, {1, 5, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 4}, {1, 2, 3, 7}, {1, 2, 4, 6}, {1, 2, 6, 7}, {1, 4, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {1, 5, 6, 7}}, triangulation {{0, 1, 2, 4}, {1, 2, 3, 6}, {1, 2, 4, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 3, 6, 7}, {1, 4, 5, 7}, {1, 4, 6, 7}}, triangulation {{0, 1, 2, 4}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 4}, {1, 3, 4, 7}, {1, 4, 5, 7}, {2, 3, 4, 7}, {2, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3, 5}, {0, 2, 3, 5}, {0, 2, 5, 6}, {0, 4, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {2, 3, 5, 6}, {3, 5, 6, 7}}, triangulation {{0, 1, 3, 5}, {0, 2, 3, 5}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 4, 5}, {2, 3, 5, 7}, {2, 4, 5, 6}, {2, 5, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 3, 5}, {0, 2, 3, 6}, {0, 3, 5, 6}, {0, 4, 5, 6}, {3, 5, 6, 7}}, |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3, 5}, {0, 2, 3, 6}, {0, 3, 4, 5}, {0, 3, 4, 6},  |
|     ------------------------------------------------------------------------|
|     {3, 4, 5, 7}, {3, 4, 6, 7}}, triangulation {{0, 1, 3, 5}, {0, 2, 3, 4}, |
|     ------------------------------------------------------------------------|
|     {0, 3, 4, 5}, {2, 3, 4, 7}, {2, 4, 6, 7}, {3, 4, 5, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 3, 6}, {0, 1, 5, 6}, {0, 2, 3, 6}, {0, 4, 5, 6}, {1, 3, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {3, 5, 6, 7}}, triangulation {{0, 1, 3, 6}, {0, 1, 4, 6}, {0, 2, 3, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 3, 6, 7}, {1, 4, 5, 6}, {1, 5, 6, 7}}, triangulation {{0, 1, 3, 4}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 3, 6}, {0, 3, 4, 6}, {1, 3, 4, 7}, {1, 4, 5, 7}, {3, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3, 4}, {0, 2, 3, 4}, {1, 3, 4, 7}, {1, 4, 5, 7},  |
|     ------------------------------------------------------------------------|
|     {2, 3, 4, 7}, {2, 4, 6, 7}}, triangulation {{0, 1, 2, 5}, {0, 2, 5, 6}, |
|     ------------------------------------------------------------------------|
|     {0, 4, 5, 6}, {1, 2, 3, 5}, {2, 3, 5, 7}, {2, 5, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 5}, {0, 2, 4, 5}, {1, 2, 3, 7}, {1, 2, 5, 7}, {2, 4, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {2, 5, 6, 7}}, triangulation {{0, 1, 2, 5}, {0, 2, 4, 5}, {1, 2, 3, 5}, |
|     ------------------------------------------------------------------------|
|     {2, 3, 5, 7}, {2, 4, 5, 7}, {2, 4, 6, 7}}, triangulation {{0, 1, 2, 4}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 7}, {1, 2, 4, 5}, {1, 2, 5, 7}, {2, 4, 5, 7}, {2, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 2, 6}, {0, 1, 5, 6}, {0, 4, 5, 6}, {1, 2, 3, 6},  |
|     ------------------------------------------------------------------------|
|     {1, 3, 6, 7}, {1, 5, 6, 7}}, triangulation {{0, 1, 2, 6}, {0, 1, 4, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 7}, {1, 2, 6, 7}, {1, 4, 5, 6}, {1, 5, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 6}, {0, 1, 4, 6}, {1, 2, 3, 6}, {1, 3, 6, 7}, {1, 4, 5, 7},  |
|     ------------------------------------------------------------------------|
|     {1, 4, 6, 7}}, triangulation {{0, 1, 2, 4}, {1, 2, 3, 7}, {1, 2, 4, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 6, 7}, {1, 4, 5, 7}, {1, 4, 6, 7}}, triangulation {{0, 1, 2, 4}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 7}, {1, 2, 4, 7}, {1, 4, 5, 7}, {2, 4, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 3, 5}, {0, 2, 3, 5}, {0, 2, 5, 6}, {0, 4, 5, 6}, {2, 3, 5, 7},  |
|     ------------------------------------------------------------------------|
|     {2, 5, 6, 7}}, triangulation {{0, 1, 3, 5}, {0, 2, 3, 5}, {0, 2, 4, 5}, |
|     ------------------------------------------------------------------------|
|     {2, 3, 5, 7}, {2, 4, 5, 7}, {2, 4, 6, 7}}, triangulation {{0, 1, 3, 5}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 3, 6}, {0, 3, 5, 7}, {0, 3, 6, 7}, {0, 4, 5, 6}, {0, 5, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3, 5}, {0, 2, 3, 6}, {0, 3, 5, 7}, {0, 3, 6, 7},  |
|     ------------------------------------------------------------------------|
|     {0, 4, 5, 7}, {0, 4, 6, 7}}, triangulation {{0, 1, 3, 5}, {0, 2, 3, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 4, 7}, {0, 3, 5, 7}, {0, 4, 5, 7}, {2, 4, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 3, 6}, {0, 1, 5, 6}, {0, 2, 3, 6}, {0, 4, 5, 6}, {1, 3, 6, 7},  |
|     ------------------------------------------------------------------------|
|     {1, 5, 6, 7}}, triangulation {{0, 1, 3, 6}, {0, 1, 4, 6}, {0, 2, 3, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 3, 6, 7}, {1, 4, 5, 7}, {1, 4, 6, 7}}, triangulation {{0, 1, 3, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 1, 4, 7}, {0, 2, 3, 6}, {0, 3, 6, 7}, {0, 4, 6, 7}, {1, 4, 5, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3, 7}, {0, 1, 4, 7}, {0, 2, 3, 7}, {0, 2, 4, 7},  |
|     ------------------------------------------------------------------------|
|     {1, 4, 5, 7}, {2, 4, 6, 7}}, triangulation {{0, 1, 2, 5}, {0, 2, 5, 6}, |
|     ------------------------------------------------------------------------|
|     {0, 4, 5, 6}, {1, 2, 3, 7}, {1, 2, 5, 7}, {2, 5, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 5}, {0, 2, 4, 5}, {1, 2, 3, 7}, {1, 2, 5, 7}, {2, 4, 5, 7},  |
|     ------------------------------------------------------------------------|
|     {2, 4, 6, 7}}, triangulation {{0, 1, 2, 6}, {0, 1, 5, 6}, {0, 4, 5, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 7}, {1, 2, 6, 7}, {1, 5, 6, 7}}, triangulation {{0, 1, 2, 6}, |
|     ------------------------------------------------------------------------|
|     {0, 1, 4, 6}, {1, 2, 3, 7}, {1, 2, 6, 7}, {1, 4, 5, 7}, {1, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 2, 7}, {0, 1, 4, 7}, {0, 2, 4, 7}, {1, 2, 3, 7},  |
|     ------------------------------------------------------------------------|
|     {1, 4, 5, 7}, {2, 4, 6, 7}}, triangulation {{0, 1, 3, 5}, {0, 2, 3, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 6, 7}, {0, 3, 5, 7}, {0, 4, 5, 6}, {0, 5, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 3, 7}, {0, 1, 5, 7}, {0, 2, 3, 6}, {0, 3, 6, 7}, {0, 4, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {0, 5, 6, 7}}, triangulation {{0, 1, 3, 7}, {0, 1, 5, 7}, {0, 2, 3, 6}, |
|     ------------------------------------------------------------------------|
|     {0, 3, 6, 7}, {0, 4, 5, 7}, {0, 4, 6, 7}}, triangulation {{0, 1, 3, 5}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 3, 7}, {0, 2, 6, 7}, {0, 3, 5, 7}, {0, 4, 5, 7}, {0, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3, 7}, {0, 1, 5, 7}, {0, 2, 3, 7}, {0, 2, 4, 7},  |
|     ------------------------------------------------------------------------|
|     {0, 4, 5, 7}, {2, 4, 6, 7}}, triangulation {{0, 1, 3, 7}, {0, 1, 4, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 3, 7}, {0, 2, 6, 7}, {0, 4, 6, 7}, {1, 4, 5, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 7}, {0, 1, 5, 7}, {0, 2, 6, 7}, {0, 4, 5, 6}, {0, 5, 6, 7},  |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 7}}, triangulation {{0, 1, 2, 7}, {0, 1, 5, 7}, {0, 2, 4, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 4, 5, 7}, {1, 2, 3, 7}, {2, 4, 6, 7}}, triangulation {{0, 1, 2, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 1, 4, 7}, {0, 2, 6, 7}, {0, 4, 6, 7}, {1, 2, 3, 7}, {1, 4, 5, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3, 7}, {0, 1, 5, 7}, {0, 2, 3, 7}, {0, 2, 6, 7},  |
|     ------------------------------------------------------------------------|
|     {0, 4, 5, 6}, {0, 5, 6, 7}}, triangulation {{0, 1, 3, 7}, {0, 1, 5, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 3, 7}, {0, 2, 6, 7}, {0, 4, 5, 7}, {0, 4, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 7}, {0, 1, 5, 7}, {0, 2, 6, 7}, {0, 4, 5, 7}, {0, 4, 6, 7},  |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 7}}}                                                          |
|                                                                             |
|o4 : List                                                                    |
+-----------------------------------------------------------------------------+
|i5 : Ts2 = generateTriangulations(A, T) -- list of list of subsets           |
|                                                                             |
|o5 = {{{0, 1, 2, 4}, {1, 2, 3, 4}, {1, 3, 4, 5}, {2, 3, 4, 6}, {3, 4, 5, 6}, |
|     ------------------------------------------------------------------------|
|     {3, 5, 6, 7}}, {{0, 1, 3, 4}, {0, 2, 3, 4}, {1, 3, 4, 5}, {2, 3, 4, 6}, |
|     ------------------------------------------------------------------------|
|     {3, 4, 5, 6}, {3, 5, 6, 7}}, {{0, 1, 2, 4}, {1, 2, 3, 5}, {1, 2, 4, 5}, |
|     ------------------------------------------------------------------------|
|     {2, 3, 5, 6}, {2, 4, 5, 6}, {3, 5, 6, 7}}, {{0, 1, 2, 4}, {1, 2, 3, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 4, 6}, {1, 3, 5, 6}, {1, 4, 5, 6}, {3, 5, 6, 7}}, {{0, 1, 2, 4}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 4}, {1, 3, 4, 5}, {2, 3, 4, 6}, {3, 4, 5, 7}, {3, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 3, 5}, {0, 2, 3, 4}, {0, 3, 4, 5}, {2, 3, 4, 6}, {3, 4, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {3, 5, 6, 7}}, {{0, 1, 3, 4}, {0, 2, 3, 6}, {0, 3, 4, 6}, {1, 3, 4, 5}, |
|     ------------------------------------------------------------------------|
|     {3, 4, 5, 6}, {3, 5, 6, 7}}, {{0, 1, 3, 4}, {0, 2, 3, 4}, {1, 3, 4, 5}, |
|     ------------------------------------------------------------------------|
|     {2, 3, 4, 6}, {3, 4, 5, 7}, {3, 4, 6, 7}}, {{0, 1, 2, 5}, {0, 2, 4, 5}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 5}, {2, 3, 5, 6}, {2, 4, 5, 6}, {3, 5, 6, 7}}, {{0, 1, 2, 4}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 5}, {1, 2, 4, 5}, {2, 3, 5, 7}, {2, 4, 5, 6}, {2, 5, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 6}, {0, 1, 4, 6}, {1, 2, 3, 6}, {1, 3, 5, 6}, {1, 4, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {3, 5, 6, 7}}, {{0, 1, 2, 4}, {1, 2, 3, 6}, {1, 2, 4, 6}, {1, 3, 6, 7}, |
|     ------------------------------------------------------------------------|
|     {1, 4, 5, 6}, {1, 5, 6, 7}}, {{0, 1, 2, 4}, {1, 2, 3, 4}, {1, 3, 4, 7}, |
|     ------------------------------------------------------------------------|
|     {1, 4, 5, 7}, {2, 3, 4, 6}, {3, 4, 6, 7}}, {{0, 1, 2, 4}, {1, 2, 3, 4}, |
|     ------------------------------------------------------------------------|
|     {1, 3, 4, 5}, {2, 3, 4, 7}, {2, 4, 6, 7}, {3, 4, 5, 7}}, {{0, 1, 3, 5}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 3, 5}, {0, 2, 4, 5}, {2, 3, 5, 6}, {2, 4, 5, 6}, {3, 5, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 3, 5}, {0, 2, 3, 6}, {0, 3, 4, 5}, {0, 3, 4, 6}, {3, 4, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {3, 5, 6, 7}}, {{0, 1, 3, 5}, {0, 2, 3, 4}, {0, 3, 4, 5}, {2, 3, 4, 6}, |
|     ------------------------------------------------------------------------|
|     {3, 4, 5, 7}, {3, 4, 6, 7}}, {{0, 1, 3, 6}, {0, 1, 4, 6}, {0, 2, 3, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 3, 5, 6}, {1, 4, 5, 6}, {3, 5, 6, 7}}, {{0, 1, 3, 4}, {0, 2, 3, 6}, |
|     ------------------------------------------------------------------------|
|     {0, 3, 4, 6}, {1, 3, 4, 5}, {3, 4, 5, 7}, {3, 4, 6, 7}}, {{0, 1, 3, 4}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 3, 4}, {1, 3, 4, 7}, {1, 4, 5, 7}, {2, 3, 4, 6}, {3, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 3, 4}, {0, 2, 3, 4}, {1, 3, 4, 5}, {2, 3, 4, 7}, {2, 4, 6, 7},  |
|     ------------------------------------------------------------------------|
|     {3, 4, 5, 7}}, {{0, 1, 2, 5}, {0, 2, 5, 6}, {0, 4, 5, 6}, {1, 2, 3, 5}, |
|     ------------------------------------------------------------------------|
|     {2, 3, 5, 6}, {3, 5, 6, 7}}, {{0, 1, 2, 5}, {0, 2, 4, 5}, {1, 2, 3, 5}, |
|     ------------------------------------------------------------------------|
|     {2, 3, 5, 7}, {2, 4, 5, 6}, {2, 5, 6, 7}}, {{0, 1, 2, 4}, {1, 2, 3, 7}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 4, 5}, {1, 2, 5, 7}, {2, 4, 5, 6}, {2, 5, 6, 7}}, {{0, 1, 2, 4}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 5}, {1, 2, 4, 5}, {2, 3, 5, 7}, {2, 4, 5, 7}, {2, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 6}, {0, 1, 5, 6}, {0, 4, 5, 6}, {1, 2, 3, 6}, {1, 3, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {3, 5, 6, 7}}, {{0, 1, 2, 6}, {0, 1, 4, 6}, {1, 2, 3, 6}, {1, 3, 6, 7}, |
|     ------------------------------------------------------------------------|
|     {1, 4, 5, 6}, {1, 5, 6, 7}}, {{0, 1, 2, 4}, {1, 2, 3, 7}, {1, 2, 4, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 6, 7}, {1, 4, 5, 6}, {1, 5, 6, 7}}, {{0, 1, 2, 4}, {1, 2, 3, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 4, 6}, {1, 3, 6, 7}, {1, 4, 5, 7}, {1, 4, 6, 7}}, {{0, 1, 2, 4}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 4}, {1, 3, 4, 7}, {1, 4, 5, 7}, {2, 3, 4, 7}, {2, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 3, 5}, {0, 2, 3, 5}, {0, 2, 5, 6}, {0, 4, 5, 6}, {2, 3, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {3, 5, 6, 7}}, {{0, 1, 3, 5}, {0, 2, 3, 5}, {0, 2, 4, 5}, {2, 3, 5, 7}, |
|     ------------------------------------------------------------------------|
|     {2, 4, 5, 6}, {2, 5, 6, 7}}, {{0, 1, 3, 5}, {0, 2, 3, 6}, {0, 3, 5, 6}, |
|     ------------------------------------------------------------------------|
|     {0, 4, 5, 6}, {3, 5, 6, 7}}, {{0, 1, 3, 5}, {0, 2, 3, 6}, {0, 3, 4, 5}, |
|     ------------------------------------------------------------------------|
|     {0, 3, 4, 6}, {3, 4, 5, 7}, {3, 4, 6, 7}}, {{0, 1, 3, 5}, {0, 2, 3, 4}, |
|     ------------------------------------------------------------------------|
|     {0, 3, 4, 5}, {2, 3, 4, 7}, {2, 4, 6, 7}, {3, 4, 5, 7}}, {{0, 1, 3, 6}, |
|     ------------------------------------------------------------------------|
|     {0, 1, 5, 6}, {0, 2, 3, 6}, {0, 4, 5, 6}, {1, 3, 5, 6}, {3, 5, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 3, 6}, {0, 1, 4, 6}, {0, 2, 3, 6}, {1, 3, 6, 7}, {1, 4, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {1, 5, 6, 7}}, {{0, 1, 3, 4}, {0, 2, 3, 6}, {0, 3, 4, 6}, {1, 3, 4, 7}, |
|     ------------------------------------------------------------------------|
|     {1, 4, 5, 7}, {3, 4, 6, 7}}, {{0, 1, 3, 4}, {0, 2, 3, 4}, {1, 3, 4, 7}, |
|     ------------------------------------------------------------------------|
|     {1, 4, 5, 7}, {2, 3, 4, 7}, {2, 4, 6, 7}}, {{0, 1, 2, 5}, {0, 2, 5, 6}, |
|     ------------------------------------------------------------------------|
|     {0, 4, 5, 6}, {1, 2, 3, 5}, {2, 3, 5, 7}, {2, 5, 6, 7}}, {{0, 1, 2, 5}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 4, 5}, {1, 2, 3, 7}, {1, 2, 5, 7}, {2, 4, 5, 6}, {2, 5, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 5}, {0, 2, 4, 5}, {1, 2, 3, 5}, {2, 3, 5, 7}, {2, 4, 5, 7},  |
|     ------------------------------------------------------------------------|
|     {2, 4, 6, 7}}, {{0, 1, 2, 4}, {1, 2, 3, 7}, {1, 2, 4, 5}, {1, 2, 5, 7}, |
|     ------------------------------------------------------------------------|
|     {2, 4, 5, 7}, {2, 4, 6, 7}}, {{0, 1, 2, 6}, {0, 1, 5, 6}, {0, 4, 5, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 6}, {1, 3, 6, 7}, {1, 5, 6, 7}}, {{0, 1, 2, 6}, {0, 1, 4, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 7}, {1, 2, 6, 7}, {1, 4, 5, 6}, {1, 5, 6, 7}}, {{0, 1, 2, 6}, |
|     ------------------------------------------------------------------------|
|     {0, 1, 4, 6}, {1, 2, 3, 6}, {1, 3, 6, 7}, {1, 4, 5, 7}, {1, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 4}, {1, 2, 3, 7}, {1, 2, 4, 6}, {1, 2, 6, 7}, {1, 4, 5, 7},  |
|     ------------------------------------------------------------------------|
|     {1, 4, 6, 7}}, {{0, 1, 2, 4}, {1, 2, 3, 7}, {1, 2, 4, 7}, {1, 4, 5, 7}, |
|     ------------------------------------------------------------------------|
|     {2, 4, 6, 7}}, {{0, 1, 3, 5}, {0, 2, 3, 5}, {0, 2, 5, 6}, {0, 4, 5, 6}, |
|     ------------------------------------------------------------------------|
|     {2, 3, 5, 7}, {2, 5, 6, 7}}, {{0, 1, 3, 5}, {0, 2, 3, 5}, {0, 2, 4, 5}, |
|     ------------------------------------------------------------------------|
|     {2, 3, 5, 7}, {2, 4, 5, 7}, {2, 4, 6, 7}}, {{0, 1, 3, 5}, {0, 2, 3, 6}, |
|     ------------------------------------------------------------------------|
|     {0, 3, 5, 7}, {0, 3, 6, 7}, {0, 4, 5, 6}, {0, 5, 6, 7}}, {{0, 1, 3, 5}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 3, 6}, {0, 3, 5, 7}, {0, 3, 6, 7}, {0, 4, 5, 7}, {0, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 3, 5}, {0, 2, 3, 7}, {0, 2, 4, 7}, {0, 3, 5, 7}, {0, 4, 5, 7},  |
|     ------------------------------------------------------------------------|
|     {2, 4, 6, 7}}, {{0, 1, 3, 6}, {0, 1, 5, 6}, {0, 2, 3, 6}, {0, 4, 5, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 3, 6, 7}, {1, 5, 6, 7}}, {{0, 1, 3, 6}, {0, 1, 4, 6}, {0, 2, 3, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 3, 6, 7}, {1, 4, 5, 7}, {1, 4, 6, 7}}, {{0, 1, 3, 7}, {0, 1, 4, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 3, 6}, {0, 3, 6, 7}, {0, 4, 6, 7}, {1, 4, 5, 7}}, {{0, 1, 3, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 1, 4, 7}, {0, 2, 3, 7}, {0, 2, 4, 7}, {1, 4, 5, 7}, {2, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 5}, {0, 2, 5, 6}, {0, 4, 5, 6}, {1, 2, 3, 7}, {1, 2, 5, 7},  |
|     ------------------------------------------------------------------------|
|     {2, 5, 6, 7}}, {{0, 1, 2, 5}, {0, 2, 4, 5}, {1, 2, 3, 7}, {1, 2, 5, 7}, |
|     ------------------------------------------------------------------------|
|     {2, 4, 5, 7}, {2, 4, 6, 7}}, {{0, 1, 2, 6}, {0, 1, 5, 6}, {0, 4, 5, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 7}, {1, 2, 6, 7}, {1, 5, 6, 7}}, {{0, 1, 2, 6}, {0, 1, 4, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 7}, {1, 2, 6, 7}, {1, 4, 5, 7}, {1, 4, 6, 7}}, {{0, 1, 2, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 1, 4, 7}, {0, 2, 4, 7}, {1, 2, 3, 7}, {1, 4, 5, 7}, {2, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 3, 5}, {0, 2, 3, 7}, {0, 2, 6, 7}, {0, 3, 5, 7}, {0, 4, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {0, 5, 6, 7}}, {{0, 1, 3, 7}, {0, 1, 5, 7}, {0, 2, 3, 6}, {0, 3, 6, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 4, 5, 6}, {0, 5, 6, 7}}, {{0, 1, 3, 7}, {0, 1, 5, 7}, {0, 2, 3, 6}, |
|     ------------------------------------------------------------------------|
|     {0, 3, 6, 7}, {0, 4, 5, 7}, {0, 4, 6, 7}}, {{0, 1, 3, 5}, {0, 2, 3, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 6, 7}, {0, 3, 5, 7}, {0, 4, 5, 7}, {0, 4, 6, 7}}, {{0, 1, 3, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 1, 5, 7}, {0, 2, 3, 7}, {0, 2, 4, 7}, {0, 4, 5, 7}, {2, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 3, 7}, {0, 1, 4, 7}, {0, 2, 3, 7}, {0, 2, 6, 7}, {0, 4, 6, 7},  |
|     ------------------------------------------------------------------------|
|     {1, 4, 5, 7}}, {{0, 1, 2, 7}, {0, 1, 5, 7}, {0, 2, 6, 7}, {0, 4, 5, 6}, |
|     ------------------------------------------------------------------------|
|     {0, 5, 6, 7}, {1, 2, 3, 7}}, {{0, 1, 2, 7}, {0, 1, 5, 7}, {0, 2, 4, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 4, 5, 7}, {1, 2, 3, 7}, {2, 4, 6, 7}}, {{0, 1, 2, 7}, {0, 1, 4, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 6, 7}, {0, 4, 6, 7}, {1, 2, 3, 7}, {1, 4, 5, 7}}, {{0, 1, 3, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 1, 5, 7}, {0, 2, 3, 7}, {0, 2, 6, 7}, {0, 4, 5, 6}, {0, 5, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 3, 7}, {0, 1, 5, 7}, {0, 2, 3, 7}, {0, 2, 6, 7}, {0, 4, 5, 7},  |
|     ------------------------------------------------------------------------|
|     {0, 4, 6, 7}}, {{0, 1, 2, 7}, {0, 1, 5, 7}, {0, 2, 6, 7}, {0, 4, 5, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 4, 6, 7}, {1, 2, 3, 7}}}                                            |
|                                                                             |
|o5 : List                                                                    |
+-----------------------------------------------------------------------------+
|i6 : Ts3 = generateTriangulations triangulation(A, T) -- list of Triangulatio|
|                                                                             |
|o6 = {triangulation {{0, 1, 2, 4}, {1, 2, 3, 4}, {1, 3, 4, 5}, {2, 3, 4, 6}, |
|     ------------------------------------------------------------------------|
|     {3, 4, 5, 6}, {3, 5, 6, 7}}, triangulation {{0, 1, 3, 4}, {0, 2, 3, 4}, |
|     ------------------------------------------------------------------------|
|     {1, 3, 4, 5}, {2, 3, 4, 6}, {3, 4, 5, 6}, {3, 5, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 4}, {1, 2, 3, 5}, {1, 2, 4, 5}, {2, 3, 5, 6}, {2, 4, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {3, 5, 6, 7}}, triangulation {{0, 1, 2, 4}, {1, 2, 3, 6}, {1, 2, 4, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 3, 5, 6}, {1, 4, 5, 6}, {3, 5, 6, 7}}, triangulation {{0, 1, 2, 4}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 4}, {1, 3, 4, 5}, {2, 3, 4, 6}, {3, 4, 5, 7}, {3, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3, 5}, {0, 2, 3, 4}, {0, 3, 4, 5}, {2, 3, 4, 6},  |
|     ------------------------------------------------------------------------|
|     {3, 4, 5, 6}, {3, 5, 6, 7}}, triangulation {{0, 1, 3, 4}, {0, 2, 3, 6}, |
|     ------------------------------------------------------------------------|
|     {0, 3, 4, 6}, {1, 3, 4, 5}, {3, 4, 5, 6}, {3, 5, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 3, 4}, {0, 2, 3, 4}, {1, 3, 4, 5}, {2, 3, 4, 6}, {3, 4, 5, 7},  |
|     ------------------------------------------------------------------------|
|     {3, 4, 6, 7}}, triangulation {{0, 1, 2, 5}, {0, 2, 4, 5}, {1, 2, 3, 5}, |
|     ------------------------------------------------------------------------|
|     {2, 3, 5, 6}, {2, 4, 5, 6}, {3, 5, 6, 7}}, triangulation {{0, 1, 2, 4}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 5}, {1, 2, 4, 5}, {2, 3, 5, 7}, {2, 4, 5, 6}, {2, 5, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 2, 6}, {0, 1, 4, 6}, {1, 2, 3, 6}, {1, 3, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {1, 4, 5, 6}, {3, 5, 6, 7}}, triangulation {{0, 1, 2, 4}, {1, 2, 3, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 4, 6}, {1, 3, 6, 7}, {1, 4, 5, 6}, {1, 5, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 4}, {1, 2, 3, 4}, {1, 3, 4, 7}, {1, 4, 5, 7}, {2, 3, 4, 6},  |
|     ------------------------------------------------------------------------|
|     {3, 4, 6, 7}}, triangulation {{0, 1, 2, 4}, {1, 2, 3, 4}, {1, 3, 4, 5}, |
|     ------------------------------------------------------------------------|
|     {2, 3, 4, 7}, {2, 4, 6, 7}, {3, 4, 5, 7}}, triangulation {{0, 1, 3, 5}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 3, 5}, {0, 2, 4, 5}, {2, 3, 5, 6}, {2, 4, 5, 6}, {3, 5, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3, 5}, {0, 2, 3, 6}, {0, 3, 4, 5}, {0, 3, 4, 6},  |
|     ------------------------------------------------------------------------|
|     {3, 4, 5, 6}, {3, 5, 6, 7}}, triangulation {{0, 1, 3, 5}, {0, 2, 3, 4}, |
|     ------------------------------------------------------------------------|
|     {0, 3, 4, 5}, {2, 3, 4, 6}, {3, 4, 5, 7}, {3, 4, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 3, 6}, {0, 1, 4, 6}, {0, 2, 3, 6}, {1, 3, 5, 6}, {1, 4, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {3, 5, 6, 7}}, triangulation {{0, 1, 3, 4}, {0, 2, 3, 6}, {0, 3, 4, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 3, 4, 5}, {3, 4, 5, 7}, {3, 4, 6, 7}}, triangulation {{0, 1, 3, 4}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 3, 4}, {1, 3, 4, 7}, {1, 4, 5, 7}, {2, 3, 4, 6}, {3, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3, 4}, {0, 2, 3, 4}, {1, 3, 4, 5}, {2, 3, 4, 7},  |
|     ------------------------------------------------------------------------|
|     {2, 4, 6, 7}, {3, 4, 5, 7}}, triangulation {{0, 1, 2, 5}, {0, 2, 5, 6}, |
|     ------------------------------------------------------------------------|
|     {0, 4, 5, 6}, {1, 2, 3, 5}, {2, 3, 5, 6}, {3, 5, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 5}, {0, 2, 4, 5}, {1, 2, 3, 5}, {2, 3, 5, 7}, {2, 4, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {2, 5, 6, 7}}, triangulation {{0, 1, 2, 4}, {1, 2, 3, 7}, {1, 2, 4, 5}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 5, 7}, {2, 4, 5, 6}, {2, 5, 6, 7}}, triangulation {{0, 1, 2, 4}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 5}, {1, 2, 4, 5}, {2, 3, 5, 7}, {2, 4, 5, 7}, {2, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 2, 6}, {0, 1, 5, 6}, {0, 4, 5, 6}, {1, 2, 3, 6},  |
|     ------------------------------------------------------------------------|
|     {1, 3, 5, 6}, {3, 5, 6, 7}}, triangulation {{0, 1, 2, 6}, {0, 1, 4, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 6}, {1, 3, 6, 7}, {1, 4, 5, 6}, {1, 5, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 4}, {1, 2, 3, 7}, {1, 2, 4, 6}, {1, 2, 6, 7}, {1, 4, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {1, 5, 6, 7}}, triangulation {{0, 1, 2, 4}, {1, 2, 3, 6}, {1, 2, 4, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 3, 6, 7}, {1, 4, 5, 7}, {1, 4, 6, 7}}, triangulation {{0, 1, 2, 4}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 4}, {1, 3, 4, 7}, {1, 4, 5, 7}, {2, 3, 4, 7}, {2, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3, 5}, {0, 2, 3, 5}, {0, 2, 5, 6}, {0, 4, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {2, 3, 5, 6}, {3, 5, 6, 7}}, triangulation {{0, 1, 3, 5}, {0, 2, 3, 5}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 4, 5}, {2, 3, 5, 7}, {2, 4, 5, 6}, {2, 5, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 3, 5}, {0, 2, 3, 6}, {0, 3, 5, 6}, {0, 4, 5, 6}, {3, 5, 6, 7}}, |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3, 5}, {0, 2, 3, 6}, {0, 3, 4, 5}, {0, 3, 4, 6},  |
|     ------------------------------------------------------------------------|
|     {3, 4, 5, 7}, {3, 4, 6, 7}}, triangulation {{0, 1, 3, 5}, {0, 2, 3, 4}, |
|     ------------------------------------------------------------------------|
|     {0, 3, 4, 5}, {2, 3, 4, 7}, {2, 4, 6, 7}, {3, 4, 5, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 3, 6}, {0, 1, 5, 6}, {0, 2, 3, 6}, {0, 4, 5, 6}, {1, 3, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {3, 5, 6, 7}}, triangulation {{0, 1, 3, 6}, {0, 1, 4, 6}, {0, 2, 3, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 3, 6, 7}, {1, 4, 5, 6}, {1, 5, 6, 7}}, triangulation {{0, 1, 3, 4}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 3, 6}, {0, 3, 4, 6}, {1, 3, 4, 7}, {1, 4, 5, 7}, {3, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3, 4}, {0, 2, 3, 4}, {1, 3, 4, 7}, {1, 4, 5, 7},  |
|     ------------------------------------------------------------------------|
|     {2, 3, 4, 7}, {2, 4, 6, 7}}, triangulation {{0, 1, 2, 5}, {0, 2, 5, 6}, |
|     ------------------------------------------------------------------------|
|     {0, 4, 5, 6}, {1, 2, 3, 5}, {2, 3, 5, 7}, {2, 5, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 5}, {0, 2, 4, 5}, {1, 2, 3, 7}, {1, 2, 5, 7}, {2, 4, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {2, 5, 6, 7}}, triangulation {{0, 1, 2, 5}, {0, 2, 4, 5}, {1, 2, 3, 5}, |
|     ------------------------------------------------------------------------|
|     {2, 3, 5, 7}, {2, 4, 5, 7}, {2, 4, 6, 7}}, triangulation {{0, 1, 2, 4}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 7}, {1, 2, 4, 5}, {1, 2, 5, 7}, {2, 4, 5, 7}, {2, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 2, 6}, {0, 1, 5, 6}, {0, 4, 5, 6}, {1, 2, 3, 6},  |
|     ------------------------------------------------------------------------|
|     {1, 3, 6, 7}, {1, 5, 6, 7}}, triangulation {{0, 1, 2, 6}, {0, 1, 4, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 7}, {1, 2, 6, 7}, {1, 4, 5, 6}, {1, 5, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 6}, {0, 1, 4, 6}, {1, 2, 3, 6}, {1, 3, 6, 7}, {1, 4, 5, 7},  |
|     ------------------------------------------------------------------------|
|     {1, 4, 6, 7}}, triangulation {{0, 1, 2, 4}, {1, 2, 3, 7}, {1, 2, 4, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 6, 7}, {1, 4, 5, 7}, {1, 4, 6, 7}}, triangulation {{0, 1, 2, 4}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 7}, {1, 2, 4, 7}, {1, 4, 5, 7}, {2, 4, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 3, 5}, {0, 2, 3, 5}, {0, 2, 5, 6}, {0, 4, 5, 6}, {2, 3, 5, 7},  |
|     ------------------------------------------------------------------------|
|     {2, 5, 6, 7}}, triangulation {{0, 1, 3, 5}, {0, 2, 3, 5}, {0, 2, 4, 5}, |
|     ------------------------------------------------------------------------|
|     {2, 3, 5, 7}, {2, 4, 5, 7}, {2, 4, 6, 7}}, triangulation {{0, 1, 3, 5}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 3, 6}, {0, 3, 5, 7}, {0, 3, 6, 7}, {0, 4, 5, 6}, {0, 5, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3, 5}, {0, 2, 3, 6}, {0, 3, 5, 7}, {0, 3, 6, 7},  |
|     ------------------------------------------------------------------------|
|     {0, 4, 5, 7}, {0, 4, 6, 7}}, triangulation {{0, 1, 3, 5}, {0, 2, 3, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 4, 7}, {0, 3, 5, 7}, {0, 4, 5, 7}, {2, 4, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 3, 6}, {0, 1, 5, 6}, {0, 2, 3, 6}, {0, 4, 5, 6}, {1, 3, 6, 7},  |
|     ------------------------------------------------------------------------|
|     {1, 5, 6, 7}}, triangulation {{0, 1, 3, 6}, {0, 1, 4, 6}, {0, 2, 3, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 3, 6, 7}, {1, 4, 5, 7}, {1, 4, 6, 7}}, triangulation {{0, 1, 3, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 1, 4, 7}, {0, 2, 3, 6}, {0, 3, 6, 7}, {0, 4, 6, 7}, {1, 4, 5, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3, 7}, {0, 1, 4, 7}, {0, 2, 3, 7}, {0, 2, 4, 7},  |
|     ------------------------------------------------------------------------|
|     {1, 4, 5, 7}, {2, 4, 6, 7}}, triangulation {{0, 1, 2, 5}, {0, 2, 5, 6}, |
|     ------------------------------------------------------------------------|
|     {0, 4, 5, 6}, {1, 2, 3, 7}, {1, 2, 5, 7}, {2, 5, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 5}, {0, 2, 4, 5}, {1, 2, 3, 7}, {1, 2, 5, 7}, {2, 4, 5, 7},  |
|     ------------------------------------------------------------------------|
|     {2, 4, 6, 7}}, triangulation {{0, 1, 2, 6}, {0, 1, 5, 6}, {0, 4, 5, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 7}, {1, 2, 6, 7}, {1, 5, 6, 7}}, triangulation {{0, 1, 2, 6}, |
|     ------------------------------------------------------------------------|
|     {0, 1, 4, 6}, {1, 2, 3, 7}, {1, 2, 6, 7}, {1, 4, 5, 7}, {1, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 2, 7}, {0, 1, 4, 7}, {0, 2, 4, 7}, {1, 2, 3, 7},  |
|     ------------------------------------------------------------------------|
|     {1, 4, 5, 7}, {2, 4, 6, 7}}, triangulation {{0, 1, 3, 5}, {0, 2, 3, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 6, 7}, {0, 3, 5, 7}, {0, 4, 5, 6}, {0, 5, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 3, 7}, {0, 1, 5, 7}, {0, 2, 3, 6}, {0, 3, 6, 7}, {0, 4, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {0, 5, 6, 7}}, triangulation {{0, 1, 3, 7}, {0, 1, 5, 7}, {0, 2, 3, 6}, |
|     ------------------------------------------------------------------------|
|     {0, 3, 6, 7}, {0, 4, 5, 7}, {0, 4, 6, 7}}, triangulation {{0, 1, 3, 5}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 3, 7}, {0, 2, 6, 7}, {0, 3, 5, 7}, {0, 4, 5, 7}, {0, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3, 7}, {0, 1, 5, 7}, {0, 2, 3, 7}, {0, 2, 4, 7},  |
|     ------------------------------------------------------------------------|
|     {0, 4, 5, 7}, {2, 4, 6, 7}}, triangulation {{0, 1, 3, 7}, {0, 1, 4, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 3, 7}, {0, 2, 6, 7}, {0, 4, 6, 7}, {1, 4, 5, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 7}, {0, 1, 5, 7}, {0, 2, 6, 7}, {0, 4, 5, 6}, {0, 5, 6, 7},  |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 7}}, triangulation {{0, 1, 2, 7}, {0, 1, 5, 7}, {0, 2, 4, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 4, 5, 7}, {1, 2, 3, 7}, {2, 4, 6, 7}}, triangulation {{0, 1, 2, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 1, 4, 7}, {0, 2, 6, 7}, {0, 4, 6, 7}, {1, 2, 3, 7}, {1, 4, 5, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3, 7}, {0, 1, 5, 7}, {0, 2, 3, 7}, {0, 2, 6, 7},  |
|     ------------------------------------------------------------------------|
|     {0, 4, 5, 6}, {0, 5, 6, 7}}, triangulation {{0, 1, 3, 7}, {0, 1, 5, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 3, 7}, {0, 2, 6, 7}, {0, 4, 5, 7}, {0, 4, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 7}, {0, 1, 5, 7}, {0, 2, 6, 7}, {0, 4, 5, 7}, {0, 4, 6, 7},  |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 7}}}                                                          |
|                                                                             |
|o6 : List                                                                    |
|-----------------------------------------------------------------------------|
|ns                                                                           |
+-----------------------------------------------------------------------------+
|i7 : Ts4 = generateTriangulations tri -- list of Triangulations              |
|                                                                             |
|o7 = {triangulation {{0, 1, 2, 4}, {1, 2, 3, 4}, {1, 3, 4, 5}, {2, 3, 4, 6}, |
|     ------------------------------------------------------------------------|
|     {3, 4, 5, 6}, {3, 5, 6, 7}}, triangulation {{0, 1, 3, 4}, {0, 2, 3, 4}, |
|     ------------------------------------------------------------------------|
|     {1, 3, 4, 5}, {2, 3, 4, 6}, {3, 4, 5, 6}, {3, 5, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 4}, {1, 2, 3, 5}, {1, 2, 4, 5}, {2, 3, 5, 6}, {2, 4, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {3, 5, 6, 7}}, triangulation {{0, 1, 2, 4}, {1, 2, 3, 6}, {1, 2, 4, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 3, 5, 6}, {1, 4, 5, 6}, {3, 5, 6, 7}}, triangulation {{0, 1, 2, 4}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 4}, {1, 3, 4, 5}, {2, 3, 4, 6}, {3, 4, 5, 7}, {3, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3, 5}, {0, 2, 3, 4}, {0, 3, 4, 5}, {2, 3, 4, 6},  |
|     ------------------------------------------------------------------------|
|     {3, 4, 5, 6}, {3, 5, 6, 7}}, triangulation {{0, 1, 3, 4}, {0, 2, 3, 6}, |
|     ------------------------------------------------------------------------|
|     {0, 3, 4, 6}, {1, 3, 4, 5}, {3, 4, 5, 6}, {3, 5, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 3, 4}, {0, 2, 3, 4}, {1, 3, 4, 5}, {2, 3, 4, 6}, {3, 4, 5, 7},  |
|     ------------------------------------------------------------------------|
|     {3, 4, 6, 7}}, triangulation {{0, 1, 2, 5}, {0, 2, 4, 5}, {1, 2, 3, 5}, |
|     ------------------------------------------------------------------------|
|     {2, 3, 5, 6}, {2, 4, 5, 6}, {3, 5, 6, 7}}, triangulation {{0, 1, 2, 4}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 5}, {1, 2, 4, 5}, {2, 3, 5, 7}, {2, 4, 5, 6}, {2, 5, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 2, 6}, {0, 1, 4, 6}, {1, 2, 3, 6}, {1, 3, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {1, 4, 5, 6}, {3, 5, 6, 7}}, triangulation {{0, 1, 2, 4}, {1, 2, 3, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 4, 6}, {1, 3, 6, 7}, {1, 4, 5, 6}, {1, 5, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 4}, {1, 2, 3, 4}, {1, 3, 4, 7}, {1, 4, 5, 7}, {2, 3, 4, 6},  |
|     ------------------------------------------------------------------------|
|     {3, 4, 6, 7}}, triangulation {{0, 1, 2, 4}, {1, 2, 3, 4}, {1, 3, 4, 5}, |
|     ------------------------------------------------------------------------|
|     {2, 3, 4, 7}, {2, 4, 6, 7}, {3, 4, 5, 7}}, triangulation {{0, 1, 3, 5}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 3, 5}, {0, 2, 4, 5}, {2, 3, 5, 6}, {2, 4, 5, 6}, {3, 5, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3, 5}, {0, 2, 3, 6}, {0, 3, 4, 5}, {0, 3, 4, 6},  |
|     ------------------------------------------------------------------------|
|     {3, 4, 5, 6}, {3, 5, 6, 7}}, triangulation {{0, 1, 3, 5}, {0, 2, 3, 4}, |
|     ------------------------------------------------------------------------|
|     {0, 3, 4, 5}, {2, 3, 4, 6}, {3, 4, 5, 7}, {3, 4, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 3, 6}, {0, 1, 4, 6}, {0, 2, 3, 6}, {1, 3, 5, 6}, {1, 4, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {3, 5, 6, 7}}, triangulation {{0, 1, 3, 4}, {0, 2, 3, 6}, {0, 3, 4, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 3, 4, 5}, {3, 4, 5, 7}, {3, 4, 6, 7}}, triangulation {{0, 1, 3, 4}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 3, 4}, {1, 3, 4, 7}, {1, 4, 5, 7}, {2, 3, 4, 6}, {3, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3, 4}, {0, 2, 3, 4}, {1, 3, 4, 5}, {2, 3, 4, 7},  |
|     ------------------------------------------------------------------------|
|     {2, 4, 6, 7}, {3, 4, 5, 7}}, triangulation {{0, 1, 2, 5}, {0, 2, 5, 6}, |
|     ------------------------------------------------------------------------|
|     {0, 4, 5, 6}, {1, 2, 3, 5}, {2, 3, 5, 6}, {3, 5, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 5}, {0, 2, 4, 5}, {1, 2, 3, 5}, {2, 3, 5, 7}, {2, 4, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {2, 5, 6, 7}}, triangulation {{0, 1, 2, 4}, {1, 2, 3, 7}, {1, 2, 4, 5}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 5, 7}, {2, 4, 5, 6}, {2, 5, 6, 7}}, triangulation {{0, 1, 2, 4}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 5}, {1, 2, 4, 5}, {2, 3, 5, 7}, {2, 4, 5, 7}, {2, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 2, 6}, {0, 1, 5, 6}, {0, 4, 5, 6}, {1, 2, 3, 6},  |
|     ------------------------------------------------------------------------|
|     {1, 3, 5, 6}, {3, 5, 6, 7}}, triangulation {{0, 1, 2, 6}, {0, 1, 4, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 6}, {1, 3, 6, 7}, {1, 4, 5, 6}, {1, 5, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 4}, {1, 2, 3, 7}, {1, 2, 4, 6}, {1, 2, 6, 7}, {1, 4, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {1, 5, 6, 7}}, triangulation {{0, 1, 2, 4}, {1, 2, 3, 6}, {1, 2, 4, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 3, 6, 7}, {1, 4, 5, 7}, {1, 4, 6, 7}}, triangulation {{0, 1, 2, 4}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 4}, {1, 3, 4, 7}, {1, 4, 5, 7}, {2, 3, 4, 7}, {2, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3, 5}, {0, 2, 3, 5}, {0, 2, 5, 6}, {0, 4, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {2, 3, 5, 6}, {3, 5, 6, 7}}, triangulation {{0, 1, 3, 5}, {0, 2, 3, 5}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 4, 5}, {2, 3, 5, 7}, {2, 4, 5, 6}, {2, 5, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 3, 5}, {0, 2, 3, 6}, {0, 3, 5, 6}, {0, 4, 5, 6}, {3, 5, 6, 7}}, |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3, 5}, {0, 2, 3, 6}, {0, 3, 4, 5}, {0, 3, 4, 6},  |
|     ------------------------------------------------------------------------|
|     {3, 4, 5, 7}, {3, 4, 6, 7}}, triangulation {{0, 1, 3, 5}, {0, 2, 3, 4}, |
|     ------------------------------------------------------------------------|
|     {0, 3, 4, 5}, {2, 3, 4, 7}, {2, 4, 6, 7}, {3, 4, 5, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 3, 6}, {0, 1, 5, 6}, {0, 2, 3, 6}, {0, 4, 5, 6}, {1, 3, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {3, 5, 6, 7}}, triangulation {{0, 1, 3, 6}, {0, 1, 4, 6}, {0, 2, 3, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 3, 6, 7}, {1, 4, 5, 6}, {1, 5, 6, 7}}, triangulation {{0, 1, 3, 4}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 3, 6}, {0, 3, 4, 6}, {1, 3, 4, 7}, {1, 4, 5, 7}, {3, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3, 4}, {0, 2, 3, 4}, {1, 3, 4, 7}, {1, 4, 5, 7},  |
|     ------------------------------------------------------------------------|
|     {2, 3, 4, 7}, {2, 4, 6, 7}}, triangulation {{0, 1, 2, 5}, {0, 2, 5, 6}, |
|     ------------------------------------------------------------------------|
|     {0, 4, 5, 6}, {1, 2, 3, 5}, {2, 3, 5, 7}, {2, 5, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 5}, {0, 2, 4, 5}, {1, 2, 3, 7}, {1, 2, 5, 7}, {2, 4, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {2, 5, 6, 7}}, triangulation {{0, 1, 2, 5}, {0, 2, 4, 5}, {1, 2, 3, 5}, |
|     ------------------------------------------------------------------------|
|     {2, 3, 5, 7}, {2, 4, 5, 7}, {2, 4, 6, 7}}, triangulation {{0, 1, 2, 4}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 7}, {1, 2, 4, 5}, {1, 2, 5, 7}, {2, 4, 5, 7}, {2, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 2, 6}, {0, 1, 5, 6}, {0, 4, 5, 6}, {1, 2, 3, 6},  |
|     ------------------------------------------------------------------------|
|     {1, 3, 6, 7}, {1, 5, 6, 7}}, triangulation {{0, 1, 2, 6}, {0, 1, 4, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 7}, {1, 2, 6, 7}, {1, 4, 5, 6}, {1, 5, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 6}, {0, 1, 4, 6}, {1, 2, 3, 6}, {1, 3, 6, 7}, {1, 4, 5, 7},  |
|     ------------------------------------------------------------------------|
|     {1, 4, 6, 7}}, triangulation {{0, 1, 2, 4}, {1, 2, 3, 7}, {1, 2, 4, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 6, 7}, {1, 4, 5, 7}, {1, 4, 6, 7}}, triangulation {{0, 1, 2, 4}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 7}, {1, 2, 4, 7}, {1, 4, 5, 7}, {2, 4, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 3, 5}, {0, 2, 3, 5}, {0, 2, 5, 6}, {0, 4, 5, 6}, {2, 3, 5, 7},  |
|     ------------------------------------------------------------------------|
|     {2, 5, 6, 7}}, triangulation {{0, 1, 3, 5}, {0, 2, 3, 5}, {0, 2, 4, 5}, |
|     ------------------------------------------------------------------------|
|     {2, 3, 5, 7}, {2, 4, 5, 7}, {2, 4, 6, 7}}, triangulation {{0, 1, 3, 5}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 3, 6}, {0, 3, 5, 7}, {0, 3, 6, 7}, {0, 4, 5, 6}, {0, 5, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3, 5}, {0, 2, 3, 6}, {0, 3, 5, 7}, {0, 3, 6, 7},  |
|     ------------------------------------------------------------------------|
|     {0, 4, 5, 7}, {0, 4, 6, 7}}, triangulation {{0, 1, 3, 5}, {0, 2, 3, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 4, 7}, {0, 3, 5, 7}, {0, 4, 5, 7}, {2, 4, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 3, 6}, {0, 1, 5, 6}, {0, 2, 3, 6}, {0, 4, 5, 6}, {1, 3, 6, 7},  |
|     ------------------------------------------------------------------------|
|     {1, 5, 6, 7}}, triangulation {{0, 1, 3, 6}, {0, 1, 4, 6}, {0, 2, 3, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 3, 6, 7}, {1, 4, 5, 7}, {1, 4, 6, 7}}, triangulation {{0, 1, 3, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 1, 4, 7}, {0, 2, 3, 6}, {0, 3, 6, 7}, {0, 4, 6, 7}, {1, 4, 5, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3, 7}, {0, 1, 4, 7}, {0, 2, 3, 7}, {0, 2, 4, 7},  |
|     ------------------------------------------------------------------------|
|     {1, 4, 5, 7}, {2, 4, 6, 7}}, triangulation {{0, 1, 2, 5}, {0, 2, 5, 6}, |
|     ------------------------------------------------------------------------|
|     {0, 4, 5, 6}, {1, 2, 3, 7}, {1, 2, 5, 7}, {2, 5, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 5}, {0, 2, 4, 5}, {1, 2, 3, 7}, {1, 2, 5, 7}, {2, 4, 5, 7},  |
|     ------------------------------------------------------------------------|
|     {2, 4, 6, 7}}, triangulation {{0, 1, 2, 6}, {0, 1, 5, 6}, {0, 4, 5, 6}, |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 7}, {1, 2, 6, 7}, {1, 5, 6, 7}}, triangulation {{0, 1, 2, 6}, |
|     ------------------------------------------------------------------------|
|     {0, 1, 4, 6}, {1, 2, 3, 7}, {1, 2, 6, 7}, {1, 4, 5, 7}, {1, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 2, 7}, {0, 1, 4, 7}, {0, 2, 4, 7}, {1, 2, 3, 7},  |
|     ------------------------------------------------------------------------|
|     {1, 4, 5, 7}, {2, 4, 6, 7}}, triangulation {{0, 1, 3, 5}, {0, 2, 3, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 6, 7}, {0, 3, 5, 7}, {0, 4, 5, 6}, {0, 5, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 3, 7}, {0, 1, 5, 7}, {0, 2, 3, 6}, {0, 3, 6, 7}, {0, 4, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {0, 5, 6, 7}}, triangulation {{0, 1, 3, 7}, {0, 1, 5, 7}, {0, 2, 3, 6}, |
|     ------------------------------------------------------------------------|
|     {0, 3, 6, 7}, {0, 4, 5, 7}, {0, 4, 6, 7}}, triangulation {{0, 1, 3, 5}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 3, 7}, {0, 2, 6, 7}, {0, 3, 5, 7}, {0, 4, 5, 7}, {0, 4, 6, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3, 7}, {0, 1, 5, 7}, {0, 2, 3, 7}, {0, 2, 4, 7},  |
|     ------------------------------------------------------------------------|
|     {0, 4, 5, 7}, {2, 4, 6, 7}}, triangulation {{0, 1, 3, 7}, {0, 1, 4, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 3, 7}, {0, 2, 6, 7}, {0, 4, 6, 7}, {1, 4, 5, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 7}, {0, 1, 5, 7}, {0, 2, 6, 7}, {0, 4, 5, 6}, {0, 5, 6, 7},  |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 7}}, triangulation {{0, 1, 2, 7}, {0, 1, 5, 7}, {0, 2, 4, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 4, 5, 7}, {1, 2, 3, 7}, {2, 4, 6, 7}}, triangulation {{0, 1, 2, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 1, 4, 7}, {0, 2, 6, 7}, {0, 4, 6, 7}, {1, 2, 3, 7}, {1, 4, 5, 7}},  |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 3, 7}, {0, 1, 5, 7}, {0, 2, 3, 7}, {0, 2, 6, 7},  |
|     ------------------------------------------------------------------------|
|     {0, 4, 5, 6}, {0, 5, 6, 7}}, triangulation {{0, 1, 3, 7}, {0, 1, 5, 7}, |
|     ------------------------------------------------------------------------|
|     {0, 2, 3, 7}, {0, 2, 6, 7}, {0, 4, 5, 7}, {0, 4, 6, 7}}, triangulation  |
|     ------------------------------------------------------------------------|
|     {{0, 1, 2, 7}, {0, 1, 5, 7}, {0, 2, 6, 7}, {0, 4, 5, 7}, {0, 4, 6, 7},  |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 7}}}                                                          |
|                                                                             |
|o7 : List                                                                    |
+-----------------------------------------------------------------------------+
|i8 : all(Ts4, isFine)                                                        |
|                                                                             |
|o8 = true                                                                    |
+-----------------------------------------------------------------------------+
|i9 : all(Ts4, isStar)                                                        |
|                                                                             |
|o9 = false                                                                   |
+-----------------------------------------------------------------------------+
|i10 : all(Ts4, isRegularTriangulation)                                       |
|                                                                             |
|o10 = true                                                                   |
+-----------------------------------------------------------------------------+
|i11 : Ts4/isStar//tally                                                      |
|                                                                             |
|o11 = Tally{false => 66}                                                     |
|            true => 8                                                        |
|                                                                             |
|o11 : Tally                                                                  |
+-----------------------------------------------------------------------------+
|i12 : Ts4/gkzVector                                                          |
|                                                                             |
|        4        20  20        4    8  8  8     20        4    4     20      |
|o12 = {{-, 4, 4, --, --, 4, 4, -}, {-, -, -, 8, --, 4, 4, -}, {-, 4, --, 4,  |
|        3         3   3        3    3  3  3      3        3    3      3      |
|      -----------------------------------------------------------------------|
|         20     4    4  20              20  4    4        20     8  8  8     |
|      4, --, 4, -}, {-, --, 4, 4, 4, 4, --, -}, {-, 4, 4, --, 8, -, -, -},   |
|          3     3    3   3               3  3    3         3     3  3  3     |
|      -----------------------------------------------------------------------|
|          4  8     16  16     4       8  4     16     16  4    8  8  8       |
|      {4, -, -, 8, --, --, 4, -}, {4, -, -, 8, --, 4, --, -}, {-, -, -, 8, 8,|
|          3  3      3   3     3       3  3      3      3  3    3  3  3       |
|      -----------------------------------------------------------------------|
|      8  8  8    8  8  20     8        4    4        8     20  8  8    8  20 |
|      -, -, -}, {-, -, --, 4, -, 8, 4, -}, {-, 4, 8, -, 4, --, -, -}, {-, --,|
|      3  3  3    3  3   3     3        3    3        3      3  3  3    3   3 |
|      -----------------------------------------------------------------------|
|      8     8        4    4        8     8  20  8    4  16     16     4  8   |
|      -, 4, -, 4, 8, -}, {-, 8, 4, -, 4, -, --, -}, {-, --, 4, --, 8, -, -,  |
|      3     3        3    3        3     3   3  3    3   3      3     3  3   |
|      -----------------------------------------------------------------------|
|           4     16  16     8  4          4  16  16  8        4    16  4  4  |
|      4}, {-, 4, --, --, 8, -, -, 4}, {4, -, --, --, -, 8, 4, -}, {--, -, -, |
|           3      3   3     3  3          3   3   3  3        3     3  3  3  |
|      -----------------------------------------------------------------------|
|            16  16  4       4  8     20     8  8       16  4  16  8          |
|      8, 4, --, --, -}, {4, -, -, 8, --, 4, -, -}, {4, --, -, --, -, 4, 8,   |
|             3   3  3       3  3      3     3  3        3  3   3  3          |
|      -----------------------------------------------------------------------|
|      4       8  4     20  8     8    8     8  20     4  8       8  8     20 |
|      -}, {4, -, -, 8, --, -, 4, -}, {-, 4, -, --, 8, -, -, 4}, {-, -, 4, --,|
|      3       3  3      3  3     3    3     3   3     3  3       3  3      3 |
|      -----------------------------------------------------------------------|
|         8  4          8  16     4     16  4    8  8     8  8     8  8    4  |
|      8, -, -, 4}, {4, -, --, 4, -, 8, --, -}, {-, -, 8, -, -, 8, -, -}, {-, |
|         3  3          3   3     3      3  3    3  3     3  3     3  3    3  |
|      -----------------------------------------------------------------------|
|      16     4     16  8       4        8  16  16  4          16  8     4    |
|      --, 8, -, 4, --, -, 4}, {-, 4, 8, -, --, --, -, 4}, {4, --, -, 4, -,   |
|       3     3      3  3       3        3   3   3  3           3  3     3    |
|      -----------------------------------------------------------------------|
|      16     4    8     8  8  8  8     8    4     16  4     8  16       4    |
|      --, 8, -}, {-, 8, -, -, -, -, 8, -}, {-, 8, --, -, 4, -, --, 4}, {-, 8,|
|       3     3    3     3  3  3  3     3    3      3  3     3   3       3    |
|      -----------------------------------------------------------------------|
|         8  16  4  16       4  16  16        4  4  16    16  4     16  4     |
|      4, -, --, -, --, 4}, {-, --, --, 4, 8, -, -, --}, {--, -, 4, --, -, 8, |
|         3   3  3   3       3   3   3        3  3   3     3  3      3  3     |
|      -----------------------------------------------------------------------|
|      16  4       4  20     8     8  8    20  4  4  20  4  20  20  4    16   |
|      --, -}, {4, -, --, 4, -, 8, -, -}, {--, -, -, --, -, --, --, -}, {--,  |
|       3  3       3   3     3     3  3     3  3  3   3  3   3   3  3     3   |
|      -----------------------------------------------------------------------|
|      4  4     16        8       4     20  20     4       16     4  16  4    |
|      -, -, 8, --, 4, 4, -}, {4, -, 4, --, --, 4, -, 4}, {--, 4, -, --, -,   |
|      3  3      3        3       3      3   3     3        3     3   3  3    |
|      -----------------------------------------------------------------------|
|      16     4       20  4     8  8     8          4  20  20  4          8   |
|      --, 8, -}, {4, --, -, 4, -, -, 8, -}, {4, 4, -, --, --, -, 4, 4}, {-,  |
|       3     3        3  3     3  3     3          3   3   3  3          3   |
|      -----------------------------------------------------------------------|
|            16     4  4  16       8  20  8  4        8    8        4  8  20  |
|      4, 4, --, 8, -, -, --}, {4, -, --, -, -, 8, 4, -}, {-, 4, 8, -, -, --, |
|             3     3  3   3       3   3  3  3        3    3        3  3   3  |
|      -----------------------------------------------------------------------|
|      8       8  8     8     20  4       4  16     4  16     4  16       20  |
|      -, 4}, {-, -, 8, -, 4, --, -, 4}, {-, --, 8, -, --, 4, -, --}, {4, --, |
|      3       3  3     3      3  3       3   3     3   3     3   3        3  |
|      -----------------------------------------------------------------------|
|      8  8  4        8    8        4  8  8  20       8     8  8     4  20    |
|      -, -, -, 4, 8, -}, {-, 8, 4, -, -, -, --, 4}, {-, 8, -, -, 4, -, --,   |
|      3  3  3        3    3        3  3  3   3       3     3  3     3   3    |
|      -----------------------------------------------------------------------|
|           4     16  4  16  4     16    4  20  20  4  20  4  4  20    16  4  |
|      4}, {-, 8, --, -, --, -, 4, --}, {-, --, --, -, --, -, -, --}, {--, -, |
|           3      3  3   3  3      3    3   3   3  3   3  3  3   3     3  3  |
|      -----------------------------------------------------------------------|
|      16     4        8       4  20        20  4          4  4  16  4  16    |
|      --, 4, -, 8, 4, -}, {4, -, --, 4, 4, --, -, 4}, {8, -, -, --, -, --,   |
|       3     3        3       3   3         3  3          3  3   3  3   3    |
|      -----------------------------------------------------------------------|
|      16          4  4  16  8        16    20  4              4  20    16    |
|      --, 4}, {8, -, -, --, -, 4, 4, --}, {--, -, 4, 4, 4, 4, -, --}, {--,   |
|       3          3  3   3  3         3     3  3              3   3     3    |
|      -----------------------------------------------------------------------|
|      16  4     4        8       20  4        4  20       20     4        4  |
|      --, -, 4, -, 4, 8, -}, {4, --, -, 4, 4, -, --, 4}, {--, 4, -, 4, 4, -, |
|       3  3     3        3        3  3        3   3        3     3        3  |
|      -----------------------------------------------------------------------|
|         20    16        8  16  4  4             20  4  4  20          8     |
|      4, --}, {--, 4, 4, -, --, -, -, 8}, {4, 4, --, -, -, --, 4, 4}, {-, 4, |
|          3     3        3   3  3  3              3  3  3   3          3     |
|      -----------------------------------------------------------------------|
|         4     16  4  16       20     4  4     20       8        4     4  16 |
|      8, -, 4, --, -, --}, {4, --, 4, -, -, 4, --, 4}, {-, 8, 4, -, 4, -, --,|
|         3      3  3   3        3     3  3      3       3        3     3   3 |
|      -----------------------------------------------------------------------|
|      16       16  16  4  16  4  4          4  8     4  16     16       8  4 |
|      --}, {4, --, --, -, --, -, -, 8}, {8, -, -, 4, -, --, 4, --}, {8, -, -,|
|       3        3   3  3   3  3  3          3  3     3   3      3       3  3 |
|      -----------------------------------------------------------------------|
|         4     16  16       8  4     8  8     20       4  8     8     8  20  |
|      4, -, 4, --, --}, {8, -, -, 4, -, -, 4, --}, {8, -, -, 4, -, 4, -, --},|
|         3      3   3       3  3     3  3      3       3  3     3     3   3  |
|      -----------------------------------------------------------------------|
|       20  8     8     8  4       20     8  8     4  8       20        4  4  |
|      {--, -, 4, -, 4, -, -, 8}, {--, 4, -, -, 4, -, -, 8}, {--, 4, 4, -, -, |
|        3  3     3     3  3        3     3  3     3  3        3        3  3  |
|      -----------------------------------------------------------------------|
|            20    16     16  4     8  4       16  16     4     4  8          |
|      4, 4, --}, {--, 4, --, -, 4, -, -, 8}, {--, --, 4, -, 4, -, -, 8}, {8, |
|             3     3      3  3     3  3        3   3     3     3  3          |
|      -----------------------------------------------------------------------|
|      8  8  8  4        20       8  8  8  8  8  8       20        4  8  8  8 |
|      -, -, -, -, 4, 4, --}, {8, -, -, -, -, -, -, 8}, {--, 4, 4, -, -, -, -,|
|      3  3  3  3         3       3  3  3  3  3  3        3        3  3  3  3 |
|      -----------------------------------------------------------------------|
|      8}}                                                                    |
|                                                                             |
|o12 : List                                                                   |
+-----------------------------------------------------------------------------+
|i13 : volume convexHull A -- 8                                               |
|                                                                             |
|o13 = 8                                                                      |
|                                                                             |
|o13 : QQ                                                                     |
+-----------------------------------------------------------------------------+
|i14 : stars1 = select(Ts4, t -> (gkzVector t)#-1 == 8)                       |
|                                                                             |
|o14 = {triangulation {{0, 1, 3, 7}, {0, 1, 4, 7}, {0, 2, 3, 7}, {0, 2, 4, 7},|
|      -----------------------------------------------------------------------|
|      {1, 4, 5, 7}, {2, 4, 6, 7}}, triangulation {{0, 1, 2, 7}, {0, 1, 4, 7},|
|      -----------------------------------------------------------------------|
|      {0, 2, 4, 7}, {1, 2, 3, 7}, {1, 4, 5, 7}, {2, 4, 6, 7}}, triangulation |
|      -----------------------------------------------------------------------|
|      {{0, 1, 3, 7}, {0, 1, 5, 7}, {0, 2, 3, 7}, {0, 2, 4, 7}, {0, 4, 5, 7}, |
|      -----------------------------------------------------------------------|
|      {2, 4, 6, 7}}, triangulation {{0, 1, 3, 7}, {0, 1, 4, 7}, {0, 2, 3, 7},|
|      -----------------------------------------------------------------------|
|      {0, 2, 6, 7}, {0, 4, 6, 7}, {1, 4, 5, 7}}, triangulation {{0, 1, 2, 7},|
|      -----------------------------------------------------------------------|
|      {0, 1, 5, 7}, {0, 2, 4, 7}, {0, 4, 5, 7}, {1, 2, 3, 7}, {2, 4, 6, 7}}, |
|      -----------------------------------------------------------------------|
|      triangulation {{0, 1, 2, 7}, {0, 1, 4, 7}, {0, 2, 6, 7}, {0, 4, 6, 7}, |
|      -----------------------------------------------------------------------|
|      {1, 2, 3, 7}, {1, 4, 5, 7}}, triangulation {{0, 1, 3, 7}, {0, 1, 5, 7},|
|      -----------------------------------------------------------------------|
|      {0, 2, 3, 7}, {0, 2, 6, 7}, {0, 4, 5, 7}, {0, 4, 6, 7}}, triangulation |
|      -----------------------------------------------------------------------|
|      {{0, 1, 2, 7}, {0, 1, 5, 7}, {0, 2, 6, 7}, {0, 4, 5, 7}, {0, 4, 6, 7}, |
|      -----------------------------------------------------------------------|
|      {1, 2, 3, 7}}}                                                         |
|                                                                             |
|o14 : List                                                                   |
+-----------------------------------------------------------------------------+
|i15 : stars2 = select(Ts4, isStar)                                           |
|                                                                             |
|o15 = {triangulation {{0, 1, 3, 7}, {0, 1, 4, 7}, {0, 2, 3, 7}, {0, 2, 4, 7},|
|      -----------------------------------------------------------------------|
|      {1, 4, 5, 7}, {2, 4, 6, 7}}, triangulation {{0, 1, 2, 7}, {0, 1, 4, 7},|
|      -----------------------------------------------------------------------|
|      {0, 2, 4, 7}, {1, 2, 3, 7}, {1, 4, 5, 7}, {2, 4, 6, 7}}, triangulation |
|      -----------------------------------------------------------------------|
|      {{0, 1, 3, 7}, {0, 1, 5, 7}, {0, 2, 3, 7}, {0, 2, 4, 7}, {0, 4, 5, 7}, |
|      -----------------------------------------------------------------------|
|      {2, 4, 6, 7}}, triangulation {{0, 1, 3, 7}, {0, 1, 4, 7}, {0, 2, 3, 7},|
|      -----------------------------------------------------------------------|
|      {0, 2, 6, 7}, {0, 4, 6, 7}, {1, 4, 5, 7}}, triangulation {{0, 1, 2, 7},|
|      -----------------------------------------------------------------------|
|      {0, 1, 5, 7}, {0, 2, 4, 7}, {0, 4, 5, 7}, {1, 2, 3, 7}, {2, 4, 6, 7}}, |
|      -----------------------------------------------------------------------|
|      triangulation {{0, 1, 2, 7}, {0, 1, 4, 7}, {0, 2, 6, 7}, {0, 4, 6, 7}, |
|      -----------------------------------------------------------------------|
|      {1, 2, 3, 7}, {1, 4, 5, 7}}, triangulation {{0, 1, 3, 7}, {0, 1, 5, 7},|
|      -----------------------------------------------------------------------|
|      {0, 2, 3, 7}, {0, 2, 6, 7}, {0, 4, 5, 7}, {0, 4, 6, 7}}, triangulation |
|      -----------------------------------------------------------------------|
|      {{0, 1, 2, 7}, {0, 1, 5, 7}, {0, 2, 6, 7}, {0, 4, 5, 7}, {0, 4, 6, 7}, |
|      -----------------------------------------------------------------------|
|      {1, 2, 3, 7}}}                                                         |
|                                                                             |
|o15 : List                                                                   |
+-----------------------------------------------------------------------------+
|i16 : stars1 == stars2                                                       |
|                                                                             |
|o16 = true                                                                   |
+-----------------------------------------------------------------------------+

Caveat
======

This function is written in the top level Macaulay2 language, and so is much
slower than allTriangulations, which
calls the topcom code written in C++.  On the other hand, one can give this
function a limit for the number of triangulations to generate, so can be used
to generate triangulations in the case when the number is too large to write
down all of them.

See also
========

  * allTriangulations -- use topcom to
    generate all triangulations of a point or vector configuration
  * flipGraph -- bistellar-flip graph of a point or vector
    configuration

Ways to use generateTriangulations:
===================================

  * "generateTriangulations(Matrix)"
  * generateTriangulations(Matrix,List) (missing documentation)
  * generateTriangulations(Triangulation) (missing documentation)

For the programmer
==================

The object generateTriangulations, is a
method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:2051:0.

gkzVector
*********

Ways to use volumeVector:
=========================

  * "volumeVector(Matrix,List)" -- see volumeVector, -- the
    GKZ vector (per-vertex/per-ray volume sum) of a triangulation
  * "volumeVector(Triangulation)" -- see volumeVector, --
    the GKZ vector (per-vertex/per-ray volume sum) of a triangulation

For the programmer
==================

The object gkzVector (missing documentation) is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in currentString:1:380.

isFine -- test whether a triangulation uses every point in the configuration
****************************************************************************

  * Usage:
        isFine T
        isFine(A, tri)
  * Inputs:
      * T, an instance of the type Triangulation,
      * A, a matrix (Macaulay2Doc), whose columns are the points
        of a configuration
      * tri, a list (Macaulay2Doc), a triangulation of the columns
        of $A$
  * Outputs:
      * a Boolean value (Macaulay2Doc), whether every column
        index appears in some maximal simplex of the triangulation

Description
===========

A triangulation is fine if every point of the configuration is a vertex of some
simplex.  Non-fine triangulations triangulate the convex hull but leave one or
more points (typically interior or on the relative boundary) unused.

+---------------------------------------------------------------------+
|i1 : A = transpose matrix {{0,3},{0,1},{-1,-1},{1,-1},{-4,-2},{4,-2}}|
|                                                                     |
|o1 = | 0 0 -1 1  -4 4  |                                             |
|     | 3 1 -1 -1 -2 -2 |                                             |
|                                                                     |
|              2       6                                              |
|o1 : Matrix ZZ  <-- ZZ                                               |
+---------------------------------------------------------------------+
|i2 : Ts = allTriangulations A;                                       |
+---------------------------------------------------------------------+
|i3 : tally apply(Ts, isFine)                                         |
|                                                                     |
|o3 = Tally{false => 10}                                              |
|           true => 6                                                 |
|                                                                     |
|o3 : Tally                                                           |
+---------------------------------------------------------------------+

Caveat
======

This function does not check that tri is a valid triangulation; it only
inspects the support.  See isWellDefined(Triangulation),
for that.

See also
========

  * isStar -- test whether a triangulation is a star with
    respect to its last point
  * isWellDefined(Triangulation), --
    test whether the simplices of a triangulation form a valid triangulation
  * isRegularTriangulation -- determine if a
    given triangulation is a regular triangulation

Ways to use isFine:
===================

  * "isFine(Matrix,List)"
  * "isFine(Triangulation)"

For the programmer
==================

The object isFine, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:1730:0.

isRegularTriangulation -- determine if a given triangulation is a regular triangulation
***************************************************************************************

  * Usage:
        isRegularTriangulation T
  * Inputs:
      * T, an instance of the type Triangulation, a
        triangulation of a point or vector configuration
  * Optional inputs (Macaulay2Doc),:
      * DegreeMatrix => a matrix (Macaulay2Doc), default value
        null, an integer matrix whose rows are a $\mathbb{Z}$-basis of $\ker
        A$; passed through to secondaryCone.  Defaults to
        degreeMatrix T
      * Strategy (missing documentation) => ..., default value Topcom,
  * Outputs:
      * a Boolean value (Macaulay2Doc), whether the given
        triangulation is regular

Description
===========

A triangulation is called regular if it can be constructed in the following
way: place the point set in one higher dimension at various heights in the new
variable.  Compute the convex hull.  Collect the list of facets with downward
pointing normal (last coordinate of normal vector is negative).  If each of
these is a simplex, then these form a triangulation of the original point set.
A triangulation which arises this way is called regular.  See the book [deLoera
et al] for more details and many beautiful properties of such triangulations.

Tested via the engine LP rawConeInteriorPoint: the triangulation is regular iff
its secondaryCone, has nonempty interior.  The
topcom-based test, kept for comparison, is available as
topcomIsRegularTriangulation (Topcom).

The following example is one of the simplest examples of a non-regular
triangulation.  Notice that tri is a triangulation of the polytope which is the
convex hull of the columns of $A$, which are the only points allowed in the
triangulation.

+-----------------------------------------------------------------------------+
|i1 : A = transpose matrix {{0,3},{0,1},{-1,-1},{1,-1},{-4,-2},{4,-2}}        |
|                                                                             |
|o1 = | 0 0 -1 1  -4 4  |                                                     |
|     | 3 1 -1 -1 -2 -2 |                                                     |
|                                                                             |
|              2       6                                                      |
|o1 : Matrix ZZ  <-- ZZ                                                       |
+-----------------------------------------------------------------------------+
|i2 : tri = {{0,1,2}, {1,3,5}, {2,3,4}, {0,1,5},                              |
|         {0,2,4}, {3,4,5}, {1,2,3}}                                          |
|                                                                             |
|o2 = {{0, 1, 2}, {1, 3, 5}, {2, 3, 4}, {0, 1, 5}, {0, 2, 4}, {3, 4, 5}, {1,  |
|     ------------------------------------------------------------------------|
|     2, 3}}                                                                  |
|                                                                             |
|o2 : List                                                                    |
+-----------------------------------------------------------------------------+
|i3 : T = triangulation(A, tri)                                               |
|                                                                             |
|o3 = triangulation {{0, 1, 2}, {0, 1, 5}, {0, 2, 4}, {1, 2, 3}, {1, 3, 5},   |
|                                                                             |
|o3 : Triangulation                                                           |
|-----------------------------------------------------------------------------|
|{2, 3, 4}, {3, 4, 5}}                                                        |
+-----------------------------------------------------------------------------+

We check that T is indeed a triangulation, and whether it is a regular
triangulation.

+-----------------------------+
|i4 : isWellDefined T         |
|                             |
|o4 = true                    |
+-----------------------------+
|i5 : isRegularTriangulation T|
|                             |
|o5 = false                   |
+-----------------------------+

See also
========

  * regularTriangulationWeights(Triangulation)
    -- height vector inducing a regular
    triangulation, if one exists
  * secondaryCone -- secondary cone of a triangulation,
    in charge-lattice coordinates
  * topcomIsRegularTriangulation (Topcom),
    -- determine if a given triangulation is a regular triangulation
  * regularFineTriangulation -- a regular fine
    triangulation of a point or vector configuration
  * isWellDefined(Triangulation), --
    test whether the simplices of a triangulation form a valid triangulation

Ways to use isRegularTriangulation:
===================================

  * "isRegularTriangulation(Matrix,List)"
  * "isRegularTriangulation(Triangulation)"

For the programmer
==================

The object isRegularTriangulation, is a
method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:1150:0.

isStar -- test whether a triangulation is a star with respect to its last point
*******************************************************************************

  * Usage:
        isStar T
        isStar(A, tri)
  * Inputs:
      * T, an instance of the type Triangulation,
      * A, a matrix (Macaulay2Doc),
      * tri, a list (Macaulay2Doc),
  * Outputs:
      * a Boolean value (Macaulay2Doc), whether every maximal
        simplex contains the last column index of the configuration

Description
===========

A triangulation is a star (with respect to a distinguished point $p$) if every
maximal simplex contains $p$ as a vertex.  This function uses the convention
that $p$ is the last column of the configuration: $T$ is a star iff every
simplex of max T contains the index numColumns(matrix T) - 1.

This convention is common when triangulating a reflexive polytope with the
origin placed last: a fine star triangulation refines the polytope into
simplices all sharing the origin.

+---------------------------------------------------------------+
|i1 : A = transpose matrix {{1,1},{-1,1},{-1,-1},{1,-1},{0,0}}  |
|                                                               |
|o1 = | 1 -1 -1 1  0 |                                          |
|     | 1 1  -1 -1 0 |                                          |
|                                                               |
|              2       5                                        |
|o1 : Matrix ZZ  <-- ZZ                                         |
+---------------------------------------------------------------+
|i2 : T = regularFineTriangulation A                            |
|                                                               |
|o2 = triangulation {{0, 1, 4}, {0, 3, 4}, {1, 2, 4}, {2, 3, 4}}|
|                                                               |
|o2 : Triangulation                                             |
+---------------------------------------------------------------+
|i3 : max T                                                     |
|                                                               |
|o3 = {{0, 1, 4}, {0, 3, 4}, {1, 2, 4}, {2, 3, 4}}              |
|                                                               |
|o3 : List                                                      |
+---------------------------------------------------------------+
|i4 : isStar T                                                  |
|                                                               |
|o4 = true                                                      |
+---------------------------------------------------------------+

Caveat
======

This function does not check that tri is a valid triangulation or that the last
column is genuinely interior; it only inspects the indices.

See also
========

  * isFine -- test whether a triangulation uses every point in
    the configuration
  * isWellDefined(Triangulation), --
    test whether the simplices of a triangulation form a valid triangulation
  * fineStarTriangulation -- refine a
    triangulation to a fine star triangulation by coning over a center
  * regularFineStarTriangulation -- a
    regular fine star triangulation of a polytope's boundary

Ways to use isStar:
===================

  * "isStar(Matrix,List)"
  * "isStar(Triangulation)"

For the programmer
==================

The object isStar, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:1775:0.

isWellDefined(Triangulation) -- test whether the simplices of a triangulation form a valid triangulation
********************************************************************************************************

  * Function: isWellDefined (Macaulay2Doc),
  * Usage:
        isWellDefined T
  * Inputs:
      * T, an instance of the type Triangulation,
  * Outputs:
      * a Boolean value (Macaulay2Doc), whether the simplices in
        max T form a valid triangulation of the columns of matrix T

Description
===========

Defers to topcomIsTriangulation (Topcom),
for the authoritative check.
A Triangulation object is just packaging: its construction does not verify that
the input simplices actually form a triangulation, so use this method to
confirm.

+-----------------------------------------------------------------------------+
|i1 : A = transpose matrix {{0,3},{0,1},{-1,-1},{1,-1},{-4,-2},{4,-2}}        |
|                                                                             |
|o1 = | 0 0 -1 1  -4 4  |                                                     |
|     | 3 1 -1 -1 -2 -2 |                                                     |
|                                                                             |
|              2       6                                                      |
|o1 : Matrix ZZ  <-- ZZ                                                       |
+-----------------------------------------------------------------------------+
|i2 : T = regularFineTriangulation A                                          |
|                                                                             |
|o2 = triangulation {{0, 1, 2}, {0, 1, 3}, {0, 2, 4}, {0, 3, 5}, {1, 2, 3},   |
|                                                                             |
|o2 : Triangulation                                                           |
|-----------------------------------------------------------------------------|
|{2, 3, 4}, {3, 4, 5}}                                                        |
+-----------------------------------------------------------------------------+
|i3 : isWellDefined T                                                         |
|                                                                             |
|o3 = true                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * isRegularTriangulation -- determine if a
    given triangulation is a regular triangulation
  * triangulation -- make a Triangulation object

Ways to use this method:
========================

  * isWellDefined(Triangulation), --
    test whether the simplices of a triangulation form a valid triangulation
-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:1689:0.

makeFine -- walk to a fine triangulation by support-increasing bistellar flips
******************************************************************************

  * Usage:
        T = makeFine T0
  * Inputs:
      * T0, an instance of the type Triangulation, a
        triangulation, possibly non-fine (some columns of $A$ unused)
  * Outputs:
      * T, an instance of the type Triangulation, a fine
        triangulation reached from $T_0$ by a sequence of support-increasing
        bistellar flips

Description
===========

At each step, this function inspects neighbors,$(T, Fine\,
=>\, false)$ and follows the first neighbor whose support (set of column
indices used by its maximal simplices) is a strict superset of $T$'s support.
It repeats until $T$ is fine, or errors when no support-increasing neighbor is
available at the current $T$.

The greedy choice is cheap to compute and usually reaches a fine triangulation
quickly, but it is not exhaustive: it never takes a flip that keeps the support
the same size, so it can stall at a non-fine $T$ even when a fine triangulation
is reachable via a longer sequence of flips that mixes support-increasing and
equal-support steps.  Failure of this function therefore means "the
support-monotone walk got stuck," not necessarily "no fine triangulation
exists."

+-----------------------------------------------------------------------------+
|i1 : A = transpose matrix {{-1,-1,1,1},{-1,-1,1,2},{-1,-1,2,1},{-1,3,-1,-1},{|
|                                                                             |
|o1 = | -1 -1 -1 -1 2  -1 |                                                   |
|     | -1 -1 -1 3  -1 1  |                                                   |
|     | 1  1  2  -1 -1 0  |                                                   |
|     | 1  2  1  -1 -1 0  |                                                   |
|                                                                             |
|              4       6                                                      |
|o1 : Matrix ZZ  <-- ZZ                                                       |
|-----------------------------------------------------------------------------|
|2,-1,-1,-1},{-1,1,0,0}}                                                      |
+-----------------------------------------------------------------------------+
|i2 : t0 = triangulation(A,                                                   |
|                                                                             |
|o2 = triangulation {{0, 1,                                                   |
|                                                                             |
|o2 : Triangulation                                                           |
|-----------------------------------------------------------------------------|
|{{0,1,2,3},{0,1,2,4},{0,1,3,4},{0,2,3,4},{1,2,3,4}})                         |
|                                                                             |
|2, 3}, {0, 1, 2, 4}, {0, 1, 3, 4}, {0, 2, 3, 4}, {1, 2, 3, 4}}               |
+-----------------------------------------------------------------------------+
|i3 : isFine t0                                                               |
|                                                                             |
|o3 = false                                                                   |
+-----------------------------------------------------------------------------+
|i4 : T = makeFine t0                                                         |
|                                                                             |
|o4 = triangulation {{0, 1, 2, 4}, {0, 1, 2, 5}, {0, 1, 4, 5}, {0, 2, 4, 5},  |
|                                                                             |
|o4 : Triangulation                                                           |
|-----------------------------------------------------------------------------|
|{1, 2, 3, 4}, {1, 2, 3, 5}, {1, 3, 4, 5}, {2, 3, 4, 5}}                      |
+-----------------------------------------------------------------------------+
|i5 : isFine T                                                                |
|                                                                             |
|o5 = true                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * neighbors -- triangulations adjacent to a given one in
    the bistellar-flip graph
  * regularFineTriangulation -- a regular fine
    triangulation of a point or vector configuration
  * someTriangulation -- a triangulation of a point
    or vector configuration, not necessarily fine or regular
  * regularFineFanTriangulation -- a
    regular fine star fan triangulation of a vector configuration

Ways to use makeFine:
=====================

  * "makeFine(Triangulation)"

For the programmer
==================

The object makeFine, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:1387:0.

matrix(Triangulation) -- the matrix whose columns are the points of a triangulation
***********************************************************************************

  * Function: matrix (Macaulay2Doc),
  * Usage:
        matrix T
  * Inputs:
      * T, an instance of the type Triangulation,
  * Optional inputs (Macaulay2Doc),:
      * Degree (Macaulay2Doc), => ..., default value
        null,
  * Outputs:
      * a matrix (Macaulay2Doc), whose columns are the points (or
        vectors) of the configuration that $T$ triangulates

Description
===========

Returns the configuration matrix stored in $T$.  By default this is the
homogenized matrix, with a final row of $1$'s appended; if $T$ was constructed
with Homogenize => false, it is the original matrix passed to the constructor.

+-----------------------------------------------------------------------------+
|i1 : A = transpose matrix {{0,3},{0,1},{-1,-1},{1,-1},{-4,-2},{4,-2}}        |
|                                                                             |
|o1 = | 0 0 -1 1  -4 4  |                                                     |
|     | 3 1 -1 -1 -2 -2 |                                                     |
|                                                                             |
|              2       6                                                      |
|o1 : Matrix ZZ  <-- ZZ                                                       |
+-----------------------------------------------------------------------------+
|i2 : T = regularFineTriangulation A                                          |
|                                                                             |
|o2 = triangulation {{0, 1, 2}, {0, 1, 3}, {0, 2, 4}, {0, 3, 5}, {1, 2, 3},   |
|                                                                             |
|o2 : Triangulation                                                           |
|-----------------------------------------------------------------------------|
|{2, 3, 4}, {3, 4, 5}}                                                        |
+-----------------------------------------------------------------------------+
|i3 : matrix T                                                                |
|                                                                             |
|o3 = | 0 0 -1 1  -4 4  |                                                     |
|     | 3 1 -1 -1 -2 -2 |                                                     |
|     | 1 1 1  1  1  1  |                                                     |
|                                                                             |
|              3       6                                                      |
|o3 : Matrix ZZ  <-- ZZ                                                       |
+-----------------------------------------------------------------------------+
|i4 : numRows matrix T == numRows A + 1                                       |
|                                                                             |
|o4 = true                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * Triangulation -- a triangulation of a point or vector
    configuration
  * vectors(Triangulation) -- the column vectors of the
    configuration underlying a triangulation
  * max(Triangulation) -- the maximal simplices
    of a triangulation
  * triangulation -- make a Triangulation object

Ways to use this method:
========================

  * matrix(Triangulation) -- the matrix whose
    columns are the points of a triangulation
-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:1660:0.

max(Triangulation) -- the maximal simplices of a triangulation
**************************************************************

  * Function: max (Macaulay2Doc),
  * Usage:
        max T
  * Inputs:
      * T, an instance of the type Triangulation,
  * Outputs:
      * a list (Macaulay2Doc), of lists, each a sorted list of
        column indices defining a maximal simplex of $T$

Description
===========

Returns the list of maximal simplices of the triangulation.  The outer list is
sorted, and each inner list (a simplex) is sorted as well, so that two
triangulations with the same simplices have identical max.

+-----------------------------------------------------------------------------+
|i1 : A = transpose matrix {{0,3},{0,1},{-1,-1},{1,-1},{-4,-2},{4,-2}}        |
|                                                                             |
|o1 = | 0 0 -1 1  -4 4  |                                                     |
|     | 3 1 -1 -1 -2 -2 |                                                     |
|                                                                             |
|              2       6                                                      |
|o1 : Matrix ZZ  <-- ZZ                                                       |
+-----------------------------------------------------------------------------+
|i2 : T = regularFineTriangulation A                                          |
|                                                                             |
|o2 = triangulation {{0, 1, 2}, {0, 1, 3}, {0, 2, 4}, {0, 3, 5}, {1, 2, 3},   |
|                                                                             |
|o2 : Triangulation                                                           |
|-----------------------------------------------------------------------------|
|{2, 3, 4}, {3, 4, 5}}                                                        |
+-----------------------------------------------------------------------------+
|i3 : max T                                                                   |
|                                                                             |
|o3 = {{0, 1, 2}, {0, 1, 3}, {0, 2, 4}, {0, 3, 5}, {1, 2, 3}, {2, 3, 4}, {3,  |
|     ------------------------------------------------------------------------|
|     4, 5}}                                                                  |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * Triangulation -- a triangulation of a point or vector
    configuration
  * vectors(Triangulation) -- the column vectors of the
    configuration underlying a triangulation
  * matrix(Triangulation) -- the matrix whose
    columns are the points of a triangulation

Ways to use this method:
========================

  * max(Triangulation) -- the maximal simplices
    of a triangulation
-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:1600:0.

naiveChirotope -- compute the chirotope of a configuration via determinants in Macaulay2
****************************************************************************************

  * Usage:
        C = naiveChirotope A
  * Inputs:
      * A, a matrix (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * Homogenize => a Boolean value (Macaulay2Doc), default
        value true, if true (default), augment $A$ with a final row of $1$'s
        before computing (treating columns of $A$ as a point set); if false,
        treat the columns of $A$ as a vector configuration as-is
  * Outputs:
      * C, an instance of the type Chirotope,

Description
===========

Computes the chirotope directly in Macaulay2 by enumerating all $d$-subsets of
the columns and recording the sign of each $d \times d$ minor.  Useful for
verifying the topcom-based chirotope.

+---------------------------------------------------------------------+
|i1 : A = transpose matrix {{0,3},{0,1},{-1,-1},{1,-1},{-4,-2},{4,-2}}|
|                                                                     |
|o1 = | 0 0 -1 1  -4 4  |                                             |
|     | 3 1 -1 -1 -2 -2 |                                             |
|                                                                     |
|              2       6                                              |
|o1 : Matrix ZZ  <-- ZZ                                               |
+---------------------------------------------------------------------+
|i2 : chirotope A == naiveChirotope A                                 |
|                                                                     |
|o2 = true                                                            |
+---------------------------------------------------------------------+

Caveat
======

Slower than chirotope, for configurations with many points.

See also
========

  * chirotope -- compute the chirotope of a point or vector
    configuration
  * Chirotope -- the chirotope (oriented matroid) of a point
    or vector configuration

Ways to use naiveChirotope:
===========================

  * "naiveChirotope(Matrix)"

For the programmer
==================

The object naiveChirotope, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:2839:0.

neighbors -- triangulations adjacent to a given one in the bistellar-flip graph
*******************************************************************************

  * Usage:
        neighbors T
  * Inputs:
      * T, an instance of the type Triangulation,
  * Optional inputs (Macaulay2Doc),:
      * Fine => a Boolean value (Macaulay2Doc), default value
        true, if true (default), only flips that preserve the support of $T$
        are considered; if false, support-changing flips are also returned
  * Outputs:
      * a list (Macaulay2Doc), of pairs $\{c, T'\}$, one per
        neighbor: $c$ is the affine circuit of the flip and $T'$ is the
        resulting Triangulation,

Description
===========

Two triangulations are neighbors if they differ by a single bistellar flip.
With the default Fine => true, the support of $T$ is preserved: a fine
triangulation has only fine neighbors.  With Fine => false, flips that drop a
vertex from the support (or, less commonly, add one) are also considered.

This is the building block used by generateTriangulations,
and flipGraph, to walk the
bistellar-flip graph.

+-----------------------------------------------------------------------------+
|i1 : A = transpose matrix {{0,3},{0,1},{-1,-1},{1,-1},{-4,-2},{4,-2}}        |
|                                                                             |
|o1 = | 0 0 -1 1  -4 4  |                                                     |
|     | 3 1 -1 -1 -2 -2 |                                                     |
|                                                                             |
|              2       6                                                      |
|o1 : Matrix ZZ  <-- ZZ                                                       |
+-----------------------------------------------------------------------------+
|i2 : T = regularFineTriangulation A                                          |
|                                                                             |
|o2 = triangulation {{0, 1, 2}, {0, 1, 3}, {0, 2, 4}, {0, 3, 5}, {1, 2, 3},   |
|                                                                             |
|o2 : Triangulation                                                           |
|-----------------------------------------------------------------------------|
|{2, 3, 4}, {3, 4, 5}}                                                        |
+-----------------------------------------------------------------------------+
|i3 : ns = neighbors T                                                        |
|                                                                             |
|o3 = {{{{1, 4}, {0, 2}}, triangulation {{0, 1, 3}, {0, 1, 4}, {0, 3, 5}, {1, |
|     ------------------------------------------------------------------------|
|     2, 3}, {1, 2, 4}, {2, 3, 4}, {3, 4, 5}}}, {{{1, 5}, {0, 3}},            |
|     ------------------------------------------------------------------------|
|     triangulation {{0, 1, 2}, {0, 1, 5}, {0, 2, 4}, {1, 2, 3}, {1, 3, 5},   |
|     ------------------------------------------------------------------------|
|     {2, 3, 4}, {3, 4, 5}}}, {{{3, 4}, {2, 5}}, triangulation {{0, 1, 2}, {0,|
|     ------------------------------------------------------------------------|
|     1, 3}, {0, 2, 4}, {0, 3, 5}, {1, 2, 3}, {2, 3, 5}, {2, 4, 5}}}}         |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+
|i4 : #ns                                                                     |
|                                                                             |
|o4 = 3                                                                       |
+-----------------------------------------------------------------------------+
|i5 : first ns                                                                |
|                                                                             |
|o5 = {{{1, 4}, {0, 2}}, triangulation {{0, 1, 3}, {0, 1, 4}, {0, 3, 5}, {1,  |
|     ------------------------------------------------------------------------|
|     2, 3}, {1, 2, 4}, {2, 3, 4}, {3, 4, 5}}}                                |
|                                                                             |
|o5 : List                                                                    |
+-----------------------------------------------------------------------------+

With Fine => false, support-changing flips are included:

+---------------------------------+
|i6 : #neighbors(T, Fine => false)|
|                                 |
|o6 = 4                           |
+---------------------------------+

See also
========

  * bistellarFlip -- perform a bistellar flip on a
    triangulation
  * flipCandidates -- candidate affine circuits for
    bistellar flips of a triangulation
  * flipGraph -- bistellar-flip graph of a point or vector
    configuration
  * generateTriangulations -- generate all
    triangulations with certain properties

Ways to use neighbors:
======================

  * "neighbors(Triangulation)"

For the programmer
==================

The object neighbors, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:2419:0.

regularFineFanTriangulation -- a regular fine star fan triangulation of a vector configuration
**********************************************************************************************

  * Usage:
        T = regularFineFanTriangulation A
  * Inputs:
      * A, a matrix (Macaulay2Doc), whose columns are nonzero
        vectors in $\mathbb{Z}^d$ (or $\mathbb{Q}^d$); every column should lie
        on the boundary of $\mathrm{conv}(A)$ and the origin should be in the
        interior of $\mathrm{conv}(A)$
  * Outputs:
      * T, an instance of the type Triangulation, a
        vector-configuration triangulation of $A$, returned with the origin as
        the implicit (unstored) cone vertex

Description
===========

Implements the classical "star fan" construction:

$\bullet$ compute a regular fine triangulation of $\mathrm{conv}(A)$ as a point
configuration (see regularFineTriangulation);

$\bullet$ for each polytope simplex $f$ and each boundary facet $g$ of
$\mathrm{conv}(A)$, take $f \cap g$; the size-$d$ intersections are the
$(d{-}1)$-faces of $f$ that lie on $\partial \mathrm{conv}(A)$;

$\bullet$ return those size-$d$ index sets as a triangulation of $A$ as a
vector configuration.

Under the stated assumptions the cones over these boundary faces form a
complete simplicial fan, and the resulting triangulation is regular, fine, and
star at the origin.

+-----------------------------------------------------------------------------+
|i1 : A = transpose matrix {{-1,-1,1,1},{-1,-1,1,2},{-1,-1,2,1},{-1,3,-1,-1},{|
|                                                                             |
|o1 = | -1 -1 -1 -1 2  -1 |                                                   |
|     | -1 -1 -1 3  -1 1  |                                                   |
|     | 1  1  2  -1 -1 0  |                                                   |
|     | 1  2  1  -1 -1 0  |                                                   |
|                                                                             |
|              4       6                                                      |
|o1 : Matrix ZZ  <-- ZZ                                                       |
|-----------------------------------------------------------------------------|
|2,-1,-1,-1},{-1,1,0,0}}                                                      |
+-----------------------------------------------------------------------------+
|i2 : isPointed posHull A                                                     |
|                                                                             |
|o2 = false                                                                   |
+-----------------------------------------------------------------------------+
|i3 : T = regularFineFanTriangulation A                                       |
|                                                                             |
|o3 = triangulation {{0, 1, 2, 4}, {0, 1, 2, 5}, {0, 1, 4, 5}, {0, 2, 4, 5},  |
|                                                                             |
|o3 : Triangulation                                                           |
|-----------------------------------------------------------------------------|
|{1, 2, 3, 4}, {1, 2, 3, 5}, {1, 3, 4, 5}, {2, 3, 4, 5}}                      |
+-----------------------------------------------------------------------------+
|i4 : isWellDefined T                                                         |
|                                                                             |
|o4 = true                                                                    |
+-----------------------------------------------------------------------------+
|i5 : isFine T                                                                |
|                                                                             |
|o5 = true                                                                    |
+-----------------------------------------------------------------------------+
|i6 : isRegularTriangulation T                                                |
|                                                                             |
|o6 = true                                                                    |
+-----------------------------------------------------------------------------+

Caveat
======

If some column of $A$ lies in the interior of $\mathrm{conv}(A)$, the
construction still returns a valid triangulation (and is still regular and
star-at-origin), but interior columns are silently omitted, so the result will
not be fine.  Use insertion flips (see neighbors, with Fine =>
false) to add them.

See also
========

  * someTriangulation -- a triangulation of a point
    or vector configuration, not necessarily fine or regular
  * regularFineTriangulation -- a regular fine
    triangulation of a point or vector configuration
  * fineStarTriangulation -- refine a
    triangulation to a fine star triangulation by coning over a center
  * regularFineStarTriangulation -- a
    regular fine star triangulation of a polytope's boundary

Ways to use regularFineFanTriangulation:
========================================

  * "regularFineFanTriangulation(Matrix)"

For the programmer
==================

The object regularFineFanTriangulation, is a
method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:1441:0.

regularFineStarTriangulation -- a regular fine star triangulation of a polytope's boundary
******************************************************************************************

  * Usage:
        star = regularFineStarTriangulation A
  * Inputs:
      * A, a matrix (Macaulay2Doc), whose columns are the
        boundary points of a polytope
  * Optional inputs (Macaulay2Doc),:
      * ConeIndex => an integer (Macaulay2Doc), default value null,
        the column index to use as the cone center; if null (default), the cone
        center is treated as a new point at index numColumns A
  * Outputs:
      * a list (Macaulay2Doc), a list of simplices forming a star
        triangulation, equivalent to fineStarTriangulation(A,
        topcomRegularFineTriangulation A)

Description
===========

Convenience wrapper that computes a regular fine triangulation of $A$'s
boundary via topcom and then cones each boundary simplex to the chosen center.

+-------------------------------------------------------+
|i1 : A = transpose matrix {{1,1},{-1,1},{-1,-1},{1,-1}}|
|                                                       |
|o1 = | 1 -1 -1 1  |                                    |
|     | 1 1  -1 -1 |                                    |
|                                                       |
|              2       4                                |
|o1 : Matrix ZZ  <-- ZZ                                 |
+-------------------------------------------------------+
|i2 : regularFineStarTriangulation A                    |
|                                                       |
|o2 = {{0, 1, 4}, {0, 3, 4}, {1, 2, 4}, {2, 3, 4}}      |
|                                                       |
|o2 : List                                              |
+-------------------------------------------------------+

Caveat
======

Returns a List of simplices, not a Triangulation.

See also
========

  * fineStarTriangulation -- refine a
    triangulation to a fine star triangulation by coning over a center
  * regularFineTriangulation -- a regular fine
    triangulation of a point or vector configuration
  * isStar -- test whether a triangulation is a star with
    respect to its last point
  * triangulation -- make a Triangulation object

Ways to use regularFineStarTriangulation:
=========================================

  * "regularFineStarTriangulation(Matrix)"

For the programmer
==================

The object regularFineStarTriangulation, is
a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:1571:0.

regularFineTriangulation -- a regular fine triangulation of a point or vector configuration
*******************************************************************************************

  * Usage:
        T = regularFineTriangulation A
        T = regularFineTriangulation T0
  * Inputs:
      * A, a matrix (Macaulay2Doc), whose columns are the points
        of the configuration
      * T0, an instance of the type Triangulation, a
        starting triangulation, possibly neither fine nor regular
  * Optional inputs (Macaulay2Doc),:
      * Homogenize => a Boolean value (Macaulay2Doc), default
        value true, if true (default), $A$ is augmented with a final row of
        $1$'s and treated as a point set; if false, the columns are treated as
        a vector configuration in their own right; ignored when the input is a
        Triangulation,
  * Outputs:
      * T, an instance of the type Triangulation, a
        regular fine triangulation, or null (Macaulay2Doc), if no
        such triangulation exists (Matrix form, when Homogenize => false)

Description
===========

With a Matrix input, constructs a regular fine triangulation by calling
topcomRegularFineTriangulation (Topcom),
and wrapping the result in
a Triangulation.  When Homogenize => false and $A$ is
non-acyclic, topcom is unreliable; in that case the result is built via
regularFineFanTriangulation, (and, if it is not
already fine, refined via makeFine).

+-----------------------------------------------------------------------------+
|i1 : A = transpose matrix {{0,3},{0,1},{-1,-1},{1,-1},{-4,-2},{4,-2}}        |
|                                                                             |
|o1 = | 0 0 -1 1  -4 4  |                                                     |
|     | 3 1 -1 -1 -2 -2 |                                                     |
|                                                                             |
|              2       6                                                      |
|o1 : Matrix ZZ  <-- ZZ                                                       |
+-----------------------------------------------------------------------------+
|i2 : T = regularFineTriangulation A                                          |
|                                                                             |
|o2 = triangulation {{0, 1, 2}, {0, 1, 3}, {0, 2, 4}, {0, 3, 5}, {1, 2, 3},   |
|                                                                             |
|o2 : Triangulation                                                           |
|-----------------------------------------------------------------------------|
|{2, 3, 4}, {3, 4, 5}}                                                        |
+-----------------------------------------------------------------------------+
|i3 : isFine T                                                                |
|                                                                             |
|o3 = true                                                                    |
+-----------------------------------------------------------------------------+
|i4 : isRegularTriangulation T                                                |
|                                                                             |
|o4 = true                                                                    |
+-----------------------------------------------------------------------------+

Given a Triangulation, $T_0$ that is not (yet) fine or
regular, this walks the bistellar flip graph: first via support-increasing
flips (see makeFine) to reach a fine triangulation, then via fine
flips until a regular one is encountered.  Errors if the second stage exhausts
the fine-flip-connected component without finding a regular triangulation.

+-----------------------------------------------------------------------------+
|i5 : A = transpose matrix {{-1,-1,1,1},{-1,-1,1,2},{-1,-1,2,1},{-1,3,-1,-1},{|
|                                                                             |
|o5 = | -1 -1 -1 -1 2  -1 |                                                   |
|     | -1 -1 -1 3  -1 1  |                                                   |
|     | 1  1  2  -1 -1 0  |                                                   |
|     | 1  2  1  -1 -1 0  |                                                   |
|                                                                             |
|              4       6                                                      |
|o5 : Matrix ZZ  <-- ZZ                                                       |
|-----------------------------------------------------------------------------|
|2,-1,-1,-1},{-1,1,0,0}}                                                      |
+-----------------------------------------------------------------------------+
|i6 : t0 = triangulation(A,                                                   |
|                                                                             |
|o6 = triangulation {{0, 1,                                                   |
|                                                                             |
|o6 : Triangulation                                                           |
|-----------------------------------------------------------------------------|
|{{0,1,2,3},{0,1,2,4},{0,1,3,4},{0,2,3,4},{1,2,3,4}})                         |
|                                                                             |
|2, 3}, {0, 1, 2, 4}, {0, 1, 3, 4}, {0, 2, 3, 4}, {1, 2, 3, 4}}               |
+-----------------------------------------------------------------------------+
|i7 : isFine t0                                                               |
|                                                                             |
|o7 = false                                                                   |
+-----------------------------------------------------------------------------+
|i8 : T = regularFineTriangulation t0                                         |
|                                                                             |
|o8 = triangulation {{0, 1, 2, 4}, {0, 1, 2, 5}, {0, 1, 4, 5}, {0, 2, 4, 5},  |
|                                                                             |
|o8 : Triangulation                                                           |
|-----------------------------------------------------------------------------|
|{1, 2, 3, 4}, {1, 2, 3, 5}, {1, 3, 4, 5}, {2, 3, 4, 5}}                      |
+-----------------------------------------------------------------------------+
|i9 : isFine T                                                                |
|                                                                             |
|o9 = true                                                                    |
+-----------------------------------------------------------------------------+
|i10 : isRegularTriangulation T                                               |
|                                                                             |
|o10 = true                                                                   |
+-----------------------------------------------------------------------------+

Caveat
======

On the Matrix form with Homogenize => false, the function returns null (Macaulay2Doc),
when makeFine, fails to reach a fine
triangulation by support-increasing flips (for instance when $A$ has a zero
column, which cannot be a ray of any maximal cone).

See also
========

  * triangulation -- make a Triangulation object
  * isRegularTriangulation -- determine if a
    given triangulation is a regular triangulation
  * isFine -- test whether a triangulation uses every point in
    the configuration
  * someTriangulation -- a triangulation of a point
    or vector configuration, not necessarily fine or regular
  * regularFineFanTriangulation -- a
    regular fine star fan triangulation of a vector configuration
  * makeFine -- walk to a fine triangulation by
    support-increasing bistellar flips
  * topcomRegularFineTriangulation (Topcom)
    -- compute a regular
    triangulation using all of the given points

Ways to use regularFineTriangulation:
=====================================

  * "regularFineTriangulation(Matrix)"
  * "regularFineTriangulation(Triangulation)"

For the programmer
==================

The object regularFineTriangulation, is a
method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:1343:0.

regularTriangulationWeights -- height vector inducing a regular triangulation, if one exists
********************************************************************************************

  * Usage:
        regularTriangulationWeights T
        regularTriangulationWeights(A, tri)
  * Inputs:
      * T, an instance of the type Triangulation,
      * A, a matrix (Macaulay2Doc),
      * tri, a list (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * DegreeMatrix => a matrix (Macaulay2Doc), default value
        null, an integer matrix whose rows are a $\mathbb{Z}$-basis of $\ker
        A$; passed through to secondaryCone.  Defaults to
        degreeMatrix T
      * Strategy (missing documentation) => ..., default value Topcom,
  * Outputs:
      * a list (Macaulay2Doc), of RR (Macaulay2Doc),
        values (machine reals), one per column of the configuration: heights
        whose lower envelope yields tri; or null (Macaulay2Doc), if
        the triangulation is not regular

Description
===========

A triangulation is regular iff there is a height vector such that lifting each
point to that height and taking the lower facets of the resulting upper hull
recovers exactly the maximal simplices of the triangulation.

Computed via the engine LP rawConeInteriorPoint on the secondaryCone,:
an interior point $t \in \mathbb{R}^{N-d}$ is lifted back to
weights $w \in \mathbb{R}^N$ via the Moore-Penrose pseudo-inverse of the charge
matrix, $w = Q^\top (Q Q^\top)^{-1} t$. Any $w$ with $Q w = t$ induces the same
triangulation; this lift is the canonical representative.  For a
rational/integer answer compatible with topcom's output, use
topcomRegularTriangulationWeights (Topcom).

+-----------------------------------------------------------------------------+
|i1 : A = transpose matrix {{0,3},{0,1},{-1,-1},{1,-1},{-4,-2},{4,-2}}        |
|                                                                             |
|o1 = | 0 0 -1 1  -4 4  |                                                     |
|     | 3 1 -1 -1 -2 -2 |                                                     |
|                                                                             |
|              2       6                                                      |
|o1 : Matrix ZZ  <-- ZZ                                                       |
+-----------------------------------------------------------------------------+
|i2 : T = regularFineTriangulation A                                          |
|                                                                             |
|o2 = triangulation {{0, 1, 2}, {0, 1, 3}, {0, 2, 4}, {0, 3, 5}, {1, 2, 3},   |
|                                                                             |
|o2 : Triangulation                                                           |
|-----------------------------------------------------------------------------|
|{2, 3, 4}, {3, 4, 5}}                                                        |
+-----------------------------------------------------------------------------+
|i3 : regularTriangulationWeights T                                           |
|                                                                             |
|      97  47  1                                                              |
|o3 = {--, --, -, 0, 0, 0}                                                    |
|      16  16  8                                                              |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+
|i4 : isRegularTriangulation T                                                |
|                                                                             |
|o4 = true                                                                    |
+-----------------------------------------------------------------------------+

For a non-regular triangulation, the function returns null (Macaulay2Doc),:

+-----------------------------------------------------------------------------+
|i5 : tri = {{0,1,2}, {1,3,5}, {2,3,4}, {0,1,5},                              |
|            {0,2,4}, {3,4,5}, {1,2,3}}                                       |
|                                                                             |
|o5 = {{0, 1, 2}, {1, 3, 5}, {2, 3, 4}, {0, 1, 5}, {0, 2, 4}, {3, 4, 5}, {1,  |
|     ------------------------------------------------------------------------|
|     2, 3}}                                                                  |
|                                                                             |
|o5 : List                                                                    |
+-----------------------------------------------------------------------------+
|i6 : Tnr = triangulation(A, tri)                                             |
|                                                                             |
|o6 = triangulation {{0, 1, 2}, {0, 1, 5}, {0, 2, 4}, {1, 2, 3}, {1, 3, 5},   |
|                                                                             |
|o6 : Triangulation                                                           |
|-----------------------------------------------------------------------------|
|{2, 3, 4}, {3, 4, 5}}                                                        |
+-----------------------------------------------------------------------------+
|i7 : isRegularTriangulation Tnr                                              |
|                                                                             |
|o7 = false                                                                   |
+-----------------------------------------------------------------------------+
|i8 : regularTriangulationWeights Tnr                                         |
+-----------------------------------------------------------------------------+

See also
========

  * isRegularTriangulation -- determine if a
    given triangulation is a regular triangulation
  * secondaryCone -- secondary cone of a triangulation,
    in charge-lattice coordinates
  * degreeMatrix -- charge matrix Q whose rows generate
    ker A
  * topcomRegularTriangulationWeights (Topcom)
    -- find a
    list of heights of a regular triangulation

Ways to use regularTriangulationWeights:
========================================

  * "regularTriangulationWeights(Matrix,List)"
  * "regularTriangulationWeights(Triangulation)"

For the programmer
==================

The object regularTriangulationWeights, is a
method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:1834:0.

secondaryCone -- secondary cone of a triangulation, in charge-lattice coordinates
*********************************************************************************

  * Usage:
        M = secondaryCone T
        M = secondaryCone(A, tri)
  * Inputs:
      * T, an instance of the type Triangulation,
      * A, a matrix (Macaulay2Doc), whose columns are the points
        or vectors of the configuration
      * tri, a list (Macaulay2Doc), a triangulation of the columns
        of $A$
  * Optional inputs (Macaulay2Doc),:
      * DegreeMatrix => a matrix (Macaulay2Doc), default value
        null, an integer matrix whose rows are a $\mathbb{Z}$-basis of $\ker
        A$; defaults to degreeMatrix, T (i.e., transpose
        syz A)
  * Outputs:
      * a matrix (Macaulay2Doc), an integer matrix $M$ of shape
        $m \times (N - d)$ where $m$ is the number of distinct codim-2 wall
        circuits and $N - d$ is the number of rows of the charge matrix; the
        secondary cone is $\{t \in \mathbb{Q}^{N-d} : M t \ge 0\}$

Description
===========

Working modulo the lineality space.  In ambient $\mathbb{R}^N$, every weight
vector $w$ inducing the triangulation $T$ yields the same regular subdivision
when shifted by an element of $\mathrm{rowspan}(A)$ (linear/affine functions of
the configuration), so the secondary cone has lineality of dimension
$\mathrm{rank}(A)$.  Quotienting by this lineality via $t = Q w$ -- where $Q$
is the charge matrix -- produces a pointed cone in $\mathbb{R}^{N-d}$, the
natural home of the secondary cone (and, in due course, the secondary fan).

Each row of $M$ comes from one wall circuit $z$ of $T$ (see wallCircuits):
solving $z = z' Q$ over $\mathbb{Z}$ gives the reduced
inequality $z'$, and the rows of $M$ are these $z'$.  When the user supplies
their own DegreeMatrix, each row of $M$ is expressed in that basis instead.

The triangulation is regular iff this cone has nonempty interior in
$\mathbb{R}^{N-d}$, which can be tested with the engine LP rawConeInteriorPoint
(see isRegularTriangulation).

To recover a weight vector $w \in \mathbb{R}^N$ from an interior point $t$ of
the reduced cone, lift via any $w$ with $Q w = t$ (for instance $w =
\mathrm{solve}(Q, t)$).  Any such $w$ induces the triangulation; different
lifts differ by an element of the lineality and produce the same triangulation.

+---------------------------------------------------+
|i1 : A = transpose matrix {{0,0},{1,0},{0,1},{1,1}}|
|                                                   |
|o1 = | 0 1 0 1 |                                   |
|     | 0 0 1 1 |                                   |
|                                                   |
|              2       4                            |
|o1 : Matrix ZZ  <-- ZZ                             |
+---------------------------------------------------+
|i2 : T1 = triangulation(A, {{0,1,3},{0,2,3}})      |
|                                                   |
|o2 = triangulation {{0, 1, 3}, {0, 2, 3}}          |
|                                                   |
|o2 : Triangulation                                 |
+---------------------------------------------------+
|i3 : T2 = triangulation(A, {{0,1,2},{1,2,3}})      |
|                                                   |
|o3 = triangulation {{0, 1, 2}, {1, 2, 3}}          |
|                                                   |
|o3 : Triangulation                                 |
+---------------------------------------------------+
|i4 : secondaryCone T1                              |
|                                                   |
|o4 = | -1 |                                        |
|                                                   |
|              1       1                            |
|o4 : Matrix ZZ  <-- ZZ                             |
+---------------------------------------------------+
|i5 : secondaryCone T2                              |
|                                                   |
|o5 = | 1 |                                         |
|                                                   |
|              1       1                            |
|o5 : Matrix ZZ  <-- ZZ                             |
+---------------------------------------------------+

A vector configuration: 8 corners of a 3-cube, treated as a $4 \times 8$ vector
configuration (homogenized by hand with a row of $1$'s).  The reduced cone
lives in $\mathbb{R}^{8-4} = \mathbb{R}^4$.

+-----------------------------------------------------------------------------+
|i6 : V = transpose matrix                                                    |
|                                                                             |
|o6 = | 1 0 1 1 0 0 1 0 |                                                     |
|     | 1 1 0 1 0 1 0 0 |                                                     |
|     | 1 1 1 0 1 0 0 0 |                                                     |
|     | 1 1 1 1 1 1 1 1 |                                                     |
|                                                                             |
|              4       8                                                      |
|o6 : Matrix ZZ  <-- ZZ                                                       |
|-----------------------------------------------------------------------------|
|{{1,1,1,1},{0,1,1,1},{1,0,1,1},{1,1,0,1},{0,0,1,1},{0,1,0,1},{1,0,0,1},{0,0,0|
|-----------------------------------------------------------------------------|
|,1}}                                                                         |
+-----------------------------------------------------------------------------+
|i7 : Tv = triangulation(V,                                                   |
|                                                                             |
|o7 = triangulation {{0, 1,                                                   |
|                                                                             |
|o7 : Triangulation                                                           |
|-----------------------------------------------------------------------------|
|{{0,1,2,3},{1,2,3,4},{1,3,4,5},{2,3,4,6},{3,4,5,6},{4,5,6,7}})               |
|                                                                             |
|2, 3}, {1, 2, 3, 4}, {1, 3, 4, 5}, {2, 3, 4, 6}, {3, 4, 5, 6}, {4, 5, 6, 7}} |
+-----------------------------------------------------------------------------+
|i8 : M = secondaryCone Tv                                                    |
|                                                                             |
|o8 = | -1 0  1  1 |                                                          |
|     | 1  -1 0  0 |                                                          |
|     | 1  0  0  0 |                                                          |
|     | -1 1  -1 0 |                                                          |
|                                                                             |
|              4       4                                                      |
|o8 : Matrix ZZ  <-- ZZ                                                       |
+-----------------------------------------------------------------------------+
|i9 : Q = degreeMatrix Tv                                                     |
|                                                                             |
|o9 = | 0 1 0  -1 -1 0  1 0  |                                                |
|     | 0 1 -1 0  0  -1 1 0  |                                                |
|     | 0 0 -1 0  1  0  1 -1 |                                                |
|     | 1 0 0  -1 -1 0  0 1  |                                                |
|                                                                             |
|              4       8                                                      |
|o9 : Matrix ZZ  <-- ZZ                                                       |
+-----------------------------------------------------------------------------+
|i10 : M * Q * (transpose matrix {regularTriangulationWeights Tv})            |
|                                                                             |
|o10 = | 1 |                                                                  |
|      | 1 |                                                                  |
|      | 1 |                                                                  |
|      | 1 |                                                                  |
|                                                                             |
|               4       1                                                     |
|o10 : Matrix ZZ  <-- ZZ                                                      |
+-----------------------------------------------------------------------------+

See also
========

  * degreeMatrix -- charge matrix Q whose rows generate
    ker A
  * wallCircuits -- distinct codim-2 wall circuits of a
    triangulation, with sign convention
  * isRegularTriangulation -- determine if a
    given triangulation is a regular triangulation
  * regularTriangulationWeights -- height
    vector inducing a regular triangulation, if one exists

Ways to use secondaryCone:
==========================

  * "secondaryCone(Matrix,List)"
  * "secondaryCone(Triangulation)"

For the programmer
==================

The object secondaryCone, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:2340:0.

someTriangulation -- a triangulation of a point or vector configuration, not necessarily fine or regular
********************************************************************************************************

  * Usage:
        T = someTriangulation A
  * Inputs:
      * A, a matrix (Macaulay2Doc), whose columns are the vectors
        of the configuration; the columns are interpreted as vectors (no
        homogenization), and $A$ is assumed to have full row rank
  * Outputs:
      * T, an instance of the type Triangulation, a
        triangulation of $A$ as a vector configuration

Description
===========

Returns some triangulation of the vector configuration $A$, useful as a seed
for flipGraph, or generateTriangulations.
Unlike regularFineTriangulation,
with Homogenize => false, this function is reliable
on non-acyclic configurations (where the origin lies in the interior of
$\mathrm{conv}(A)$).  The returned triangulation need not be fine; columns in
the strict interior of $\mathrm{conv}(A)$ are omitted.  When
coneFromVData (Polyhedra),$(A)$ is pointed, this defers to
regularFineTriangulation.

+-----------------------------------------------------------------------------+
|i1 : A = transpose matrix {{-1,-1,1,1},{-1,-1,1,2},{-1,-1,2,1},{-1,3,-1,-1},{|
|                                                                             |
|o1 = | -1 -1 -1 -1 2  -1 |                                                   |
|     | -1 -1 -1 3  -1 1  |                                                   |
|     | 1  1  2  -1 -1 0  |                                                   |
|     | 1  2  1  -1 -1 0  |                                                   |
|                                                                             |
|              4       6                                                      |
|o1 : Matrix ZZ  <-- ZZ                                                       |
|-----------------------------------------------------------------------------|
|2,-1,-1,-1},{-1,1,0,0}}                                                      |
+-----------------------------------------------------------------------------+
|i2 : isPointed posHull A                                                     |
|                                                                             |
|o2 = false                                                                   |
+-----------------------------------------------------------------------------+
|i3 : T = someTriangulation A                                                 |
|                                                                             |
|o3 = triangulation {{0, 1, 2, 4}, {0, 1, 2, 5}, {0, 1, 4, 5}, {0, 2, 4, 5},  |
|                                                                             |
|o3 : Triangulation                                                           |
|-----------------------------------------------------------------------------|
|{1, 2, 3, 4}, {1, 2, 3, 5}, {1, 3, 4, 5}, {2, 3, 4, 5}}                      |
+-----------------------------------------------------------------------------+
|i4 : isWellDefined T                                                         |
|                                                                             |
|o4 = true                                                                    |
+-----------------------------------------------------------------------------+
|i5 : isFine T                                                                |
|                                                                             |
|o5 = true                                                                    |
+-----------------------------------------------------------------------------+
|i6 : isRegularTriangulation T                                                |
|                                                                             |
|o6 = true                                                                    |
+-----------------------------------------------------------------------------+

Strategy: triangulate homogenize$(A)$ as a point configuration (which
topcomRegularFineTriangulation (Topcom),
handles correctly for any
$A$); the resulting $d$-dimensional polytope simplices each have $d{+}1$
vertices.  The $(d{-}1)$-subsets appearing in exactly one polytope simplex are
the boundary $(d{-}1)$-faces of $\mathrm{conv}(A)$.  For a non-acyclic $A$ the
cones over these boundary faces form a complete simplicial fan.

See also
========

  * regularFineTriangulation -- a regular fine
    triangulation of a point or vector configuration
  * triangulation -- make a Triangulation object
  * flipGraph -- bistellar-flip graph of a point or vector
    configuration
  * generateTriangulations -- generate all
    triangulations with certain properties

Ways to use someTriangulation:
==============================

  * "someTriangulation(Matrix)"

For the programmer
==================

The object someTriangulation, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:1489:0.

Triangulation -- a triangulation of a point or vector configuration
*******************************************************************

Description
===========

A Triangulation packages a point (or vector) configuration $A$ together with a
triangulation of the columns of $A$, given as a list of maximal simplices.
Each simplex is a sorted list of column indices into $A$, and the outer list is
sorted as well.

Construct a Triangulation with triangulation, from an
explicit matrix and list, or with regularFineTriangulation,
from just a matrix.  Inspect one with the accessors
max(Triangulation),
vectors(Triangulation), and matrix(Triangulation).

+-----------------------------------------------------------------------------+
|i1 : A = transpose matrix {{0,3},{0,1},{-1,-1},{1,-1},{-4,-2},{4,-2}}        |
|                                                                             |
|o1 = | 0 0 -1 1  -4 4  |                                                     |
|     | 3 1 -1 -1 -2 -2 |                                                     |
|                                                                             |
|              2       6                                                      |
|o1 : Matrix ZZ  <-- ZZ                                                       |
+-----------------------------------------------------------------------------+
|i2 : T = regularFineTriangulation A                                          |
|                                                                             |
|o2 = triangulation {{0, 1, 2}, {0, 1, 3}, {0, 2, 4}, {0, 3, 5}, {1, 2, 3},   |
|                                                                             |
|o2 : Triangulation                                                           |
|-----------------------------------------------------------------------------|
|{2, 3, 4}, {3, 4, 5}}                                                        |
+-----------------------------------------------------------------------------+
|i3 : max T                                                                   |
|                                                                             |
|o3 = {{0, 1, 2}, {0, 1, 3}, {0, 2, 4}, {0, 3, 5}, {1, 2, 3}, {2, 3, 4}, {3,  |
|     ------------------------------------------------------------------------|
|     4, 5}}                                                                  |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+
|i4 : matrix T                                                                |
|                                                                             |
|o4 = | 0 0 -1 1  -4 4  |                                                     |
|     | 3 1 -1 -1 -2 -2 |                                                     |
|     | 1 1 1  1  1  1  |                                                     |
|                                                                             |
|              3       6                                                      |
|o4 : Matrix ZZ  <-- ZZ                                                       |
+-----------------------------------------------------------------------------+
|i5 : vectors T                                                               |
|                                                                             |
|o5 = {{0, 3, 1}, {0, 1, 1}, {-1, -1, 1}, {1, -1, 1}, {-4, -2, 1}, {4, -2, 1}}|
|                                                                             |
|o5 : List                                                                    |
+-----------------------------------------------------------------------------+

By default, the matrix stored in T is the homogenized configuration, with a
final row of $1$'s appended; most algorithms in this package operate on
homogenized vectors.  Pass Homogenize => false to triangulation,
if the input is already a vector configuration.

See also
========

  * triangulation -- make a Triangulation object
  * regularFineTriangulation -- a regular fine
    triangulation of a point or vector configuration
  * max(Triangulation) -- the maximal simplices
    of a triangulation
  * vectors(Triangulation) -- the column vectors of the
    configuration underlying a triangulation
  * matrix(Triangulation) -- the matrix whose
    columns are the points of a triangulation

Functions and methods returning an object of class Triangulation:
=================================================================

  * "makeFine(Triangulation)" -- see makeFine, -- walk to a
    fine triangulation by support-increasing bistellar flips
  * "regularFineFanTriangulation(Matrix)" -- see
    regularFineFanTriangulation, -- a regular fine
    star fan triangulation of a vector configuration
  * "regularFineTriangulation(Matrix)" -- see regularFineTriangulation,
    -- a regular fine triangulation of a point or
    vector configuration
  * "regularFineTriangulation(Triangulation)" -- see
    regularFineTriangulation, -- a regular fine
    triangulation of a point or vector configuration
  * "someTriangulation(Matrix)" -- see someTriangulation,
    -- a triangulation of a point or vector configuration,
    not necessarily fine or regular
  * "triangulation(List,List)" -- see triangulation, --
    make a Triangulation object
  * "triangulation(Matrix,List)" -- see triangulation, --
    make a Triangulation object

Methods that use an object of class Triangulation:
==================================================

  * "bistellarFlip(Triangulation,List)" -- see bistellarFlip,
    -- perform a bistellar flip on a triangulation
  * "degreeMatrix(Triangulation)" -- see degreeMatrix, --
    charge matrix Q whose rows generate ker A
  * "flipCandidates(Triangulation)" -- see flipCandidates,
    -- candidate affine circuits for bistellar flips of a
    triangulation
  * "flipGraph(Triangulation)" -- see flipGraph, --
    bistellar-flip graph of a point or vector configuration
  * "flips(Triangulation)" -- see flips, -- legal bistellar flips
    of a triangulation, computed via topcom
  * generateTriangulations(Triangulation) (missing documentation)
  * "isFine(Triangulation)" -- see isFine, -- test whether a
    triangulation uses every point in the configuration
  * "isRegularTriangulation(Triangulation)" -- see
    isRegularTriangulation, -- determine if a given
    triangulation is a regular triangulation
  * "isStar(Triangulation)" -- see isStar, -- test whether a
    triangulation is a star with respect to its last point
  * isWellDefined(Triangulation), --
    test whether the simplices of a triangulation form a valid triangulation
  * matrix(Triangulation) -- the matrix whose
    columns are the points of a triangulation
  * max(Triangulation) -- the maximal simplices
    of a triangulation
  * "neighbors(Triangulation)" -- see neighbors, --
    triangulations adjacent to a given one in the bistellar-flip graph
  * net(Triangulation) (missing documentation)
  * "regularTriangulationWeights(Triangulation)" -- see
    regularTriangulationWeights, -- height vector
    inducing a regular triangulation, if one exists
  * "secondaryCone(Triangulation)" -- see secondaryCone,
    -- secondary cone of a triangulation, in charge-lattice coordinates
  * toExternalString(Triangulation) (missing documentation)
  * topcomIsRegularTriangulation(Triangulation) (missing documentation)
  * topcomRegularTriangulationWeights(Triangulation) (missing documentation)
  * toString(Triangulation) (missing documentation)
  * Triangulation == Triangulation (missing documentation)
  * "vectors(Triangulation)" -- see vectors, -- the column
    vectors of the configuration underlying a triangulation
  * "volumeVector(Triangulation)" -- see volumeVector, --
    the GKZ vector (per-vertex/per-ray volume sum) of a triangulation
  * "wallCircuits(Triangulation)" -- see wallCircuits, --
    distinct codim-2 wall circuits of a triangulation, with sign convention

For the programmer
==================

The object Triangulation, is a type (Macaulay2Doc),
with ancestor classes HashTable (Macaulay2Doc),
< Thing (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:1187:0.

triangulation -- make a Triangulation object
********************************************

  * Usage:
        triangulation(A, T)
        triangulation(vecs, T)
  * Inputs:
      * A, a matrix (Macaulay2Doc), whose columns are the points
        or vectors of the configuration
      * vecs, a list (Macaulay2Doc), a list of points or vectors
        (each entry a list of integers or rationals); equivalent to passing
        transpose matrix vecs
      * T, a list (Macaulay2Doc), representing a triangulation of
        the columns of $A$ (each element in the list is a list of indices in
        the range $0, \ldots, n-1$, where $n$ is the number of columns of $A$)
  * Optional inputs (Macaulay2Doc),:
      * Homogenize => a Boolean value (Macaulay2Doc), default
        value null, controls how $A$ is interpreted.  By default (null) the
        interpretation is inferred from the size of the max simplices in $T$
        (see Description below).  Pass true to force a point-set interpretation
        (a row of $1$'s is appended to $A$ before storing) or false to force a
        vector-configuration interpretation (matrix stored as-is).  An explicit
        value inconsistent with the simplex sizes is an error.
  * Outputs:
      * an instance of the type Triangulation, A
        Triangulation, object.  Very little computation is
        performed.  The matrix and list representing a triangulation is
        packaged into an object to make clear that it is a triangulation

Description
===========

The Homogenize option determines how $A$ is interpreted, not just how it is
stored.  By default the constructor inspects the size of the max simplices in
$T$:

$\bullet$ if every max simplex has size numRows A + 1, $A$ is treated as a
point set and the stored matrix is $A$ with an appended row of $1$'s
(homogenisation);

$\bullet$ if every max simplex has size numRows A, $A$ is already a vector
configuration (e.g., a $d \times n$ matrix of rays in $\RR^d$) and is stored as
given.

Downstream routines (regularity, flips, chirotope, $\ldots$) read the ambient
dimension from the stored matrix, so the two interpretations yield genuinely
different triangulations of the same combinatorial $T$. Passing Homogenize =>
true or false forces a particular interpretation; an explicit value
inconsistent with the inferred one is rejected.

+-----------------------------------------------------------------------------+
|i1 : P = hypercube 3                                                         |
|                                                                             |
|o1 = P                                                                       |
|                                                                             |
|o1 : Polyhedron                                                              |
+-----------------------------------------------------------------------------+
|i2 : A = vertices P                                                          |
|                                                                             |
|o2 = | -1 1  -1 1  -1 1  -1 1 |                                              |
|     | -1 -1 1  1  -1 -1 1  1 |                                              |
|     | -1 -1 -1 -1 1  1  1  1 |                                              |
|                                                                             |
|              3       8                                                      |
|o2 : Matrix QQ  <-- QQ                                                       |
+-----------------------------------------------------------------------------+
|i3 : T = topcomRegularFineTriangulation A                                    |
|                                                                             |
|o3 = {{0, 1, 2, 4}, {1, 2, 3, 4}, {1, 3, 4, 5}, {2, 3, 4, 6}, {3, 4, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {3, 5, 6, 7}}                                                           |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+
|i4 : tri = triangulation(A, T)                                               |
|                                                                             |
|o4 = triangulation {{0, 1, 2, 4}, {1, 2, 3, 4}, {1, 3, 4, 5}, {2, 3, 4, 6},  |
|                                                                             |
|o4 : Triangulation                                                           |
|-----------------------------------------------------------------------------|
|{3, 4, 5, 6}, {3, 5, 6, 7}}                                                  |
+-----------------------------------------------------------------------------+
|i5 : matrix tri                                                              |
|                                                                             |
|o5 = | -1 1  -1 1  -1 1  -1 1 |                                              |
|     | -1 -1 1  1  -1 -1 1  1 |                                              |
|     | -1 -1 -1 -1 1  1  1  1 |                                              |
|     | 1  1  1  1  1  1  1  1 |                                              |
|                                                                             |
|              4       8                                                      |
|o5 : Matrix QQ  <-- QQ                                                       |
+-----------------------------------------------------------------------------+
|i6 : vectors tri                                                             |
|                                                                             |
|o6 = {{-1, -1, -1, 1}, {1, -1, -1, 1}, {-1, 1, -1, 1}, {1, 1, -1, 1}, {-1,   |
|     ------------------------------------------------------------------------|
|     -1, 1, 1}, {1, -1, 1, 1}, {-1, 1, 1, 1}, {1, 1, 1, 1}}                  |
|                                                                             |
|o6 : List                                                                    |
+-----------------------------------------------------------------------------+
|i7 : max tri                                                                 |
|                                                                             |
|o7 = {{0, 1, 2, 4}, {1, 2, 3, 4}, {1, 3, 4, 5}, {2, 3, 4, 6}, {3, 4, 5, 6},  |
|     ------------------------------------------------------------------------|
|     {3, 5, 6, 7}}                                                           |
|                                                                             |
|o7 : List                                                                    |
+-----------------------------------------------------------------------------+
|i8 : isWellDefined tri                                                       |
|                                                                             |
|o8 = true                                                                    |
+-----------------------------------------------------------------------------+
|i9 : netList flipCandidates tri                                              |
|                                                                             |
|     +------+------+                                                         |
|o9 = |{1, 2}|{0, 3}|                                                         |
|     +------+------+                                                         |
|     |{3, 4}|{2, 5}|                                                         |
|     +------+------+                                                         |
|     |{3, 4}|{1, 6}|                                                         |
|     +------+------+                                                         |
|     |{5, 6}|{4, 7}|                                                         |
|     +------+------+                                                         |
+-----------------------------------------------------------------------------+
|i10 : isFine tri                                                             |
|                                                                             |
|o10 = true                                                                   |
+-----------------------------------------------------------------------------+
|i11 : isStar tri                                                             |
|                                                                             |
|o11 = false                                                                  |
+-----------------------------------------------------------------------------+
|i12 : isRegularTriangulation tri                                             |
|                                                                             |
|o12 = true                                                                   |
+-----------------------------------------------------------------------------+

A vector configuration: simplex size matches the row count of $A$, so no
homogenisation is applied.

+-----------------------------------------------------------------------------+
|i13 : V = transpose matrix                                                   |
|                                                                             |
|o13 = | 1 0 1 1 0 0 1 0 |                                                    |
|      | 1 1 0 1 0 1 0 0 |                                                    |
|      | 1 1 1 0 1 0 0 0 |                                                    |
|      | 1 1 1 1 1 1 1 1 |                                                    |
|                                                                             |
|               4       8                                                     |
|o13 : Matrix ZZ  <-- ZZ                                                      |
|-----------------------------------------------------------------------------|
|{{1,1,1,1},{0,1,1,1},{1,0,1,1},{1,1,0,1},{0,0,1,1},{0,1,0,1},{1,0,0,1},{0,0,0|
|-----------------------------------------------------------------------------|
|,1}}                                                                         |
+-----------------------------------------------------------------------------+
|i14 : triV = {{0,1,2,3},{1,2,3,4},{1,3,4,5},{2,3,4,6},{3,4,5,6},{4,5,6,7}}   |
|                                                                             |
|o14 = {{0, 1, 2, 3}, {1, 2, 3, 4}, {1, 3, 4, 5}, {2, 3, 4, 6}, {3, 4, 5, 6}, |
|      -----------------------------------------------------------------------|
|      {4, 5, 6, 7}}                                                          |
|                                                                             |
|o14 : List                                                                   |
+-----------------------------------------------------------------------------+
|i15 : Tv = triangulation(V, triV)                                            |
|                                                                             |
|o15 = triangulation {{0, 1, 2, 3}, {1, 2, 3, 4}, {1, 3, 4, 5}, {2, 3, 4, 6}, |
|                                                                             |
|o15 : Triangulation                                                          |
|-----------------------------------------------------------------------------|
|{3, 4, 5, 6}, {4, 5, 6, 7}}                                                  |
+-----------------------------------------------------------------------------+
|i16 : matrix Tv                                                              |
|                                                                             |
|o16 = | 1 0 1 1 0 0 1 0 |                                                    |
|      | 1 1 0 1 0 1 0 0 |                                                    |
|      | 1 1 1 0 1 0 0 0 |                                                    |
|      | 1 1 1 1 1 1 1 1 |                                                    |
|                                                                             |
|               4       8                                                     |
|o16 : Matrix ZZ  <-- ZZ                                                      |
+-----------------------------------------------------------------------------+

The (List, List) form is convenient when the configuration is given as a list
of vectors:

+-----------------------------------------------------------------+
|i17 : triangulation({{0,0},{1,0},{0,1},{1,1}}, {{0,1,2},{1,2,3}})|
|                                                                 |
|o17 = triangulation {{0, 1, 2}, {1, 2, 3}}                       |
|                                                                 |
|o17 : Triangulation                                              |
+-----------------------------------------------------------------+

Caveat
======

See also
========

  * Triangulation -- a triangulation of a point or vector
    configuration
  * max(Triangulation) -- the maximal simplices
    of a triangulation
  * vectors(Triangulation) -- the column vectors of the
    configuration underlying a triangulation
  * matrix(Triangulation) -- the matrix whose
    columns are the points of a triangulation
  * regularFineTriangulation -- a regular fine
    triangulation of a point or vector configuration
  * isWellDefined(Triangulation), --
    test whether the simplices of a triangulation form a valid triangulation

Ways to use triangulation:
==========================

  * "triangulation(List,List)"
  * "triangulation(Matrix,List)"

For the programmer
==================

The object triangulation, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:1276:0.

vectors -- the column vectors of the configuration underlying a triangulation
*****************************************************************************

  * Usage:
        vectors T
  * Inputs:
      * T, an instance of the type Triangulation,
  * Outputs:
      * a list (Macaulay2Doc), whose $i$-th entry is the $i$-th
        column of matrix(Triangulation),
        represented as a list of integers

Description
===========

Returns the columns of the matrix associated to $T$ as a list of column
vectors.  If $T$ was constructed with the default Homogenize => true, each
vector ends with a $1$.

+-----------------------------------------------------------------------------+
|i1 : A = transpose matrix {{0,3},{0,1},{-1,-1},{1,-1},{-4,-2},{4,-2}}        |
|                                                                             |
|o1 = | 0 0 -1 1  -4 4  |                                                     |
|     | 3 1 -1 -1 -2 -2 |                                                     |
|                                                                             |
|              2       6                                                      |
|o1 : Matrix ZZ  <-- ZZ                                                       |
+-----------------------------------------------------------------------------+
|i2 : T = regularFineTriangulation A                                          |
|                                                                             |
|o2 = triangulation {{0, 1, 2}, {0, 1, 3}, {0, 2, 4}, {0, 3, 5}, {1, 2, 3},   |
|                                                                             |
|o2 : Triangulation                                                           |
|-----------------------------------------------------------------------------|
|{2, 3, 4}, {3, 4, 5}}                                                        |
+-----------------------------------------------------------------------------+
|i3 : vectors T                                                               |
|                                                                             |
|o3 = {{0, 3, 1}, {0, 1, 1}, {-1, -1, 1}, {1, -1, 1}, {-4, -2, 1}, {4, -2, 1}}|
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * Triangulation -- a triangulation of a point or vector
    configuration
  * matrix(Triangulation) -- the matrix whose
    columns are the points of a triangulation
  * max(Triangulation) -- the maximal simplices
    of a triangulation

Ways to use vectors:
====================

  * "vectors(Triangulation)"

For the programmer
==================

The object vectors, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:1629:0.

volumeVector -- the GKZ vector (per-vertex/per-ray volume sum) of a triangulation
*********************************************************************************

  * Usage:
        volumeVector T
        volumeVector(A, tri)
        gkzVector T
        gkzVector(A, tri)
  * Inputs:
      * T, an instance of the type Triangulation,
      * A, a matrix (Macaulay2Doc), whose columns are the points
        or vectors of the configuration
      * tri, a list (Macaulay2Doc), a triangulation of the columns
        of $A$
  * Outputs:
      * a list (Macaulay2Doc), whose $i$-th entry is the sum of
        $|\det A_t| / d!$ over all maximal simplices $t$ of tri containing
        column $i$

Description
===========

For each maximal simplex $t$, the function computes $|\det A_t| / d!$.  The
output's $i$-th entry is the sum of these values over all $t$ containing $i$.
This is the GKZ vector (or volume vector) of the triangulation; the two names
volumeVector and gkzVector are aliases for the same method.

The geometric reading of $|\det A_t|/d!$ depends on whether $A$ is a point or
vector configuration:

  * Point configuration (homogenized matrix, last row of $1$'s; e.g. a
    Triangulation built with the default Homogenize => true): |det A_t|/d! is
    the $d$-dimensional volume of the simplex with vertices the columns of A_t;
    the result is the GKZ vector in the polytope / secondary-fan sense.
  * Vector configuration (e.g. a Triangulation built with Homogenize => false,
    whose columns span the rays of a simplicial fan): |det A_t|/d! is the
    normalized lattice volume of the cone, equivalently the index of the
    sublattice generated by the rays in A_t; the result is the per-ray sum of
    cone indices.

If $A$ has fewer rows than $d{+}1$ where $d{+}1 = |t|$ for any simplex $t \in
tri$, $A$ is auto-homogenized with a final row of $1$'s before the determinant
is taken.

Example: a fine regular triangulation of a planar point set, regarded as a
point configuration:

+-----------------------------------------------------------------------------+
|i1 : A = transpose matrix {{0,3},{0,1},{-1,-1},{1,-1},{-4,-2},{4,-2}}        |
|                                                                             |
|o1 = | 0 0 -1 1  -4 4  |                                                     |
|     | 3 1 -1 -1 -2 -2 |                                                     |
|                                                                             |
|              2       6                                                      |
|o1 : Matrix ZZ  <-- ZZ                                                       |
+-----------------------------------------------------------------------------+
|i2 : T = regularFineTriangulation A                                          |
|                                                                             |
|o2 = triangulation {{0, 1, 2}, {0, 1, 3}, {0, 2, 4}, {0, 3, 5}, {1, 2, 3},   |
|                                                                             |
|o2 : Triangulation                                                           |
|-----------------------------------------------------------------------------|
|{2, 3, 4}, {3, 4, 5}}                                                        |
+-----------------------------------------------------------------------------+
|i3 : volumeVector T                                                          |
|                                                                             |
|             19  27  21  19                                                  |
|o3 = {13, 4, --, --, --, --}                                                 |
|              2   2   2   2                                                  |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+

Example: the rays of the fan of $\mathbb{P}^1 \times \mathbb{P}^1$, as a vector
configuration:

+--------------------------------------------------------------------------+
|i4 : B = matrix{{1,0,-1,0},{0,1,0,-1}}                                    |
|                                                                          |
|o4 = | 1 0 -1 0  |                                                        |
|     | 0 1 0  -1 |                                                        |
|                                                                          |
|              2       4                                                   |
|o4 : Matrix ZZ  <-- ZZ                                                    |
+--------------------------------------------------------------------------+
|i5 : TB = triangulation(B, {{0,1},{1,2},{2,3},{0,3}}, Homogenize => false)|
|                                                                          |
|o5 = triangulation {{0, 1}, {0, 3}, {1, 2}, {2, 3}}                       |
|                                                                          |
|o5 : Triangulation                                                        |
+--------------------------------------------------------------------------+
|i6 : gkzVector TB                                                         |
|                                                                          |
|o6 = {2, 2, 2, 2}                                                         |
|                                                                          |
|o6 : List                                                                 |
+--------------------------------------------------------------------------+

See also
========

  * Triangulation -- a triangulation of a point or vector
    configuration
  * triangulation -- make a Triangulation object

Ways to use volumeVector:
=========================

  * "volumeVector(Matrix,List)"
  * "volumeVector(Triangulation)"

For the programmer
==================

The object volumeVector, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:2640:0.

wallCircuits -- distinct codim-2 wall circuits of a triangulation, with sign convention
***************************************************************************************

  * Usage:
        wcs = wallCircuits T
        wcs = wallCircuits(A, tri)
  * Inputs:
      * T, an instance of the type Triangulation,
      * A, a matrix (Macaulay2Doc), whose columns are the points
        or vectors of the configuration
      * tri, a list (Macaulay2Doc), a triangulation of the columns
        of $A$
  * Outputs:
      * a list (Macaulay2Doc), of triples $\{inTri, notInTri, z\}$,
        one per distinct circuit supported on a codim-2 wall of the
        triangulation

Description
===========

A codim-2 wall of $T$ is the union of two adjacent maximal simplices, a
$(d{+}1)$-element subset $c$ of column indices.  The circuit supported on $c$
is the integer kernel relation $\sum_{i \in c} z_i A_i = 0$, restricted to its
support (the indices $i$ with $z_i \ne 0$).  When the circuit support is
strictly smaller than $d{+}1$ -- which happens when one of the wall vertices
has $z = 0$ -- the same circuit can appear in several different walls; these
duplicates are removed so each entry of the returned list is a distinct
circuit.

Each triple $\{inTri, notInTri, z\}$ records:

$\bullet$ inTri: the support indices with $z_i > 0$.

$\bullet$ notInTri: the support indices with $z_i < 0$.

$\bullet$ z: an integer kernel of length $\#(inTri \cup notInTri)$, indexed by
position in sort(inTri | notInTri), signed so the facet inequality $$\sum_{i
\in inTri \cup notInTri} z_i \, w_i \;\ge\; 0$$ holds for every $w$ that
induces $T$.

For a balanced circuit (both signs present), inTri is exactly the half whose
simplices $c \setminus \{v\}$ appear in $T$.  For a totally cyclic circuit
(e.g. when $0$ lies in the interior of $\mathrm{cone}(c)$, as in many complete
simplicial fans), $z$ is one-sided: inTri is the full circuit support and
notInTri is empty, yet the inequality still holds.

+-----------------------------------------------------------------------------+
|i1 : A = transpose matrix {{0,3},{0,1},{-1,-1},{1,-1},{-4,-2},{4,-2}}        |
|                                                                             |
|o1 = | 0 0 -1 1  -4 4  |                                                     |
|     | 3 1 -1 -1 -2 -2 |                                                     |
|                                                                             |
|              2       6                                                      |
|o1 : Matrix ZZ  <-- ZZ                                                       |
+-----------------------------------------------------------------------------+
|i2 : T = regularFineTriangulation A                                          |
|                                                                             |
|o2 = triangulation {{0, 1, 2}, {0, 1, 3}, {0, 2, 4}, {0, 3, 5}, {1, 2, 3},   |
|                                                                             |
|o2 : Triangulation                                                           |
|-----------------------------------------------------------------------------|
|{2, 3, 4}, {3, 4, 5}}                                                        |
+-----------------------------------------------------------------------------+
|i3 : netList wallCircuits T                                                  |
|                                                                             |
|     +---------+------+----------------+                                     |
|o3 = |{0, 2, 3}|{1}   |{2, -4, 1, 1}   |                                     |
|     +---------+------+----------------+                                     |
|     |{1, 4}   |{0, 2}|{-5, 11, -8, 2} |                                     |
|     +---------+------+----------------+                                     |
|     |{1, 5}   |{0, 3}|{-5, 11, -8, 2} |                                     |
|     +---------+------+----------------+                                     |
|     |{0, 3, 4}|{2}   |{2, -21, 11, 8} |                                     |
|     +---------+------+----------------+                                     |
|     |{1, 3, 4}|{2}   |{2, -11, 5, 4}  |                                     |
|     +---------+------+----------------+                                     |
|     |{0, 4, 5}|{3}   |{8, -40, 11, 21}|                                     |
|     +---------+------+----------------+                                     |
|     |{2, 5}   |{3, 4}|{4, -4, -1, 1}  |                                     |
|     +---------+------+----------------+                                     |
+-----------------------------------------------------------------------------+

See also
========

  * flipCandidates -- candidate affine circuits for
    bistellar flips of a triangulation
  * secondaryCone -- secondary cone of a triangulation,
    in charge-lattice coordinates

Ways to use wallCircuits:
=========================

  * "wallCircuits(Matrix,List)"
  * "wallCircuits(Triangulation)"

For the programmer
==================

The object wallCircuits, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Triangulations.m2:2219:0.