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

ResultantComplexes
******************

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

Systems of sparse polynomials with indeterminate coefficients are defined by
the family of their supports which contain the exponents of terms. The
Minkowski sum of their Newton polytopes specifies a toric variety. To calculate
resultants Canny and Emiris shifted this sum by a rational vector. This
displacement can also be viewed as a twist of line bundles associated with
lattice polytopes by a suitable rank one-bundle.  This way, a complex of
finitely generated modules over the ring of coefficients is obtained as
proposed by Gelfand, Kapranov and Zelevinsky via global sections of twisted
sheafs in the Koszul complex generated by the given system. Following Canny and
Emiris again, tight mixed subdivisions are utilized to obtain regular minors of
the corresponding differentials, so that the determinant can be calculated by
means of the Cayley formula.  Besides the assumption that the Minkowski sum of
all Newton polytopes in the system must be full dimensional, there are no
further conditions for the family of supports. Consequently, the determinant of
the complex agrees with the resultant, redefined by D'Andrea and Sombra.  The
example illustrates a system that contains the first three supports as unique
essential sub-family. It results from the system considered in
resultantComplex, by multiplying the exponents with a
unimodular integer matrix.  Furthermore, the length of the fourth support in
the factor lattice over the sub-lattice generated by the first three supports
doubles the multiplicity of the resultant, as described by D'Andrea, C. and
Sombra.
+-----------------------------------------------------------------------------+
|i1 : A = QQ[c_1..c_10];                                                      |
+-----------------------------------------------------------------------------+
|i2 : supp = {{{0,0,0},{0,2,4},{-2,5,8}}, {{-2,4,6},{1,0,1},{4,-4,-4}},       |
|-----------------------------------------------------------------------------|
|{{3,-3,-3},{0,1,2}}, {{0,0,0},{2,-4,-4}}};                                   |
+-----------------------------------------------------------------------------+
|i3 : Lift = {{0,-12,-4},{-2,-1},{-3,0},{-5,-2}};                             |
+-----------------------------------------------------------------------------+
|i4 : (complexRes,mon,choice) = resultantComplex( A, supp, Lift,              |
|-----------------------------------------------------------------------------|
|{-1/8,1/3,4/7} );                                                            |
+-----------------------------------------------------------------------------+
|i5 : complexRes                                                              |
|                                                                             |
|      44      46      2                                                      |
|o5 = A   <-- A   <-- A  <-- 0                                                |
|                                                                             |
|     0       1       2      3                                                |
|                                                                             |
|o5 : Complex                                                                 |
+-----------------------------------------------------------------------------+
|i6 : Res = factor CayleyFormula(complexRes,mon,choice)                       |
|                                                                             |
|         2               2 14                                                |
|o6 = (c c  - c c c  + c c )                                                  |
|       4 7    5 7 8    6 8                                                   |
|                                                                             |
|o6 : Expression of class Product                                             |
+-----------------------------------------------------------------------------+

References
==========

  * Canny, John F. and Emiris, Ioannis Z., "A Subdivision-based Algorithm for
    the Sparse Resultant", Journal of ACM, May 2000, volume 47 number 3, 2000
  * D'Andrea, C. and Sombra, M., A Poisson formula for the sparse resultant.,
    Proc. Lond. Math. Soc. (3), ISSN 0024-6115; 1460-244X/e, Volume 110, Number
    4, Pages 932--964, 2015
  * Sturmfels, Bernd, "On the Newton Polytope of the Resultant" , Journal of
    Algebraic Combinatorics, 1994, Apr, volume 3, number 2, pages 207-236 ISSN
    1572-9192
  * Gelfand, I.M. and Kapranov, M. and Zelevinsky, A., "Discriminants,
    Resultants, and Multidimensional Determinants", ISBN 9780817647711, Modern
    Birkhäuser Classics, 1994

Author
======

  * Friedemann Groh

Certification a gold star
=========================

Version 1.0 of this package was accepted for publication in volume 16 (see
https://msp.org/jsag/2026/16-1/ ) of Journal of Software for Algebra and
Geometry (see https://msp.org/jsag/ ) on 2025-08-16, in the article Resultant
complexes of toric systems (see https://msp.org/jsag/2026/16-1/p01.xhtml )
(DOI: 10.2140/jsag.2026.16.1 (see https://doi.org/10.2140/jsag.2026.16.1 )).
That version can be obtained from the journal (see
https://msp.org/jsag/2026/16-1/jsag-v16-n1-x01-ResultantComplexes.zip ).

Version
=======

This documentation describes version 1.0 of ResultantComplexes, released August
16, 2025.

Citation
========

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

+----------------------------------------------------------------------------+
|@misc{ResultantComplexesSource,                                             |
|  title = {{ResultantComplexes: A \emph{Macaulay2} package. Version~1.0}},  |
|  author = {Friedemann Groh},                                               |
|  howpublished = {A \emph{Macaulay2} package available at                   |
|    \url{https://github.com/Macaulay2/M2/tree/stable/M2/Macaulay2/packages}}|
|}                                                                           |
|                                                                            |
|@article{ResultantComplexesArticle,                                         |
|  title = {{Resultant complexes of toric systems}},                         |
|  author = {Friedemann Groh},                                               |
|  journal = {Journal of Software for Algebra and Geometry},                 |
|  volume = {16},                                                            |
|  year = {2025},                                                            |
|}                                                                           |
|                                                                            |
+----------------------------------------------------------------------------+

Exports
=======

  * Functions and commands
      * calcResultant -- Calculate resultant of sparse
        system.
      * CannyEmirisCoef -- determine rank one bundle to
        twist Koszul complex
      * CayleyFormula -- Calculate determinant of
        resultant complex.
      * mixedSubdivision -- computes a coherent mixed
        sub-division
      * polynomials -- convert support set of exponents to
        polynomial
      * randomLift -- Get random lift-vectors to produce
        coherent subdivisions.
      * resultantComplex -- Resultant complex of
        sparse system.
  * Methods
      * "calcResultant(List,List,List)" -- see calcResultant,
        -- Calculate resultant of sparse system.
      * CannyEmirisCoef(Sequence,Matrix) (missing documentation)
      * mixedSubdivision(List,Matrix) (missing documentation)
      * polynomials(List,List,List) (missing documentation)
      * randomLift(List,ZZ) (missing documentation)
      * "resultantComplex(List,List,List)" -- see resultantComplex,
        -- Resultant complex of sparse system.
      * "resultantComplex(PolynomialRing,List,List,List)" -- see
        resultantComplex, -- Resultant complex of sparse
        system.

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

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

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

The source of this document is in ResultantComplexes.m2:378:0.

resultantComplex -- Resultant complex of sparse system.
*******************************************************

  * Usage:
        (complexRes, mon, choice) = resultantComplex(f, Lift, shiftP) or (coefRing, supp, Lift, shiftP)
  * Inputs:
      * f, a list (Macaulay2Doc), List of sparse polynomials
        (specified in the algebraic torus)
      * coefRing, a ring (Macaulay2Doc), Ring of the coefficients
        of the input polynomials
      * supp, a list (Macaulay2Doc), Support set containing the
        exponents defining the polynomials with indeterminate coefficients
      * Lift, a list (Macaulay2Doc), additional coordinate to lift
        the vertices of the system's Newton polytopes
      * shiftP, a list (Macaulay2Doc), QQ-coordinates of Canny
        Emiris vector to shift Minkowski sums of Newton polytopes
  * Outputs:
      * complexRes, a complex (Complexes), ChainComplex contains
        modules over the coefficient ring and the differentials
      * mon, a list (Macaulay2Doc), exponents of characters which
        yield bases of its modules
      * choice, a list (Macaulay2Doc), flags specify admissible
        sub-modules required for the Cayley formula

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

This example yields a resultant with a multiple of 7. (Since the family of
supports do not satisfy any particular conditions here, the determinant of the
complex may have multiplicities. It agrees with the resultant, redefined by
D'Andrea and Sombra.) We check the lengths of the co-homologies of the
resultant complex localized at the eliminant, which is irreducible and thus
generates a prime ideal. Resultant complexes consist of modules over the
coefficient ring of the sparse polynomials, they are determined by the lattice
points inside sums of Newton polytopes shifted by the Canny Emiris vector,
which are stored in mon. The second list choice specifies admissible
sub-modules required for the Cayley formula. They are obtained from the lift
vectors given in the second argument, provided that these define a tight
coherent mixed subdivision (TCMD) of the Newton polytopes: CayleyFormula,
and mixedSubdivision. To reduce the
number of cells in the sub-division, we specify the lift function only at the
vertices of the Newton polytopes and not on the entire support sets.
+-----------------------------------------------------------------------------+
|i1 : needsPackage "LocalRings";                                              |
+-----------------------------------------------------------------------------+
|i2 : A = QQ[c_1..c_8];                                                       |
+-----------------------------------------------------------------------------+
|i3 : R = A[t_1..t_2];                                                        |
+-----------------------------------------------------------------------------+
|i4 : supp = { {{0,0},{2,2},{1,3}}, {{0,2},{2,1},{4,0}}, {{3,0},{1,1}} };     |
+-----------------------------------------------------------------------------+
|i5 : f = polynomials( gens A, gens R, supp )                                 |
|                                                                             |
|         2 2        3          4      2        2     3                       |
|o5 = {c t t  + c t t  + c , c t  + c t t  + c t , c t  + c t t }             |
|       2 1 2    3 1 2    1   6 1    5 1 2    4 2   7 1    8 1 2              |
|                                                                             |
|o5 : List                                                                    |
+-----------------------------------------------------------------------------+
|i6 : (complexRes,mon,choice) = resultantComplex( f,                          |
|-----------------------------------------------------------------------------|
|{{0,-12,-4},{-2,-1},{-3,0}}, {1/8,1/3} );                                    |
+-----------------------------------------------------------------------------+
|i7 : Res = CayleyFormula(complexRes,mon,choice);                             |
+-----------------------------------------------------------------------------+
|i8 : factor Res                                                              |
|                                                                             |
|         2               2 7                                                 |
|o8 = (c c  - c c c  + c c )                                                  |
|       4 7    5 7 8    6 8                                                   |
|                                                                             |
|o8 : Expression of class Product                                             |
+-----------------------------------------------------------------------------+
|i9 : CP = complexRes ** A_(radical ideal {Res});                             |
+-----------------------------------------------------------------------------+
|i10 : for i from 0 to length CP list length HH^i CP                          |
|                                                                             |
|o10 = {7, 0, 0}                                                              |
|                                                                             |
|o10 : List                                                                   |
+-----------------------------------------------------------------------------+

Ways to use resultantComplex:
=============================

  * "resultantComplex(List,List,List)"
  * "resultantComplex(PolynomialRing,List,List,List)"

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

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

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

The source of this document is in ResultantComplexes.m2:415:0.

calcResultant -- Calculate resultant of sparse system.
******************************************************

  * Usage:
        Res = calcResultant( f, Lift, shiftP )
  * Inputs:
      * f, a list (Macaulay2Doc), List of sparse polynomials
        (specified in the algebraic torus)
      * Lift, a list (Macaulay2Doc), additional coordinate to lift
        the vertices of the system's Newton polytopes
      * shiftP, a list (Macaulay2Doc), QQ-coordinates of Canny
        Emiris vector to shift Minkowski sums of Newton polytopes
  * Outputs:
      * Res, a ring element (Macaulay2Doc), resultant of the
        sparse system contained in the (multi-homogeneous) ring of coefficients

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

Once we have chosen lifting vectors which produce a tight coherent subdivision
of the system's Newton polytopes and specified a Canny Emiris vector, the
resultant of the sparse system can be calculated as determinant of a complex
via Cayley formula resultantComplex, and
CayleyFormula. As the number of terms in resultants can grow
rapidly, this method is only useful for smaller systems. Except that the
Minkowski sum of the Newton polytopes must be full dimensional, there are no
restrictions on the family of support sets. Hence resultants may have
multiplicities, they agree with the definition of D'Andrea and Sombra. Further,
to reduce the number of cells in the sub-division, we specify the lift function
only at the vertices of the Newton polytopes and not on the entire support
sets.
+-----------------------------------------------------------------------------+
|i1 : supp = { {{0,0},{2,2},{1,3}}, {{0,0},{2,0},{1,2}}, {{3,0},{1,1}} };     |
+-----------------------------------------------------------------------------+
|i2 : A = QQ[c_1..c_8];                                                       |
+-----------------------------------------------------------------------------+
|i3 : R = A[t_1..t_2];                                                        |
+-----------------------------------------------------------------------------+
|i4 : f = polynomials( gens A, gens R, supp )                                 |
|                                                                             |
|         2 2        3            2      2          3                         |
|o4 = {c t t  + c t t  + c , c t t  + c t  + c , c t  + c t t }               |
|       2 1 2    3 1 2    1   6 1 2    5 1    4   7 1    8 1 2                |
|                                                                             |
|o4 : List                                                                    |
+-----------------------------------------------------------------------------+
|i5 : Res = calcResultant( f, {{-1, 0, 0},{-7, -13, 0},{0, 0}}, {0,1/3} )     |
|                                                                             |
|      5 7 7       4 5     6       2   2 4 3 6      5 7 6      2 3 6   5 2    |
|o5 = c c c  - 7c c c c c c c  + 5c c c c c c c  + c c c c  + c c c c c c  -  |
|      3 4 7     1 3 4 5 6 7 8     1 2 3 4 6 7 8    1 6 7 8    2 3 4 5 7 8    |
|     ------------------------------------------------------------------------|
|         3   5 2 5 2      2 3 3 2 2 5 2      3     2   4 5 2    5 6   4 3    |
|     5c c c c c c c  + 14c c c c c c c  - 13c c c c c c c c  + c c c c c  +  |
|       1 2 3 4 6 7 8      1 3 4 5 6 7 8      1 2 3 4 5 6 7 8    2 4 6 7 8    |
|     ------------------------------------------------------------------------|
|         2 2 4 2   4 3     2 3 3   3 4 3     3 2   3 3 4 3     4   2 5 4 3   |
|     2c c c c c c c c  + 6c c c c c c c  - 7c c c c c c c  + 3c c c c c c  - |
|       1 2 3 4 5 6 7 8     1 2 4 5 6 7 8     1 3 4 5 6 7 8     1 2 5 6 7 8   |
|     ------------------------------------------------------------------------|
|           3 3 4 3 4    2 2   2 3 2 3 4       4 3 3   2 5    2   2   5   2 5 |
|     2c c c c c c c  - c c c c c c c c  - 2c c c c c c c  - c c c c c c c c  |
|       1 2 3 4 5 7 8    1 2 3 4 5 6 7 8     1 2 4 5 6 7 8    1 2 3 4 5 6 7 8 |
|     ------------------------------------------------------------------------|
|         3 2 4 3 2 5    2 3 7   6    2 3 6   7                               |
|     + 3c c c c c c  + c c c c c  + c c c c c                                |
|         1 2 5 6 7 8    1 3 5 7 8    1 2 5 6 8                               |
|                                                                             |
|o5 : A                                                                       |
+-----------------------------------------------------------------------------+

Ways to use calcResultant:
==========================

  * "calcResultant(List,List,List)"

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

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

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

The source of this document is in ResultantComplexes.m2:440:0.

CayleyFormula -- Calculate determinant of resultant complex.
************************************************************

  * Usage:
        Res = CayleyFormula(complexRes, mon, choice)
  * Inputs:
      * complexRes, a complex (Complexes), contains modules over
        the coefficient ring and the differentials
      * mon, a list (Macaulay2Doc), exponents of characters which
        yield bases of its modules
      * choice, a list (Macaulay2Doc), flags specify admissible
        sub-modules required for the Cayley formula
  * Outputs:
      * Res, a ring element (Macaulay2Doc), resultant
        evaluated as determinant of resultant complex

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

A resultant complex must first be determined for this command. Its terms are
modules over the coefficient ring of the sparse polynomials. They are
determined by the lattice points inside sums of Newton polytopes shifted by the
Canny Emiris vector, which are stored in mon. The second list choice specifies
admissible sub-modules required for the Cayley formula.  Finally, a system with
two essential sub-families is considered. Even in such cases, the definition of
toric resultant complexes and their admissible sub-modules is valid. Evaluating
the Cayley formula yields the unit, without checking for exceptions.
+-----------------------------------------------------------------------------+
|i1 : supp = { {{2,0,0},{1,2,2},{0,4,4}}, {{1,0,0},{0,2,2}}, {{0,5,3}},       |
|-----------------------------------------------------------------------------|
|{{0,0,0},{1,3,2},{4,1,3}} };                                                 |
+-----------------------------------------------------------------------------+
|i2 : A = QQ[c_1..c_(#flatten supp)];                                         |
+-----------------------------------------------------------------------------+
|i3 : (complexRes, mon, choice) = resultantComplex( A, supp,                  |
|-----------------------------------------------------------------------------|
|{{0,-4},{-2,-1},{-5},{-13,0,-3}}, {-1/8,1/3,4/7} );                          |
+-----------------------------------------------------------------------------+
|i4 : complexRes                                                              |
|                                                                             |
|      27      54      27                                                     |
|o4 = A   <-- A   <-- A   <-- 0                                               |
|                                                                             |
|     0       1       2       3                                               |
|                                                                             |
|o4 : Complex                                                                 |
+-----------------------------------------------------------------------------+
|i5 : Res = CayleyFormula(complexRes, mon, choice)                            |
|                                                                             |
|o5 = 1                                                                       |
|                                                                             |
|o5 : A                                                                       |
+-----------------------------------------------------------------------------+

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

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

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

The source of this document is in ResultantComplexes.m2:464:0.

randomLift -- Get random lift-vectors to produce coherent subdivisions.
***********************************************************************

  * Usage:
        Lift = randomLift( f, m )
  * Inputs:
      * f, a list (Macaulay2Doc), of polynomials
      * m, an integer (Macaulay2Doc), range of random numbers
        assigned to vertices of Newton polytopes
  * Outputs:
      * Lift, a list (Macaulay2Doc), values of lifting function at
        the vertices of Newton polytopes

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

Randomly selects additional coordinates for the list of points whose
sub-division is to be determined. Tight coherent mixed sub-divisions (TCMD)
determine the admissible sub-modules of the resultant complex required for the
Cayley formula: CayleyFormula, and mixedSubdivision.
To reduce the number of cells in the sub-division, we
specify the lift function only at the vertices of the Newton polytopes and not
on the entire support set. Randomly chosen liftings almost always result in
tight mixed sub-divisions.
+-----------------------------------------------------------------------------+
|i1 : supp = {{{2,1,0},{0,2,4},{4,2,0}},{{1,0,0},{2,2,0}},{{0,1,2},{0,0,0},{0,|
|-----------------------------------------------------------------------------|
|2,4}},{{0,1,0},{0,0,2}}};                                                    |
+-----------------------------------------------------------------------------+
|i2 : A = QQ[c_1..c_(#flatten supp)];                                         |
+-----------------------------------------------------------------------------+
|i3 : R = A[t_1..t_(#(supp#0#0))];                                            |
+-----------------------------------------------------------------------------+
|i4 : f = polynomials(gens A, gens R, supp)                                   |
|                                                                             |
|         4 2      2 4      2       2 2            2 4        2           2   |
|o4 = {c t t  + c t t  + c t t , c t t  + c t , c t t  + c t t  + c , c  t  + |
|       3 1 2    2 2 3    1 1 2   5 1 2    4 1   8 2 3    6 2 3    7   10 3   |
|     ------------------------------------------------------------------------|
|     c t }                                                                   |
|      9 2                                                                    |
|                                                                             |
|o4 : List                                                                    |
+-----------------------------------------------------------------------------+
|i5 : Lift = randomLift(f, 80)                                                |
|                                                                             |
|o5 = {{-56, -15, -9}, {-8, -61}, {-61, -8}, {-1, -8}}                        |
|                                                                             |
|o5 : List                                                                    |
+-----------------------------------------------------------------------------+

Ways to use randomLift:
=======================

  * randomLift(List,ZZ) (missing documentation)

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

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

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

The source of this document is in ResultantComplexes.m2:549:0.

polynomials -- convert support set of exponents to polynomial
*************************************************************

  * Usage:
        f = polynomial(coef, vars, supp)
  * Inputs:
      * coefs, a ring element (Macaulay2Doc), coefficients
        of the polynomial
      * vars, a ring element (Macaulay2Doc), variables of
        output polynomial
      * supp, a list (Macaulay2Doc), family of support sets
        determining a system of polynomials
  * Outputs:
      * f, a list (Macaulay2Doc), of polynomial with fixed or
        indeterminate coefficients

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

Polynomials with indeterminate coefficients are determined by the exponents of
their terms, which are elements in an integer lattice. These form a set which
is referred to as support of the polynomial. Resultants depend on a system of
such polynomials calcResultant.
+-------------------------------------------------------------+
|i1 : supp = { {{1,1,3},{0,2,1},{2,0,4}}, {{0,1,3},{2,5,0}} };|
+-------------------------------------------------------------+
|i2 : A = QQ[c_1..c_(#flatten supp)];                         |
+-------------------------------------------------------------+
|i3 : R = A[t_1..t_(#(supp#0#0))];                            |
+-------------------------------------------------------------+
|i4 : f = polynomials(gens A, gens R, supp)                   |
|                                                             |
|         2 4          3      2       2 5        3            |
|o4 = {c t t  + c t t t  + c t t , c t t  + c t t }           |
|       3 1 3    1 1 2 3    2 2 3   5 1 2    4 2 3            |
|                                                             |
|o4 : List                                                    |
+-------------------------------------------------------------+

Ways to use polynomials:
========================

  * polynomials(List,List,List) (missing documentation)

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

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

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

The source of this document is in ResultantComplexes.m2:526:0.

mixedSubdivision -- computes a coherent mixed sub-division
**********************************************************

  * Usage:
        cell = mixedSubdivision( grad, Lift )
  * Inputs:
      * grad, a list (Macaulay2Doc), of matrices with coordinates
        of lattice points in its rows
      * Lift, a matrix (Macaulay2Doc), additional coordinate to
        lift these points
  * Outputs:
      * cell, a list (Macaulay2Doc),  list of cells of the coherent
        mixed sub-division (CMD)

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

 Determine the tight mixed coherent subdivision (TCMD) of sparse system given
in 'On the Newton Polytope of the Resultant' by Sturmfels [1994]. We get 7
cells, each containing a vertex.
+-----------------------------------------------------------------------------+
|i1 : grad = { {{0,2,1},{0,2,3}}, {{0,2,1},{0,0,2}}, {{3,1},{0,1}} } / matrix |
|                                                                             |
|o1 = {| 0 2 1 |, | 0 2 1 |, | 3 1 |}                                         |
|      | 0 2 3 |  | 0 0 2 |  | 0 1 |                                          |
|                                                                             |
|o1 : List                                                                    |
+-----------------------------------------------------------------------------+
|i2 : Lift = {{-1, 0, 0},{-7, -13, 0},{0, 0}};                                |
+-----------------------------------------------------------------------------+
|i3 : cell = mixedSubdivision( grad, matrix {flatten Lift} )                  |
|                                                                             |
|o3 = {{{0, 1, 2}, {1}, {0}}, {{0, 2}, {0, 1}, {1}}, {{0, 2}, {1}, {0, 1}},   |
|     ------------------------------------------------------------------------|
|     {{0}, {0, 1}, {0, 1}}, {{1, 2}, {1, 2}, {0}}, {{2}, {0, 1, 2}, {1}},    |
|     ------------------------------------------------------------------------|
|     {{2}, {1, 2}, {0, 1}}}                                                  |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+

Ways to use mixedSubdivision:
=============================

  * mixedSubdivision(List,Matrix) (missing documentation)

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

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

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

The source of this document is in ResultantComplexes.m2:479:0.

CannyEmirisCoef -- determine rank one bundle to twist Koszul complex
********************************************************************

  * Usage:
        coefsDiv = CannyEmirisCoef( facetPolytope, shiftPolytope )
  * Inputs:
      * facetPolytope, a list (Macaulay2Doc), specifies facets of
        polytope
      * shiftPolytope, a matrix (Macaulay2Doc), vector with
        rational coefficients move polytope
  * Outputs:
      * coefsDiv, a list (Macaulay2Doc), coefficients of a divisor
        equivalent to translation of polytope

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

Following Gelfand, Kapranov and Zelevinsky, we calculate resultants via Cayley
Formula as determinant of a complex formed by global sections of a Koszul
complex of sheafs CayleyFormula, and
resultantComplex. To ensure that higher sheaf cohomologies
vanish, we twist this complex by a reflexive rank one bundle, which corresponds
to the shift of Newton polytopes by a rational vector, introduced by Canny and
Emiris. We cannot assume the Weil divisor corresponding to this bundle being
Q-Cartier.
+-----------------------------------------------------------------+
|i1 : needsPackage "NormalToricVarieties";                        |
+-----------------------------------------------------------------+
|i2 : supp = {{1,1,3},{0,2,1},{2,0,4},{2,5,0},{3,2,7}};           |
+-----------------------------------------------------------------+
|i3 : P = convexHull transpose matrix supp;                       |
+-----------------------------------------------------------------+
|i4 : X = normalToricVariety P;                                   |
+-----------------------------------------------------------------+
|i5 : a = CannyEmirisCoef( facets P, matrix {{-2/7},{1/3},{3/5}} )|
|                                                                 |
|o5 = {-1, -11, -11, 1, 2, 5}                                     |
|                                                                 |
|o5 : List                                                        |
+-----------------------------------------------------------------+
|i6 : D = sum( #rays X, i -> a_i * X_i );                         |
|                                                                 |
|o6 : ToricDivisor on X                                           |
+-----------------------------------------------------------------+
|i7 : isQQCartier D                                               |
|                                                                 |
|o7 = false                                                       |
+-----------------------------------------------------------------+

Ways to use CannyEmirisCoef:
============================

  * CannyEmirisCoef(Sequence,Matrix) (missing documentation)

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

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

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

The source of this document is in ResultantComplexes.m2:506:0.