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

Resultants -- resultants, discriminants, and Chow forms
*******************************************************

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

This package provides methods to deal with resultants and discriminants of
multivariate polynomials, and with higher associated subvarieties of
irreducible projective varieties. The main methods are:
resultant(Matrix), discriminant(RingElement),
see chowForm, dualVariety,
and tangentialChowForm. For the
mathematical theory, we refer to the following two books: Using Algebraic
Geometry (see http://link.springer.com/book/10.1007%2Fb138611 ), by David A.
Cox, John Little, Donal O'shea; Discriminants, Resultants, and Multidimensional
Determinants (see http://link.springer.com/book/10.1007%2F978-0-8176-4771-1 ),
by Israel M. Gelfand, Mikhail M. Kapranov and Andrei V. Zelevinsky. Other
references for the theory of Chow forms are: The equations defining Chow
varieties (see https://projecteuclid.org/euclid.dmj/1077305197 ), by M. L.
Green and I. Morrison; Multiplicative properties of projectively dual varieties
(see http://link.springer.com/article/10.1007/BF02567693 ), by J. Weyman and A.
Zelevinsky; and Coisotropic hypersurfaces in Grassmannians (see
https://www.sciencedirect.com/science/article/abs/pii/S0747717119301506 ), by
K. Kohn.

Author
======

  * Giovanni Staglianò <giovannistagliano@gmail.com>

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

Version 1.2.1 of this package was accepted for publication in volume 8 (see
https://msp.org/jsag/2018/8-1/ ) of The Journal of Software for Algebra and
Geometry (see https://msp.org/jsag/ ) on 18 May 2018, in the article A package
for computations with classical resultants (see
https://msp.org/jsag/2018/8-1/p03.xhtml ) (DOI: 10.2140/jsag.2018.8.21 (see
https://doi.org/10.2140/jsag.2018.8.21 )). That version can be obtained from
the journal (see https://msp.org/jsag/2018/8-1/jsag-v8-n1-x03-Resultants.m2 ).

Version
=======

This documentation describes version 1.2.2 of Resultants, released May 10,
2019.

Citation
========

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

+-----------------------------------------------------------------------------+
|@misc{ResultantsSource,                                                      |
|  title = {{Resultants: resultants, discriminants, and Chow forms. Version   |
|  author = {Giovanni Staglian{\`o}},                                         |
|  howpublished = {A \emph{Macaulay2} package available at                    |
|    \url{https://github.com/Macaulay2/M2/tree/stable/M2/Macaulay2/packages   |
|}                                                                            |
|                                                                             |
|@article{ResultantsArticle,                                                  |
|  title = {{A package for computations with classical resultants}},          |
|  author = {Giovanni Staglian{\`o}},                                         |
|  journal = {The Journal of Software for Algebra and Geometry},              |
|  volume = {8},                                                              |
|  year = {2018},                                                             |
|}                                                                            |
|-----------------------------------------------------------------------------|
|~1.2.2}},                                                                    |
|                                                                             |
|                                                                             |
|}}                                                                           |
+-----------------------------------------------------------------------------+

Exports
=======

  * Functions and commands
      * affineDiscriminant -- affine discriminant
      * affineResultant -- affine resultant
      * cayleyTrick -- Cayley trick
      * chowEquations -- Chow equations of a projective
        variety
      * chowForm -- Chow form of a projective variety
      * conormalVariety -- conormal variety
      * dualize -- apply duality of Grassmannians
      * dualVariety -- projective dual variety
      * fromPluckerToStiefel -- convert from
        Plücker coordinates to Stiefel coordinates
      * genericPolynomials -- generic homogeneous
        polynomials
      * Grass -- coordinate ring of a Grassmannian
      * hurwitzForm -- Hurwitz form of a projective variety
      * isCoisotropic -- whether a hypersurface of a
        Grassmannian is a tangential Chow form
      * isInCoisotropic -- test membership in a
        coisotropic hypersurface
      * macaulayFormula -- Macaulay formula for the
        resultant
      * plucker -- get the Plücker coordinates of a linear
        subspace
      * tangentialChowForm -- higher Chow forms of a
        projective variety
      * veronese -- Veronese embedding
  * Methods
      * "affineDiscriminant(RingElement)" -- see affineDiscriminant,
        -- affine discriminant
      * "affineResultant(List)" -- see affineResultant,
        -- affine resultant
      * "affineResultant(Matrix)" -- see affineResultant,
        -- affine resultant
      * "cayleyTrick(Ideal,ZZ)" -- see cayleyTrick, --
        Cayley trick
      * "chowEquations(RingElement)" -- see chowEquations,
        -- Chow equations of a projective variety
      * "chowForm(Ideal)" -- see chowForm, -- Chow form of a
        projective variety
      * "chowForm(RingMap)" -- see chowForm, -- Chow form of a
        projective variety
      * "conormalVariety(Ideal)" -- see conormalVariety,
        -- conormal variety
      * discriminant(RingElement), --
        resultant of the partial derivatives
      * "dualize(Ideal)" -- see dualize, -- apply duality of
        Grassmannians
      * "dualize(Matrix)" -- see dualize, -- apply duality of
        Grassmannians
      * "dualize(Ring)" -- see dualize, -- apply duality of
        Grassmannians
      * "dualize(RingElement)" -- see dualize, -- apply duality
        of Grassmannians
      * "dualize(RingMap)" -- see dualize, -- apply duality of
        Grassmannians
      * "dualize(VisibleList)" -- see dualize, -- apply duality
        of Grassmannians
      * "dualVariety(Ideal)" -- see dualVariety, --
        projective dual variety
      * "dualVariety(RingMap)" -- see dualVariety, --
        projective dual variety
      * "fromPluckerToStiefel(Ideal)" -- see fromPluckerToStiefel,
        -- convert from Plücker coordinates to Stiefel
        coordinates
      * "fromPluckerToStiefel(Matrix)" -- see fromPluckerToStiefel,
        -- convert from Plücker coordinates to Stiefel
        coordinates
      * "fromPluckerToStiefel(RingElement)" -- see fromPluckerToStiefel,
        -- convert from Plücker coordinates to Stiefel
        coordinates
      * "genericPolynomials(List)" -- see genericPolynomials,
        -- generic homogeneous polynomials
      * "genericPolynomials(VisibleList,Ring)" -- see genericPolynomials,
        -- generic homogeneous polynomials
      * "Grass(ZZ,ZZ)" -- see Grass, -- coordinate ring of a
        Grassmannian
      * "Grass(ZZ,ZZ,Ring)" -- see Grass, -- coordinate ring of a
        Grassmannian
      * "hurwitzForm(Ideal)" -- see hurwitzForm, -- Hurwitz
        form of a projective variety
      * "isCoisotropic(RingElement)" -- see isCoisotropic,
        -- whether a hypersurface of a Grassmannian is a tangential Chow form
      * "isInCoisotropic(Ideal,Ideal)" -- see isInCoisotropic,
        -- test membership in a coisotropic hypersurface
      * "macaulayFormula(List)" -- see macaulayFormula,
        -- Macaulay formula for the resultant
      * "macaulayFormula(Matrix)" -- see macaulayFormula,
        -- Macaulay formula for the resultant
      * "plucker(Ideal)" -- see plucker, -- get the Plücker
        coordinates of a linear subspace
      * "plucker(Ideal,ZZ)" -- see plucker, -- get the Plücker
        coordinates of a linear subspace
      * "resultant(List)" -- see resultant(Matrix),
        -- multipolynomial resultant
      * resultant(Matrix) -- multipolynomial
        resultant
      * "tangentialChowForm(Ideal,ZZ)" -- see tangentialChowForm,
        -- higher Chow forms of a projective variety
      * "veronese(ZZ,ZZ)" -- see veronese, -- Veronese
        embedding
      * "veronese(ZZ,ZZ,Ring)" -- see veronese, -- Veronese
        embedding
  * Symbols
      * AffineChartGrass -- use an affine chart on the
        Grassmannian
      * AffineChartProj -- use an affine chart on the
        projective space
      * AssumeOrdinary -- whether the expected
        codimension is 1
      * Duality -- whether to use dual Plücker coordinates
      * SingularLocus -- pass the singular locus of the
        variety

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

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

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

The source of this document is in Resultants.m2:852:0.

AffineChartGrass -- use an affine chart on the Grassmannian
***********************************************************

  * Usage:
        AffineChartGrass => l

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

This is an optional input for methods that involve computations on
Grassmannians. The argument l can be a list of $k+1$ distinct integers between
0 and $n$, corresponding to an affine chart $U$ on the Grassmannian
$\mathbb{G}(k,n)$. This indicates to the method that should perform internal
computations using the chart $U$. Set this to false (resp. true) to not use any
chart (resp. to use a random chart).

See also
========

  * chowForm -- Chow form of a projective variety
  * fromPluckerToStiefel -- convert from Plücker
    coordinates to Stiefel coordinates
  * hurwitzForm -- Hurwitz form of a projective variety
  * isCoisotropic -- whether a hypersurface of a
    Grassmannian is a tangential Chow form
  * tangentialChowForm -- higher Chow forms of a
    projective variety

Functions with optional argument named AffineChartGrass:
========================================================

  * "chowForm(...,AffineChartGrass=>...)"
  * "fromPluckerToStiefel(...,AffineChartGrass=>...)"
  * "hurwitzForm(...,AffineChartGrass=>...)"
  * "isCoisotropic(...,AffineChartGrass=>...)"
  * "plucker(...,AffineChartGrass=>...)"
  * "tangentialChowForm(...,AffineChartGrass=>...)"

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

The object AffineChartGrass, is a symbol (Macaulay2Doc).

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

The source of this document is in Resultants.m2:1215:0.

AffineChartProj -- use an affine chart on the projective space
**************************************************************

  * Usage:
        AffineChartProj => l

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

This is an optional input for some methods, and it works quite similar to
AffineChartGrass. The argument l can be an integer between 0
and $n$, corresponding to an affine chart $U$ on the projective space
$\mathbb{P}^n$. This indicates to the method that should perform internal
computations using the chart $U$.

See also
========

  * chowForm -- Chow form of a projective variety
  * hurwitzForm -- Hurwitz form of a projective variety
  * tangentialChowForm -- higher Chow forms of a
    projective variety

Functions with optional argument named AffineChartProj:
=======================================================

  * "chowForm(...,AffineChartProj=>...)"
  * "hurwitzForm(...,AffineChartProj=>...)"
  * "tangentialChowForm(...,AffineChartProj=>...)"

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

The object AffineChartProj, is a symbol (Macaulay2Doc).

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

The source of this document is in Resultants.m2:1222:0.

affineDiscriminant -- affine discriminant
*****************************************

  * Usage:
        affineDiscriminant f
  * Inputs:
      * f, a ring element (Macaulay2Doc), a polynomial
  * Optional inputs (Macaulay2Doc),:
      * Algorithm, =>
        ..., default value "Poisson",
  * Outputs:
      * a ring element (Macaulay2Doc), the discriminant of
        the polynomial obtained by homogenizing f with respect to a new
        variable

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

+-----------------------------------------------+
|i1 : ZZ[a,b,c][x]; f = a*x^2+b*x+c             |
|                                               |
|        2                                      |
|o2 = a*x  + b*x + c                            |
|                                               |
|o2 : ZZ[a..c][x]                               |
+-----------------------------------------------+
|i3 : affineDiscriminant f                      |
|                                               |
|        2                                      |
|o3 = - b  + 4a*c                               |
|                                               |
|o3 : ZZ[a..c]                                  |
+-----------------------------------------------+
|i4 : ZZ[a,b,c,d][x]; f = a*x^3+b*x^2+c*x+d     |
|                                               |
|        3      2                               |
|o5 = a*x  + b*x  + c*x + d                     |
|                                               |
|o5 : ZZ[a..d][x]                               |
+-----------------------------------------------+
|i6 : affineDiscriminant f                      |
|                                               |
|        2 2       3     3                   2 2|
|o6 = - b c  + 4a*c  + 4b d - 18a*b*c*d + 27a d |
|                                               |
|o6 : ZZ[a..d]                                  |
+-----------------------------------------------+

See also
========

  * discriminant(RingElement) (missing documentation)
  * affineResultant -- affine resultant

Ways to use affineDiscriminant:
===============================

  * "affineDiscriminant(RingElement)"

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

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

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

The source of this document is in Resultants.m2:950:0.

affineResultant -- affine resultant
***********************************

  * Usage:
        affineResultant f
  * Inputs:
      * f, a matrix (Macaulay2Doc), a row matrix whose entries
        are $n+1$ polynomials $f_0,\ldots,f_n$ in $n$ variables (or a
        list (Macaulay2Doc), to be interpreted as such a matrix)
  * Optional inputs (Macaulay2Doc),:
      * Algorithm, =>
        ..., default value "Poisson",
  * Outputs:
      * a ring element (Macaulay2Doc), the resultant of the
        polynomials obtained by homogenizing $f_0,\ldots,f_n$ with respect to a
        new variable

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

+-----------------------------------------------------------------------------+
|i1 : ZZ[t,u][y,z]                                                            |
|                                                                             |
|o1 = ZZ[t..u][y..z]                                                          |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : f = {3*t*y*z-u*z^2+1, -y+t+3*u-1, u*z^4-t*y^3+t*y*z}                    |
|                                                                             |
|                  2                           4      3                       |
|o2 = {3t*y*z - u*z  + 1, - y + t + 3u - 1, u*z  - t*y  + t*y*z}              |
|                                                                             |
|o2 : List                                                                    |
+-----------------------------------------------------------------------------+
|i3 : affineResultant f                                                       |
|                                                                             |
|          12         11 2         10 3         9 4          8 5          7 6 |
|o3 = - 81t  u - 1701t  u  - 15309t  u  - 76545t u  - 229635t u  - 413343t u  |
|     ------------------------------------------------------------------------|
|              6 7          5 8       11          10 2         9 3            |
|     - 413343t u  - 177147t u  + 567t  u + 10206t  u  + 76545t u  +          |
|     ------------------------------------------------------------------------|
|            8 4          7 5          6 6          5 7        4 8        3 9 |
|     306181t u  + 688923t u  + 826821t u  + 413883t u  + 1215t u  + 1458t u  |
|     ------------------------------------------------------------------------|
|           2 10        10          9 2          8 3          7 4          6 5|
|     + 729t u   - 1701t  u - 25515t u  - 153093t u  - 459321t u  - 689265t u |
|     ------------------------------------------------------------------------|
|              5 6        4 7        3 8        2 9        9          8 2     |
|     - 414693t u  - 2835t u  - 3159t u  - 1458t u  + 2835t u + 33984t u  +   |
|     ------------------------------------------------------------------------|
|            7 3          6 4          5 5         4 6        3 7        2 8  |
|     152565t u  + 303135t u  + 220905t u  - 12150t u  - 5913t u  + 1215t u  -|
|     ------------------------------------------------------------------------|
|          8          7 2         6 3         5 4         4 5         3 6     |
|     2862t u - 25659t u  - 75873t u  - 70031t u  + 16263t u  + 13230t u  -   |
|     ------------------------------------------------------------------------|
|         2 7        7          6 2         5 3        4 4        3 5         |
|     540t u  + 1809t u + 10818t u  + 15015t u  - 6609t u  - 9360t u  +       |
|     ------------------------------------------------------------------------|
|         2 6       6         5 2       4 3        3 4      2 5        6      |
|     135t u  - 729t u - 2313t u  + 684t u  + 3165t u  - 81t u  - 54t*u  +    |
|     ------------------------------------------------------------------------|
|         5        4 2       3 3      2 4        5      4       3 2      2 3  |
|     189t u + 135t u  - 583t u  - 38t u  + 54t*u  - 27t u + 54t u  + 47t u  -|
|     ------------------------------------------------------------------------|
|          4     2 2       3    2                                             |
|     18t*u  - 9t u  + 2t*u  + u                                              |
|                                                                             |
|o3 : ZZ[t..u]                                                                |
+-----------------------------------------------------------------------------+

See also
========

  * resultant(Matrix) (missing documentation)
  * affineDiscriminant -- affine discriminant

Ways to use affineResultant:
============================

  * "affineResultant(List)"
  * "affineResultant(Matrix)"

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

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

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

The source of this document is in Resultants.m2:936:0.

AssumeOrdinary -- whether the expected codimension is 1
*******************************************************

  * Usage:
        AssumeOrdinary => true/false

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

This is an option for dualVariety, and
tangentialChowForm, that controls the option
SubringLimit (Macaulay2Doc), used internally with kernel (Macaulay2Doc),
and gb (Macaulay2Doc). You can set this to true
when the expected output should represent a hypersurface.

See also
========

  * dualVariety -- projective dual variety
  * tangentialChowForm -- higher Chow forms of a
    projective variety

Functions with optional argument named AssumeOrdinary:
======================================================

  * "dualVariety(...,AssumeOrdinary=>...)"
  * "tangentialChowForm(...,AssumeOrdinary=>...)"

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

The object AssumeOrdinary, is a symbol (Macaulay2Doc).

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

The source of this document is in Resultants.m2:1201:0.

cayleyTrick -- Cayley trick
***************************

  * Usage:
        cayleyTrick(I,k)
  * Inputs:
      * I, an ideal (Macaulay2Doc), a homogeneous ideal defining a
        projective variety $X=V(I)\subset\mathbb{P}^n$
      * k, an integer (Macaulay2Doc), the dimension of $X$, or more
        generally an integer $k$ not exceeding the dimension of $X$ and not
        smaller than the dual defect of $X$
  * Optional inputs (Macaulay2Doc),:
      * Duality, => ..., default value false, whether to use
        dual Plücker coordinates
      * Variable, => ...,
        default value null, specify a name for a variable
  * Outputs:
      * a pair $(J,J')$, where $J$ is the defining ideal of the Segre product
        $X\times\mathbb{P}^k\subset\mathbb{P}^{(k+1)(n+1)-1}$, while $J'$ is
        the principal ideal defining the dual hypersurface
        $(X\times\mathbb{P}^k)^{*}\subset{\mathbb{P^{(k+1)(n+1)-1}}}^{*}$

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

Let $X\subset\mathbb{P}^n$ be a $k$-dimensional projective variety. Consider
the product $W = X\times\mathbb{P}^k$ as a subvariety of
$\mathbb{P}(Mat(k+1,n+1))$, the projectivization of the space of $(k+1)\times
(n+1)$-matrices, and consider the projection
$p:\mathbb{P}(Mat(k+1,n+1))\dashrightarrow\mathbb{G}(k,n)=\mathbb{G}(n-k-1,n)$.
Then the "Cayley trick" states that the dual variety $W^*$ of $W$ equals the
closure of $p^{-1}(Z_0(X))$, where $Z_0(X)\subset\mathbb{G}(n-k-1,n)$ is the
Chow hypersurface of $X$. The defining form of $W^*$ is also called the
$X$-resultant. For details and proof, see Multiplicative properties of
projectively dual varieties (see
http://link.springer.com/article/10.1007/BF02567693 ), by J. Weyman and A.
Zelevinsky; see also Coisotropic hypersurfaces in Grassmannians (see
https://www.sciencedirect.com/science/article/abs/pii/S0747717119301506 ), by
K. Kohn.

In the example below, we apply the method to the quadric
$\mathbb{P}^1\times\mathbb{P}^1\subset\mathbb{P}^3$.

+------------------------------------------------------+
|i1 : QQ[x_0..x_3]; P1xP1 = ideal(x_0*x_1-x_2*x_3)     |
|                                                      |
|o2 = ideal(x x  - x x )                               |
|            0 1    2 3                                |
|                                                      |
|o2 : Ideal of QQ[x ..x ]                              |
|                  0   3                               |
+------------------------------------------------------+
|i3 : time (P1xP1xP2,P1xP1xP2') = cayleyTrick(P1xP1,2);|
| -- used 0.122512s (cpu); 0.0962834s (thread); 0s (gc)|
+------------------------------------------------------+

In the next example, we calculate the defining ideal of
$\mathbb{P}^1\times\mathbb{P}^1\times\mathbb{P}^1\subset\mathbb{P}^7$ and that
of its dual variety.

+-----------------------------------------------------------------------------+
|i4 : time (P1xP1xP1,P1xP1xP1') = cayleyTrick(P1xP1,1)                        |
| -- used 0.200502s (cpu); 0.112866s (thread); 0s (gc)                        |
|                                                                             |
|                                                                             |
|o4 = (ideal (x   x    - x   x   , x   x    - x   x   , x   x    - x   x   ,  |
|              0,3 1,2    0,2 1,3   1,0 1,1    1,2 1,3   0,3 1,1    0,1 1,3   |
|     ------------------------------------------------------------------------|
|                                                                             |
|     x   x    - x   x   , x   x    - x   x   , x   x    - x   x   , x   x    |
|      0,2 1,1    0,1 1,2   0,0 1,1    0,2 1,3   0,3 1,0    0,0 1,3   0,2 1,0 |
|     ------------------------------------------------------------------------|
|                                                                   2   2     |
|     - x   x   , x   x    - x   x   , x   x    - x   x   ), ideal(x   x    - |
|        0,0 1,2   0,1 1,0    0,2 1,3   0,0 0,1    0,2 0,3          0,1 1,0   |
|     ------------------------------------------------------------------------|
|                                              2   2                          |
|     2x   x   x   x    + 4x   x   x   x    + x   x    - 2x   x   x   x    -  |
|       0,0 0,1 1,0 1,1     0,2 0,3 1,0 1,1    0,0 1,1     0,1 0,3 1,0 1,2    |
|     ------------------------------------------------------------------------|
|                          2   2                                              |
|     2x   x   x   x    + x   x    - 2x   x   x   x    - 2x   x   x   x    +  |
|       0,0 0,3 1,1 1,2    0,3 1,2     0,1 0,2 1,0 1,3     0,0 0,2 1,1 1,3    |
|     ------------------------------------------------------------------------|
|                                              2   2                          |
|     4x   x   x   x    - 2x   x   x   x    + x   x   ))                      |
|       0,0 0,1 1,2 1,3     0,2 0,3 1,2 1,3    0,2 1,3                        |
|                                                                             |
|o4 : Sequence                                                                |
+-----------------------------------------------------------------------------+

If the option Duality is set to true, then the method applies the so-called
"dual Cayley trick".

+-----------------------------------------------------+
|i5 : time cayleyTrick(P1xP1,1,Duality=>true);        |
| -- used 0.231634s (cpu); 0.137925s (thread); 0s (gc)|
+-----------------------------------------------------+
|i6 : assert(oo == (P1xP1xP1,P1xP1xP1'))              |
+-----------------------------------------------------+
|i7 : time cayleyTrick(P1xP1,2,Duality=>true);        |
| -- used 0.247523s (cpu); 0.171202s (thread); 0s (gc)|
+-----------------------------------------------------+
|i8 : assert(oo == (P1xP1xP2,P1xP1xP2'))              |
+-----------------------------------------------------+

See also
========

  * dualVariety -- projective dual variety

Ways to use cayleyTrick:
========================

  * "cayleyTrick(Ideal,ZZ)"

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

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

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

The source of this document is in Resultants.m2:1125:0.

chowEquations -- Chow equations of a projective variety
*******************************************************

  * Usage:
        chowEquations W
  * Inputs:
      * W, a ring element (Macaulay2Doc), the Chow form of
        an irreducible projective variety $X\subset\mathbb{P}^n$
  * Optional inputs (Macaulay2Doc),:
      * Variable, => ...,
        default value null, specify a name for a variable
  * Outputs:
      * the ideal (Macaulay2Doc), generated by the Chow equations
        of $X$

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

Given the Chow form $Z_0(X)\subset\mathbb{G}(n-k-1,n)$ of an irreducible
projective $k$-dimensional variety $X\subset\mathbb{P}^n$, one can recover a
canonical system of equations, called Chow equations, that always define $X$
set-theoretically, and also scheme-theoretically whenever $X$ is smooth. For
details, see chapter 3, section 2C of Discriminants, Resultants, and
Multidimensional Determinants (see
http://link.springer.com/book/10.1007%2F978-0-8176-4771-1 ), by Israel M.
Gelfand, Mikhail M. Kapranov and Andrei V. Zelevinsky.

+-----------------------------------------------------------------------------+
|i1 : P3 = Grass(0,3,ZZ/11,Variable=>x);                                      |
+-----------------------------------------------------------------------------+
|i2 : -- an elliptic quartic curve                                            |
|     C = ideal(x_0^2+x_1^2+x_2^2+x_3^2,x_0*x_1+x_1*x_2+x_2*x_3)              |
|                                                                             |
|             2    2    2    2                                                |
|o2 = ideal (x  + x  + x  + x , x x  + x x  + x x )                           |
|             0    1    2    3   0 1    1 2    2 3                            |
|                                                                             |
|o2 : Ideal of P3                                                             |
+-----------------------------------------------------------------------------+
|i3 : -- Chow equations of C                                                  |
|     time eqsC = chowEquations chowForm C                                    |
| -- used 0.0519154s (cpu); 0.0519144s (thread); 0s (gc)                      |
|                                                                             |
|             2 2    2 2    2 2    4                2      2 2   2            |
|o3 = ideal (x x  + x x  + x x  + x , x x x x  + x x x  + x x , x x x  +      |
|             0 3    1 3    2 3    3   0 1 2 3    1 2 3    2 3   0 2 3        |
|     ------------------------------------------------------------------------|
|      2        3           2         2      3   3         2          2    2 2|
|     x x x  + x x  - 2x x x  - 2x x x  - x x , x x  + 2x x x  - x x x  + x x |
|      1 2 3    2 3     0 1 3     1 2 3    2 3   1 3     1 2 3    0 2 3    2 3|
|     ------------------------------------------------------------------------|
|          3     2      2             2         2       3   2          2      |
|     + x x , x x x  + x x x  + 2x x x  + 3x x x  + 2x x , x x x  - x x x  +  |
|        1 3   0 1 3    1 2 3     0 1 3     1 2 3     2 3   0 1 3    1 2 3    |
|     ------------------------------------------------------------------------|
|          2    2 2   3      2          2           2         2      3        |
|     x x x  - x x , x x  - x x x  + x x x  + 4x x x  + 3x x x  + x x  +      |
|      0 2 3    2 3   0 3    1 2 3    0 2 3     0 1 3     1 2 3    0 3        |
|     ------------------------------------------------------------------------|
|         3       2      3    3          2        2      3   2 2    2 2    4  |
|     4x x , x x x  + x x  + x x  + x x x  + x x x  + x x , x x  + x x  + x  +|
|       2 3   0 1 2    1 2    2 3    0 1 3    1 2 3    2 3   0 2    1 2    2  |
|     ------------------------------------------------------------------------|
|      2 2   3         3      2      3           2         2       3     2    |
|     x x , x x  + 2x x  - x x x  + x x  + 3x x x  + 4x x x  + 3x x , x x x  +|
|      2 3   1 2     1 2    0 2 3    2 3     0 1 3     1 2 3     2 3   0 1 2  |
|     ------------------------------------------------------------------------|
|      2 2      2     2          3      2      3          2        2      3   |
|     x x  + x x x , x x x  - x x  + x x x  - x x  + x x x  + x x x  + x x ,  |
|      1 2    1 2 3   0 1 2    1 2    0 2 3    2 3    0 1 3    1 2 3    2 3   |
|     ------------------------------------------------------------------------|
|      3      2 2      3      2          2   4     2 2       2      2 2       |
|     x x  - x x  + x x  - x x x  + x x x , x  + 2x x  + 2x x x  + x x  +     |
|      0 2    1 2    0 2    1 2 3    0 2 3   1     1 2     1 2 3    1 3       |
|     ------------------------------------------------------------------------|
|      2 2     3       3    2          2      3           2         2       3 |
|     x x , x x  - 2x x  + x x x  + x x x  - x x  - 2x x x  - 3x x x  - 2x x ,|
|      2 3   0 1     1 2    1 2 3    0 2 3    2 3     0 1 3     1 2 3     2 3 |
|     ------------------------------------------------------------------------|
|      2 2    2 2       2      2 2   3        3    2          2        3   4  |
|     x x  - x x  - 2x x x  - x x , x x  + x x  - x x x  - x x x  - x x , x  -|
|      0 1    1 2     1 2 3    2 3   0 1    1 2    1 2 3    0 2 3    2 3   0  |
|     ------------------------------------------------------------------------|
|      4       2      2 2    2 2    4                                         |
|     x  + 2x x x  - x x  - x x  - x )                                        |
|      2     1 2 3    1 3    2 3    3                                         |
|                                                                             |
|o3 : Ideal of P3                                                             |
+-----------------------------------------------------------------------------+
|i4 : C == saturate eqsC                                                      |
|                                                                             |
|o4 = true                                                                    |
+-----------------------------------------------------------------------------+
|i5 : -- a singular irreducible curve                                         |
|     D = ideal(x_1^2-x_0*x_2,x_2^3-x_0*x_1*x_3,x_1*x_2^2-x_0^2*x_3)          |
|                                                                             |
|             2          3              2    2                                |
|o5 = ideal (x  - x x , x  - x x x , x x  - x x )                             |
|             1    0 2   2    0 1 3   1 2    0 3                              |
|                                                                             |
|o5 : Ideal of P3                                                             |
+-----------------------------------------------------------------------------+
|i6 : -- Chow equations of D                                                  |
|     time eqsD = chowEquations chowForm D                                    |
| -- used 0.0465041s (cpu); 0.0465045s (thread); 0s (gc)                      |
|                                                                             |
|             4      3 2     3        2 2     3      2   2   2 2      2   2   |
|o6 = ideal (x x  - x x , x x x  - x x x , x x x  - x x x , x x x  - x x x ,  |
|             2 3    1 3   1 2 3    0 1 3   0 2 3    0 1 3   1 2 3    0 1 3   |
|     ------------------------------------------------------------------------|
|          2      3 2   3        3 2   4         2         2 2       3        |
|     x x x x  - x x , x x x  - x x , x x  - 4x x x x  + 3x x x , x x x  -    |
|      0 1 2 3    0 3   1 2 3    0 3   1 3     0 1 2 3     0 2 3   0 1 3      |
|     ------------------------------------------------------------------------|
|      2         2 2      3       5    3 2     4    2 2       4    2          |
|     x x x x , x x x  - x x x , x  - x x , x x  - x x x , x x  - x x x x ,   |
|      0 1 2 3   0 1 3    0 2 3   2    0 3   1 2    0 2 3   0 2    0 1 2 3    |
|     ------------------------------------------------------------------------|
|      2 3    2             3    3       2 3    3       3 2    3       2   2  |
|     x x  - x x x x , x x x  - x x x , x x  - x x x , x x  - x x x , x x x  -|
|      1 2    0 1 2 3   0 1 2    0 2 3   0 2    0 1 3   1 2    0 2 3   0 1 2  |
|     ------------------------------------------------------------------------|
|      4     4      3         3      4     2 2      3 2   5    4       4      |
|     x x , x x  - x x x , x x x  - x x , x x x  - x x , x  - x x , x x  -    |
|      0 3   1 2    0 1 3   0 1 2    0 3   0 1 2    0 2   1    0 3   0 1      |
|     ------------------------------------------------------------------------|
|      3 2   2 3    3       3 2    4                                          |
|     x x , x x  - x x x , x x  - x x )                                       |
|      0 2   0 1    0 1 2   0 1    0 2                                        |
|                                                                             |
|o6 : Ideal of P3                                                             |
+-----------------------------------------------------------------------------+
|i7 : D == saturate eqsD                                                      |
|                                                                             |
|o7 = false                                                                   |
+-----------------------------------------------------------------------------+
|i8 : D == radical eqsD                                                       |
|                                                                             |
|o8 = true                                                                    |
+-----------------------------------------------------------------------------+

Actually, one can use chowEquations to recover a variety $X$ from some other of
its tangential Chow forms as well. This is based on generalizations of the
"Cayley trick", see Multiplicative properties of projectively dual varieties
(see http://link.springer.com/article/10.1007/BF02567693 ), by J. Weyman and A.
Zelevinsky; see also Coisotropic hypersurfaces in Grassmannians (see
https://www.sciencedirect.com/science/article/abs/pii/S0747717119301506 ), by
K. Kohn. For instance,

+-----------------------------------------------------------------------------+
|i9 : Q = ideal(x_0*x_1+x_2*x_3)                                              |
|                                                                             |
|o9 = ideal(x x  + x x )                                                      |
|            0 1    2 3                                                       |
|                                                                             |
|o9 : Ideal of P3                                                             |
+-----------------------------------------------------------------------------+
|i10 : -- tangential Chow forms of Q                                          |
|      time (W0,W1,W2) = (tangentialChowForm(Q,0),tangentialChowForm(Q,1),tang|
| -- used 0.093311s (cpu); 0.0933161s (thread); 0s (gc)                       |
|                                                                             |
|                     2                              2                        |
|o10 = (x x  + x x , x    - 4x   x    + 2x   x    + x   , x     x      +      |
|        0 1    2 3   0,1     0,2 1,3     0,1 2,3    2,3   0,1,2 0,1,3        |
|      -----------------------------------------------------------------------|
|      x     x     )                                                          |
|       0,2,3 1,2,3                                                           |
|                                                                             |
|o10 : Sequence                                                               |
|-----------------------------------------------------------------------------|
|entialChowForm(Q,2))                                                         |
+-----------------------------------------------------------------------------+
|i11 : time (Q,Q,Q) == (chowEquations(W0,0),chowEquations(W1,1),chowEquations(|
| -- used 0.162935s (cpu); 0.114208s (thread); 0s (gc)                        |
|                                                                             |
|o11 = true                                                                   |
|-----------------------------------------------------------------------------|
|W2,2))                                                                       |
+-----------------------------------------------------------------------------+

Note that chowEquations(W,0) is not the same as chowEquations W.

Ways to use chowEquations:
==========================

  * "chowEquations(RingElement)"

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

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

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

The source of this document is in Resultants.m2:1098:0.

chowForm -- Chow form of a projective variety
*********************************************

  * Usage:
        chowForm I
  * Inputs:
      * I, an ideal (Macaulay2Doc), a homogeneous ideal defining a
        projective variety $X=V(I)\subset\mathbb{P}^n$
  * Optional inputs (Macaulay2Doc),:
      * AffineChartGrass, => ..., default value true,
        use an affine chart on the Grassmannian
      * AffineChartProj, => ..., default value true, use
        an affine chart on the projective space
      * Duality, => ..., default value null, whether to use dual
        Plücker coordinates
      * Variable, => ...,
        default value null, specify a name for a variable
  * Outputs:
      * a ring element (Macaulay2Doc), the Chow form of $X$
        in the coordinate ring of the Grassmannian
        $\mathbb{G}(n-dim(X)-1,\mathbb{P}^n)$ in the Plücker embedding

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

This is the same as tangentialChowForm(I,0), see tangentialChowForm.
Below, we compute the Chow form of the Veronese surface
and then we compare it with the resultant of three ternary quadrics.

+-----------------------------------------------------------------------------+
|i1 : -- Veronese surface in P^5                                              |
|     f = veronese(2,2,ZZ/3331); V = kernel f                                 |
|                                                                             |
|              ZZ               ZZ                                            |
|o1 : RingMap ----[t ..t ] <-- ----[x ..x ]                                   |
|             3331  0   2      3331  0   5                                    |
|                                                                             |
|             2                                    2                       2  |
|o2 = ideal (x  - x x , x x  - x x , x x  - x x , x  - x x , x x  - x x , x  -|
|             4    3 5   2 4    1 5   2 3    1 4   2    0 5   1 2    0 4   1  |
|     ------------------------------------------------------------------------|
|     x x )                                                                   |
|      0 3                                                                    |
|                                                                             |
|               ZZ                                                            |
|o2 : Ideal of ----[x ..x ]                                                   |
|              3331  0   5                                                    |
+-----------------------------------------------------------------------------+
|i3 : -- Chow form of V in Grass(2,5) (performing internal computations on an |
|     time ChowV = chowForm(V,AffineChartGrass=>{1,2,3})                      |
| -- used 7.18712s (cpu); 6.7287s (thread); 0s (gc)                           |
|                                                                             |
|      4               2              2     2               2                 |
|o3 = x      + 2x     x     x      + x     x      - 2x     x     x      +     |
|      1,2,4     0,2,4 1,2,4 2,3,4    0,2,4 2,3,4     1,2,3 1,2,4 1,2,5       |
|     ------------------------------------------------------------------------|
|      2     2              2                                                 |
|     x     x      - x     x     x      + x     x     x     x      +          |
|      1,2,3 1,2,5    0,2,4 1,2,4 1,3,5    0,2,3 1,2,4 1,2,5 1,3,5            |
|     ------------------------------------------------------------------------|
|                                       2                     2               |
|     x     x     x     x      - x     x     x      - 3x     x     x      -   |
|      0,1,4 1,2,4 1,2,5 1,3,5    0,1,3 1,2,5 1,3,5     0,2,3 1,2,4 2,3,5     |
|     ------------------------------------------------------------------------|
|            2              2                                                 |
|     x     x     x      - x     x     x      - x     x     x     x      -    |
|      0,1,4 1,2,4 2,3,5    0,2,4 1,3,4 2,3,5    0,2,3 0,2,4 2,3,4 2,3,5      |
|     ------------------------------------------------------------------------|
|                                                                             |
|     x     x     x     x      + 2x     x     x     x      +                  |
|      0,1,4 0,2,4 2,3,4 2,3,5     0,1,2 1,2,4 2,3,4 2,3,5                    |
|     ------------------------------------------------------------------------|
|                                                                             |
|     x     x     x     x      + x     x     x     x      +                   |
|      0,2,3 1,2,3 1,2,5 2,3,5    0,1,3 1,2,4 1,2,5 2,3,5                     |
|     ------------------------------------------------------------------------|
|                                                                             |
|     x     x     x     x      + x     x     x     x      -                   |
|      0,2,3 0,2,4 1,3,5 2,3,5    0,1,4 0,2,4 1,3,5 2,3,5                     |
|     ------------------------------------------------------------------------|
|                                             2                    2          |
|     x     x     x     x      - x     x     x      + x     x     x      +    |
|      0,1,3 0,2,5 1,3,5 2,3,5    0,1,2 1,2,3 2,3,5    0,1,3 0,2,4 2,3,5      |
|     ------------------------------------------------------------------------|
|             2                     2              2                          |
|     2x     x     x      - 2x     x     x      + x     x     x      -        |
|       0,2,3 1,2,4 1,4,5     0,1,4 1,2,4 1,4,5    0,2,4 1,3,4 1,4,5          |
|     ------------------------------------------------------------------------|
|                                                                             |
|     2x     x     x     x      + 2x     x     x     x      -                 |
|       0,2,3 1,2,3 1,2,5 1,4,5     0,1,3 1,2,4 1,2,5 1,4,5                   |
|     ------------------------------------------------------------------------|
|                                                                             |
|     x     x     x     x      - x     x     x     x      +                   |
|      0,2,3 0,2,4 1,3,5 1,4,5    0,1,4 0,2,4 1,3,5 1,4,5                     |
|     ------------------------------------------------------------------------|
|                                                            2     2          |
|     x     x     x     x      + x     x     x     x      + x     x      -    |
|      0,1,2 1,2,4 1,3,5 1,4,5    0,1,3 0,2,5 1,3,5 1,4,5    0,2,3 1,4,5      |
|     ------------------------------------------------------------------------|
|                   2        2     2                     2                    |
|     2x     x     x      + x     x      - 2x     x     x      -              |
|       0,1,2 1,2,3 1,4,5    0,1,4 1,4,5     0,1,2 0,3,4 1,4,5                |
|     ------------------------------------------------------------------------|
|                  2                                           2              |
|     x     x     x      + 2x     x     x     x      + 2x     x     x      -  |
|      0,1,3 0,1,5 1,4,5     0,2,3 1,2,3 1,2,4 2,4,5     0,1,3 1,2,4 2,4,5    |
|     ------------------------------------------------------------------------|
|                                  2                                          |
|     8x     x     x     x      + x     x     x      +                        |
|       0,1,2 1,2,4 1,3,4 2,4,5    0,2,3 2,3,4 2,4,5                          |
|     ------------------------------------------------------------------------|
|                                  2                                          |
|     2x     x     x     x      + x     x     x      -                        |
|       0,1,2 1,2,3 2,3,4 2,4,5    0,1,4 2,3,4 2,4,5                          |
|     ------------------------------------------------------------------------|
|                                                                             |
|     2x     x     x     x      - 2x     x     x     x      -                 |
|       0,1,2 0,3,4 2,3,4 2,4,5     0,1,3 1,2,3 1,2,5 2,4,5                   |
|     ------------------------------------------------------------------------|
|      2                                                2                     |
|     x     x     x      + 2x     x     x     x      - x     x     x      +   |
|      0,2,3 1,3,5 2,4,5     0,1,2 1,2,3 1,3,5 2,4,5    0,1,4 1,3,5 2,4,5     |
|     ------------------------------------------------------------------------|
|                                                                             |
|     2x     x     x     x      + x     x     x     x      -                  |
|       0,1,2 0,3,4 1,3,5 2,4,5    0,1,3 0,1,5 1,3,5 2,4,5                    |
|     ------------------------------------------------------------------------|
|                                                            2     2          |
|     x     x     x     x      - x     x     x     x      + x     x      -    |
|      0,1,3 0,2,3 2,3,5 2,4,5    0,1,3 0,1,4 2,3,5 2,4,5    0,1,3 2,4,5      |
|     ------------------------------------------------------------------------|
|                                                                             |
|     x     x     x     x      + 3x     x     x     x      +                  |
|      0,2,3 0,2,4 1,2,4 3,4,5     0,1,4 0,2,4 1,2,4 3,4,5                    |
|     ------------------------------------------------------------------------|
|             2              2                                                |
|     3x     x     x      - x     x     x      + 2x     x     x     x      +  |
|       0,1,2 1,2,4 3,4,5    0,2,4 0,3,4 3,4,5     0,1,2 0,2,4 2,3,4 3,4,5    |
|     ------------------------------------------------------------------------|
|       2                    2                                                |
|     2x     x     x      - x     x     x      - 3x     x     x     x      +  |
|       0,2,3 1,2,5 3,4,5    0,1,4 1,2,5 3,4,5     0,1,3 0,2,4 1,2,5 3,4,5    |
|     ------------------------------------------------------------------------|
|                                                                             |
|     x     x     x     x      + x     x     x     x      +                   |
|      0,1,3 0,1,5 1,2,5 3,4,5    0,2,3 0,2,4 0,3,5 3,4,5                     |
|     ------------------------------------------------------------------------|
|                                                                             |
|     x     x     x     x      - x     x     x     x      -                   |
|      0,1,4 0,2,4 0,3,5 3,4,5    0,1,3 0,2,5 0,3,5 3,4,5                     |
|     ------------------------------------------------------------------------|
|                                                                             |
|     2x     x     x     x      - x     x     x     x      -                  |
|       0,1,2 0,2,3 2,3,5 3,4,5    0,1,2 0,1,4 2,3,5 3,4,5                    |
|     ------------------------------------------------------------------------|
|      2                    2                                                 |
|     x     x     x      - x     x     x      + 2x     x     x     x      +   |
|      0,2,3 0,4,5 3,4,5    0,1,4 0,4,5 3,4,5     0,1,2 0,3,4 0,4,5 3,4,5     |
|     ------------------------------------------------------------------------|
|                                                                             |
|     x     x     x     x      + 2x     x     x     x      +                  |
|      0,1,3 0,1,5 0,4,5 3,4,5     0,1,2 0,2,3 1,4,5 3,4,5                    |
|     ------------------------------------------------------------------------|
|                                                            2     2          |
|     x     x     x     x      + x     x     x     x      + x     x           |
|      0,1,2 0,1,4 1,4,5 3,4,5    0,1,2 0,1,3 2,4,5 3,4,5    0,1,2 3,4,5      |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|o3 : ------------------------------------------------------------------------|
|     (x     x      - x     x      + x     x     , x     x      - x     x     |
|       2,3,5 1,4,5    1,3,5 2,4,5    1,2,5 3,4,5   2,3,4 1,4,5    1,3,4 2,4,5|
|-----------------------------------------------------------------------------|
|affine chart of the Grassmannian)                                            |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
| + x     x     , x     x      - x     x      + x     x     , x     x      - x|
|    1,2,4 3,4,5   2,3,5 0,4,5    0,3,5 2,4,5    0,2,5 3,4,5   1,3,5 0,4,5    |
|-----------------------------------------------------------------------------|
|                                                                             |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|     x      + x     x     , x     x      - x     x      + x     x     , x    |
|0,3,5 1,4,5    0,1,5 3,4,5   1,2,5 0,4,5    0,2,5 1,4,5    0,1,5 2,4,5   2,3,|
|-----------------------------------------------------------------------------|
|                                                                             |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
| x      - x     x      + x     x     , x     x      - x     x      + x     x |
|4 0,4,5    0,3,4 2,4,5    0,2,4 3,4,5   1,3,4 0,4,5    0,3,4 1,4,5    0,1,4 3|
|-----------------------------------------------------------------------------|
|                                                                             |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|    , x     x      - x     x      + x     x     , x     x      - x     x     |
|,4,5   1,2,4 0,4,5    0,2,4 1,4,5    0,1,4 2,4,5   1,2,3 0,4,5    0,2,3 1,4,5|
|-----------------------------------------------------------------------------|
|                                                                             |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
| + x     x      - x     x     , x     x      - x     x      + x     x     , x|
|    0,1,3 2,4,5    0,1,2 3,4,5   2,3,4 1,3,5    1,3,4 2,3,5    1,2,3 3,4,5   |
|-----------------------------------------------------------------------------|
|                                                                             |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|     x      - x     x      + x     x     , x     x      - x     x      + x   |
|1,2,5 0,3,5    0,2,5 1,3,5    0,1,5 2,3,5   2,3,4 0,3,5    0,3,4 2,3,5    0,2|
|-----------------------------------------------------------------------------|
|                                                                             |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|  x     , x     x      - x     x      + x     x     , x     x      - x     x |
|,3 3,4,5   1,3,4 0,3,5    0,3,4 1,3,5    0,1,3 3,4,5   1,2,4 0,3,5    0,2,4 1|
|-----------------------------------------------------------------------------|
|                                                                             |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|     + x     x      + x     x     , x     x      - x     x      + x     x    |
|,3,5    0,1,4 2,3,5    0,1,2 3,4,5   1,2,3 0,3,5    0,2,3 1,3,5    0,1,3 2,3,|
|-----------------------------------------------------------------------------|
|                                                      ZZ                     |
|                                                     ----[x     ..x     , x  |
|                                                     3331  0,1,2   0,1,3   0,|
|-----------------------------------------------------------------------------|
| , x     x      - x     x      + x     x     , x     x      - x     x      + |
|5   2,3,4 1,2,5    1,2,4 2,3,5    1,2,3 2,4,5   1,3,4 1,2,5    1,2,4 1,3,5   |
|-----------------------------------------------------------------------------|
|   , x     , x     , x     , x     , x     , x     , x     , x     , x     , |
|2,3   1,2,3   0,1,4   0,2,4   1,2,4   0,3,4   1,3,4   2,3,4   0,1,5   0,2,5  |
|-----------------------------------------------------------------------------|
|x     x     , x     x      - x     x      + x     x      + x     x      - x  |
| 1,2,3 1,4,5   0,3,4 1,2,5    0,2,4 1,3,5    0,1,4 2,3,5    0,2,3 1,4,5    0,|
|-----------------------------------------------------------------------------|
|x     , x     , x     , x     , x     , x     , x     , x     ]              |
| 1,2,5   0,3,5   1,3,5   2,3,5   0,4,5   1,4,5   2,4,5   3,4,5               |
|-----------------------------------------------------------------------------|
|   x      + x     x     , x     x      - x     x      + x     x     , x     x|
|1,3 2,4,5    0,1,2 3,4,5   2,3,4 0,2,5    0,2,4 2,3,5    0,2,3 2,4,5   1,3,4 |
|-----------------------------------------------------------------------------|
|-----------------------------------------------------------------------------|
|      - x     x      + x     x      + x     x     , x     x      - x     x   |
|0,2,5    0,2,4 1,3,5    0,2,3 1,4,5    0,1,2 3,4,5   0,3,4 0,2,5    0,2,4 0,3|
|-----------------------------------------------------------------------------|
|-----------------------------------------------------------------------------|
|   + x     x     , x     x      - x     x      + x     x     , x     x      -|
|,5    0,2,3 0,4,5   1,2,4 0,2,5    0,2,4 1,2,5    0,1,2 2,4,5   1,2,3 0,2,5  |
|-----------------------------------------------------------------------------|
|-----------------------------------------------------------------------------|
| x     x      + x     x     , x     x      - x     x      + x     x      - x |
|  0,2,3 1,2,5    0,1,2 2,3,5   2,3,4 0,1,5    0,1,4 2,3,5    0,1,3 2,4,5    0|
|-----------------------------------------------------------------------------|
|-----------------------------------------------------------------------------|
|    x     , x     x      - x     x      + x     x     , x     x      - x     |
|,1,2 3,4,5   1,3,4 0,1,5    0,1,4 1,3,5    0,1,3 1,4,5   0,3,4 0,1,5    0,1,4|
|-----------------------------------------------------------------------------|
|-----------------------------------------------------------------------------|
|x      + x     x     , x     x      - x     x      + x     x     , x     x   |
| 0,3,5    0,1,3 0,4,5   1,2,4 0,1,5    0,1,4 1,2,5    0,1,2 1,4,5   0,2,4 0,1|
|-----------------------------------------------------------------------------|
|-----------------------------------------------------------------------------|
|   - x     x      + x     x     , x     x      - x     x      + x     x     ,|
|,5    0,1,4 0,2,5    0,1,2 0,4,5   1,2,3 0,1,5    0,1,3 1,2,5    0,1,2 1,3,5 |
|-----------------------------------------------------------------------------|
|-----------------------------------------------------------------------------|
| x     x      - x     x      + x     x     , x     x      - x     x      + x |
|  0,2,3 0,1,5    0,1,3 0,2,5    0,1,2 0,3,5   1,2,4 0,3,4    0,2,4 1,3,4    0|
|-----------------------------------------------------------------------------|
|-----------------------------------------------------------------------------|
|    x     , x     x      - x     x      + x     x     , x     x      - x     |
|,1,4 2,3,4   1,2,3 0,3,4    0,2,3 1,3,4    0,1,3 2,3,4   1,2,3 0,2,4    0,2,3|
|-----------------------------------------------------------------------------|
|-----------------------------------------------------------------------------|
|x      + x     x     , x     x      - x     x      + x     x     , x     x   |
| 1,2,4    0,1,2 2,3,4   1,2,3 0,1,4    0,1,3 1,2,4    0,1,2 1,3,4   0,2,3 0,1|
|-----------------------------------------------------------------------------|
|---------------------------------                                            |
|   - x     x      + x     x     )                                            |
|,4    0,1,3 0,2,4    0,1,2 0,3,4                                             |
+-----------------------------------------------------------------------------+
|i4 : -- equivalently (but faster)...                                         |
|     time assert(ChowV === chowForm f)                                       |
| -- used 1.6851s (cpu); 1.5374s (thread); 0s (gc)                            |
+-----------------------------------------------------------------------------+
|i5 : -- X-resultant of V                                                     |
|     time Xres = fromPluckerToStiefel dualize ChowV;                         |
| -- used 0.346067s (cpu); 0.264773s (thread); 0s (gc)                        |
+-----------------------------------------------------------------------------+
|i6 : -- three generic ternary quadrics                                       |
|     F = genericPolynomials({2,2,2},ZZ/3331)                                 |
|                                                                             |
|         2               2                        2     2               2    |
|o6 = {a x  + a x x  + a x  + a x x  + a x x  + a x , b x  + b x x  + b x  +  |
|       0 0    1 0 1    3 1    2 0 2    4 1 2    5 2   0 0    1 0 1    3 1    |
|     ------------------------------------------------------------------------|
|                          2     2               2                        2   |
|     b x x  + b x x  + b x , c x  + c x x  + c x  + c x x  + c x x  + c x }  |
|      2 0 2    4 1 2    5 2   0 0    1 0 1    3 1    2 0 2    4 1 2    5 2   |
|                                                                             |
|o6 : List                                                                    |
+-----------------------------------------------------------------------------+
|i7 : -- resultant of the three forms                                         |
|     time resF = resultant F;                                                |
| -- used 0.347348s (cpu); 0.249061s (thread); 0s (gc)                        |
+-----------------------------------------------------------------------------+
|i8 : assert(resF === sub(Xres,vars ring resF) and Xres === sub(resF,vars ring|
|-----------------------------------------------------------------------------|
|Xres))                                                                       |
+-----------------------------------------------------------------------------+

See also
========

  * tangentialChowForm -- higher Chow forms of a
    projective variety
  * hurwitzForm -- Hurwitz form of a projective variety

Ways to use chowForm:
=====================

  * "chowForm(Ideal)"
  * "chowForm(RingMap)"

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

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

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

The source of this document is in Resultants.m2:1054:0.

conormalVariety -- conormal variety
***********************************

  * Usage:
        conormalVariety I
  * Inputs:
      * I, an ideal (Macaulay2Doc), a homogeneous ideal defining a
        projective variety $X=V(I)\subset\mathbb{P}^n$
  * Optional inputs (Macaulay2Doc),:
      * SingularLocus, => ..., default value null, pass
        the singular locus of the variety
      * Strategy,
        => ..., default value "Saturate",
      * Variable, => ...,
        default value null, specify a name for a variable
  * Outputs:
      * an ideal (Macaulay2Doc), the bihomogeneous ideal of the
        conormal variety $Con(X)\subset\mathbb{P}^n\times{\mathbb{P}^n}^{*}$ of
        $X$

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

The conormal variety $Con(X)$ of a projective variety $X\subset\mathbb{P}^n$ is
the Zariski closure in $\mathbb{P}^n\times{\mathbb{P}^n}^{*}$ of the set of
tuples $(x,H)$ where $x$ is a regular point of $X$ and $H$ is a hyperplane in
$\mathbb{P}^n$ containing the embedded tangent space to $X$ at $x$. The dual
variety of $X$ is the image of
$Con(X)\subset\mathbb{P}^n\times{\mathbb{P}^n}^{*}$ under projection onto the
second factor ${\mathbb{P}^n}^{*}$.

+-----------------------------------------------------------------------------+
|i1 : X = kernel veronese(1,3)                                                |
|                                                                             |
|             2                       2                                       |
|o1 = ideal (x  - x x , x x  - x x , x  - x x )                               |
|             2    1 3   1 2    0 3   1    0 2                                |
|                                                                             |
|o1 : Ideal of QQ[x ..x ]                                                     |
|                  0   3                                                      |
+-----------------------------------------------------------------------------+
|i2 : conormalVariety X                                                       |
|                                                                             |
|                                                                             |
|o2 = ideal (x   x    + 2x   x    + 3x   x   , x   x    + 2x   x    +         |
|             0,1 1,1     0,2 1,2     0,3 1,3   0,0 1,1     0,1 1,2           |
|     ------------------------------------------------------------------------|
|                                                                             |
|     3x   x   , 3x   x    + 2x   x    + x   x   , x   x    - x   x    -      |
|       0,2 1,3    0,1 1,0     0,2 1,1    0,3 1,2   0,0 1,0    0,2 1,2        |
|     ------------------------------------------------------------------------|
|                 2                                     2                     |
|     2x   x   , x    - x   x   , x   x    - x   x   , x    - x   x   ,       |
|       0,3 1,3   0,2    0,1 0,3   0,1 0,2    0,0 0,3   0,1    0,0 0,2        |
|     ------------------------------------------------------------------------|
|      2   2           3       3                                 2   2        |
|     x   x    - 4x   x    - 4x   x    + 18x   x   x   x    - 27x   x   )     |
|      1,1 1,2     1,0 1,2     1,1 1,3      1,0 1,1 1,2 1,3      1,0 1,3      |
|                                                                             |
|o2 : Ideal of QQ[x   ..x   ]                                                 |
|                  0,0   1,3                                                  |
+-----------------------------------------------------------------------------+

See also
========

  * dualVariety -- projective dual variety

Ways to use conormalVariety:
============================

  * "conormalVariety(Ideal)"

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

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

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

The source of this document is in Resultants.m2:1262:0.

conormalVariety(...,Strategy=>...)
**********************************

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

This is an option for conormalVariety, and
dualVariety, which specifies which algorithm to use. One can
choose between two strategies: "Saturate" and "Eliminate".

Functions with optional argument named Strategy:
================================================

  * "addHook(...,Strategy=>...)" -- see addHook (Macaulay2Doc),
    -- add a hook function to an object for later processing
  * annihilator(...,Strategy=>...) (missing documentation)
  * "basis(...,Strategy=>...)" -- see basis (Macaulay2Doc), --
    basis or generating set of all or part of a ring, ideal or module
  * "mingens(...,Strategy=>...)" -- see Complement (Macaulay2Doc),
    -- a Strategy option value
  * "trim(...,Strategy=>...)" -- see Complement (Macaulay2Doc),
    -- a Strategy option value
  * "compose(Module,Module,Module,Strategy=>...)" -- see compose (Macaulay2Doc),
    -- composition as a pairing on Hom-modules
  * conormalVariety(...,Strategy=>...)
  * "dualVariety(...,Strategy=>...)"
  * decompose(Ideal,Strategy=>...) (missing documentation)
  * determinant(...,Strategy=>...) (Macaulay2Doc)
    -- choose
    between Bareiss, Cofactor and Dynamic algorithms
  * "dual(MonomialIdeal,List,Strategy=>...)" -- see
    dual(MonomialIdeal,Strategy=>...) (Macaulay2Doc),
  * "dual(MonomialIdeal,RingElement,Strategy=>...)" -- see
    dual(MonomialIdeal,Strategy=>...) (Macaulay2Doc),
  * dual(MonomialIdeal,Strategy=>...) (Macaulay2Doc)
  * "End(...,Strategy=>...)" -- see End (Macaulay2Doc), -- module of
    endomorphisms
  * exteriorPower(...,Strategy=>...) (Macaulay2Doc)
    -- choose
    between Bareiss, Cofactor and Dynamic algorithms
  * "gb(...,Strategy=>...)" -- see gb (Macaulay2Doc), -- compute a
    Gröbner basis
  * "GF(...,Strategy=>...)" -- see GF (Macaulay2Doc), -- make a finite
    field
  * "groebnerBasis(...,Strategy=>...)" -- see groebnerBasis (Macaulay2Doc),
    -- Gröbner basis, as a matrix
  * hilbertFunction(...,Strategy=>...) (missing documentation)
  * "Hom(...,Strategy=>...)" -- see Hom (Macaulay2Doc), -- module of
    homomorphisms
  * "homomorphism'(...,Strategy=>...)" -- see homomorphism' (Macaulay2Doc),
    -- get the element of Hom from a homomorphism
  * "hooks(...,Strategy=>...)" -- see hooks (Macaulay2Doc), -- list
    hooks attached to a key
  * "intersect(Ideal,Ideal,Strategy=>...)" -- see intersect(Ideal,Ideal) (Macaulay2Doc),
    -- compute an intersection of a
    sequence of ideals or modules
  * "intersect(Module,Module,Strategy=>...)" -- see
    intersect(Ideal,Ideal) (Macaulay2Doc), --
    compute an intersection of a sequence of ideals or modules
  * isPrime(Ideal,Strategy=>...) (missing documentation)
  * kernel(...,Strategy=>...) (Macaulay2Doc)
    -- strategy for
    Groebner Basis computations used in kernel computations
  * "match(...,Strategy=>...)" -- see match (Macaulay2Doc), --
    regular expression matching
  * minors(...,Strategy=>...) (Macaulay2Doc)
    -- choose
    between Bareiss, Cofactor and Dynamic algorithms
  * normalCone(Ideal,RingElement,Strategy=>...) (missing documentation)
  * normalCone(Ideal,Strategy=>...) (missing documentation)
  * "parallelApply(...,Strategy=>...)" -- see parallelApply (Macaulay2Doc),
    -- apply a function to each element in
    parallel
  * "pushForward(...,Strategy=>...)" -- see pushForward(RingMap,Module) (Macaulay2Doc),
    -- compute the pushforward
    of a module along a ring map
  * quotient'(...,Strategy=>...) (missing documentation)
  * quotient(...,Strategy=>...) (missing documentation)
  * saturate(...,Strategy=>...) (missing documentation)
  * "syz(...,Strategy=>...)" -- see syz(Matrix) (Macaulay2Doc),
    -- compute the syzygy matrix

Further information
===================

  * Default value: Saturate
  * Function: conormalVariety, -- conormal variety
  * Option key: Strategy (Macaulay2Doc), -- an optional argument
-------------------------------------------------------------------------------

The source of this document is in Resultants.m2:1248:0.

discriminant(RingElement) -- resultant of the partial derivatives
*****************************************************************

  * Function: discriminant (Elimination),
  * Usage:
        discriminant F
  * Inputs:
      * F, a ring element (Macaulay2Doc), a homogeneous
        polynomial
  * Optional inputs (Macaulay2Doc),:
      * Algorithm, =>
        ..., default value null,
  * Outputs:
      * a ring element (Macaulay2Doc), the discriminant of F

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

The discriminant of a homogeneous polynomial is defined, up to a scalar factor,
as the resultant(Matrix), of its partial
derivatives. For the general theory, see one of the following: Using Algebraic
Geometry (see http://link.springer.com/book/10.1007%2Fb138611 ), by David A.
Cox, John Little, Donal O'shea; Discriminants, Resultants, and Multidimensional
Determinants (see http://link.springer.com/book/10.1007%2F978-0-8176-4771-1 ),
by Israel M. Gelfand, Mikhail M. Kapranov and Andrei V. Zelevinsky.

+-------------------------------------------------------+
|i1 : ZZ[a,b,c][x,y]; F = a*x^2+b*x*y+c*y^2             |
|                                                       |
|        2              2                               |
|o2 = a*x  + b*x*y + c*y                                |
|                                                       |
|o2 : ZZ[a..c][x..y]                                    |
+-------------------------------------------------------+
|i3 : time discriminant F                               |
| -- used 0.0104628s (cpu); 0.0104628s (thread); 0s (gc)|
|                                                       |
|        2                                              |
|o3 = - b  + 4a*c                                       |
|                                                       |
|o3 : ZZ[a..c]                                          |
+-------------------------------------------------------+
|i4 : ZZ[a,b,c,d][x,y]; F = a*x^3+b*x^2*y+c*x*y^2+d*y^3 |
|                                                       |
|        3      2         2      3                      |
|o5 = a*x  + b*x y + c*x*y  + d*y                       |
|                                                       |
|o5 : ZZ[a..d][x..y]                                    |
+-------------------------------------------------------+
|i6 : time discriminant F                               |
| -- used 0.0116276s (cpu); 0.0116302s (thread); 0s (gc)|
|                                                       |
|        2 2       3     3                   2 2        |
|o6 = - b c  + 4a*c  + 4b d - 18a*b*c*d + 27a d         |
|                                                       |
|o6 : ZZ[a..d]                                          |
+-------------------------------------------------------+

The next example illustrates how computing the intersection of a pencil
generated by two degree $d$ forms $F(x_0,\ldots,x_n), G(x_0,\ldots,x_n)$ with
the discriminant hypersurface in the space of forms of degree $d$ on
$\mathbb{P}^n$

+-----------------------------------------------------------------------------+
|i7 : x=symbol x; R=ZZ/331[x_0..x_3]                                          |
|                                                                             |
|o8 = R                                                                       |
|                                                                             |
|o8 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i9 : F=x_0^4+x_1^4+x_2^4+x_3^4                                               |
|                                                                             |
|      4    4    4    4                                                       |
|o9 = x  + x  + x  + x                                                        |
|      0    1    2    3                                                       |
|                                                                             |
|o9 : R                                                                       |
+-----------------------------------------------------------------------------+
|i10 : G=x_0^4-x_0*x_1^3-x_2^4+x_2*x_3^3                                      |
|                                                                             |
|       4      3    4      3                                                  |
|o10 = x  - x x  - x  + x x                                                   |
|       0    0 1    2    2 3                                                  |
|                                                                             |
|o10 : R                                                                      |
+-----------------------------------------------------------------------------+
|i11 : R'=ZZ/331[t_0,t_1][x_0..x_3];                                          |
+-----------------------------------------------------------------------------+
|i12 : pencil=t_0*sub(F,R')+t_1*sub(G,R')                                     |
|                                                                             |
|                4        3      4             4        3      4              |
|o12 = (t  + t )x  - t x x  + t x  + (t  - t )x  + t x x  + t x               |
|        0    1  0    1 0 1    0 1     0    1  2    1 2 3    0 3              |
|                                                                             |
|o12 : R'                                                                     |
+-----------------------------------------------------------------------------+
|i13 : time D=discriminant pencil                                             |
| -- used 0.430588s (cpu); 0.430584s (thread); 0s (gc)                        |
|                                                                             |
|           108      106 2       102 6      100 8       98 10       96 12     |
|o13 = - 62t    + 19t   t  + 160t   t  + 91t   t  + 129t  t   + 117t  t   +   |
|           0        0   1       0   1      0   1       0  1        0  1      |
|      -----------------------------------------------------------------------|
|          94 14       92 16      90 18      88 20      86 22       84 24     |
|      161t  t   + 124t  t   - 82t  t   - 21t  t   - 49t  t   - 123t  t   +   |
|          0  1        0  1       0  1       0  1       0  1        0  1      |
|      -----------------------------------------------------------------------|
|        82 26     80 28      78 30       76 32      74 34       72 36        |
|      5t  t   - 4t  t   + 75t  t   + 103t  t   + 47t  t   + 108t  t   -      |
|        0  1      0  1       0  1        0  1       0  1        0  1         |
|      -----------------------------------------------------------------------|
|         70 38      68 40       66 42      64 44      62 46       60 48      |
|      62t  t   - 97t  t   - 131t  t   + 71t  t   - 68t  t   - 144t  t   -    |
|         0  1       0  1        0  1       0  1       0  1        0  1       |
|      -----------------------------------------------------------------------|
|          58 50      56 52      54 54       52 56     50 58      48 60       |
|      163t  t   + 10t  t   - 35t  t   + 105t  t   + 7t  t   + 10t  t   -     |
|          0  1       0  1       0  1        0  1      0  1       0  1        |
|      -----------------------------------------------------------------------|
|        46 62      44 64       42 66      40 68       38 70      36 72       |
|      3t  t   + 76t  t   - 152t  t   - 81t  t   + 106t  t   - 11t  t   -     |
|        0  1       0  1        0  1       0  1        0  1       0  1        |
|      -----------------------------------------------------------------------|
|         34 74      32 76      30 78      28 80     26 82      24 84         |
|      13t  t   + 17t  t   + 18t  t   + 88t  t   + 9t  t   + 58t  t   -       |
|         0  1       0  1       0  1       0  1      0  1       0  1          |
|      -----------------------------------------------------------------------|
|         22 86       20 88       18 90       16 92       14 94      12 96    |
|      73t  t   + 113t  t   - 154t  t   - 102t  t   - 161t  t   + 33t  t   -  |
|         0  1        0  1        0  1        0  1        0  1       0  1     |
|      -----------------------------------------------------------------------|
|          10 98      8 100       6 102       4 104      2 106      108       |
|      130t  t   - 21t t    + 157t t    + 105t t    + 82t t    + 69t          |
|          0  1       0 1         0 1         0 1        0 1        1         |
|                                                                             |
|       ZZ                                                                    |
|o13 : ---[t ..t ]                                                            |
|      331  0   1                                                             |
+-----------------------------------------------------------------------------+
|i14 : factor D                                                               |
|                                                                             |
|                  9            9           9           9         18          |
|o14 = (128t  - t ) (128t  + t ) (11t  - t ) (11t  + t ) (t  - t )  (t  +     |
|           0    1       0    1      0    1      0    1    0    1     0       |
|                                                                             |
|o14 : Expression of class Product                                            |
|-----------------------------------------------------------------------------|
|   18    2              2 9    2              2 9                            |
|t )  (39t  - 139t t  + t ) (39t  + 139t t  + t ) (69)                        |
| 1       0       0 1    1      0       0 1    1                              |
+-----------------------------------------------------------------------------+

See also
========

  * dualVariety -- projective dual variety
  * resultant(Matrix) (missing documentation)

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

  * discriminant(RingElement), --
    resultant of the partial derivatives
-------------------------------------------------------------------------------

The source of this document is in Resultants.m2:923:0.

Duality -- whether to use dual Plücker coordinates
**************************************************

  * Usage:
        Duality => true/false

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

This is a option typically used to specify whether to perform internal
computations using the dual Plücker coordinates.

See also
========

  * chowForm -- Chow form of a projective variety
  * hurwitzForm -- Hurwitz form of a projective variety
  * tangentialChowForm -- higher Chow forms of a
    projective variety

Functions with optional argument named Duality:
===============================================

  * "cayleyTrick(...,Duality=>...)"
  * "chowForm(...,Duality=>...)"
  * "hurwitzForm(...,Duality=>...)"
  * "isInCoisotropic(...,Duality=>...)"
  * "tangentialChowForm(...,Duality=>...)"

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

The object Duality, is a symbol (Macaulay2Doc).

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

The source of this document is in Resultants.m2:1208:0.

dualize -- apply duality of Grassmannians
*****************************************

  * Usage:
        dualize f
  * Inputs:
      * f, a ring element (Macaulay2Doc),  or a
        matrix (Macaulay2Doc), or an ideal (Macaulay2Doc),
        in the coordinate ring (resp. ambient ring) of a Grassmannian
        $\mathbb{G}(k,n)$
  * Outputs:
      * the image of f in the coordinate ring (resp. ambient ring) of
        $\mathbb{G}(n-k-1,n)$ via the duality of Grassmannians

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

This method implements the natural identification
$\mathbb{G}(k,\mathbb{P}^n)\to\mathbb{G}(n-k-1,{\mathbb{P}^n}^{*})$, which
takes a subspace $L\in\mathbb{G}(k,\mathbb{P}^n)$ to its orthogonal complement
$L^*\in\mathbb{G}(n-k-1,{\mathbb{P}^n}^*)$.

+-----------------------------------------------------------------------------+
|i1 : P9 = ambient Grass(2,4,ZZ/13,Variable=>x);                              |
+-----------------------------------------------------------------------------+
|i2 : vars P9                                                                 |
|                                                                             |
|o2 = | x_(0,1,2) x_(0,1,3) x_(0,2,3) x_(1,2,3) x_(0,1,4) x_(0,2,4) x_(1,2,4) |
|     ------------------------------------------------------------------------|
|     x_(0,3,4) x_(1,3,4) x_(2,3,4) |                                         |
|                                                                             |
|              1       10                                                     |
|o2 : Matrix P9  <-- P9                                                       |
+-----------------------------------------------------------------------------+
|i3 : dualize vars P9                                                         |
|                                                                             |
|o3 = | x_(3,4) -x_(2,4) x_(1,4) -x_(0,4) x_(2,3) -x_(1,3) x_(0,3) x_(1,2)    |
|     ------------------------------------------------------------------------|
|     -x_(0,2) x_(0,1) |                                                      |
|                                                                             |
|             ZZ                                                             1|
|o3 : Matrix (--[x   ..x   , x   , x   , x   , x   , x   , x   , x   , x   ]) |
|             13  0,1   0,2   1,2   0,3   1,3   2,3   0,4   1,4   2,4   3,4   |
|-----------------------------------------------------------------------------|
|     ZZ                                                             10       |
|<-- (--[x   ..x   , x   , x   , x   , x   , x   , x   , x   , x   ])         |
|     13  0,1   0,2   1,2   0,3   1,3   2,3   0,4   1,4   2,4   3,4           |
+-----------------------------------------------------------------------------+
|i4 : F  = random(2,P9)                                                       |
|                                                                             |
|         2                         2                                         |
|o4 = - 2x      - 5x     x      - 6x      + x     x      - 2x     x      +    |
|         0,1,2     0,1,2 0,1,3     0,1,3    0,1,2 0,2,3     0,1,3 0,2,3      |
|     ------------------------------------------------------------------------|
|       2                                                         2           |
|     2x      + 3x     x      - 5x     x      + 3x     x      - 4x      -     |
|       0,2,3     0,1,2 1,2,3     0,1,3 1,2,3     0,2,3 1,2,3     1,2,3       |
|     ------------------------------------------------------------------------|
|                                                                       2     |
|     6x     x      - 5x     x      + 6x     x      + 3x     x      + 6x      |
|       0,1,2 0,1,4     0,1,3 0,1,4     0,2,3 0,1,4     1,2,3 0,1,4     0,1,4 |
|     ------------------------------------------------------------------------|
|                                                                             |
|     - 5x     x      - 2x     x      + 3x     x      - 6x     x      +       |
|         0,1,2 0,2,4     0,1,3 0,2,4     0,2,3 0,2,4     1,2,3 0,2,4         |
|     ------------------------------------------------------------------------|
|       2                                                                     |
|     5x      - 3x     x      + 5x     x      + 6x     x      + 6x     x      |
|       0,2,4     0,1,2 1,2,4     0,1,3 1,2,4     0,2,3 1,2,4     1,2,3 1,2,4 |
|     ------------------------------------------------------------------------|
|                                         2                                   |
|     + 2x     x      + 6x     x      - 6x      + 3x     x      -             |
|         0,1,4 1,2,4     0,2,4 1,2,4     1,2,4     0,1,2 0,3,4               |
|     ------------------------------------------------------------------------|
|                                                                             |
|     6x     x      - 5x     x      - 4x     x      + 6x     x      +         |
|       0,1,3 0,3,4     0,2,3 0,3,4     1,2,3 0,3,4     0,1,4 0,3,4           |
|     ------------------------------------------------------------------------|
|                                       2                                     |
|     3x     x      - 4x     x      - 3x      - x     x      - 5x     x      -|
|       0,2,4 0,3,4     1,2,4 0,3,4     0,3,4    0,1,2 1,3,4     0,1,3 1,3,4  |
|     ------------------------------------------------------------------------|
|                                                                             |
|     3x     x      + 6x     x      - 4x     x      + 5x     x      -         |
|       0,2,3 1,3,4     1,2,3 1,3,4     0,1,4 1,3,4     0,2,4 1,3,4           |
|     ------------------------------------------------------------------------|
|                                       2                                     |
|     2x     x      + 5x     x      + 4x      + 3x     x      + 5x     x      |
|       1,2,4 1,3,4     0,3,4 1,3,4     1,3,4     0,1,2 2,3,4     0,1,3 2,3,4 |
|     ------------------------------------------------------------------------|
|                                                                             |
|     + 6x     x      + 2x     x      + 3x     x      - 6x     x      +       |
|         0,2,3 2,3,4     1,2,3 2,3,4     0,1,4 2,3,4     0,2,4 2,3,4         |
|     ------------------------------------------------------------------------|
|                                       2                                     |
|     4x     x      + 3x     x      - 2x                                      |
|       1,2,4 2,3,4     1,3,4 2,3,4     2,3,4                                 |
|                                                                             |
|o4 : P9                                                                      |
+-----------------------------------------------------------------------------+
|i5 : dualize F                                                               |
|                                                                             |
|         2                   2                   2                           |
|o5 = - 2x    - 3x   x    + 4x    - 5x   x    - 3x    + 4x   x    + 2x   x    |
|         0,1     0,1 0,2     0,2     0,2 1,2     1,2     0,1 0,3     0,2 0,3 |
|     ------------------------------------------------------------------------|
|                     2                                                       |
|     - 4x   x    - 6x    + 6x   x    + 5x   x    - 3x   x    - 6x   x    +   |
|         1,2 0,3     0,3     0,1 1,3     0,2 1,3     1,2 1,3     0,3 1,3     |
|     ------------------------------------------------------------------------|
|       2                                                       2             |
|     5x    + 3x   x    + 4x   x    + 6x   x    + 2x   x    + 6x    -         |
|       1,3     0,1 2,3     0,2 2,3     1,2 2,3     0,3 2,3     2,3           |
|     ------------------------------------------------------------------------|
|                                                                             |
|     2x   x    + 6x   x    + 4x   x    - 6x   x    - 6x   x    - 3x   x    - |
|       0,1 0,4     0,2 0,4     1,2 0,4     0,3 0,4     1,3 0,4     2,3 0,4   |
|     ------------------------------------------------------------------------|
|       2                                                                     |
|     4x    + 6x   x    + 3x   x    - 5x   x    + 6x   x    - 3x   x    +     |
|       0,4     0,1 1,4     0,2 1,4     1,2 1,4     0,3 1,4     1,3 1,4       |
|     ------------------------------------------------------------------------|
|                               2                                             |
|     6x   x    - 3x   x    + 2x    - 5x   x    - 5x   x    + 6x   x    -     |
|       2,3 1,4     0,4 1,4     1,4     0,1 2,4     0,2 2,4     1,2 2,4       |
|     ------------------------------------------------------------------------|
|                                                                   2         |
|     5x   x    - 2x   x    + 5x   x    - 5x   x    + 2x   x    - 6x    +     |
|       0,3 2,4     1,3 2,4     2,3 2,4     0,4 2,4     1,4 2,4     2,4       |
|     ------------------------------------------------------------------------|
|                                                                             |
|     3x   x    + x   x    + 3x   x    - 3x   x    + 5x   x    - 6x   x    -  |
|       0,1 3,4    0,2 3,4     1,2 3,4     0,3 3,4     1,3 3,4     2,3 3,4    |
|     ------------------------------------------------------------------------|
|                                          2                                  |
|     3x   x    + x   x    + 5x   x    - 2x                                   |
|       0,4 3,4    1,4 3,4     2,4 3,4     3,4                                |
|                                                                             |
|     ZZ                                                                      |
|o5 : --[x   ..x   , x   , x   , x   , x   , x   , x   , x   , x   ]          |
|     13  0,1   0,2   1,2   0,3   1,3   2,3   0,4   1,4   2,4   3,4           |
+-----------------------------------------------------------------------------+
|i6 : F == dualize dualize F                                                  |
|                                                                             |
|o6 = true                                                                    |
+-----------------------------------------------------------------------------+

Ways to use dualize:
====================

  * "dualize(Ideal)"
  * "dualize(Matrix)"
  * "dualize(Ring)"
  * "dualize(RingElement)"
  * "dualize(RingMap)"
  * "dualize(VisibleList)"

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

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

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

The source of this document is in Resultants.m2:1141:0.

dualVariety -- projective dual variety
**************************************

  * Usage:
        dualVariety I
  * Inputs:
      * I, an ideal (Macaulay2Doc), a homogeneous ideal defining a
        projective variety $X=V(I)\subset\mathbb{P}^n$
  * Optional inputs (Macaulay2Doc),:
      * AssumeOrdinary, => ..., default value false,
        whether the expected codimension is 1
      * SingularLocus, => ..., default value null, pass
        the singular locus of the variety
      * Strategy,
        => ..., default value null,
  * Outputs:
      * the ideal (Macaulay2Doc), of the projective dual variety
        $X^{*}\subset{\mathbb{P}^n}^{*}$

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

This can be considered a shortcut for dualize tangentialChowForm(I,dim I -1).

Note that in characteristic 0 (or sufficiently large characteristic), the
reflexivity theorem implies that if I' == dualVariety I then dualVariety I' ==
I. Below, we verify the reflexivity theorem for the Veronese surface.

+-----------------------------------------------------------------------------+
|i1 : V = kernel veronese(2,2)                                                |
|                                                                             |
|             2                                    2                       2  |
|o1 = ideal (x  - x x , x x  - x x , x x  - x x , x  - x x , x x  - x x , x  -|
|             4    3 5   2 4    1 5   2 3    1 4   2    0 5   1 2    0 4   1  |
|     ------------------------------------------------------------------------|
|     x x )                                                                   |
|      0 3                                                                    |
|                                                                             |
|o1 : Ideal of QQ[x ..x ]                                                     |
|                  0   5                                                      |
+-----------------------------------------------------------------------------+
|i2 : time V' = dualVariety V                                                 |
| -- used 0.19593s (cpu); 0.145957s (thread); 0s (gc)                         |
|                                                                             |
|            2                 2    2                                         |
|o2 = ideal(x x  - x x x  + x x  + x x  - 4x x x )                            |
|            2 3    1 2 4    0 4    1 5     0 3 5                             |
|                                                                             |
|o2 : Ideal of QQ[x ..x ]                                                     |
|                  0   5                                                      |
+-----------------------------------------------------------------------------+
|i3 : time V == dualVariety V'                                                |
| -- used 0.290712s (cpu); 0.199236s (thread); 0s (gc)                        |
|                                                                             |
|o3 = true                                                                    |
+-----------------------------------------------------------------------------+

In the next example, we verify that the discriminant of a generic ternary cubic
form coincides with the dual variety of the 3-th Veronese embedding of the
plane, which is a hypersurface of degree 12 in $\mathbb{P}^9$

+-----------------------------------------------------------------------------+
|i4 : F = first genericPolynomials({3,-1,-1},ZZ/3331)                         |
|                                                                             |
|        3      2          2      3      2                   2          2     |
|o4 = a x  + a x x  + a x x  + a x  + a x x  + a x x x  + a x x  + a x x  +   |
|      0 0    1 0 1    3 0 1    6 1    2 0 2    4 0 1 2    7 1 2    5 0 2     |
|     ------------------------------------------------------------------------|
|          2      3                                                           |
|     a x x  + a x                                                            |
|      8 1 2    9 2                                                           |
|                                                                             |
|      ZZ                                                                     |
|o4 : ----[a ..a ][x ..x ]                                                    |
|     3331  0   9   0   2                                                     |
+-----------------------------------------------------------------------------+
|i5 : time discF = ideal discriminant F;                                      |
| -- used 0.142121s (cpu); 0.093674s (thread); 0s (gc)                        |
|                                                                             |
|               ZZ                                                            |
|o5 : Ideal of ----[a ..a ]                                                   |
|              3331  0   9                                                    |
+-----------------------------------------------------------------------------+
|i6 : time Z = dualVariety(veronese(2,3,ZZ/3331),AssumeOrdinary=>true);       |
| -- used 0.937285s (cpu); 0.840503s (thread); 0s (gc)                        |
|                                                                             |
|               ZZ                                                            |
|o6 : Ideal of ----[x ..x ]                                                   |
|              3331  0   9                                                    |
+-----------------------------------------------------------------------------+
|i7 : discF == sub(Z,vars ring discF) and Z == sub(discF,vars ring Z)         |
|                                                                             |
|o7 = true                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * conormalVariety -- conormal variety
  * discriminant(RingElement) (missing documentation)

Ways to use dualVariety:
========================

  * "dualVariety(Ideal)"
  * "dualVariety(RingMap)"

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

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

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

The source of this document is in Resultants.m2:1244:0.

fromPluckerToStiefel -- convert from Plücker coordinates to Stiefel coordinates
*******************************************************************************

  * Usage:
        fromPluckerToStiefel f
  * Inputs:
      * f, a ring element (Macaulay2Doc),  or a
        matrix (Macaulay2Doc), or an ideal (Macaulay2Doc),
        in the coordinate ring of a Grassmannian $\mathbb{G}(k,n)$
  * Optional inputs (Macaulay2Doc),:
      * AffineChartGrass, => ..., default value false,
        use an affine chart on the Grassmannian
      * Variable, => ...,
        default value null, specify a name for a variable
  * Outputs:
      * the representation of f in the Stiefel coordinates of $\mathbb{G}(k,n)$
        (or in the affine coordinates if an affine chart is given with
        AffineChartGrass)

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

This method can be used to compute the $X$-resultant of a projective variety.
Here, we compute the $X$-resultant of the twisted cubic curve.

+-----------------------------------------------------------------------------+
|i1 : C = kernel veronese(1,3)                                                |
|                                                                             |
|             2                       2                                       |
|o1 = ideal (x  - x x , x x  - x x , x  - x x )                               |
|             2    1 3   1 2    0 3   1    0 2                                |
|                                                                             |
|o1 : Ideal of QQ[x ..x ]                                                     |
|                  0   3                                                      |
+-----------------------------------------------------------------------------+
|i2 : time fromPluckerToStiefel dualize chowForm C                            |
| -- used 0.124528s (cpu); 0.073927s (thread); 0s (gc)                        |
|                                                                             |
|        3   3          2   2              2       2          2   3           |
|o2 = - x   x    + x   x   x   x    - x   x   x   x    + x   x   x    -       |
|        0,3 1,0    0,2 0,3 1,0 1,1    0,1 0,3 1,0 1,1    0,0 0,3 1,1         |
|     ------------------------------------------------------------------------|
|      2       2               2   2                                          |
|     x   x   x   x    + 2x   x   x   x    + x   x   x   x   x   x    -       |
|      0,2 0,3 1,0 1,2     0,1 0,3 1,0 1,2    0,1 0,2 0,3 1,0 1,1 1,2         |
|     ------------------------------------------------------------------------|
|           2                              2          2           2           |
|     3x   x   x   x   x    - x   x   x   x   x    - x   x   x   x    +       |
|       0,0 0,3 1,0 1,1 1,2    0,0 0,2 0,3 1,1 1,2    0,1 0,3 1,0 1,2         |
|     ------------------------------------------------------------------------|
|                       2                      2      2       3               |
|     2x   x   x   x   x    + x   x   x   x   x    - x   x   x    +           |
|       0,0 0,2 0,3 1,0 1,2    0,0 0,1 0,3 1,1 1,2    0,0 0,3 1,2             |
|     ------------------------------------------------------------------------|
|      3   2                       2               2   2                      |
|     x   x   x    - 3x   x   x   x   x    + 3x   x   x   x    -              |
|      0,2 1,0 1,3     0,1 0,2 0,3 1,0 1,3     0,0 0,3 1,0 1,3                |
|     ------------------------------------------------------------------------|
|          2                   2                                              |
|     x   x   x   x   x    + 2x   x   x   x   x    + x   x   x   x   x   x    |
|      0,1 0,2 1,0 1,1 1,3     0,1 0,3 1,0 1,1 1,3    0,0 0,2 0,3 1,0 1,1 1,3 |
|     ------------------------------------------------------------------------|
|            2   2                       2          2                         |
|     + x   x   x   x    - 2x   x   x   x   x    + x   x   x   x   x    -     |
|        0,0 0,2 1,1 1,3     0,0 0,1 0,3 1,1 1,3    0,1 0,2 1,0 1,2 1,3       |
|     ------------------------------------------------------------------------|
|           2                                                                 |
|     2x   x   x   x   x    - x   x   x   x   x   x    -                      |
|       0,0 0,2 1,0 1,2 1,3    0,0 0,1 0,3 1,0 1,2 1,3                        |
|     ------------------------------------------------------------------------|
|                                  2                      2       2           |
|     x   x   x   x   x   x    + 3x   x   x   x   x    + x   x   x   x    -   |
|      0,0 0,1 0,2 1,1 1,2 1,3     0,0 0,3 1,1 1,2 1,3    0,0 0,2 1,2 1,3     |
|     ------------------------------------------------------------------------|
|      3       2                       2       2           2                  |
|     x   x   x    + 3x   x   x   x   x    - 3x   x   x   x    +              |
|      0,1 1,0 1,3     0,0 0,1 0,2 1,0 1,3     0,0 0,3 1,0 1,3                |
|     ------------------------------------------------------------------------|
|          2       2       2           2      2           2      3   3        |
|     x   x   x   x    - 2x   x   x   x    - x   x   x   x    + x   x         |
|      0,0 0,1 1,1 1,3     0,0 0,2 1,1 1,3    0,0 0,1 1,2 1,3    0,0 1,3      |
|                                                                             |
|o2 : QQ[x   ..x   ]                                                          |
|         0,0   1,3                                                           |
+-----------------------------------------------------------------------------+
|i3 : time fromPluckerToStiefel(dualize chowForm C,AffineChartGrass=>{0,1})   |
| -- used 0.200366s (cpu); 0.0955764s (thread); 0s (gc)                       |
|                                                                             |
|            3          2                         2                           |
|o3 = - x   x    + x   x   x    - x   x   x    + x   x    + 3x   x   x    -   |
|        0,3 1,2    0,2 1,2 1,3    0,2 0,3 1,2    0,2 1,3     0,3 1,2 1,3     |
|     ------------------------------------------------------------------------|
|           2      3      2                                                   |
|     2x   x    + x    + x                                                    |
|       0,2 1,3    1,3    0,3                                                 |
|                                                                             |
|o3 : QQ[x   ..x   ]                                                          |
|         0,2   1,3                                                           |
+-----------------------------------------------------------------------------+
|i4 : fromPluckerToStiefel(dualize chowForm C,AffineChartGrass=>{2,3},Variable|
|                                                                             |
|        3              2          3                       2                  |
|o4 = - a   a    + a   a   a    + a    + 3a   a   a    - 2a   a    -          |
|        0,1 1,0    0,0 0,1 1,1    0,0     0,0 0,1 1,0     0,0 1,1            |
|     ------------------------------------------------------------------------|
|                         2      2                                            |
|     a   a   a    + a   a    + a                                             |
|      0,1 1,0 1,1    0,0 1,1    1,0                                          |
|                                                                             |
|o4 : QQ[a   ..a   ]                                                          |
|         0,0   1,1                                                           |
|-----------------------------------------------------------------------------|
|=>a)                                                                         |
+-----------------------------------------------------------------------------+

As another application, we check that the singular locus of the Chow form of
the twisted cubic has dimension 2 (on each standard chart).

+-----------------------------------------------------------------------------+
|i5 : w = chowForm C;                                                         |
+-----------------------------------------------------------------------------+
|i6 : time U = apply(subsets(4,2),s->ideal fromPluckerToStiefel(w,AffineChartG|
| -- used 0.024596s (cpu); 0.024596s (thread); 0s (gc)                        |
|                                                                             |
|                   3          2          3                       2           |
|o6 = {ideal(- x   x    + x   x   x    - x    - 3x   x   x    + 2x   x    +   |
|               0,3 1,2    0,2 1,2 1,3    0,2     0,2 0,3 1,2     0,2 1,3     |
|     ------------------------------------------------------------------------|
|                         2      2            2   3               2           |
|     x   x   x    - x   x    + x   ), ideal(x   x    - 2x   x   x   x    +   |
|      0,3 1,2 1,3    0,2 1,3    0,3          0,3 1,1     0,1 0,3 1,1 1,3     |
|     ------------------------------------------------------------------------|
|      2       2      3                      2                                |
|     x   x   x    + x    + 3x   x   x    - x   x    + x   x   x    - x   ),  |
|      0,1 1,1 1,3    0,1     0,1 0,3 1,1    0,1 1,3    0,3 1,1 1,3    0,3    |
|     ------------------------------------------------------------------------|
|            2   2                         2              2                   |
|     ideal(x   x    - x   x   x   x    - x   x    - x   x    - 2x   x    -   |
|            0,3 1,0    0,0 0,3 1,0 1,3    0,0 0,3    1,0 1,3     0,3 1,0     |
|     ------------------------------------------------------------------------|
|                             3   3           2   2           2           2   |
|     x   x    + 1), ideal(- x   x    + 3x   x   x   x    - 3x   x   x   x    |
|      0,0 1,3                0,2 1,1     0,1 0,2 1,1 1,2     0,1 0,2 1,1 1,2 |
|     ------------------------------------------------------------------------|
|        3   3       2   2                         2   2      2               |
|     + x   x    + 2x   x    - x   x   x   x    - x   x    + x   x    +       |
|        0,1 1,2     0,2 1,1    0,1 0,2 1,1 1,2    0,1 1,2    0,1 1,1         |
|     ------------------------------------------------------------------------|
|          2                       3   2           2              2       2   |
|     x   x    - x   x   ), ideal(x   x    - 2x   x   x   x    + x   x   x    |
|      0,2 1,2    0,2 1,1          0,2 1,0     0,0 0,2 1,0 1,2    0,0 0,2 1,2 |
|     ------------------------------------------------------------------------|
|                                           2      3                          |
|     + x   x   x    + 3x   x   x    - x   x    + x    - x   ), ideal(-       |
|        0,0 0,2 1,0     0,2 1,0 1,2    0,0 1,2    1,2    1,0                 |
|     ------------------------------------------------------------------------|
|      3              2                         2                             |
|     x   x    + x   x   x    + x   x   x    - x   x    - 3x   x   x    +     |
|      0,1 1,0    0,0 0,1 1,1    0,0 0,1 1,0    0,0 1,1     0,1 1,0 1,1       |
|     ------------------------------------------------------------------------|
|           2      3      2                                                   |
|     2x   x    - x    + x   )}                                               |
|       0,0 1,1    1,1    1,0                                                 |
|                                                                             |
|o6 : List                                                                    |
|-----------------------------------------------------------------------------|
|rass=>s))                                                                    |
+-----------------------------------------------------------------------------+
|i7 : time apply(U,u->dim singularLocus u)                                    |
| -- used 0.111944s (cpu); 0.0650154s (thread); 0s (gc)                       |
|                                                                             |
|o7 = {2, 2, 2, 2, 2, 2}                                                      |
|                                                                             |
|o7 : List                                                                    |
+-----------------------------------------------------------------------------+

Ways to use fromPluckerToStiefel:
=================================

  * "fromPluckerToStiefel(Ideal)"
  * "fromPluckerToStiefel(Matrix)"
  * "fromPluckerToStiefel(RingElement)"

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

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

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

The source of this document is in Resultants.m2:1161:0.

genericPolynomials -- generic homogeneous polynomials
*****************************************************

  * Usage:
        genericPolynomials(d,K)
        genericPolynomials d
  * Inputs:
      * d, a list (Macaulay2Doc), n+1 integers d_0,...,d_n
      * K, a ring (Macaulay2Doc), optional, with default value
        QQ (Macaulay2Doc),
  * Outputs:
      * a list (Macaulay2Doc), n+1 generic homogeneous polynomials
        of degrees d_0,...,d_n in the ring
        K[a_0,a_1,...,b_0,b_1,...][x_0,...,x_n]

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

This is an auxiliary method to build tests and examples. For instance, the two
following codes have to produce the same polynomial up to a renaming of
variables: 1) resultant genericPolynomials((n+1):d,K) and 2)
fromPluckerToStiefel dualize chowForm veronese(n,d,K).

+-----------------------------------------------------------------------------+
|i1 : genericPolynomials {1,2,3}                                              |
|                                                                             |
|                             2               2                        2     3|
|o1 = {a x  + a x  + a x , b x  + b x x  + b x  + b x x  + b x x  + b x , c x |
|       0 0    1 1    2 2   0 0    1 0 1    3 1    2 0 2    4 1 2    5 2   0 0|
|     ------------------------------------------------------------------------|
|          2          2      3      2                   2          2        2 |
|     + c x x  + c x x  + c x  + c x x  + c x x x  + c x x  + c x x  + c x x  |
|        1 0 1    3 0 1    6 1    2 0 2    4 0 1 2    7 1 2    5 0 2    8 1 2 |
|     ------------------------------------------------------------------------|
|          3                                                                  |
|     + c x }                                                                 |
|        9 2                                                                  |
|                                                                             |
|o1 : List                                                                    |
+-----------------------------------------------------------------------------+
|i2 : first genericPolynomials({4,2,3},ZZ/101)                                |
|                                                                             |
|        4      3        2 2        3       4      3        2            2    |
|o2 = a x  + a x x  + a x x  + a x x  + a  x  + a x x  + a x x x  + a x x x  +|
|      0 0    1 0 1    3 0 1    6 0 1    10 1    2 0 2    4 0 1 2    7 0 1 2  |
|     ------------------------------------------------------------------------|
|         3        2 2          2       2 2        3         3       4        |
|     a  x x  + a x x  + a x x x  + a  x x  + a x x  + a  x x  + a  x         |
|      11 1 2    5 0 2    8 0 1 2    12 1 2    9 0 2    13 1 2    14 2        |
|                                                                             |
|      ZZ                                                                     |
|o2 : ---[a ..a  , b ..b , c ..c ][x ..x ]                                    |
|     101  0   14   0   5   0   9   0   2                                     |
+-----------------------------------------------------------------------------+
|i3 : first genericPolynomials({4,-1,-1},ZZ/101)                              |
|                                                                             |
|        4      3        2 2        3       4      3        2            2    |
|o3 = a x  + a x x  + a x x  + a x x  + a  x  + a x x  + a x x x  + a x x x  +|
|      0 0    1 0 1    3 0 1    6 0 1    10 1    2 0 2    4 0 1 2    7 0 1 2  |
|     ------------------------------------------------------------------------|
|         3        2 2          2       2 2        3         3       4        |
|     a  x x  + a x x  + a x x x  + a  x x  + a x x  + a  x x  + a  x         |
|      11 1 2    5 0 2    8 0 1 2    12 1 2    9 0 2    13 1 2    14 2        |
|                                                                             |
|      ZZ                                                                     |
|o3 : ---[a ..a  ][x ..x ]                                                    |
|     101  0   14   0   2                                                     |
+-----------------------------------------------------------------------------+

See also
========

  * veronese -- Veronese embedding

Ways to use genericPolynomials:
===============================

  * "genericPolynomials(List)"
  * "genericPolynomials(VisibleList,Ring)"

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

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

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

The source of this document is in Resultants.m2:966:0.

Grass -- coordinate ring of a Grassmannian
******************************************

  * Usage:
        Grass(k,n)
        Grass(k,n,K)
  * Inputs:
      * k, an integer (Macaulay2Doc),
      * n, an integer (Macaulay2Doc),
      * K, a ring (Macaulay2Doc), optional with default value
        QQ (Macaulay2Doc), the coefficient ring to be used
  * Optional inputs (Macaulay2Doc),:
      * Variable, => ...,
        default value "p", specify a name for a variable
  * Outputs:
      * a quotient ring (Macaulay2Doc), the coordinate ring
        of the Grassmannian variety of all projective $k$-planes in
        $\mathbb{P}^n$

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

This method calls the method Grassmannian (Macaulay2Doc),
and Grass(k,n,K,Variable=>p) can be considered equivalent to quotient
Grassmannian(k,n,Variable=>p,CoefficientRing=>K). However, the method Grass
creates no more than an instance of ring for a given tuple (k,n,K,p).

+---------------------------+
|i1 : R = Grass(2,4,ZZ/11)  |
|                           |
|o1 = R                     |
|                           |
|o1 : QuotientRing          |
+---------------------------+
|i2 : R === Grass(2,4,ZZ/11)|
|                           |
|o2 = true                  |
+---------------------------+

In order to facilitate comparisons, the outputs of the methods chowForm,
see hurwitzForm, tangentialChowForm,
see chowEquations, and dualize,
always lie in these rings.

+-----------------------------------------------------------------------------+
|i3 : L = trim ideal(random(1,Grass(0,3,ZZ/11,Variable=>x)),random(1,Grass(0,3|
|                                                                             |
|o3 = ideal (x  + 2x , x  - x  + 2x )                                         |
|             1     3   0    2     3                                          |
|                                                                             |
|              ZZ                                                             |
|o3 : Ideal of --[x ..x ]                                                     |
|              11  0   3                                                      |
|-----------------------------------------------------------------------------|
|,ZZ/11,Variable=>x)))                                                        |
+-----------------------------------------------------------------------------+
|i4 : w = chowForm L                                                          |
|                                                                             |
|o4 = x    + x    + 2x    - 2x    - 2x                                        |
|      0,1    1,2     0,3     1,3     2,3                                     |
|                                                                             |
|     ZZ                                                                      |
|     --[x   ..x   , x   , x   , x   , x   ]                                  |
|     11  0,1   0,2   1,2   0,3   1,3   2,3                                   |
|o4 : --------------------------------------                                  |
|         x   x    - x   x    + x   x                                         |
|          1,2 0,3    0,2 1,3    0,1 2,3                                      |
+-----------------------------------------------------------------------------+
|i5 : ring w === Grass(1,3,ZZ/11,Variable=>x)                                 |
|                                                                             |
|o5 = true                                                                    |
+-----------------------------------------------------------------------------+
|i6 : L' = chowEquations w                                                    |
|                                                                             |
|o6 = ideal (x  + 2x , x  - x  + 2x )                                         |
|             1     3   0    2     3                                          |
|                                                                             |
|              ZZ                                                             |
|o6 : Ideal of --[x ..x ]                                                     |
|              11  0   3                                                      |
+-----------------------------------------------------------------------------+
|i7 : ring L' === Grass(0,3,ZZ/11,Variable=>x)                                |
|                                                                             |
|o7 = true                                                                    |
+-----------------------------------------------------------------------------+
|i8 : L''= chowEquations(w,Variable=>y)                                       |
|                                                                             |
|o8 = ideal (y  + 2y , y  - y  + 2y )                                         |
|             1     3   0    2     3                                          |
|                                                                             |
|              ZZ                                                             |
|o8 : Ideal of --[y ..y ]                                                     |
|              11  0   3                                                      |
+-----------------------------------------------------------------------------+
|i9 : ring L'' === Grass(0,3,ZZ/11,Variable=>y)                               |
|                                                                             |
|o9 = true                                                                    |
+-----------------------------------------------------------------------------+

Ways to use Grass:
==================

  * "Grass(ZZ,ZZ)"
  * "Grass(ZZ,ZZ,Ring)"

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

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

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

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

Grass(...,Variable=>...) -- specify a name for a variable
*********************************************************

  * Usage:
        Variable => x

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

This is an option used to specify a symbol to be used as a name for the
generator of the coordinate ring of the Grassmannian Grass, or
some other ring.

See also
========

  * Grass -- coordinate ring of a Grassmannian

Functions with optional argument named Variable:
================================================

  * "GF(...,Variable=>...)" -- see GF (Macaulay2Doc), -- make a finite
    field
  * "cayleyTrick(...,Variable=>...)"
  * "chowEquations(...,Variable=>...)"
  * "chowForm(...,Variable=>...)"
  * "conormalVariety(...,Variable=>...)"
  * "fromPluckerToStiefel(...,Variable=>...)"
  * Grass(...,Variable=>...),
    -- specify a name for a variable
  * "hurwitzForm(...,Variable=>...)"
  * "plucker(...,Variable=>...)"
  * "tangentialChowForm(...,Variable=>...)"
  * "veronese(...,Variable=>...)"
  * "Grassmannian(...,Variable=>...)" -- see Grassmannian (Macaulay2Doc),
    -- compute the ideal of the Grassmannian of
    linear subspaces of a vector space
  * normalCone(Ideal,RingElement,Variable=>...) (missing documentation)
  * normalCone(Ideal,Variable=>...) (missing documentation)
  * "Schubert(...,Variable=>...)" -- see Schubert (Macaulay2Doc),
    -- compute the Plücker ideal of a Schubert variety

Further information
===================

  * Default value: p
  * Function: Grass, -- coordinate ring of a Grassmannian
  * Option key: Variable (Macaulay2Doc), -- an optional argument
-------------------------------------------------------------------------------

The source of this document is in Resultants.m2:1194:0.

hurwitzForm -- Hurwitz form of a projective variety
***************************************************

  * Usage:
        hurwitzForm I
  * Inputs:
      * I, an ideal (Macaulay2Doc), a homogeneous ideal defining a
        non-linear projective variety $X=V(I)\subset\mathbb{P}^n$
  * Optional inputs (Macaulay2Doc),:
      * AffineChartGrass, => ..., default value true,
        use an affine chart on the Grassmannian
      * AffineChartProj, => ..., default value true, use
        an affine chart on the projective space
      * Duality, => ..., default value null, whether to use dual
        Plücker coordinates
      * SingularLocus, => ..., default value null, pass
        the singular locus of the variety
      * Variable, => ...,
        default value null, specify a name for a variable
  * Outputs:
      * a ring element (Macaulay2Doc), the Hurwitz form of
        $X$ in the coordinate ring of the Grassmannian
        $\mathbb{G}(n-dim(X),\mathbb{P}^n)$ in the Plücker embedding

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

This is the same as tangentialChowForm(I,1), see tangentialChowForm.

+-----------------------------------------------------------------------------+
|i1 : Q = ideal random(2,Grass(0,4))                                          |
|                                                                             |
|           9 2   9        7 2   3        7       3 2   7       7       6     |
|o1 = ideal(-p  + -p p  + --p  + -p p  + --p p  + -p  + -p p  + -p p  + -p p  |
|           2 0   4 0 1   10 1   4 0 2   10 1 2   7 2   4 0 3   3 1 3   7 2 3 |
|     ------------------------------------------------------------------------|
|       5 2   7                       2        3 2                            |
|     + -p  + -p p  + 7p p  + 6p p  + -p p  + --p )                           |
|       4 3   9 0 4     1 4     2 4   9 3 4   10 4                            |
|                                                                             |
|o1 : Ideal of QQ[p ..p ]                                                     |
|                  0   4                                                      |
+-----------------------------------------------------------------------------+
|i2 : time hurwitzForm Q                                                      |
| -- used 0.123305s (cpu); 0.0722101s (thread); 0s (gc)                       |
|                                                                             |
|              2                                 2                            |
|o2 = 11966535p    + 14645610p   p    + 11354175p    + 1666980p   p    +      |
|              0,1            0,1 0,2            0,2           0,1 1,2        |
|     ------------------------------------------------------------------------|
|                               2                                             |
|     4456620p   p    + 1127196p    + 54176850p   p    + 20326950p   p    +   |
|             0,2 1,2           1,2            0,1 0,3            0,2 0,3     |
|     ------------------------------------------------------------------------|
|              2                                                              |
|     30858975p    + 8890560p   p    + 2800980p   p    - 1375920p   p    +    |
|              0,3           0,1 1,3           0,2 1,3           1,2 1,3      |
|     ------------------------------------------------------------------------|
|                               2                                             |
|     4895100p   p    - 3087000p    + 1099980p   p    - 2721600p   p    -     |
|             0,3 1,3           1,3           0,1 2,3           0,2 2,3       |
|     ------------------------------------------------------------------------|
|                                                                  2          |
|     4445280p   p    + 1190700p   p    - 793800p   p    + 2235600p    +      |
|             1,2 2,3           0,3 2,3          1,3 2,3           2,3        |
|     ------------------------------------------------------------------------|
|                                                                       2     |
|     194481000p   p    + 169608600p   p    + 2028600p   p    + 7612640p    + |
|               0,1 0,4             0,2 0,4           0,3 0,4           0,4   |
|     ------------------------------------------------------------------------|
|                                                                             |
|     46551960p   p    + 67331880p   p    + 11113200p   p    -                |
|              0,1 1,4            0,2 1,4            1,2 1,4                  |
|     ------------------------------------------------------------------------|
|                                                                       2     |
|     41483400p   p    - 50873760p   p    - 13000680p   p    - 76458816p    - |
|              0,3 1,4            1,3 1,4            0,4 1,4            1,4   |
|     ------------------------------------------------------------------------|
|                                                                             |
|     11254320p   p    + 12171600p   p    - 5715360p   p    - 34398000p   p   |
|              0,1 2,4            0,2 2,4           1,2 2,4            0,3 2,4|
|     ------------------------------------------------------------------------|
|                                                                             |
|     - 62516160p   p    - 15724800p   p    - 13388760p   p    -              |
|                1,3 2,4            2,3 2,4            0,4 2,4                |
|     ------------------------------------------------------------------------|
|                                  2                                          |
|     132024816p   p    - 56337120p    + 70442400p   p    + 64033200p   p    +|
|               1,4 2,4            2,4            0,1 3,4            0,2 3,4  |
|     ------------------------------------------------------------------------|
|                                                                             |
|     69360480p   p    - 4939200p   p    - 53919600p   p    - 47023200p   p   |
|              1,2 3,4           0,3 3,4            1,3 3,4            2,3 3,4|
|     ------------------------------------------------------------------------|
|                                                                    2        |
|     + 2785160p   p    - 493920p   p    - 2600640p   p    + 2303000p         |
|               0,4 3,4          1,4 3,4           2,4 3,4           3,4      |
|                                                                             |
|                                                      QQ[p   ..p   , p   , p |
|                                                          0,1   0,2   1,2   0|
|o2 : ------------------------------------------------------------------------|
|     (p   p    - p   p    + p   p   , p   p    - p   p    + p   p   , p   p  |
|       2,3 1,4    1,3 2,4    1,2 3,4   2,3 0,4    0,3 2,4    0,2 3,4   1,3 0,|
|-----------------------------------------------------------------------------|
|  , p   , p   , p   , p   , p   , p   ]                                      |
|,3   1,3   2,3   0,4   1,4   2,4   3,4                                       |
|-----------------------------------------------------------------------------|
|  - p   p    + p   p   , p   p    - p   p    + p   p   , p   p    - p   p    |
|4    0,3 1,4    0,1 3,4   1,2 0,4    0,2 1,4    0,1 2,4   1,2 0,3    0,2 1,3 |
|-----------------------------------------------------------------------------|
|-----------                                                                  |
|+ p   p   )                                                                  |
|   0,1 2,3                                                                   |
+-----------------------------------------------------------------------------+

See also
========

  * tangentialChowForm -- higher Chow forms of a
    projective variety
  * chowForm -- Chow form of a projective variety

Ways to use hurwitzForm:
========================

  * "hurwitzForm(Ideal)"

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

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

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

The source of this document is in Resultants.m2:1067:0.

isCoisotropic -- whether a hypersurface of a Grassmannian is a tangential Chow form
***********************************************************************************

  * Usage:
        isCoisotropic w
  * Inputs:
      * w, a ring element (Macaulay2Doc),  representing a
        hypersurface of a Grassmannian
  * Optional inputs (Macaulay2Doc),:
      * AffineChartGrass, => ..., default value true,
        use an affine chart on the Grassmannian
  * Outputs:
      * a Boolean value (Macaulay2Doc), whether w is a
        tangential Chow form of some projective variety

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

The algorithm implemented is based on Proposition 3.12 in Chapter 4 of
Discriminants, Resultants, and Multidimensional Determinants (see
http://link.springer.com/book/10.1007%2F978-0-8176-4771-1 ), by Israel M.
Gelfand, Mikhail M. Kapranov and Andrei V. Zelevinsky.

+-----------------------------------------------------------------------------+
|i1 : -- first tangential Chow form of a random quadric in P^3                |
|     w = tangentialChowForm(ideal random(2,Grass(0,3)),1)                    |
|                                                                             |
|            2                              2                                 |
|o1 = 675675p    + 697410p   p    + 3132675p    + 61740p   p    +             |
|            0,1          0,1 0,2           0,2         0,1 1,2               |
|     ------------------------------------------------------------------------|
|                              2                                              |
|     1508220p   p    + 511756p    + 357210p   p    + 9327150p   p    +       |
|             0,2 1,2          1,2          0,1 0,3           0,2 0,3         |
|     ------------------------------------------------------------------------|
|            2                                                                |
|     351675p    - 173460p   p    + 4498200p   p    + 1572312p   p    +       |
|            0,3          0,1 1,3           0,2 1,3           1,2 1,3         |
|     ------------------------------------------------------------------------|
|                            2                                                |
|     106380p   p    + 63756p    - 2407860p   p    - 441000p   p    +         |
|            0,3 1,3         1,3           0,1 2,3          0,2 2,3           |
|     ------------------------------------------------------------------------|
|                                                                 2           |
|     246960p   p    - 1755000p   p    - 650160p   p    - 3402000p            |
|            1,2 2,3           0,3 2,3          1,3 2,3           2,3         |
|                                                                             |
|     QQ[p   ..p   , p   , p   , p   , p   ]                                  |
|         0,1   0,2   1,2   0,3   1,3   2,3                                   |
|o1 : --------------------------------------                                  |
|         p   p    - p   p    + p   p                                         |
|          1,2 0,3    0,2 1,3    0,1 2,3                                      |
+-----------------------------------------------------------------------------+
|i2 : time isCoisotropic w                                                    |
| -- used 0.00931326s (cpu); 0.00931306s (thread); 0s (gc)                    |
|                                                                             |
|o2 = true                                                                    |
+-----------------------------------------------------------------------------+
|i3 : -- random quadric in G(1,3)                                             |
|     w' = random(2,Grass(1,3))                                               |
|                                                                             |
|      3 2     3           7 2                 5           7 2     10         |
|o3 = --p    + -p   p    + -p    + 5p   p    + -p   p    + -p    + --p   p    |
|     10 0,1   7 0,1 0,2   8 0,2     0,1 1,2   6 0,2 1,2   2 1,2    9 0,1 0,3 |
|     ------------------------------------------------------------------------|
|                   5 2                  2           2           5            |
|     + 5p   p    + -p    + 10p   p    + -p   p    + -p   p    + -p   p    +  |
|         0,2 0,3   7 0,3      0,1 1,3   5 0,2 1,3   5 1,2 1,3   9 0,3 1,3    |
|     ------------------------------------------------------------------------|
|      1 2     3           5           6           5           4              |
|     --p    + -p   p    + -p   p    + -p   p    + -p   p    + -p   p    +    |
|     10 1,3   2 0,1 2,3   3 0,2 2,3   5 1,2 2,3   3 0,3 2,3   3 1,3 2,3      |
|     ------------------------------------------------------------------------|
|     3 2                                                                     |
|     -p                                                                      |
|     7 2,3                                                                   |
|                                                                             |
|     QQ[p   ..p   , p   , p   , p   , p   ]                                  |
|         0,1   0,2   1,2   0,3   1,3   2,3                                   |
|o3 : --------------------------------------                                  |
|         p   p    - p   p    + p   p                                         |
|          1,2 0,3    0,2 1,3    0,1 2,3                                      |
+-----------------------------------------------------------------------------+
|i4 : time isCoisotropic w'                                                   |
| -- used 0.00740559s (cpu); 0.007406s (thread); 0s (gc)                      |
|                                                                             |
|o4 = false                                                                   |
+-----------------------------------------------------------------------------+

Ways to use isCoisotropic:
==========================

  * "isCoisotropic(RingElement)"

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

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

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

The source of this document is in Resultants.m2:1278:0.

isInCoisotropic -- test membership in a coisotropic hypersurface
****************************************************************

  * Usage:
        isInCoisotropic(L,I)
  * Inputs:
      * L, an ideal (Macaulay2Doc), the ideal of a $k$-dimensional
        linear subspace $V(L)\subset\mathbb{P}^n$, which corresponds to a point
        $p_L\in\mathbb{G}(k,\mathbb{P}^n)$
      * I, an ideal (Macaulay2Doc), the ideal of a $d$-dimensional
        projective variety $X=V(I)\subset\mathbb{P}^n$
  * Optional inputs (Macaulay2Doc),:
      * Duality, => ..., default value null, whether to use dual
        Plücker coordinates
      * SingularLocus, => ..., default value null, pass
        the singular locus of the variety
  * Outputs:
      * a Boolean value (Macaulay2Doc), whether $p_L$ belongs to
        the $s$-th associated subvariety
        $Z_s(X)\subset\mathbb{G}(k,\mathbb{P}^n)$ with $s = k+d+1-n$

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

This is equivalent to isSubset(ideal tangentialChowForm(I,s),plucker L), but it
does not compute the tangential Chow form.

+-----------------------------------------------------------------------------+
|i1 : use Grass(0,5,ZZ/33331,Variable=>x)                                     |
|                                                                             |
|       ZZ                                                                    |
|o1 = -----[x ..x ]                                                           |
|     33331  0   5                                                            |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : I = minors(2,matrix {{x_0,x_1,x_3,x_4},{x_1,x_2,x_4,x_5}}) -- rational n|
|                                                                             |
|               2                                                             |
|o2 = ideal (- x  + x x , - x x  + x x , - x x  + x x , - x x  + x x , - x x  |
|               1    0 2     1 3    0 4     2 3    1 4     1 4    0 5     2 4 |
|     ------------------------------------------------------------------------|
|                2                                                            |
|     + x x , - x  + x x )                                                    |
|        1 5     4    3 5                                                     |
|                                                                             |
|                ZZ                                                           |
|o2 : Ideal of -----[x ..x ]                                                  |
|              33331  0   5                                                   |
|-----------------------------------------------------------------------------|
|ormal scroll surface                                                         |
+-----------------------------------------------------------------------------+
|i3 : L = ideal(x_1-12385*x_2-16397*x_3-7761*x_4+827*x_5,x_0+2162*x_2-8686*x_3|
|                                                                             |
|o3 = ideal (x  - 12385x  - 16397x  - 7761x  + 827x , x  + 2162x  - 8686x  +  |
|             1         2         3        4       5   0        2        3    |
|     ------------------------------------------------------------------------|
|     2380x  + 9482x )                                                        |
|          4        5                                                         |
|                                                                             |
|                ZZ                                                           |
|o3 : Ideal of -----[x ..x ]                                                  |
|              33331  0   5                                                   |
|-----------------------------------------------------------------------------|
|+2380*x_4+9482*x_5) -- linear 3-dimensional subspace                         |
+-----------------------------------------------------------------------------+
|i4 : time isInCoisotropic(L,I) -- whether L belongs to Z_1(V(I))             |
| -- used 0.0232506s (cpu); 0.0232453s (thread); 0s (gc)                      |
|                                                                             |
|o4 = true                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * tangentialChowForm -- higher Chow forms of a
    projective variety
  * plucker -- get the Plücker coordinates of a linear subspace

Ways to use isInCoisotropic:
============================

  * "isInCoisotropic(Ideal,Ideal)"

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

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

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

The source of this document is in Resultants.m2:1294:0.

macaulayFormula -- Macaulay formula for the resultant
*****************************************************

  * Usage:
        macaulayFormula F
  * Inputs:
      * F, a matrix (Macaulay2Doc), a row matrix whose entries
        are $n+1$ homogeneous polynomials $F_0,\ldots,F_n$ in $n+1$ variables
        (or a list (Macaulay2Doc), to be interpreted as such a
        matrix)
  * Outputs:
      * a pair of two square matrices $(D,D')$ such that the ratio of their
        determinants $det(D)/det(D')$ is the resultant of $F_0,\ldots,F_n$

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

This formula is stated in Theorem 4.9 of Using Algebraic Geometry (see
http://link.springer.com/book/10.1007%2Fb138611 ), by David A. Cox, John
Little, Donal O'shea.

+-----------------------------------------------------------------------------+
|i1 : F = genericPolynomials {2,2,3}                                          |
|                                                                             |
|         2               2                        2     2               2    |
|o1 = {a x  + a x x  + a x  + a x x  + a x x  + a x , b x  + b x x  + b x  +  |
|       0 0    1 0 1    3 1    2 0 2    4 1 2    5 2   0 0    1 0 1    3 1    |
|     ------------------------------------------------------------------------|
|                          2     3      2          2      3      2            |
|     b x x  + b x x  + b x , c x  + c x x  + c x x  + c x  + c x x  +        |
|      2 0 2    4 1 2    5 2   0 0    1 0 1    3 0 1    6 1    2 0 2          |
|     ------------------------------------------------------------------------|
|                   2          2        2      3                              |
|     c x x x  + c x x  + c x x  + c x x  + c x }                             |
|      4 0 1 2    7 1 2    5 0 2    8 1 2    9 2                              |
|                                                                             |
|o1 : List                                                                    |
+-----------------------------------------------------------------------------+
|i2 : time (D,D') = macaulayFormula F                                         |
| -- used 0.00428758s (cpu); 0.00428583s (thread); 0s (gc)                    |
|                                                                             |
|o2 = (| a_0 a_1 a_2 a_3 a_4 a_5 0   0   0   0   0   0   0   0   0   0   0    |
|      | 0   a_0 0   a_1 a_2 0   a_3 a_4 a_5 0   0   0   0   0   0   0   0    |
|      | 0   0   a_0 0   a_1 a_2 0   a_3 a_4 a_5 0   0   0   0   0   0   0    |
|      | 0   0   0   a_0 0   0   a_1 a_2 0   0   a_3 a_4 a_5 0   0   0   0    |
|      | 0   0   0   0   a_0 0   0   a_1 a_2 0   0   a_3 a_4 a_5 0   0   0    |
|      | 0   0   0   0   0   a_0 0   0   a_1 a_2 0   0   a_3 a_4 a_5 0   0    |
|      | 0   0   0   0   0   0   a_0 0   0   0   a_1 a_2 0   0   0   a_3 a_4  |
|      | 0   0   0   0   0   0   0   a_0 0   0   0   a_1 a_2 0   0   0   a_3  |
|      | 0   0   0   0   0   0   0   0   a_0 0   0   0   a_1 a_2 0   0   0    |
|      | 0   0   0   0   0   0   0   0   0   a_0 0   0   0   a_1 a_2 0   0    |
|      | 0   0   0   b_0 0   0   b_1 b_2 0   0   b_3 b_4 b_5 0   0   0   0    |
|      | 0   0   0   0   b_0 0   0   b_1 b_2 0   0   b_3 b_4 b_5 0   0   0    |
|      | 0   0   0   0   0   b_0 0   0   b_1 b_2 0   0   b_3 b_4 b_5 0   0    |
|      | 0   c_0 0   c_1 c_2 0   c_3 c_4 c_5 0   c_6 c_7 c_8 c_9 0   0   0    |
|      | 0   0   c_0 0   c_1 c_2 0   c_3 c_4 c_5 0   c_6 c_7 c_8 c_9 0   0    |
|      | 0   0   0   0   0   0   b_0 0   0   0   b_1 b_2 0   0   0   b_3 b_4  |
|      | 0   0   0   0   0   0   0   b_0 0   0   0   b_1 b_2 0   0   0   b_3  |
|      | 0   0   0   0   0   0   0   0   b_0 0   0   0   b_1 b_2 0   0   0    |
|      | 0   0   0   0   0   0   0   0   0   b_0 0   0   0   b_1 b_2 0   0    |
|      | 0   0   0   0   c_0 0   0   c_1 c_2 0   0   c_3 c_4 c_5 0   0   c_6  |
|      | 0   0   0   0   0   c_0 0   0   c_1 c_2 0   0   c_3 c_4 c_5 0   0    |
|     ------------------------------------------------------------------------|
|     0   0   0   0   |, | a_0 a_1 a_2 0   0   |)                             |
|     0   0   0   0   |  | 0   a_0 0   0   0   |                              |
|     0   0   0   0   |  | 0   0   a_0 0   a_5 |                              |
|     0   0   0   0   |  | 0   0   0   a_0 a_3 |                              |
|     0   0   0   0   |  | 0   0   0   b_0 b_3 |                              |
|     0   0   0   0   |                                                       |
|     a_5 0   0   0   |                                                       |
|     a_4 a_5 0   0   |                                                       |
|     a_3 a_4 a_5 0   |                                                       |
|     0   a_3 a_4 a_5 |                                                       |
|     0   0   0   0   |                                                       |
|     0   0   0   0   |                                                       |
|     0   0   0   0   |                                                       |
|     0   0   0   0   |                                                       |
|     0   0   0   0   |                                                       |
|     b_5 0   0   0   |                                                       |
|     b_4 b_5 0   0   |                                                       |
|     b_3 b_4 b_5 0   |                                                       |
|     0   b_3 b_4 b_5 |                                                       |
|     c_7 c_8 c_9 0   |                                                       |
|     c_6 c_7 c_8 c_9 |                                                       |
|                                                                             |
|o2 : Sequence                                                                |
+-----------------------------------------------------------------------------+
|i3 : F = {random(2,Grass(0,2)),random(2,Grass(0,2)),random(3,Grass(0,2))}    |
|                                                                             |
|      9 2   9       7 2   3       7        7 2   7 2   7       3 2           |
|o3 = {-p  + -p p  + -p  + -p p  + -p p  + --p , --p  + -p p  + -p  + 7p p  + |
|      2 0   4 0 1   4 1   4 0 2   9 1 2   10 2  10 0   3 0 1   7 1     0 2   |
|     ------------------------------------------------------------------------|
|     6         2  5 3   2 2     3   2      3    3 2               3 2        |
|     -p p  + 6p , -p  + -p p  + -p p  + 10p  + --p p  + 5p p p  + -p p  +    |
|     7 1 2     2  4 0   9 0 1   7 0 1      1   10 0 2     0 1 2   2 1 2      |
|     ------------------------------------------------------------------------|
|     10   2   7   2   5 3                                                    |
|     --p p  + -p p  + -p }                                                   |
|      9 0 2   8 1 2   6 2                                                    |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+
|i4 : time (D,D') = macaulayFormula F                                         |
| -- used 0.00292645s (cpu); 0.00292491s (thread); 0s (gc)                    |
|                                                                             |
|o4 = (| 9/2 9/4 3/4 7/4  7/9  7/10 0    0    0    0    0   0   0    0    0   |
|      | 0   9/2 0   9/4  3/4  0    7/4  7/9  7/10 0    0   0   0    0    0   |
|      | 0   0   9/2 0    9/4  3/4  0    7/4  7/9  7/10 0   0   0    0    0   |
|      | 0   0   0   9/2  0    0    9/4  3/4  0    0    7/4 7/9 7/10 0    0   |
|      | 0   0   0   0    9/2  0    0    9/4  3/4  0    0   7/4 7/9  7/10 0   |
|      | 0   0   0   0    0    9/2  0    0    9/4  3/4  0   0   7/4  7/9  7/10|
|      | 0   0   0   0    0    0    9/2  0    0    0    9/4 3/4 0    0    0   |
|      | 0   0   0   0    0    0    0    9/2  0    0    0   9/4 3/4  0    0   |
|      | 0   0   0   0    0    0    0    0    9/2  0    0   0   9/4  3/4  0   |
|      | 0   0   0   0    0    0    0    0    0    9/2  0   0   0    9/4  3/4 |
|      | 0   0   0   7/10 0    0    7/3  7    0    0    3/7 6/7 6    0    0   |
|      | 0   0   0   0    7/10 0    0    7/3  7    0    0   3/7 6/7  6    0   |
|      | 0   0   0   0    0    7/10 0    0    7/3  7    0   0   3/7  6/7  6   |
|      | 0   5/4 0   2/9  3/10 0    3/7  5    10/9 0    10  3/2 7/8  5/6  0   |
|      | 0   0   5/4 0    2/9  3/10 0    3/7  5    10/9 0   10  3/2  7/8  5/6 |
|      | 0   0   0   0    0    0    7/10 0    0    0    7/3 7   0    0    0   |
|      | 0   0   0   0    0    0    0    7/10 0    0    0   7/3 7    0    0   |
|      | 0   0   0   0    0    0    0    0    7/10 0    0   0   7/3  7    0   |
|      | 0   0   0   0    0    0    0    0    0    7/10 0   0   0    7/3  7   |
|      | 0   0   0   0    5/4  0    0    2/9  3/10 0    0   3/7 5    10/9 0   |
|      | 0   0   0   0    0    5/4  0    0    2/9  3/10 0   0   3/7  5    10/9|
|     ------------------------------------------------------------------------|
|     0   0   0    0    0    0    |, | 9/2 9/4 3/4 0    0    |)               |
|     0   0   0    0    0    0    |  | 0   9/2 0   0    0    |                |
|     0   0   0    0    0    0    |  | 0   0   9/2 0    7/10 |                |
|     0   0   0    0    0    0    |  | 0   0   0   9/2  7/4  |                |
|     0   0   0    0    0    0    |  | 0   0   0   7/10 3/7  |                |
|     0   0   0    0    0    0    |                                           |
|     7/4 7/9 7/10 0    0    0    |                                           |
|     0   7/4 7/9  7/10 0    0    |                                           |
|     0   0   7/4  7/9  7/10 0    |                                           |
|     0   0   0    7/4  7/9  7/10 |                                           |
|     0   0   0    0    0    0    |                                           |
|     0   0   0    0    0    0    |                                           |
|     0   0   0    0    0    0    |                                           |
|     0   0   0    0    0    0    |                                           |
|     0   0   0    0    0    0    |                                           |
|     3/7 6/7 6    0    0    0    |                                           |
|     0   3/7 6/7  6    0    0    |                                           |
|     0   0   3/7  6/7  6    0    |                                           |
|     0   0   0    3/7  6/7  6    |                                           |
|     0   10  3/2  7/8  5/6  0    |                                           |
|     0   0   10   3/2  7/8  5/6  |                                           |
|                                                                             |
|o4 : Sequence                                                                |
+-----------------------------------------------------------------------------+
|i5 : assert(det D == (resultant F) * (det D'))                               |
+-----------------------------------------------------------------------------+

See also
========

  * resultant(Matrix) (missing documentation)

Ways to use macaulayFormula:
============================

  * "macaulayFormula(List)"
  * "macaulayFormula(Matrix)"

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

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

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

The source of this document is in Resultants.m2:982:0.

plucker -- get the Plücker coordinates of a linear subspace
***********************************************************

  * Usage:
        plucker L
        plucker p
  * Inputs:
      * L, an ideal (Macaulay2Doc), the ideal of a $k$-dimensional
        linear subspace $V(L)\subset\mathbb{P}^n$
      * p, an ideal (Macaulay2Doc), the ideal of the corresponding
        point of V(L) in the Grassmannian $\mathbb{G}(k,\mathbb{P}^n)$
        (embedded via the Plücker embedding)
  * Optional inputs (Macaulay2Doc),:
      * AffineChartGrass, => ..., default value true,
        use an affine chart on the Grassmannian
      * Variable, => ...,
        default value null, specify a name for a variable
  * Outputs:
      * an ideal (Macaulay2Doc), p if the input is L, and L if the
        input is p

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

+-----------------------------------------------------------------------------+
|i1 : P4 = Grass(0,4,ZZ/33331,Variable=>x); G'1'4 =                           |
|-----------------------------------------------------------------------------|
|Grass(1,4,ZZ/33331,Variable=>x);                                             |
+-----------------------------------------------------------------------------+
|i3 : L = trim ideal apply(3,i->random(1,P4))  -- a line in P^4               |
|                                                                             |
|o3 = ideal (x  + 8480x  - 11656x , x  - 6727x  + 14853x , x  + 15777x  -     |
|             2        3         4   1        3         4   0         3       |
|     ------------------------------------------------------------------------|
|     664x )                                                                  |
|         4                                                                   |
|                                                                             |
|o3 : Ideal of P4                                                             |
+-----------------------------------------------------------------------------+
|i4 : time p = plucker L                                                      |
| -- used 0.00574347s (cpu); 0.00574116s (thread); 0s (gc)                    |
|                                                                             |
|o4 = ideal (x    + 8480x   , x    - 6727x   , x    + 15777x   , x    +       |
|             2,4        3,4   1,4        3,4   0,4         3,4   2,3         |
|     ------------------------------------------------------------------------|
|     11656x   , x    - 14853x   , x    + 664x   , x    + 13522x   , x    +   |
|           3,4   1,3         3,4   0,3       3,4   1,2         3,4   0,2     |
|     ------------------------------------------------------------------------|
|     11804x   , x    + 14854x   )                                            |
|           3,4   0,1         3,4                                             |
|                                                                             |
|o4 : Ideal of G'1'4                                                          |
+-----------------------------------------------------------------------------+
|i5 : time L' = plucker p                                                     |
| -- used 0.098913s (cpu); 0.0657585s (thread); 0s (gc)                       |
|                                                                             |
|o5 = ideal (x  + 8480x  - 11656x , x  - 6727x  + 14853x , x  + 15777x  -     |
|             2        3         4   1        3         4   0         3       |
|     ------------------------------------------------------------------------|
|     664x )                                                                  |
|         4                                                                   |
|                                                                             |
|o5 : Ideal of P4                                                             |
+-----------------------------------------------------------------------------+
|i6 : assert(L' == L)                                                         |
+-----------------------------------------------------------------------------+

More generally, if the input is the ideal of a subvariety
$Y\subset\mathbb{G}(k,\mathbb{P}^n)$, then the method returns the ideal of the
variety $W\subset\mathbb{P}^n$ swept out by the linear spaces corresponding to
points of $Y$. As an example, we now compute a surface scroll
$W\subset\mathbb{P}^4$ over an elliptic curve
$Y\subset\mathbb{G}(1,\mathbb{P}^4)$.

+----------------------------------------------------------------+
|i7 : Y = ideal apply(5,i->random(1,G'1'4)); -- an elliptic curve|
|                                                                |
|o7 : Ideal of G'1'4                                             |
+----------------------------------------------------------------+
|i8 : time W = plucker Y; -- surface swept out by the lines of Y |
| -- used 0.109677s (cpu); 0.0643414s (thread); 0s (gc)          |
|                                                                |
|o8 : Ideal of P4                                                |
+----------------------------------------------------------------+
|i9 : (codim W,degree W)                                         |
|                                                                |
|o9 = (2, 5)                                                     |
|                                                                |
|o9 : Sequence                                                   |
+----------------------------------------------------------------+

In this example, we can recover the subvariety
$Y\subset\mathbb{G}(k,\mathbb{P}^n)$ by computing the Fano variety of
$k$-planes contained in $W$.

+----------------------------------------------------------------+
|i10 : time Y' = plucker(W,1); -- variety of lines contained in W|
| -- used 0.192794s (cpu); 0.192797s (thread); 0s (gc)           |
|                                                                |
|o10 : Ideal of G'1'4                                            |
+----------------------------------------------------------------+
|i11 : assert(Y' == Y)                                           |
+----------------------------------------------------------------+

Warning: Notice that, by default, the computation is done on a randomly chosen
affine chart on the Grassmannian. To change this behavior, you can use the
AffineChartGrass, option.

Ways to use plucker:
====================

  * "plucker(Ideal)"
  * "plucker(Ideal,ZZ)"

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

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

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

The source of this document is in Resultants.m2:1322:0.

resultant(...,Algorithm=>...)
*****************************

  * Usage:
        Algorithm => "Poisson"/"Macaulay"/"Poisson2"/"Macaulay2"

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

This is an option that determines which algorithm will be used to compute the
resultant (Elimination).
There are currently four algorithms implemented:

"Poisson" (default) the resultant is computed, recursively, through the Poisson
Formula (see [1, Theorem 3.4]);

"Macaulay" the resultant is computed as a Macaulay resultant, i.e. as a ratio
of two determinants (see [1, Theorem 4.9]);

"Poisson2" and "Macaulay2" these are variants of the above ones using
interpolation of multivariate polynomials.

[1] David A. Cox, John Little, Donal O'shea - Using Algebraic Geometry (see
http://link.springer.com/book/10.1007%2Fb138611 ), Graduate Texts in
Mathematics, Volume 185 (2005).

+-----------------------------------------------------------------------------+
|i1 : R = QQ[a,b][x,y,z,w]                                                    |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : F = {(7/3)*x+(7/2)*y+z+2*w, ((10/7)*a+b)*x^2+(a+(5/4)*b)*x*y+(2*a+(1/2)*|
|                                                                             |
|      7    7             10       2        5              1   2    7         |
|o2 = {-x + -y + z + 2w, (--a + b)x  + (a + -b)x*y + (2a + -b)y  + (-a +      |
|      3    2              7                4              2        8         |
|     ------------------------------------------------------------------------|
|     7         3             7    1   2    5    4                         7  |
|     -b)x*z + (-a + b)y*z + (-a + -b)z  + (-a + -b)x*w + (9a + 10b)y*w + (-a |
|     5         4             8    7        7    3                         5  |
|     ------------------------------------------------------------------------|
|       3         4        2   1    7   3    1         2     8    3     2     |
|     + -b)z*w + (-a + 5b)w , (-a + -b)x  + (-a + 10b)x y + (-a + -b)x*y  + (a|
|       4         3            2    5        2               9    5           |
|     ------------------------------------------------------------------------|
|       7   3    3    3   2     1     9           9       2     1    1     2  |
|     + -b)y  + (-a + -b)x z + (-a + --b)x*y*z + (-a + b)y z + (-a + -b)x*z  +|
|       6        7    4         3    10           4             6    5        |
|     ------------------------------------------------------------------------|
|           5     2    5    3   3           2     4    5           5    5   2 |
|     (3a + -b)y*z  + (-a + -b)z  + (a + b)x w + (-a + -b)x*y*w + (-a + -b)y w|
|           2          3    7                     5    4           3    8     |
|     ------------------------------------------------------------------------|
|        3    1           1    4                1   2     7    5     2        |
|     + (-a + -b)x*z*w + (-a + -b)y*z*w + (9a + -b)z w + (-a + -b)x*w  + (a + |
|        2    6           3    5                3         3    4              |
|     ------------------------------------------------------------------------|
|     3     2    9    7     2    9        3       1    8    4                 |
|     -b)y*w  + (-a + -b)z*w  + (-a + 2b)w , 2x + -y + -z + -w}               |
|     4          8    8          7                4    3    5                 |
|                                                                             |
|o2 : List                                                                    |
|-----------------------------------------------------------------------------|
|b)*y^2+((7/8)*a+(7/5)*b)*x*z+((3/4)*a+b)*y*z+((7/8)*a+(1/7)*b)*z^2+((5/7)*a+(|
|-----------------------------------------------------------------------------|
|4/3)*b)*x*w+(9*a+10*b)*y*w+((7/5)*a+(3/4)*b)*z*w+((4/3)*a+5*b)*w^2,          |
|-----------------------------------------------------------------------------|
|((1/2)*a+(7/5)*b)*x^3+((1/2)*a+10*b)*x^2*y+((8/9)*a+(3/5)*b)*x*y^2+(a+(7/6)*b|
|-----------------------------------------------------------------------------|
|)*y^3+((3/7)*a+(3/4)*b)*x^2*z+((1/3)*a+(9/10)*b)*x*y*z+((9/4)*a+b)*y^2*z+((1/|
|-----------------------------------------------------------------------------|
|6)*a+(1/5)*b)*x*z^2+(3*a+(5/2)*b)*y*z^2+((5/3)*a+(3/7)*b)*z^3+(a+b)*x^2*w+((4|
|-----------------------------------------------------------------------------|
|/5)*a+(5/4)*b)*x*y*w+((5/3)*a+(5/8)*b)*y^2*w+((3/2)*a+(1/6)*b)*x*z*w+((1/3)*a|
|-----------------------------------------------------------------------------|
|+(4/5)*b)*y*z*w+(9*a+(1/3)*b)*z^2*w+((7/3)*a+(5/4)*b)*x*w^2+(a+(3/4)*b)*y*w^2|
|-----------------------------------------------------------------------------|
|+((9/8)*a+(7/8)*b)*z*w^2+((9/7)*a+2*b)*w^3, 2*x+(1/4)*y+(8/3)*z+(4/5)*w}     |
+-----------------------------------------------------------------------------+
|i3 : time resultant(F,Algorithm=>"Poisson2")                                 |
| -- used 0.462586s (cpu); 0.256251s (thread); 0s (gc)                        |
|                                                                             |
|       21002161660529014459938925799 5   2085933800619238998825958079203 4   |
|o3 = - -----------------------------a  - -------------------------------a b -|
|           2222549728809984000000            12700284164628480000000         |
|     ------------------------------------------------------------------------|
|     348237304382147063838108483692249 3 2                                   |
|     ---------------------------------a b  -                                 |
|          889019891523993600000000                                           |
|     ------------------------------------------------------------------------|
|     38379949248928909714532254698073 2 3                                    |
|     --------------------------------a b  -                                  |
|          35278567123968000000000                                            |
|     ------------------------------------------------------------------------|
|     1146977327343523453866040839029   4   194441910898734675845094443 5     |
|     -------------------------------a*b  - ---------------------------b      |
|          1119954511872000000000                895963609497600000           |
|                                                                             |
|o3 : QQ[a..b]                                                                |
+-----------------------------------------------------------------------------+
|i4 : time resultant(F,Algorithm=>"Macaulay2")                                |
| -- used 0.228352s (cpu); 0.12693s (thread); 0s (gc)                         |
|                                                                             |
|       21002161660529014459938925799 5   2085933800619238998825958079203 4   |
|o4 = - -----------------------------a  - -------------------------------a b -|
|           2222549728809984000000            12700284164628480000000         |
|     ------------------------------------------------------------------------|
|     348237304382147063838108483692249 3 2                                   |
|     ---------------------------------a b  -                                 |
|          889019891523993600000000                                           |
|     ------------------------------------------------------------------------|
|     38379949248928909714532254698073 2 3                                    |
|     --------------------------------a b  -                                  |
|          35278567123968000000000                                            |
|     ------------------------------------------------------------------------|
|     1146977327343523453866040839029   4   194441910898734675845094443 5     |
|     -------------------------------a*b  - ---------------------------b      |
|          1119954511872000000000                895963609497600000           |
|                                                                             |
|o4 : QQ[a..b]                                                                |
+-----------------------------------------------------------------------------+
|i5 : time resultant(F,Algorithm=>"Poisson")                                  |
| -- used 0.355495s (cpu); 0.3555s (thread); 0s (gc)                          |
|                                                                             |
|       21002161660529014459938925799 5   2085933800619238998825958079203 4   |
|o5 = - -----------------------------a  - -------------------------------a b -|
|           2222549728809984000000            12700284164628480000000         |
|     ------------------------------------------------------------------------|
|     348237304382147063838108483692249 3 2                                   |
|     ---------------------------------a b  -                                 |
|          889019891523993600000000                                           |
|     ------------------------------------------------------------------------|
|     38379949248928909714532254698073 2 3                                    |
|     --------------------------------a b  -                                  |
|          35278567123968000000000                                            |
|     ------------------------------------------------------------------------|
|     1146977327343523453866040839029   4   194441910898734675845094443 5     |
|     -------------------------------a*b  - ---------------------------b      |
|          1119954511872000000000                895963609497600000           |
|                                                                             |
|o5 : QQ[a..b]                                                                |
+-----------------------------------------------------------------------------+
|i6 : time resultant(F,Algorithm=>"Macaulay")                                 |
| -- used 0.741407s (cpu); 0.692822s (thread); 0s (gc)                        |
|                                                                             |
|       21002161660529014459938925799 5   2085933800619238998825958079203 4   |
|o6 = - -----------------------------a  - -------------------------------a b -|
|           2222549728809984000000            12700284164628480000000         |
|     ------------------------------------------------------------------------|
|     348237304382147063838108483692249 3 2                                   |
|     ---------------------------------a b  -                                 |
|          889019891523993600000000                                           |
|     ------------------------------------------------------------------------|
|     38379949248928909714532254698073 2 3                                    |
|     --------------------------------a b  -                                  |
|          35278567123968000000000                                            |
|     ------------------------------------------------------------------------|
|     1146977327343523453866040839029   4   194441910898734675845094443 5     |
|     -------------------------------a*b  - ---------------------------b      |
|          1119954511872000000000                895963609497600000           |
|                                                                             |
|o6 : QQ[a..b]                                                                |
+-----------------------------------------------------------------------------+
|i7 : assert(o3 == o4 and o4 == o5 and o5 == o6)                              |
+-----------------------------------------------------------------------------+

See also
========

  * discriminant(RingElement) (missing documentation)
  * resultant(Matrix) (missing documentation)

Functions with optional argument named Algorithm:
=================================================

  * "gb(...,Algorithm=>...)" -- see Gröbner basis algorithms (Macaulay2Doc),
  * "affineDiscriminant(...,Algorithm=>...)"
  * "affineResultant(...,Algorithm=>...)"
  * "discriminant(...,Algorithm=>...)"
  * resultant(...,Algorithm=>...)
  * "syz(...,Algorithm=>...)" -- see syz(Matrix) (Macaulay2Doc),
    -- compute the syzygy matrix

Further information
===================

  * Default value: null
  * Function: resultant (Elimination),
  * Option key: Algorithm (Macaulay2Doc), -- an optional
    argument
-------------------------------------------------------------------------------

The source of this document is in Resultants.m2:871:0.

resultant(Matrix) -- multipolynomial resultant
**********************************************

  * Function: resultant (Elimination),
  * Usage:
        resultant F
  * Inputs:
      * F, a matrix (Macaulay2Doc), a row matrix whose entries
        are $n+1$ homogeneous polynomials $F_0,\ldots,F_n$ in $n+1$ variables
        (or a list (Macaulay2Doc), to be interpreted as such a
        matrix)
  * Optional inputs (Macaulay2Doc),:
      * Algorithm, =>
        ..., default value null,
  * Outputs:
      * a ring element (Macaulay2Doc), the resultant of
        $F_0,\ldots,F_n$

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

Let $F_0,\ldots,F_n$ be $n+1$ homogeneous polynomials in $n+1$ variables
$x_0,\ldots,x_n$ over a commutative ring $K$. The resultant $R(F_0,\ldots,F_n)$
is a certain polynomial in the coefficients of $F_0,\ldots,F_n$; when $K$ is an
algebraically closed field, $R(F_0,\ldots,F_n)$ vanishes if and only if
$F_0,\ldots,F_n$ have a common nontrivial root.  For the general theory, see
one of the following: Using Algebraic Geometry (see
http://link.springer.com/book/10.1007%2Fb138611 ), by David A. Cox, John
Little, Donal O'shea; Discriminants, Resultants, and Multidimensional
Determinants (see http://link.springer.com/book/10.1007%2F978-0-8176-4771-1 ),
by Israel M. Gelfand, Mikhail M. Kapranov and Andrei V. Zelevinsky.

+-----------------------------------------------------------------------------+
|i1 : ZZ[t,u][x,y,z]                                                          |
|                                                                             |
|o1 = ZZ[t..u][x..z]                                                          |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : F = {x^2+3*t*y*z-u*z^2,(t+3*u-1)*x-y,-t*x*y^3+t*x^2*y*z+u*z^4}          |
|                                                                             |
|       2               2                            3      2         4       |
|o2 = {x  + 3t*y*z - u*z , (t + 3u - 1)x - y, - t*x*y  + t*x y*z + u*z }      |
|                                                                             |
|o2 : List                                                                    |
+-----------------------------------------------------------------------------+
|i3 : time resultant F                                                        |
| -- used 0.0964764s (cpu); 0.0528736s (thread); 0s (gc)                      |
|                                                                             |
|          12         11 2         10 3         9 4          8 5          7 6 |
|o3 = - 81t  u - 1701t  u  - 15309t  u  - 76545t u  - 229635t u  - 413343t u  |
|     ------------------------------------------------------------------------|
|              6 7          5 8       11          10 2         9 3            |
|     - 413343t u  - 177147t u  + 567t  u + 10206t  u  + 76545t u  +          |
|     ------------------------------------------------------------------------|
|            8 4          7 5          6 6          5 7        4 8        3 9 |
|     306181t u  + 688923t u  + 826821t u  + 413883t u  + 1215t u  + 1458t u  |
|     ------------------------------------------------------------------------|
|           2 10        10          9 2          8 3          7 4          6 5|
|     + 729t u   - 1701t  u - 25515t u  - 153093t u  - 459321t u  - 689265t u |
|     ------------------------------------------------------------------------|
|              5 6        4 7        3 8        2 9        9          8 2     |
|     - 414693t u  - 2835t u  - 3159t u  - 1458t u  + 2835t u + 33984t u  +   |
|     ------------------------------------------------------------------------|
|            7 3          6 4          5 5         4 6        3 7        2 8  |
|     152565t u  + 303135t u  + 220905t u  - 12150t u  - 5913t u  + 1215t u  -|
|     ------------------------------------------------------------------------|
|          8          7 2         6 3         5 4         4 5         3 6     |
|     2862t u - 25659t u  - 75873t u  - 70031t u  + 16263t u  + 13230t u  -   |
|     ------------------------------------------------------------------------|
|         2 7        7          6 2         5 3        4 4        3 5         |
|     540t u  + 1809t u + 10818t u  + 15015t u  - 6609t u  - 9360t u  +       |
|     ------------------------------------------------------------------------|
|         2 6       6         5 2       4 3        3 4      2 5        6      |
|     135t u  - 729t u - 2313t u  + 684t u  + 3165t u  - 81t u  - 54t*u  +    |
|     ------------------------------------------------------------------------|
|         5        4 2       3 3      2 4        5      4       3 2      2 3  |
|     189t u + 135t u  - 583t u  - 38t u  + 54t*u  - 27t u + 54t u  + 47t u  -|
|     ------------------------------------------------------------------------|
|          4     2 2       3    2                                             |
|     18t*u  - 9t u  + 2t*u  + u                                              |
|                                                                             |
|o3 : ZZ[t..u]                                                                |
+-----------------------------------------------------------------------------+

Below we compute the general expression of the resultant of a linear, a
quadratic and a cubic form on $\mathbb{P}^2$.

+-----------------------------------------------------------------------------+
|i4 : F = genericPolynomials({1,2,3},ZZ)                                      |
|                                                                             |
|                             2               2                        2     3|
|o4 = {a x  + a x  + a x , b x  + b x x  + b x  + b x x  + b x x  + b x , c x |
|       0 0    1 1    2 2   0 0    1 0 1    3 1    2 0 2    4 1 2    5 2   0 0|
|     ------------------------------------------------------------------------|
|          2          2      3      2                   2          2        2 |
|     + c x x  + c x x  + c x  + c x x  + c x x x  + c x x  + c x x  + c x x  |
|        1 0 1    3 0 1    6 1    2 0 2    4 0 1 2    7 1 2    5 0 2    8 1 2 |
|     ------------------------------------------------------------------------|
|          3                                                                  |
|     + c x }                                                                 |
|        9 2                                                                  |
|                                                                             |
|o4 : List                                                                    |
+-----------------------------------------------------------------------------+
|i5 : time resultant F                                                        |
| -- used 3.11554s (cpu); 2.38219s (thread); 0s (gc)                          |
|                                                                             |
|      6 3 2       5 2   2     2 4   2 2    3 3 3 2     2 4 2   2             |
|o5 = a b c  - 3a a b b c  + 3a a b b c  - a a b c  + 3a a b b c  -           |
|      2 3 0     1 2 3 4 0     1 2 3 4 0    1 2 4 0     1 2 3 5 0             |
|     ------------------------------------------------------------------------|
|       3 3       2     4 2 2   2     4 2   2 2     5     2 2    6 3 2        |
|     6a a b b b c  + 3a a b b c  + 3a a b b c  - 3a a b b c  + a b c  -      |
|       1 2 3 4 5 0     1 2 4 5 0     1 2 3 5 0     1 2 4 5 0    1 5 0        |
|     ------------------------------------------------------------------------|
|      6   2          5   2           5               2 4                     |
|     a b b c c  + a a b b c c  + 2a a b b b c c  - 2a a b b b c c  +         |
|      2 1 3 0 1    1 2 2 3 0 1     1 2 1 3 4 0 1     1 2 2 3 4 0 1           |
|     ------------------------------------------------------------------------|
|        5 2          2 4   2        3 3   2             4   2                |
|     a a b b c c  - a a b b c c  + a a b b c c  - 2a a a b b c c  +          |
|      0 2 3 4 0 1    1 2 1 4 0 1    1 2 2 4 0 1     0 1 2 3 4 0 1            |
|     ------------------------------------------------------------------------|
|        2 3 3         2 4               3 3                   4 2            |
|     a a a b c c  - 2a a b b b c c  + 2a a b b b c c  - 2a a a b b c c  +    |
|      0 1 2 4 0 1     1 2 1 3 5 0 1     1 2 2 3 5 0 1     0 1 2 3 5 0 1      |
|     ------------------------------------------------------------------------|
|       3 3               4 2                 2 3                 3 2 2       |
|     2a a b b b c c  - 2a a b b b c c  + 6a a a b b b c c  - 4a a a b b c c  |
|       1 2 1 4 5 0 1     1 2 2 4 5 0 1     0 1 2 3 4 5 0 1     0 1 2 4 5 0 1 |
|     ------------------------------------------------------------------------|
|        4 2   2        5     2           3 2   2           4     2           |
|     - a a b b c c  + a a b b c c  - 4a a a b b c c  + 5a a a b b c c  -     |
|        1 2 1 5 0 1    1 2 2 5 0 1     0 1 2 3 5 0 1     0 1 2 4 5 0 1       |
|     ------------------------------------------------------------------------|
|         5 3        6   2 2      5   2 2       5       2         4       2   |
|     2a a b c c  + a b b c  - a a b b c  - 2a a b b b c  + 2a a a b b b c  + |
|       0 1 5 0 1    2 0 3 1    0 2 2 3 1     1 2 0 3 4 1     0 1 2 2 3 4 1   |
|     ------------------------------------------------------------------------|
|      2 4   2 2      2 3   2 2     2 4       2       2 3       2    2 4 2   2|
|     a a b b c  - a a a b b c  + 2a a b b b c  - 2a a a b b b c  + a a b b c |
|      1 2 0 4 1    0 1 2 2 4 1     1 2 0 3 5 1     0 1 2 2 3 5 1    0 2 3 5 1|
|     ------------------------------------------------------------------------|
|         3 3       2       3 2       2     2   3       2    2 2 2 2   2      |
|     - 2a a b b b c  + 2a a a b b b c  - 2a a a b b b c  + a a a b b c  +    |
|         1 2 0 4 5 1     0 1 2 2 4 5 1     0 1 2 3 4 5 1    0 1 2 4 5 1      |
|     ------------------------------------------------------------------------|
|      4 2   2 2      4     2 2     2 2 2   2 2     2 3     2 2    2 4 3 2    |
|     a a b b c  - a a a b b c  + 2a a a b b c  - 2a a a b b c  + a a b c  +  |
|      1 2 0 5 1    0 1 2 2 5 1     0 1 2 3 5 1     0 1 2 4 5 1    0 1 5 1    |
|     ------------------------------------------------------------------------|
|        5   2        2 4   2           5 3         2 4                       |
|     a a b b c c  - a a b b c c  - 2a a b c c  - 2a a b b b c c  +           |
|      1 2 1 3 0 2    1 2 2 3 0 2     0 2 3 0 2     1 2 1 3 4 0 2             |
|     ------------------------------------------------------------------------|
|       3 3                   4 2          3 3   2        4 2   2             |
|     2a a b b b c c  + 5a a a b b c c  + a a b b c c  - a a b b c c  -       |
|       1 2 2 3 4 0 2     0 1 2 3 4 0 2    1 2 1 4 0 2    1 2 2 4 0 2         |
|     ------------------------------------------------------------------------|
|         2 3   2          3 2 3         3 3               4 2                |
|     4a a a b b c c  + a a a b c c  + 2a a b b b c c  - 2a a b b b c c  -    |
|       0 1 2 3 4 0 2    0 1 2 4 0 2     1 2 1 3 5 0 2     1 2 2 3 5 0 2      |
|     ------------------------------------------------------------------------|
|         2 3 2           4 2               5                   3 2           |
|     4a a a b b c c  - 2a a b b b c c  + 2a a b b b c c  + 6a a a b b b c c  |
|       0 1 2 3 5 0 2     1 2 1 4 5 0 2     1 2 2 4 5 0 2     0 1 2 3 4 5 0 2 |
|     ------------------------------------------------------------------------|
|           4   2          5     2        6   2           4     2             |
|     - 2a a a b b c c  + a a b b c c  - a b b c c  - 2a a a b b c c  +       |
|         0 1 2 4 5 0 2    1 2 1 5 0 2    1 2 5 0 2     0 1 2 3 5 0 2         |
|     ------------------------------------------------------------------------|
|        5   2           5   2          5   2            4   2                |
|     a a b b c c  - 2a a b b c c  + a a b b c c  + a a a b b c c  +          |
|      0 1 4 5 0 2     1 2 0 3 1 2    0 2 1 3 1 2    0 1 2 2 3 1 2            |
|     ------------------------------------------------------------------------|
|       2 4                   4                 2 3              2 4 2        |
|     4a a b b b c c  - 2a a a b b b c c  - 2a a a b b b c c  - a a b b c c  -|
|       1 2 0 3 4 1 2     0 1 2 1 3 4 1 2     0 1 2 2 3 4 1 2    0 2 3 4 1 2  |
|     ------------------------------------------------------------------------|
|       3 3   2          2 3   2          3 2   2         2   3   2           |
|     2a a b b c c  + a a a b b c c  + a a a b b c c  + 2a a a b b c c  -     |
|       1 2 0 4 1 2    0 1 2 1 4 1 2    0 1 2 2 4 1 2     0 1 2 3 4 1 2       |
|     ------------------------------------------------------------------------|
|      2 2 2 3         3 3                 2 3                 3 2            |
|     a a a b c c  - 4a a b b b c c  + 2a a a b b b c c  + 2a a a b b b c c  +|
|      0 1 2 4 1 2     1 2 0 3 5 1 2     0 1 2 1 3 5 1 2     0 1 2 2 3 5 1 2  |
|     ------------------------------------------------------------------------|
|       4 2                 3 2                 4                             |
|     4a a b b b c c  - 2a a a b b b c c  - 2a a a b b b c c  -               |
|       1 2 0 4 5 1 2     0 1 2 1 4 5 1 2     0 1 2 2 4 5 1 2                 |
|     ------------------------------------------------------------------------|
|       2 2 2               2 3   2           5     2          4     2        |
|     2a a a b b b c c  + 2a a a b b c c  - 2a a b b c c  + a a a b b c c  +  |
|       0 1 2 3 4 5 1 2     0 1 2 4 5 1 2     1 2 0 5 1 2    0 1 2 1 5 1 2    |
|     ------------------------------------------------------------------------|
|        5   2        2 4   2        2 4   2 2        4   2 2    2 4 3 2      |
|     a a b b c c  - a a b b c c  + a a b b c  - a a a b b c  + a a b c  -    |
|      0 1 2 5 1 2    0 1 4 5 1 2    1 2 0 3 2    0 1 2 1 3 2    0 2 3 2      |
|     ------------------------------------------------------------------------|
|       3 3       2       2 3       2     2   3 2   2    4 2   2 2            |
|     2a a b b b c  + 2a a a b b b c  - 2a a a b b c  + a a b b c  -          |
|       1 2 0 3 4 2     0 1 2 1 3 4 2     0 1 2 3 4 2    1 2 0 4 2            |
|     ------------------------------------------------------------------------|
|        3 2   2 2    2 2 2   2 2     4 2       2       3 2       2           |
|     a a a b b c  + a a a b b c  + 2a a b b b c  - 2a a a b b b c  +         |
|      0 1 2 1 4 2    0 1 2 3 4 2     1 2 0 3 5 2     0 1 2 1 3 5 2           |
|     ------------------------------------------------------------------------|
|       2 2 2 2   2     5         2       4         2     2 3         2       |
|     2a a a b b c  - 2a a b b b c  + 2a a a b b b c  - 2a a a b b b c  +     |
|       0 1 2 3 5 2     1 2 0 4 5 2     0 1 2 1 4 5 2     0 1 2 3 4 5 2       |
|     ------------------------------------------------------------------------|
|      6   2 2      5   2 2    2 4   2 2    6 2             5                 |
|     a b b c  - a a b b c  + a a b b c  + a b b c c  - 2a a b b b c c  +     |
|      1 0 5 2    0 1 1 5 2    0 1 3 5 2    2 1 3 0 3     1 2 1 2 3 0 3       |
|     ------------------------------------------------------------------------|
|      2 4 2           6   2           5   2          5 2                     |
|     a a b b c c  - 2a b b c c  + 2a a b b c c  - a a b b c c  +             |
|      1 2 2 3 0 3     2 0 3 0 3     0 2 2 3 0 3    1 2 1 4 0 3               |
|     ------------------------------------------------------------------------|
|       2 4              3 3 2             5                 5                |
|     2a a b b b c c  - a a b b c c  + 4a a b b b c c  - 2a a b b b c c  -    |
|       1 2 1 2 4 0 3    1 2 2 4 0 3     1 2 0 3 4 0 3     0 2 1 3 4 0 3      |
|     ------------------------------------------------------------------------|
|           4               2 4   2             4   2        2 4   2          |
|     2a a a b b b c c  - 2a a b b c c  + 2a a a b b c c  + a a b b c c  -    |
|       0 1 2 2 3 4 0 3     1 2 0 4 0 3     0 1 2 1 4 0 3    0 2 3 4 0 3      |
|     ------------------------------------------------------------------------|
|      2   3 3        2 4 2           3 3              4 2 2                  |
|     a a a b c c  + a a b b c c  - 2a a b b b c c  + a a b b c c  -          |
|      0 1 2 4 0 3    1 2 1 5 0 3     1 2 1 2 5 0 3    1 2 2 5 0 3            |
|     ------------------------------------------------------------------------|
|       2 4                   4               2 4 2           3 3             |
|     4a a b b b c c  + 4a a a b b b c c  - 2a a b b c c  + 4a a b b b c c  - |
|       1 2 0 3 5 0 3     0 1 2 1 3 5 0 3     0 2 3 5 0 3     1 2 0 4 5 0 3   |
|     ------------------------------------------------------------------------|
|         2 3                 3 2               2 2 2 2           4 2   2     |
|     6a a a b b b c c  + 2a a a b b b c c  + 3a a a b b c c  - 2a a b b c c  |
|       0 1 2 1 4 5 0 3     0 1 2 2 4 5 0 3     0 1 2 4 5 0 3     1 2 0 5 0 3 |
|     ------------------------------------------------------------------------|
|           3 2   2           4     2         2 3     2         2 4 3         |
|     + 4a a a b b c c  - 2a a a b b c c  - 4a a a b b c c  + 2a a b c c  -   |
|         0 1 2 1 5 0 3     0 1 2 2 5 0 3     0 1 2 4 5 0 3     0 1 5 0 3     |
|     ------------------------------------------------------------------------|
|      6                5                5                  4 2               |
|     a b b b c c  + a a b b b c c  + a a b b b c c  - a a a b b c c  +       |
|      2 0 1 3 1 3    1 2 0 2 3 1 3    0 2 1 2 3 1 3    0 1 2 2 3 1 3         |
|     ------------------------------------------------------------------------|
|        5              2 4                  4                2 3 2           |
|     a a b b b c c  - a a b b b c c  - a a a b b b c c  + a a a b b c c  +   |
|      1 2 0 1 4 1 3    1 2 0 2 4 1 3    0 1 2 1 2 4 1 3    0 1 2 2 4 1 3     |
|     ------------------------------------------------------------------------|
|        5              2 4                  4   2        2   3   2           |
|     a a b b b c c  - a a b b b c c  - a a a b b c c  + a a a b b c c  -     |
|      0 2 0 3 4 1 3    0 2 2 3 4 1 3    0 1 2 0 4 1 3    0 1 2 2 4 1 3       |
|     ------------------------------------------------------------------------|
|      2 4              3 3                2 3                3 2 2           |
|     a a b b b c c  + a a b b b c c  + a a a b b b c c  - a a a b b c c  -   |
|      1 2 0 1 5 1 3    1 2 0 2 5 1 3    0 1 2 1 2 5 1 3    0 1 2 2 5 1 3     |
|     ------------------------------------------------------------------------|
|           4              2 4               2   3                            |
|     2a a a b b b c c  - a a b b b c c  + 3a a a b b b c c  +                |
|       0 1 2 0 3 5 1 3    0 2 1 3 5 1 3     0 1 2 2 3 5 1 3                  |
|     ------------------------------------------------------------------------|
|         2 3              2   3               2 2 2                          |
|     3a a a b b b c c  + a a a b b b c c  - 4a a a b b b c c  +              |
|       0 1 2 0 4 5 1 3    0 1 2 1 4 5 1 3     0 1 2 2 4 5 1 3                |
|     ------------------------------------------------------------------------|
|      3 3              3   2 2             3 2   2        2 2 2   2          |
|     a a b b b c c  - a a a b b c c  - 2a a a b b c c  - a a a b b c c  +    |
|      0 2 3 4 5 1 3    0 1 2 4 5 1 3     0 1 2 0 5 1 3    0 1 2 1 5 1 3      |
|     ------------------------------------------------------------------------|
|       2 3     2         3   2   2         3 2     2         3 3 3           |
|     3a a a b b c c  - 2a a a b b c c  + 3a a a b b c c  - 2a a b c c  +     |
|       0 1 2 2 5 1 3     0 1 2 3 5 1 3     0 1 2 4 5 1 3     0 1 5 1 3       |
|     ------------------------------------------------------------------------|
|        5                5 2          2 4                  4                 |
|     a a b b b c c  - a a b b c c  - a a b b b c c  + a a a b b b c c  +     |
|      1 2 0 1 3 2 3    0 2 1 3 2 3    1 2 0 2 3 2 3    0 1 2 1 2 3 2 3       |
|     ------------------------------------------------------------------------|
|         5   2         2 4   2        2 4                  4 2               |
|     2a a b b c c  - 2a a b b c c  - a a b b b c c  + a a a b b c c  +       |
|       0 2 0 3 2 3     0 2 2 3 2 3    1 2 0 1 4 2 3    0 1 2 1 4 2 3         |
|     ------------------------------------------------------------------------|
|      3 3                2 3                   4               2 4           |
|     a a b b b c c  - a a a b b b c c  - 5a a a b b b c c  + 2a a b b b c c  |
|      1 2 0 2 4 2 3    0 1 2 1 2 4 2 3     0 1 2 0 3 4 2 3     0 2 1 3 4 2 3 |
|     ------------------------------------------------------------------------|
|         2   3                 2 3   2         2   3   2        2 2 2   2    |
|     + 3a a a b b b c c  + 3a a a b b c c  - 2a a a b b c c  - a a a b b c c |
|         0 1 2 2 3 4 2 3     0 1 2 0 4 2 3     0 1 2 1 4 2 3    0 1 2 2 4 2 3|
|     ------------------------------------------------------------------------|
|        3 3   2        3   2 3        3 3                2 3 2               |
|     - a a b b c c  + a a a b c c  + a a b b b c c  - a a a b b c c  -       |
|        0 2 3 4 2 3    0 1 2 4 2 3    1 2 0 1 5 2 3    0 1 2 1 5 2 3         |
|     ------------------------------------------------------------------------|
|      4 2                3 2                 2 3                             |
|     a a b b b c c  + a a a b b b c c  + 6a a a b b b c c  -                 |
|      1 2 0 2 5 2 3    0 1 2 1 2 5 2 3     0 1 2 0 3 5 2 3                   |
|     ------------------------------------------------------------------------|
|       2   3               2 2 2               3 3 2                         |
|     3a a a b b b c c  - 3a a a b b b c c  + 2a a b b c c  -                 |
|       0 1 2 1 3 5 2 3     0 1 2 2 3 5 2 3     0 2 3 5 2 3                   |
|     ------------------------------------------------------------------------|
|         3 2               2 2 2               2 3                           |
|     7a a a b b b c c  + 5a a a b b b c c  + 2a a a b b b c c  -             |
|       0 1 2 0 4 5 2 3     0 1 2 1 4 5 2 3     0 1 2 2 4 5 2 3               |
|     ------------------------------------------------------------------------|
|      3   2               3 2   2             4     2         2 3     2      |
|     a a a b b b c c  - 2a a a b b c c  + 4a a a b b c c  - 3a a a b b c c  -|
|      0 1 2 3 4 5 2 3     0 1 2 4 5 2 3     0 1 2 0 5 2 3     0 1 2 1 5 2 3  |
|     ------------------------------------------------------------------------|
|      2 4   2         3 2     2        3 3   2        6 2   2       5       2|
|     a a b b c c  + 2a a a b b c c  + a a b b c c  + a b b c  - 2a a b b b c |
|      0 1 2 5 2 3     0 1 2 3 5 2 3    0 1 4 5 2 3    2 0 3 3     0 2 0 2 3 3|
|     ------------------------------------------------------------------------|
|        2 4 2   2      5 2   2         4       2    2   3 2   2    2 4 2   2 |
|     + a a b b c  - a a b b c  + 2a a a b b b c  - a a a b b c  + a a b b c  |
|        0 2 2 3 3    1 2 0 4 3     0 1 2 0 2 4 3    0 1 2 2 4 3    1 2 0 5 3 |
|     ------------------------------------------------------------------------|
|           2 3       2    2 2 2 2   2     2 4       2     3 3       2        |
|     - 2a a a b b b c  + a a a b b c  + 2a a b b b c  - 2a a b b b c  -      |
|         0 1 2 0 2 5 3    0 1 2 2 5 3     0 2 0 3 5 3     0 2 2 3 5 3        |
|     ------------------------------------------------------------------------|
|       2   3       2     3   2       2     2 2 2   2 2     3 2     2 2       |
|     2a a a b b b c  + 2a a a b b b c  + 2a a a b b c  - 2a a a b b c  +     |
|       0 1 2 0 4 5 3     0 1 2 2 4 5 3     0 1 2 0 5 3     0 1 2 2 5 3       |
|     ------------------------------------------------------------------------|
|      4 2   2 2    4       2 2    4 2 3 2      5 2           2 4             |
|     a a b b c  - a a a b b c  + a a b c  - a a b b c c  + 2a a b b b c c  - |
|      0 2 3 5 3    0 1 2 4 5 3    0 1 5 3    1 2 1 3 0 4     1 2 1 2 3 0 4   |
|     ------------------------------------------------------------------------|
|      3 3 2             5   2          5   2             4   2               |
|     a a b b c c  + 2a a b b c c  + a a b b c c  - 3a a a b b c c  +         |
|      1 2 2 3 0 4     1 2 0 3 0 4    0 2 1 3 0 4     0 1 2 2 3 0 4           |
|     ------------------------------------------------------------------------|
|      2 4 2           3 3              4 2 2           2 4                   |
|     a a b b c c  - 2a a b b b c c  + a a b b c c  - 4a a b b b c c  +       |
|      1 2 1 4 0 4     1 2 1 2 4 0 4    1 2 2 4 0 4     1 2 0 3 4 0 4         |
|     ------------------------------------------------------------------------|
|         2 3              2 4 2           3 3   2          2 3   2           |
|     4a a a b b b c c  - a a b b c c  + 2a a b b c c  - a a a b b c c  -     |
|       0 1 2 2 3 4 0 4    0 2 3 4 0 4     1 2 0 4 0 4    0 1 2 1 4 0 4       |
|     ------------------------------------------------------------------------|
|        3 2   2        2   3   2        3 3 2           4 2                  |
|     a a a b b c c  + a a a b b c c  - a a b b c c  + 2a a b b b c c  -      |
|      0 1 2 2 4 0 4    0 1 2 3 4 0 4    1 2 1 5 0 4     1 2 1 2 5 0 4        |
|     ------------------------------------------------------------------------|
|      5   2           3 3                 2 3                 3 2            |
|     a a b b c c  + 4a a b b b c c  - 2a a a b b b c c  - 2a a a b b b c c  +|
|      1 2 2 5 0 4     1 2 0 3 5 0 4     0 1 2 1 3 5 0 4     0 1 2 2 3 5 0 4  |
|     ------------------------------------------------------------------------|
|       2   3 2           4 2                 3 2                             |
|     4a a a b b c c  - 4a a b b b c c  + 4a a a b b b c c  -                 |
|       0 1 2 3 5 0 4     1 2 0 4 5 0 4     0 1 2 1 4 5 0 4                   |
|     ------------------------------------------------------------------------|
|       2 2 2              2 3   2           5     2           4     2        |
|     6a a a b b b c c  + a a a b b c c  + 2a a b b c c  - 3a a a b b c c  +  |
|       0 1 2 3 4 5 0 4    0 1 2 4 5 0 4     1 2 0 5 0 4     0 1 2 1 5 0 4    |
|     ------------------------------------------------------------------------|
|        5   2         2 3     2        2 4   2          5                    |
|     a a b b c c  + 4a a a b b c c  - a a b b c c  + a a b b b c c  -        |
|      0 1 2 5 0 4     0 1 2 3 5 0 4    0 1 4 5 0 4    1 2 0 1 3 1 4          |
|     ------------------------------------------------------------------------|
|      2 4                  4                2 3 2             5   2          |
|     a a b b b c c  - a a a b b b c c  + a a a b b c c  - 2a a b b c c  +    |
|      1 2 0 2 3 1 4    0 1 2 1 2 3 1 4    0 1 2 2 3 1 4     0 2 0 3 1 4      |
|     ------------------------------------------------------------------------|
|       2 4   2        2 4              3 3                2 3                |
|     2a a b b c c  - a a b b b c c  + a a b b b c c  + a a a b b b c c  -    |
|       0 2 2 3 1 4    1 2 0 1 4 1 4    1 2 0 2 4 1 4    0 1 2 1 2 4 1 4      |
|     ------------------------------------------------------------------------|
|        3 2 2               4               2   3                2 3   2     |
|     a a a b b c c  + 3a a a b b b c c  - 3a a a b b b c c  - a a a b b c c  |
|      0 1 2 2 4 1 4     0 1 2 0 3 4 1 4     0 1 2 2 3 4 1 4    0 1 2 0 4 1 4 |
|     ------------------------------------------------------------------------|
|        2 2 2   2        3 3              4 2                3 2             |
|     + a a a b b c c  + a a b b b c c  - a a b b b c c  - a a a b b b c c  + |
|        0 1 2 2 4 1 4    1 2 0 1 5 1 4    1 2 0 2 5 1 4    0 1 2 1 2 5 1 4   |
|     ------------------------------------------------------------------------|
|        4   2             2 3              2   3              2 2 2          |
|     a a a b b c c  - 2a a a b b b c c  + a a a b b b c c  + a a a b b b c c |
|      0 1 2 2 5 1 4     0 1 2 0 3 5 1 4    0 1 2 1 3 5 1 4    0 1 2 2 3 5 1 4|
|     ------------------------------------------------------------------------|
|         3 3 2            3 2              2 2 2                             |
|     - 2a a b b c c  + a a a b b b c c  - a a a b b b c c  +                 |
|         0 2 3 5 1 4    0 1 2 0 4 5 1 4    0 1 2 1 4 5 1 4                   |
|     ------------------------------------------------------------------------|
|       3   2              3 2   2          2 3     2        2 4   2          |
|     3a a a b b b c c  - a a a b b c c  + a a a b b c c  - a a b b c c  -    |
|       0 1 2 3 4 5 1 4    0 1 2 4 5 1 4    0 1 2 1 5 1 4    0 1 2 5 1 4      |
|     ------------------------------------------------------------------------|
|       3 2     2        3 3   2        2 4                  4 2              |
|     2a a a b b c c  + a a b b c c  - a a b b b c c  + a a a b b c c  +      |
|       0 1 2 3 5 1 4    0 1 4 5 1 4    1 2 0 1 3 2 4    0 1 2 1 3 2 4        |
|     ------------------------------------------------------------------------|
|      3 3                2 3              2 4   2        2   3   2           |
|     a a b b b c c  - a a a b b b c c  - a a b b c c  + a a a b b c c  +     |
|      1 2 0 2 3 2 4    0 1 2 1 2 3 2 4    0 2 1 3 2 4    0 1 2 2 3 2 4       |
|     ------------------------------------------------------------------------|
|      3 3                2 3 2          4 2                3 2               |
|     a a b b b c c  - a a a b b c c  - a a b b b c c  + a a a b b b c c  +   |
|      1 2 0 1 4 2 4    0 1 2 1 4 2 4    1 2 0 2 4 2 4    0 1 2 1 2 4 2 4     |
|     ------------------------------------------------------------------------|
|        2 3              2 2 2              3 3 2            3 2   2         |
|     a a a b b b c c  - a a a b b b c c  + a a b b c c  - a a a b b c c  +   |
|      0 1 2 0 3 4 2 4    0 1 2 2 3 4 2 4    0 2 3 4 2 4    0 1 2 0 4 2 4     |
|     ------------------------------------------------------------------------|
|      2 2 2   2        3   2   2        4 2                3 2 2             |
|     a a a b b c c  - a a a b b c c  - a a b b b c c  + a a a b b c c  +     |
|      0 1 2 1 4 2 4    0 1 2 3 4 2 4    1 2 0 1 5 2 4    0 1 2 1 5 2 4       |
|     ------------------------------------------------------------------------|
|      5                  4                   3 2              2 2 2          |
|     a a b b b c c  - a a a b b b c c  - 2a a a b b b c c  + a a a b b b c c |
|      1 2 0 2 5 2 4    0 1 2 1 2 5 2 4     0 1 2 0 3 5 2 4    0 1 2 1 3 5 2 4|
|     ------------------------------------------------------------------------|
|        2 3                 3   2 2             4                            |
|     + a a a b b b c c  - 2a a a b b c c  + 3a a a b b b c c  -              |
|        0 1 2 2 3 5 2 4     0 1 2 3 5 2 4     0 1 2 0 4 5 2 4                |
|     ------------------------------------------------------------------------|
|       2 3                 3 2                   5   2         2 4   2       |
|     3a a a b b b c c  + 3a a a b b b c c  - 2a a b b c c  + 2a a b b c c  - |
|       0 1 2 1 4 5 2 4     0 1 2 3 4 5 2 4     0 1 0 5 2 4     0 1 1 5 2 4   |
|     ------------------------------------------------------------------------|
|       3 3   2           5 2            5                   4                |
|     2a a b b c c  - 2a a b b c c  + a a b b b c c  + 3a a a b b b c c  -    |
|       0 1 3 5 2 4     1 2 0 3 3 4    0 2 0 1 3 3 4     0 1 2 0 2 3 3 4      |
|     ------------------------------------------------------------------------|
|      2 4              2   3 2           2 4 2              4                |
|     a a b b b c c  - a a a b b c c  + 2a a b b c c  - a a a b b b c c  -    |
|      0 2 1 2 3 3 4    0 1 2 2 3 3 4     1 2 0 4 3 4    0 1 2 0 1 4 3 4      |
|     ------------------------------------------------------------------------|
|         2 3              2   3              2 2 2 2          2 4            |
|     3a a a b b b c c  + a a a b b b c c  + a a a b b c c  - a a b b b c c  +|
|       0 1 2 0 2 4 3 4    0 1 2 1 2 4 3 4    0 1 2 2 4 3 4    0 2 0 3 4 3 4  |
|     ------------------------------------------------------------------------|
|      3 3              2   3   2        3   2   2         3 3 2              |
|     a a b b b c c  + a a a b b c c  - a a a b b c c  - 2a a b b c c  +      |
|      0 2 2 3 4 3 4    0 1 2 0 4 3 4    0 1 2 2 4 3 4     1 2 0 5 3 4        |
|     ------------------------------------------------------------------------|
|        2 3                 3 2              2 2 2              2 3   2      |
|     a a a b b b c c  + 3a a a b b b c c  - a a a b b b c c  - a a a b b c c |
|      0 1 2 0 1 5 3 4     0 1 2 0 2 5 3 4    0 1 2 1 2 5 3 4    0 1 2 2 5 3 4|
|     ------------------------------------------------------------------------|
|         2   3              3 3              3   2                           |
|     - 2a a a b b b c c  + a a b b b c c  + a a a b b b c c  +               |
|         0 1 2 0 3 5 3 4    0 2 1 3 5 3 4    0 1 2 2 3 5 3 4                 |
|     ------------------------------------------------------------------------|
|      2 2 2              3   2              4 2              4     2         |
|     a a a b b b c c  - a a a b b b c c  - a a b b b c c  + a a a b b c c  - |
|      0 1 2 0 4 5 3 4    0 1 2 1 4 5 3 4    0 2 3 4 5 3 4    0 1 2 4 5 3 4   |
|     ------------------------------------------------------------------------|
|       2 3     2        3 2     2        3 3   2        4 2   2              |
|     2a a a b b c c  + a a a b b c c  + a a b b c c  - a a b b c c  +        |
|       0 1 2 0 5 3 4    0 1 2 1 5 3 4    0 1 2 5 3 4    0 1 4 5 3 4          |
|     ------------------------------------------------------------------------|
|      2 4 2   2        4       2      2 3       2    2   3       2           |
|     a a b b c  - a a a b b b c  - a a a b b b c  + a a a b b b c  +         |
|      1 2 0 3 4    0 1 2 0 1 3 4    0 1 2 0 2 3 4    0 1 2 1 2 3 4           |
|     ------------------------------------------------------------------------|
|      2 4   2 2    3 3   2 2    3 3 2   2      2 3       2      3 2       2  |
|     a a b b c  - a a b b c  - a a b b c  + a a a b b b c  + a a a b b b c  -|
|      0 2 0 3 4    0 2 2 3 4    1 2 0 4 4    0 1 2 0 1 4 4    0 1 2 0 2 4 4  |
|     ------------------------------------------------------------------------|
|      2 2 2       2    2   3       2    3   2       2    4 2 2   2           |
|     a a a b b b c  - a a a b b b c  + a a a b b b c  + a a b b c  -         |
|      0 1 2 1 2 4 4    0 1 2 0 3 4 4    0 1 2 2 3 4 4    1 2 0 5 4           |
|     ------------------------------------------------------------------------|
|        3 2       2      4         2    2 3         2     2 2 2       2      |
|     a a a b b b c  - a a a b b b c  + a a a b b b c  + 2a a a b b b c  -    |
|      0 1 2 0 1 5 4    0 1 2 0 2 5 4    0 1 2 1 2 5 4     0 1 2 0 3 5 4      |
|     ------------------------------------------------------------------------|
|      3   2       2    3 2         2    4 2 2   2    2 3         2           |
|     a a a b b b c  - a a a b b b c  + a a b b c  - a a a b b b c  +         |
|      0 1 2 1 3 5 4    0 1 2 2 3 5 4    0 2 3 5 4    0 1 2 0 4 5 4           |
|     ------------------------------------------------------------------------|
|      3 2         2    4           2    2 4   2 2    3 3   2 2    4 2   2 2  |
|     a a a b b b c  - a a a b b b c  + a a b b c  - a a b b c  + a a b b c  +|
|      0 1 2 1 4 5 4    0 1 2 3 4 5 4    0 1 0 5 4    0 1 1 5 4    0 1 3 5 4  |
|     ------------------------------------------------------------------------|
|      2 4 2           3 3              4 2 2           2 4   2               |
|     a a b b c c  - 2a a b b b c c  + a a b b c c  - 2a a b b c c  -         |
|      1 2 1 3 0 5     1 2 1 2 3 0 5    1 2 2 3 0 5     1 2 0 3 0 5           |
|     ------------------------------------------------------------------------|
|           4   2           2 3   2         2 4 3        3 3 2                |
|     2a a a b b c c  + 4a a a b b c c  + 2a a b c c  - a a b b c c  +        |
|       0 1 2 1 3 0 5     0 1 2 2 3 0 5     0 2 3 0 5    1 2 1 4 0 5          |
|     ------------------------------------------------------------------------|
|       4 2              5   2           3 3                 2 3              |
|     2a a b b b c c  - a a b b c c  + 4a a b b b c c  + 2a a a b b b c c  -  |
|       1 2 1 2 4 0 5    1 2 2 4 0 5     1 2 0 3 4 0 5     0 1 2 1 3 4 0 5    |
|     ------------------------------------------------------------------------|
|         3 2               2   3 2           4 2   2           4     2       |
|     6a a a b b b c c  - 4a a a b b c c  - 2a a b b c c  + 2a a a b b c c  + |
|       0 1 2 2 3 4 0 5     0 1 2 3 4 0 5     1 2 0 4 0 5     0 1 2 2 4 0 5   |
|     ------------------------------------------------------------------------|
|       2 2 2   2        2 3   3        4 2 2           5                     |
|     3a a a b b c c  - a a a b c c  + a a b b c c  - 2a a b b b c c  +       |
|       0 1 2 3 4 0 5    0 1 2 4 0 5    1 2 1 5 0 5     1 2 1 2 5 0 5         |
|     ------------------------------------------------------------------------|
|      6 2           4 2                 4                 5                  |
|     a b b c c  - 4a a b b b c c  + 4a a a b b b c c  + 4a a b b b c c  -    |
|      1 2 5 0 5     1 2 0 3 5 0 5     0 1 2 2 3 5 0 5     1 2 0 4 5 0 5      |
|     ------------------------------------------------------------------------|
|         4                   5              2 4 2           6   2            |
|     2a a a b b b c c  - 2a a b b b c c  + a a b b c c  - 2a b b c c  +      |
|       0 1 2 1 4 5 0 5     0 1 2 4 5 0 5    0 1 4 5 0 5     1 0 5 0 5        |
|     ------------------------------------------------------------------------|
|         5   2         2 4   2        2 4              3 3                   |
|     2a a b b c c  - 2a a b b c c  - a a b b b c c  + a a b b b c c  +       |
|       0 1 1 5 0 5     0 1 3 5 0 5    1 2 0 1 3 1 5    1 2 0 2 3 1 5         |
|     ------------------------------------------------------------------------|
|        2 3                3 2 2               4   2        2 4   2          |
|     a a a b b b c c  - a a a b b c c  + 4a a a b b c c  - a a b b c c  -    |
|      0 1 2 1 2 3 1 5    0 1 2 2 3 1 5     0 1 2 0 3 1 5    0 2 1 3 1 5      |
|     ------------------------------------------------------------------------|
|       2   3   2        3 3              4 2                3 2              |
|     3a a a b b c c  + a a b b b c c  - a a b b b c c  - a a a b b b c c  +  |
|       0 1 2 2 3 1 5    1 2 0 1 4 1 5    1 2 0 2 4 1 5    0 1 2 1 2 4 1 5    |
|     ------------------------------------------------------------------------|
|        4   2             2 3               2   3                            |
|     a a a b b c c  - 7a a a b b b c c  + 2a a a b b b c c  +                |
|      0 1 2 2 4 1 5     0 1 2 0 3 4 1 5     0 1 2 1 3 4 1 5                  |
|     ------------------------------------------------------------------------|
|       2 2 2              3 3 2             3 2   2        2 2 2   2         |
|     5a a a b b b c c  + a a b b c c  + 3a a a b b c c  - a a a b b c c  -   |
|       0 1 2 2 3 4 1 5    0 2 3 4 1 5     0 1 2 0 4 1 5    0 1 2 1 4 1 5     |
|     ------------------------------------------------------------------------|
|       2 3     2         3   2   2        3 2   3        4 2                 |
|     2a a a b b c c  - 2a a a b b c c  + a a a b c c  - a a b b b c c  +     |
|       0 1 2 2 4 1 5     0 1 2 3 4 1 5    0 1 2 4 1 5    1 2 0 1 5 1 5       |
|     ------------------------------------------------------------------------|
|      5                  4                  5 2             3 2              |
|     a a b b b c c  + a a a b b b c c  - a a b b c c  + 6a a a b b b c c  -  |
|      1 2 0 2 5 1 5    0 1 2 1 2 5 1 5    0 1 2 5 1 5     0 1 2 0 3 5 1 5    |
|     ------------------------------------------------------------------------|
|       2 2 2               2 3                 3   2 2                       |
|     3a a a b b b c c  - 3a a a b b b c c  + 2a a a b b c c  -               |
|       0 1 2 1 3 5 1 5     0 1 2 2 3 5 1 5     0 1 2 3 5 1 5                 |
|     ------------------------------------------------------------------------|
|         4                 2 3                 2 4                           |
|     5a a a b b b c c  + 3a a a b b b c c  + 2a a b b b c c  -               |
|       0 1 2 0 4 5 1 5     0 1 2 1 4 5 1 5     0 1 2 4 5 1 5                 |
|     ------------------------------------------------------------------------|
|      3 2                3 3 2             5   2         2 4   2             |
|     a a a b b b c c  - a a b b c c  + 2a a b b c c  - 2a a b b c c  +       |
|      0 1 2 3 4 5 1 5    0 1 4 5 1 5     0 1 0 5 1 5     0 1 1 5 1 5         |
|     ------------------------------------------------------------------------|
|       3 3   2        3 3                2 3 2          4 2                  |
|     2a a b b c c  + a a b b b c c  - a a a b b c c  - a a b b b c c  +      |
|       0 1 3 5 1 5    1 2 0 1 3 2 5    0 1 2 1 3 2 5    1 2 0 2 3 2 5        |
|     ------------------------------------------------------------------------|
|        3 2                 2 3   2         2   3   2        2 2 2   2       |
|     a a a b b b c c  - 2a a a b b c c  + 3a a a b b c c  - a a a b b c c  - |
|      0 1 2 1 2 3 2 5     0 1 2 0 3 2 5     0 1 2 1 3 2 5    0 1 2 2 3 2 5   |
|     ------------------------------------------------------------------------|
|       3 3 3        4 2                3 2 2          5                      |
|     2a a b c c  - a a b b b c c  + a a a b b c c  + a a b b b c c  -        |
|       0 2 3 2 5    1 2 0 1 4 2 5    0 1 2 1 4 2 5    1 2 0 2 4 2 5          |
|     ------------------------------------------------------------------------|
|        4                   3 2               2 2 2                          |
|     a a a b b b c c  + 3a a a b b b c c  - 4a a a b b b c c  +              |
|      0 1 2 1 2 4 2 5     0 1 2 0 3 4 2 5     0 1 2 1 3 4 2 5                |
|     ------------------------------------------------------------------------|
|      2 3                 3   2 2            4     2        2 3     2        |
|     a a a b b b c c  + 3a a a b b c c  - a a a b b c c  + a a a b b c c  -  |
|      0 1 2 2 3 4 2 5     0 1 2 3 4 2 5    0 1 2 0 4 2 5    0 1 2 1 4 2 5    |
|     ------------------------------------------------------------------------|
|      3 2     2        5                  4   2          6                   |
|     a a a b b c c  + a a b b b c c  - a a a b b c c  - a b b b c c  +       |
|      0 1 2 3 4 2 5    1 2 0 1 5 2 5    0 1 2 1 5 2 5    1 0 2 5 2 5         |
|     ------------------------------------------------------------------------|
|        5                 4                 2 3                2 4           |
|     a a b b b c c  - 2a a a b b b c c  + 3a a a b b b c c  - a a b b b c c  |
|      0 1 1 2 5 2 5     0 1 2 0 3 5 2 5     0 1 2 1 3 5 2 5    0 1 2 3 5 2 5 |
|     ------------------------------------------------------------------------|
|         3 2   2            5              2 4              3 3              |
|     - 2a a a b b c c  + a a b b b c c  - a a b b b c c  + a a b b b c c  +  |
|         0 1 2 3 5 2 5    0 1 0 4 5 2 5    0 1 1 4 5 2 5    0 1 3 4 5 2 5    |
|     ------------------------------------------------------------------------|
|       2 4 2               4              2 4 2             2 3              |
|     2a a b b c c  - 2a a a b b b c c  + a a b b c c  - 2a a a b b b c c  +  |
|       1 2 0 3 3 5     0 1 2 0 1 3 3 5    0 2 1 3 3 5     0 1 2 0 2 3 3 5    |
|     ------------------------------------------------------------------------|
|      2 2 2 2           2 4   2         3 3   2         3 3 2                |
|     a a a b b c c  - 2a a b b c c  + 2a a b b c c  - 2a a b b c c  +        |
|      0 1 2 2 3 3 5     0 2 0 3 3 5     0 2 2 3 3 5     1 2 0 4 3 5          |
|     ------------------------------------------------------------------------|
|         2 3              2   3 2             3 2              2 3   2       |
|     2a a a b b b c c  - a a a b b c c  + 2a a a b b b c c  - a a a b b c c  |
|       0 1 2 0 1 4 3 5    0 1 2 1 4 3 5     0 1 2 0 2 4 3 5    0 1 2 2 4 3 5 |
|     ------------------------------------------------------------------------|
|         2   3               3 3               3   2                         |
|     + 6a a a b b b c c  - 2a a b b b c c  - 4a a a b b b c c  -             |
|         0 1 2 0 3 4 3 5     0 2 1 3 4 3 5     0 1 2 2 3 4 3 5               |
|     ------------------------------------------------------------------------|
|       2 2 2   2         3   2   2         3 2     2        4 2   2          |
|     4a a a b b c c  + 2a a a b b c c  + 2a a a b b c c  + a a b b c c  -    |
|       0 1 2 0 4 3 5     0 1 2 1 4 3 5     0 1 2 2 4 3 5    0 2 3 4 3 5      |
|     ------------------------------------------------------------------------|
|      4     3         4 2 2             3 2              2 2 2 2             |
|     a a a b c c  + 2a a b b c c  - 2a a a b b b c c  + a a a b b c c  -     |
|      0 1 2 4 3 5     1 2 0 5 3 5     0 1 2 0 1 5 3 5    0 1 2 1 5 3 5       |
|     ------------------------------------------------------------------------|
|         4                2 4 2           2 2 2               3   2          |
|     2a a a b b b c c  + a a b b c c  - 4a a a b b b c c  + 2a a a b b b c c |
|       0 1 2 0 2 5 3 5    0 1 2 5 3 5     0 1 2 0 3 5 3 5     0 1 2 1 3 5 3 5|
|     ------------------------------------------------------------------------|
|         3 2                 4 2 2           2 3                             |
|     + 2a a a b b b c c  - 2a a b b c c  + 6a a a b b b c c  -               |
|         0 1 2 2 3 5 3 5     0 2 3 5 3 5     0 1 2 0 4 5 3 5                 |
|     ------------------------------------------------------------------------|
|       3 2                 3 3               4                  4 2 2        |
|     4a a a b b b c c  - 2a a b b b c c  + 2a a a b b b c c  + a a b b c c  -|
|       0 1 2 1 4 5 3 5     0 1 2 4 5 3 5     0 1 2 3 4 5 3 5    0 1 4 5 3 5  |
|     ------------------------------------------------------------------------|
|       2 4   2         3 3   2         4 2   2         3 3 2                 |
|     2a a b b c c  + 2a a b b c c  - 2a a b b c c  - 2a a b b c c  +         |
|       0 1 0 5 3 5     0 1 1 5 3 5     0 1 3 5 3 5     1 2 0 3 4 5           |
|     ------------------------------------------------------------------------|
|         2 3              2   3 2            3 2              2 2 2          |
|     3a a a b b b c c  - a a a b b c c  + a a a b b b c c  - a a a b b b c c |
|       0 1 2 0 1 3 4 5    0 1 2 1 3 4 5    0 1 2 0 2 3 4 5    0 1 2 1 2 3 4 5|
|     ------------------------------------------------------------------------|
|         2   3   2        3 3   2        3   2   2         4 2 2             |
|     - 2a a a b b c c  + a a b b c c  + a a a b b c c  + 2a a b b c c  -     |
|         0 1 2 0 3 4 5    0 2 1 3 4 5    0 1 2 2 3 4 5     1 2 0 4 4 5       |
|     ------------------------------------------------------------------------|
|         3 2              2 2 2 2            4                2 3            |
|     3a a a b b b c c  + a a a b b c c  - a a a b b b c c  + a a a b b b c c |
|       0 1 2 0 1 4 4 5    0 1 2 1 4 4 5    0 1 2 0 2 4 4 5    0 1 2 1 2 4 4 5|
|     ------------------------------------------------------------------------|
|        2 2 2              3 2                4 2 2          2 3     2       |
|     + a a a b b b c c  - a a a b b b c c  - a a b b c c  + a a a b b c c  - |
|        0 1 2 0 3 4 4 5    0 1 2 2 3 4 4 5    0 2 3 4 4 5    0 1 2 0 4 4 5   |
|     ------------------------------------------------------------------------|
|      3 2     2        4       2         5   2             4                 |
|     a a a b b c c  + a a a b b c c  - 2a a b b c c  + 3a a a b b b c c  -   |
|      0 1 2 1 4 4 5    0 1 2 3 4 4 5     1 2 0 5 4 5     0 1 2 0 1 5 4 5     |
|     ------------------------------------------------------------------------|
|      2 3   2            5              2 4               2 3                |
|     a a a b b c c  + a a b b b c c  - a a b b b c c  - 2a a a b b b c c  +  |
|      0 1 2 1 5 4 5    0 1 0 2 5 4 5    0 1 1 2 5 4 5     0 1 2 0 3 5 4 5    |
|     ------------------------------------------------------------------------|
|      3 2                3 3              2 4              3 3               |
|     a a a b b b c c  + a a b b b c c  - a a b b b c c  + a a b b b c c  -   |
|      0 1 2 1 3 5 4 5    0 1 2 3 5 4 5    0 1 0 4 5 4 5    0 1 1 4 5 4 5     |
|     ------------------------------------------------------------------------|
|      4 2              4 2 2   2       3 2       2    2 2 2 2   2            |
|     a a b b b c c  + a a b b c  - 2a a a b b b c  + a a a b b c  +          |
|      0 1 3 4 5 4 5    1 2 0 3 5     0 1 2 0 1 3 5    0 1 2 1 3 5            |
|     ------------------------------------------------------------------------|
|       2 2 2   2 2     3   2   2 2    4 2 3 2    5   2   2       4         2 |
|     2a a a b b c  - 2a a a b b c  + a a b c  - a a b b c  + 2a a a b b b c  |
|       0 1 2 0 3 5     0 1 2 1 3 5    0 2 3 5    1 2 0 4 5     0 1 2 0 1 4 5 |
|     ------------------------------------------------------------------------|
|        2 3   2   2     2 3         2     3 2         2    4     2   2       |
|     - a a a b b c  - 2a a a b b b c  + 2a a a b b b c  - a a a b b c  +     |
|        0 1 2 1 4 5     0 1 2 0 3 4 5     0 1 2 1 3 4 5    0 1 2 3 4 5       |
|     ------------------------------------------------------------------------|
|      6 2   2       5       2    2 4 2   2     2 4       2     3 3       2   |
|     a b b c  - 2a a b b b c  + a a b b c  + 2a a b b b c  - 2a a b b b c  + |
|      1 0 5 5     0 1 0 1 5 5    0 1 1 5 5     0 1 0 3 5 5     0 1 1 3 5 5   |
|     ------------------------------------------------------------------------|
|      4 2 2   2    6 3           5 2           2 4   2        3 3 3          |
|     a a b b c  - a b c c  + 3a a b b c c  - 3a a b b c c  + a a b c c  +    |
|      0 1 3 5 5    2 1 0 6     1 2 1 2 0 6     1 2 1 2 0 6    1 2 2 0 6      |
|     ------------------------------------------------------------------------|
|       6                 5                 5                   4 2           |
|     3a b b b c c  - 3a a b b b c c  - 3a a b b b c c  + 3a a a b b c c  -   |
|       2 0 1 3 0 6     1 2 0 2 3 0 6     0 2 1 2 3 0 6     0 1 2 2 3 0 6     |
|     ------------------------------------------------------------------------|
|         5                 5 2           2 4                   4             |
|     3a a b b b c c  + 3a a b b c c  + 3a a b b b c c  - 3a a a b b b c c  - |
|       1 2 0 1 4 0 6     0 2 1 4 0 6     1 2 0 2 4 0 6     0 1 2 1 2 4 0 6   |
|     ------------------------------------------------------------------------|
|         5               2 4                   4   2         2 4   2         |
|     3a a b b b c c  + 3a a b b b c c  + 3a a a b b c c  - 3a a b b c c  +   |
|       0 2 0 3 4 0 6     0 2 2 3 4 0 6     0 1 2 0 4 0 6     0 2 1 4 0 6     |
|     ------------------------------------------------------------------------|
|      3 3 3         2 4                   4 2           3 3                  |
|     a a b c c  + 3a a b b b c c  - 6a a a b b c c  - 3a a b b b c c  +      |
|      0 2 4 0 6     1 2 0 1 5 0 6     0 1 2 1 5 0 6     1 2 0 2 5 0 6        |
|     ------------------------------------------------------------------------|
|         2 3                 3 2 2               4                           |
|     9a a a b b b c c  - 3a a a b b c c  + 6a a a b b b c c  +               |
|       0 1 2 1 2 5 0 6     0 1 2 2 5 0 6     0 1 2 0 3 5 0 6                 |
|     ------------------------------------------------------------------------|
|       2 4               2   3                 2 3                           |
|     3a a b b b c c  - 9a a a b b b c c  - 9a a a b b b c c  +               |
|       0 2 1 3 5 0 6     0 1 2 2 3 5 0 6     0 1 2 0 4 5 0 6                 |
|     ------------------------------------------------------------------------|
|       2   3               3 3               3   2 2             3 2   2     |
|     9a a a b b b c c  - 3a a b b b c c  - 3a a a b b c c  + 6a a a b b c c  |
|       0 1 2 1 4 5 0 6     0 2 3 4 5 0 6     0 1 2 4 5 0 6     0 1 2 0 5 0 6 |
|     ------------------------------------------------------------------------|
|         2 2 2   2         2 3     2         3   2   2         3 2     2     |
|     - 9a a a b b c c  + 3a a a b b c c  + 6a a a b b c c  + 3a a a b b c c  |
|         0 1 2 1 5 0 6     0 1 2 2 5 0 6     0 1 2 3 5 0 6     0 1 2 4 5 0 6 |
|     ------------------------------------------------------------------------|
|         3 3 3        6   2           5                5 2                   |
|     - 2a a b c c  + a b b c c  - 2a a b b b c c  - a a b b c c  +           |
|         0 1 5 0 6    2 0 1 1 6     1 2 0 1 2 1 6    0 2 1 2 1 6             |
|     ------------------------------------------------------------------------|
|      2 4   2             4   2          2 3 3         6 2                   |
|     a a b b c c  + 2a a a b b c c  - a a a b c c  - 2a b b c c  +           |
|      1 2 0 2 1 6     0 1 2 1 2 1 6    0 1 2 2 1 6     2 0 3 1 6             |
|     ------------------------------------------------------------------------|
|         5               2 4 2             5 2             5                 |
|     4a a b b b c c  - 2a a b b c c  + 2a a b b c c  - 2a a b b b c c  -     |
|       0 2 0 2 3 1 6     0 2 2 3 1 6     1 2 0 4 1 6     0 2 0 1 4 1 6       |
|     ------------------------------------------------------------------------|
|           4               2 4              2 4   2        3 3   2           |
|     2a a a b b b c c  + 2a a b b b c c  + a a b b c c  - a a b b c c  -     |
|       0 1 2 0 2 4 1 6     0 2 1 2 4 1 6    0 2 0 4 1 6    0 2 2 4 1 6       |
|     ------------------------------------------------------------------------|
|       2 4 2               4              2 4 2           2   3              |
|     2a a b b c c  + 4a a a b b b c c  + a a b b c c  - 6a a a b b b c c  +  |
|       1 2 0 5 1 6     0 1 2 0 1 5 1 6    0 2 1 5 1 6     0 1 2 1 2 5 1 6    |
|     ------------------------------------------------------------------------|
|       2 2 2 2           2 4               3 3               3 3             |
|     3a a a b b c c  - 4a a b b b c c  + 4a a b b b c c  - 2a a b b b c c  + |
|       0 1 2 2 5 1 6     0 2 0 3 5 1 6     0 2 2 3 5 1 6     0 2 1 4 5 1 6   |
|     ------------------------------------------------------------------------|
|       3   2              4 2 2           3   2   2         3 2     2        |
|     2a a a b b b c c  + a a b b c c  + 4a a a b b c c  - 4a a a b b c c  -  |
|       0 1 2 2 4 5 1 6    0 2 4 5 1 6     0 1 2 1 5 1 6     0 1 2 2 5 1 6    |
|     ------------------------------------------------------------------------|
|       4 2   2         4       2         4 2 3          5   2                |
|     2a a b b c c  - 2a a a b b c c  + 2a a b c c  - a a b b c c  +          |
|       0 2 3 5 1 6     0 1 2 4 5 1 6     0 1 5 1 6    1 2 0 1 2 6            |
|     ------------------------------------------------------------------------|
|        5 3         2 4                   4 2          3 3   2               |
|     a a b c c  + 2a a b b b c c  - 2a a a b b c c  - a a b b c c  +         |
|      0 2 1 2 6     1 2 0 1 2 2 6     0 1 2 1 2 2 6    1 2 0 2 2 6           |
|     ------------------------------------------------------------------------|
|        2 3   2           5 2             5                  4               |
|     a a a b b c c  + 2a a b b c c  - 3a a b b b c c  - a a a b b b c c  +   |
|      0 1 2 1 2 2 6     1 2 0 3 2 6     0 2 0 1 3 2 6    0 1 2 0 2 3 2 6     |
|     ------------------------------------------------------------------------|
|       2 4              2   3 2           2 4 2               4              |
|     3a a b b b c c  - a a a b b c c  - 2a a b b c c  + 5a a a b b b c c  -  |
|       0 2 1 2 3 2 6    0 1 2 2 3 2 6     1 2 0 4 2 6     0 1 2 0 1 4 2 6    |
|     ------------------------------------------------------------------------|
|       2 4 2            2 3              2   3               2 4             |
|     3a a b b c c  - a a a b b b c c  + a a a b b b c c  + 3a a b b b c c  - |
|       0 2 1 4 2 6    0 1 2 0 2 4 2 6    0 1 2 1 2 4 2 6     0 2 0 3 4 2 6   |
|     ------------------------------------------------------------------------|
|       3 3               2   3   2         3 3   2        3   2   2          |
|     3a a b b b c c  - 4a a a b b c c  + 3a a b b c c  + a a a b b c c  -    |
|       0 2 2 3 4 2 6     0 1 2 0 4 2 6     0 2 1 4 2 6    0 1 2 2 4 2 6      |
|     ------------------------------------------------------------------------|
|      4 2 3         3 3 2             2 3               2   3 2              |
|     a a b c c  + 2a a b b c c  - 7a a a b b b c c  + 5a a a b b c c  +      |
|      0 2 4 2 6     1 2 0 5 2 6     0 1 2 0 1 5 2 6     0 1 2 1 5 2 6        |
|     ------------------------------------------------------------------------|
|         3 2               2 2 2               2   3                         |
|     3a a a b b b c c  - 3a a a b b b c c  - 2a a a b b b c c  -             |
|       0 1 2 0 2 5 2 6     0 1 2 1 2 5 2 6     0 1 2 0 3 5 2 6               |
|     ------------------------------------------------------------------------|
|       3 3               3   2               2 2 2                           |
|     3a a b b b c c  + 5a a a b b b c c  + 9a a a b b b c c  -               |
|       0 2 1 3 5 2 6     0 1 2 2 3 5 2 6     0 1 2 0 4 5 2 6                 |
|     ------------------------------------------------------------------------|
|       3   2               3 2                 4 2                           |
|     7a a a b b b c c  - 2a a a b b b c c  + 3a a b b b c c  +               |
|       0 1 2 1 4 5 2 6     0 1 2 2 4 5 2 6     0 2 3 4 5 2 6                 |
|     ------------------------------------------------------------------------|
|       4     2           2 3     2         3 2     2        3 3   2          |
|     2a a a b b c c  - 6a a a b b c c  + 5a a a b b c c  + a a b b c c  -    |
|       0 1 2 4 5 2 6     0 1 2 0 5 2 6     0 1 2 1 5 2 6    0 1 2 5 2 6      |
|     ------------------------------------------------------------------------|
|       4       2        4 2   2        6 2            5 2                    |
|     4a a a b b c c  - a a b b c c  - a b b c c  + a a b b c c  +            |
|       0 1 2 3 5 2 6    0 1 4 5 2 6    2 0 1 3 6    1 2 0 2 3 6              |
|     ------------------------------------------------------------------------|
|         5                   4   2        2 4   2        2   3 3             |
|     2a a b b b c c  - 2a a a b b c c  - a a b b c c  + a a a b c c  +       |
|       0 2 0 1 2 3 6     0 1 2 0 2 3 6    0 2 1 2 3 6    0 1 2 2 3 6         |
|     ------------------------------------------------------------------------|
|        5 2           2 4              3 3 2               4 2               |
|     a a b b c c  - 2a a b b b c c  + a a b b c c  - 2a a a b b c c  -       |
|      0 2 0 4 3 6     0 2 0 2 4 3 6    0 2 2 4 3 6     0 1 2 0 5 3 6         |
|     ------------------------------------------------------------------------|
|       2 4               2   3               3 3               3   2 2       |
|     2a a b b b c c  + 6a a a b b b c c  + 2a a b b b c c  - 4a a a b b c c  |
|       0 2 0 1 5 3 6     0 1 2 0 2 5 3 6     0 2 1 2 5 3 6     0 1 2 2 5 3 6 |
|     ------------------------------------------------------------------------|
|         3 3               4 2               3   2   2        4 2   2        |
|     + 2a a b b b c c  - 2a a b b b c c  - 4a a a b b c c  - a a b b c c  +  |
|         0 2 0 4 5 3 6     0 2 2 4 5 3 6     0 1 2 0 5 3 6    0 2 1 5 3 6    |
|     ------------------------------------------------------------------------|
|       4       2        5     2         5   3          5 2                   |
|     5a a a b b c c  + a a b b c c  - 2a a b c c  + a a b b c c  -           |
|       0 1 2 2 5 3 6    0 2 4 5 3 6     0 1 5 3 6    1 2 0 1 4 6             |
|     ------------------------------------------------------------------------|
|        5   2        2 4 2          2 4 2            2 3   2                 |
|     a a b b c c  - a a b b c c  + a a b b c c  + a a a b b c c  -           |
|      0 2 0 1 4 6    1 2 0 2 4 6    0 2 1 2 4 6    0 1 2 0 2 4 6             |
|     ------------------------------------------------------------------------|
|      2   3   2           5 2           2 4               3 3 2              |
|     a a a b b c c  + 2a a b b c c  - 4a a b b b c c  + 2a a b b c c  -      |
|      0 1 2 1 2 4 6     0 2 0 3 4 6     0 2 0 2 3 4 6     0 2 2 3 4 6        |
|     ------------------------------------------------------------------------|
|           4 2           2 4               2   3               3 3           |
|     3a a a b b c c  + 2a a b b b c c  + 4a a a b b b c c  - 2a a b b b c c  |
|       0 1 2 0 4 4 6     0 2 0 1 4 4 6     0 1 2 0 2 4 4 6     0 2 1 2 4 4 6 |
|     ------------------------------------------------------------------------|
|        3   2 2          3 3   2        4 2   2           2 3 2              |
|     - a a a b b c c  - a a b b c c  + a a b b c c  + 4a a a b b c c  -      |
|        0 1 2 2 4 4 6    0 2 0 4 4 6    0 2 2 4 4 6     0 1 2 0 5 4 6        |
|     ------------------------------------------------------------------------|
|       2   3              3 3 2           2 2 2               3   2          |
|     2a a a b b b c c  - a a b b c c  - 6a a a b b b c c  + 4a a a b b b c c |
|       0 1 2 0 1 5 4 6    0 2 1 5 4 6     0 1 2 0 2 5 4 6     0 1 2 1 2 5 4 6|
|     ------------------------------------------------------------------------|
|        3 2   2           3 3               4 2               3   2          |
|     + a a a b b c c  + 4a a b b b c c  - 4a a b b b c c  - 2a a a b b b c c |
|        0 1 2 2 5 4 6     0 2 0 3 5 4 6     0 2 2 3 5 4 6     0 1 2 0 4 5 4 6|
|     ------------------------------------------------------------------------|
|         4 2              5   2           3 2     2         4       2        |
|     + 2a a b b b c c  - a a b b c c  + 4a a a b b c c  - 3a a a b b c c  -  |
|         0 2 1 4 5 4 6    0 2 4 5 4 6     0 1 2 0 5 4 6     0 1 2 1 5 4 6    |
|     ------------------------------------------------------------------------|
|      4 2   2         5     2        5     2        2 4 2                    |
|     a a b b c c  + 2a a b b c c  + a a b b c c  - a a b b c c  +            |
|      0 1 2 5 4 6     0 2 3 5 4 6    0 1 4 5 4 6    1 2 0 1 5 6              |
|     ------------------------------------------------------------------------|
|           4   2        2 4 3        3 3 2             2 3                   |
|     2a a a b b c c  - a a b c c  + a a b b c c  - 2a a a b b b c c  +       |
|       0 1 2 0 1 5 6    0 2 1 5 6    1 2 0 2 5 6     0 1 2 0 1 2 5 6         |
|     ------------------------------------------------------------------------|
|      2   3 2               4 2           2 4               2   3            |
|     a a a b b c c  - 4a a a b b c c  + 3a a b b b c c  + 5a a a b b b c c  -|
|      0 1 2 1 2 5 6     0 1 2 0 3 5 6     0 2 0 1 3 5 6     0 1 2 0 2 3 5 6  |
|     ------------------------------------------------------------------------|
|       3 3              3   2 2             2 3 2           2   3            |
|     3a a b b b c c  - a a a b b c c  + 5a a a b b c c  - 7a a a b b b c c  +|
|       0 2 1 2 3 5 6    0 1 2 2 3 5 6     0 1 2 0 4 5 6     0 1 2 0 1 4 5 6  |
|     ------------------------------------------------------------------------|
|       3 3 2           2 2 2              3   2              3 2   2         |
|     3a a b b c c  - 3a a a b b b c c  + a a a b b b c c  + a a a b b c c  - |
|       0 2 1 4 5 6     0 1 2 0 2 4 5 6    0 1 2 1 2 4 5 6    0 1 2 2 4 5 6   |
|     ------------------------------------------------------------------------|
|       3 3               4 2               3   2   2         4 2   2         |
|     3a a b b b c c  + 3a a b b b c c  + 5a a a b b c c  - 3a a b b c c  -   |
|       0 2 0 3 4 5 6     0 2 2 3 4 5 6     0 1 2 0 4 5 6     0 2 1 4 5 6     |
|     ------------------------------------------------------------------------|
|       4       2        5   3           3 2 2           2 2 2                |
|     2a a a b b c c  + a a b c c  - 6a a a b b c c  + 9a a a b b b c c  -    |
|       0 1 2 2 4 5 6    0 2 4 5 6     0 1 2 0 5 5 6     0 1 2 0 1 5 5 6      |
|     ------------------------------------------------------------------------|
|       3   2 2           2 3                3 2                3 3 2         |
|     4a a a b b c c  + 3a a a b b b c c  - a a a b b b c c  - a a b b c c  - |
|       0 1 2 1 5 5 6     0 1 2 0 2 5 5 6    0 1 2 1 2 5 5 6    0 1 2 5 5 6   |
|     ------------------------------------------------------------------------|
|       3   2               4 2              4                                |
|     2a a a b b b c c  + 3a a b b b c c  - a a a b b b c c  -                |
|       0 1 2 0 3 5 5 6     0 2 1 3 5 5 6    0 1 2 2 3 5 5 6                  |
|     ------------------------------------------------------------------------|
|       3 2                 4                   4 2                           |
|     7a a a b b b c c  + 5a a a b b b c c  + 2a a b b b c c  -               |
|       0 1 2 0 4 5 5 6     0 1 2 1 4 5 5 6     0 1 2 4 5 5 6                 |
|     ------------------------------------------------------------------------|
|       5                5   2           3 3   2         4 2   2              |
|     3a a b b b c c  - a a b b c c  + 2a a b b c c  - 2a a b b c c  +        |
|       0 2 3 4 5 5 6    0 1 4 5 5 6     0 1 0 5 5 6     0 1 1 5 5 6          |
|     ------------------------------------------------------------------------|
|       5     2        6 3 2       5 2   2     2 4   2 2    3 3 3 2           |
|     2a a b b c c  + a b c  - 3a a b b c  + 3a a b b c  - a a b c  +         |
|       0 1 3 5 5 6    2 0 6     0 2 0 2 6     0 2 0 2 6    0 2 2 6           |
|     ------------------------------------------------------------------------|
|       2 4 2   2     3 3       2     4 2 2   2     4 2   2 2     5     2 2   |
|     3a a b b c  - 6a a b b b c  + 3a a b b c  + 3a a b b c  - 3a a b b c  + |
|       0 2 0 5 6     0 2 0 2 5 6     0 2 2 5 6     0 2 0 5 6     0 2 2 5 6   |
|     ------------------------------------------------------------------------|
|      6 3 2      5 3         2 4 2           3 3   2        4 2 3            |
|     a b c  + a a b c c  - 3a a b b c c  + 3a a b b c c  - a a b c c  -      |
|      0 5 6    1 2 1 0 7     1 2 1 2 0 7     1 2 1 2 0 7    1 2 2 0 7        |
|     ------------------------------------------------------------------------|
|         5                5 2           2 4                   4              |
|     3a a b b b c c  - a a b b c c  + 3a a b b b c c  + 5a a a b b b c c  -  |
|       1 2 0 1 3 0 7    0 2 1 3 0 7     1 2 0 2 3 0 7     0 1 2 1 2 3 0 7    |
|     ------------------------------------------------------------------------|
|         2 3 2             5   2         2 4   2         2 4                 |
|     4a a a b b c c  + 2a a b b c c  - 2a a b b c c  + 3a a b b b c c  -     |
|       0 1 2 2 3 0 7     0 2 0 3 0 7     0 2 2 3 0 7     1 2 0 1 4 0 7       |
|     ------------------------------------------------------------------------|
|           4 2           3 3                2 3                3 2 2         |
|     2a a a b b c c  - 3a a b b b c c  + a a a b b b c c  + a a a b b c c  - |
|       0 1 2 1 4 0 7     1 2 0 2 4 0 7    0 1 2 1 2 4 0 7    0 1 2 2 4 0 7   |
|     ------------------------------------------------------------------------|
|          4               2 4              2   3                2 3   2      |
|     a a a b b b c c  + 2a a b b b c c  - a a a b b b c c  - a a a b b c c  +|
|      0 1 2 0 3 4 0 7     0 2 1 3 4 0 7    0 1 2 2 3 4 0 7    0 1 2 0 4 0 7  |
|     ------------------------------------------------------------------------|
|      2   3   2        3 3   2         3 3                 2 3 2             |
|     a a a b b c c  - a a b b c c  - 3a a b b b c c  + 5a a a b b c c  +     |
|      0 1 2 1 4 0 7    0 2 3 4 0 7     1 2 0 1 5 0 7     0 1 2 1 5 0 7       |
|     ------------------------------------------------------------------------|
|       4 2                 3 2                 4   2                         |
|     3a a b b b c c  - 7a a a b b b c c  + 2a a a b b c c  -                 |
|       1 2 0 2 5 0 7     0 1 2 1 2 5 0 7     0 1 2 2 5 0 7                   |
|     ------------------------------------------------------------------------|
|         2 3               2   3               2 2 2                         |
|     2a a a b b b c c  - 7a a a b b b c c  + 9a a a b b b c c  +             |
|       0 1 2 0 3 5 0 7     0 1 2 1 3 5 0 7     0 1 2 2 3 5 0 7               |
|     ------------------------------------------------------------------------|
|       3 3 2             3 2               2 2 2                             |
|     2a a b b c c  + 5a a a b b b c c  - 3a a a b b b c c  -                 |
|       0 2 3 5 0 7     0 1 2 0 4 5 0 7     0 1 2 1 4 5 0 7                   |
|     ------------------------------------------------------------------------|
|       2 3                 3   2                 4     2                     |
|     2a a a b b b c c  + 3a a a b b b c c  - 4a a a b b c c  +               |
|       0 1 2 2 4 5 0 7     0 1 2 3 4 5 0 7     0 1 2 0 5 0 7                 |
|     ------------------------------------------------------------------------|
|       2 3     2        2 4   2         3 2     2        3 3   2             |
|     5a a a b b c c  - a a b b c c  - 6a a a b b c c  + a a b b c c  -       |
|       0 1 2 1 5 0 7    0 1 2 5 0 7     0 1 2 3 5 0 7    0 1 4 5 0 7         |
|     ------------------------------------------------------------------------|
|        5   2         2 4                  4 2          3 3   2              |
|     a a b b c c  + 2a a b b b c c  + a a a b b c c  - a a b b c c  -        |
|      1 2 0 1 1 7     1 2 0 1 2 1 7    0 1 2 1 2 1 7    1 2 0 2 1 7          |
|     ------------------------------------------------------------------------|
|         2 3   2          3 2 3           5 2            5                   |
|     2a a a b b c c  + a a a b c c  + 2a a b b c c  + a a b b b c c  -       |
|       0 1 2 1 2 1 7    0 1 2 2 1 7     1 2 0 3 1 7    0 2 0 1 3 1 7         |
|     ------------------------------------------------------------------------|
|           4              2 4               2   3 2           2 4 2          |
|     5a a a b b b c c  - a a b b b c c  + 3a a a b b c c  - 2a a b b c c  +  |
|       0 1 2 0 2 3 1 7    0 2 1 2 3 1 7     0 1 2 2 3 1 7     1 2 0 4 1 7    |
|     ------------------------------------------------------------------------|
|          4                 2 3              2   3              2 2 2 2      |
|     a a a b b b c c  + 3a a a b b b c c  - a a a b b b c c  - a a a b b c c |
|      0 1 2 0 1 4 1 7     0 1 2 0 2 4 1 7    0 1 2 1 2 4 1 7    0 1 2 2 4 1 7|
|     ------------------------------------------------------------------------|
|        2 4              3 3               3 3 2             2 3             |
|     - a a b b b c c  + a a b b b c c  + 2a a b b c c  - 3a a a b b b c c  - |
|        0 2 0 3 4 1 7    0 2 2 3 4 1 7     1 2 0 5 1 7     0 1 2 0 1 5 1 7   |
|     ------------------------------------------------------------------------|
|      2   3 2            3 2               2 2 2               2 3   2       |
|     a a a b b c c  - a a a b b b c c  + 5a a a b b b c c  - 2a a a b b c c  |
|      0 1 2 1 5 1 7    0 1 2 0 2 5 1 7     0 1 2 1 2 5 1 7     0 1 2 2 5 1 7 |
|     ------------------------------------------------------------------------|
|         2   3              3 3               3   2                          |
|     + 6a a a b b b c c  + a a b b b c c  - 7a a a b b b c c  -              |
|         0 1 2 0 3 5 1 7    0 2 1 3 5 1 7     0 1 2 2 3 5 1 7                |
|     ------------------------------------------------------------------------|
|       2 2 2              3   2               3 2                            |
|     3a a a b b b c c  + a a a b b b c c  + 2a a a b b b c c  -              |
|       0 1 2 0 4 5 1 7    0 1 2 1 4 5 1 7     0 1 2 2 4 5 1 7                |
|     ------------------------------------------------------------------------|
|      4 2               2 3     2         3 2     2        3 3   2           |
|     a a b b b c c  + 2a a a b b c c  - 3a a a b b c c  + a a b b c c  +     |
|      0 2 3 4 5 1 7     0 1 2 0 5 1 7     0 1 2 1 5 1 7    0 1 2 5 1 7       |
|     ------------------------------------------------------------------------|
|       4       2        4 2   2        2 4   2            4 3                |
|     4a a a b b c c  - a a b b c c  + a a b b c c  - a a a b c c  -          |
|       0 1 2 3 5 1 7    0 1 4 5 1 7    1 2 0 1 2 7    0 1 2 1 2 7            |
|     ------------------------------------------------------------------------|
|       3 3                 2 3 2          4 2   2          3 2   2           |
|     2a a b b b c c  + 2a a a b b c c  + a a b b c c  - a a a b b c c  -     |
|       1 2 0 1 2 2 7     0 1 2 1 2 2 7    1 2 0 2 2 7    0 1 2 1 2 2 7       |
|     ------------------------------------------------------------------------|
|       2 4 2               4              2 4 2             2 3              |
|     2a a b b c c  + 2a a a b b b c c  + a a b b c c  + 2a a a b b b c c  -  |
|       1 2 0 3 2 7     0 1 2 0 1 3 2 7    0 2 1 3 2 7     0 1 2 0 2 3 2 7    |
|     ------------------------------------------------------------------------|
|       2   3              2 2 2 2           2 4   2         3 3   2          |
|     4a a a b b b c c  + a a a b b c c  - 2a a b b c c  + 2a a b b c c  +    |
|       0 1 2 1 2 3 2 7    0 1 2 2 3 2 7     0 2 0 3 2 7     0 2 2 3 2 7      |
|     ------------------------------------------------------------------------|
|       3 3 2             2 3               2   3 2           2   3           |
|     2a a b b c c  - 4a a a b b b c c  + 2a a a b b c c  + 2a a a b b b c c  |
|       1 2 0 4 2 7     0 1 2 0 1 4 2 7     0 1 2 1 4 2 7     0 1 2 0 3 4 2 7 |
|     ------------------------------------------------------------------------|
|         3 3              2 2 2   2        3   2   2        4 2   2          |
|     - 2a a b b b c c  + a a a b b c c  - a a a b b c c  + a a b b c c  -    |
|         0 2 1 3 4 2 7    0 1 2 0 4 2 7    0 1 2 1 4 2 7    0 2 3 4 2 7      |
|     ------------------------------------------------------------------------|
|       4 2 2             3 2               2 2 2 2             4             |
|     2a a b b c c  + 6a a a b b b c c  - 4a a a b b c c  - 2a a a b b b c c  |
|       1 2 0 5 2 7     0 1 2 0 1 5 2 7     0 1 2 1 5 2 7     0 1 2 0 2 5 2 7 |
|     ------------------------------------------------------------------------|
|         2 3                 2 2 2               3   2                       |
|     + 2a a a b b b c c  - 4a a a b b b c c  + 6a a a b b b c c  -           |
|         0 1 2 1 2 5 2 7     0 1 2 0 3 5 2 7     0 1 2 1 3 5 2 7             |
|     ------------------------------------------------------------------------|
|       3 2                 4 2 2           2 3                               |
|     2a a a b b b c c  - 2a a b b c c  - 2a a a b b b c c  +                 |
|       0 1 2 2 3 5 2 7     0 2 3 5 2 7     0 1 2 0 4 5 2 7                   |
|     ------------------------------------------------------------------------|
|       3 2                 4                   2 4   2         3 3   2       |
|     2a a a b b b c c  - 2a a a b b b c c  + 2a a b b c c  - 2a a b b c c  + |
|       0 1 2 1 4 5 2 7     0 1 2 3 4 5 2 7     0 1 0 5 2 7     0 1 1 5 2 7   |
|     ------------------------------------------------------------------------|
|       4 2   2          5 2          2 4 2               4                   |
|     2a a b b c c  + a a b b c c  - a a b b c c  - 2a a a b b b c c  +       |
|       0 1 3 5 2 7    1 2 0 1 3 7    1 2 0 2 3 7     0 1 2 0 1 2 3 7         |
|     ------------------------------------------------------------------------|
|         2 3   2        2   3   2        2 2 2 3           5 2               |
|     2a a a b b c c  + a a a b b c c  - a a a b c c  - 2a a b b c c  +       |
|       0 1 2 0 2 3 7    0 1 2 1 2 3 7    0 1 2 2 3 7     0 2 0 3 3 7         |
|     ------------------------------------------------------------------------|
|       2 4               3 3 2              4 2           2   3              |
|     4a a b b b c c  - 2a a b b c c  + a a a b b c c  - 2a a a b b b c c  +  |
|       0 2 0 2 3 3 7     0 2 2 3 3 7    0 1 2 0 4 3 7     0 1 2 0 2 4 3 7    |
|     ------------------------------------------------------------------------|
|      3   2 2           2   3               2 2 2                            |
|     a a a b b c c  + 2a a a b b b c c  - 2a a a b b b c c  -                |
|      0 1 2 2 4 3 7     0 1 2 0 1 5 3 7     0 1 2 0 2 5 3 7                  |
|     ------------------------------------------------------------------------|
|       3   2               3 2   2           3 3               4 2           |
|     2a a a b b b c c  + 2a a a b b c c  - 4a a b b b c c  + 4a a b b b c c  |
|       0 1 2 1 2 5 3 7     0 1 2 2 5 3 7     0 2 0 3 5 3 7     0 2 2 3 5 3 7 |
|     ------------------------------------------------------------------------|
|         3   2               4                  4       2        4 2   2     |
|     + 2a a a b b b c c  - 2a a a b b b c c  + a a a b b c c  - a a b b c c  |
|         0 1 2 0 4 5 3 7     0 1 2 2 4 5 3 7    0 1 2 1 5 3 7    0 1 2 5 3 7 |
|     ------------------------------------------------------------------------|
|         5     2        5     2        2 4 2              4   2              |
|     - 2a a b b c c  + a a b b c c  - a a b b c c  + a a a b b c c  +        |
|         0 2 3 5 3 7    0 1 4 5 3 7    1 2 0 1 4 7    0 1 2 0 1 4 7          |
|     ------------------------------------------------------------------------|
|      3 3 2          2   3 2            3 2   2        2 2 2   2             |
|     a a b b c c  - a a a b b c c  - a a a b b c c  + a a a b b c c  -       |
|      1 2 0 2 4 7    0 1 2 1 2 4 7    0 1 2 0 2 4 7    0 1 2 1 2 4 7         |
|     ------------------------------------------------------------------------|
|      2 4              2   3              3 3              3   2 2           |
|     a a b b b c c  + a a a b b b c c  + a a b b b c c  - a a a b b c c  +   |
|      0 2 0 1 3 4 7    0 1 2 0 2 3 4 7    0 2 1 2 3 4 7    0 1 2 2 3 4 7     |
|     ------------------------------------------------------------------------|
|        2 3 2          2   3              2 2 2              3   2           |
|     a a a b b c c  - a a a b b b c c  - a a a b b b c c  + a a a b b b c c  |
|      0 1 2 0 4 4 7    0 1 2 0 1 4 4 7    0 1 2 0 2 4 4 7    0 1 2 1 2 4 4 7 |
|     ------------------------------------------------------------------------|
|        3 3              4 2                 3 2 2          2 2 2            |
|     + a a b b b c c  - a a b b b c c  - 2a a a b b c c  + a a a b b b c c  +|
|        0 2 0 3 4 4 7    0 2 2 3 4 4 7     0 1 2 0 5 4 7    0 1 2 0 1 5 4 7  |
|     ------------------------------------------------------------------------|
|      3   2 2           2 3                 3 2                              |
|     a a a b b c c  + 3a a a b b b c c  - 3a a a b b b c c  -                |
|      0 1 2 1 5 4 7     0 1 2 0 2 5 4 7     0 1 2 1 2 5 4 7                  |
|     ------------------------------------------------------------------------|
|       3   2              4 2               4                                |
|     2a a a b b b c c  - a a b b b c c  + 3a a a b b b c c  +                |
|       0 1 2 0 3 5 4 7    0 2 1 3 5 4 7     0 1 2 2 3 5 4 7                  |
|     ------------------------------------------------------------------------|
|      3 2                4                  5                 3 3   2        |
|     a a a b b b c c  - a a a b b b c c  + a a b b b c c  - 2a a b b c c  +  |
|      0 1 2 0 4 5 4 7    0 1 2 1 4 5 4 7    0 2 3 4 5 4 7     0 1 0 5 4 7    |
|     ------------------------------------------------------------------------|
|       4 2   2         5     2        3 3 2             2 3   2              |
|     2a a b b c c  - 2a a b b c c  + a a b b c c  - 2a a a b b c c  +        |
|       0 1 1 5 4 7     0 1 3 5 4 7    1 2 0 1 5 7     0 1 2 0 1 5 7          |
|     ------------------------------------------------------------------------|
|      2   3 3        4 2 2             3 2              2 2 2 2              |
|     a a a b c c  - a a b b c c  + 2a a a b b b c c  - a a a b b c c  +      |
|      0 1 2 1 5 7    1 2 0 2 5 7     0 1 2 0 1 2 5 7    0 1 2 1 2 5 7        |
|     ------------------------------------------------------------------------|
|         2 3 2          2   3              3 3 2           2 2 2             |
|     2a a a b b c c  - a a a b b b c c  - a a b b c c  - 3a a a b b b c c  + |
|       0 1 2 0 3 5 7    0 1 2 0 1 3 5 7    0 2 1 3 5 7     0 1 2 0 2 3 5 7   |
|     ------------------------------------------------------------------------|
|       3   2               3 3   2         4 2   2           3 2 2           |
|     3a a a b b b c c  + 2a a b b c c  - 2a a b b c c  - 3a a a b b c c  +   |
|       0 1 2 1 2 3 5 7     0 2 0 3 5 7     0 2 2 3 5 7     0 1 2 0 4 5 7     |
|     ------------------------------------------------------------------------|
|       2 2 2               3   2 2          2 3                              |
|     5a a a b b b c c  - 2a a a b b c c  + a a a b b b c c  -                |
|       0 1 2 0 1 4 5 7     0 1 2 1 4 5 7    0 1 2 0 2 4 5 7                  |
|     ------------------------------------------------------------------------|
|      3 2                 3   2               4 2                            |
|     a a a b b b c c  - 3a a a b b b c c  + 2a a b b b c c  +                |
|      0 1 2 1 2 4 5 7     0 1 2 0 3 4 5 7     0 2 1 3 4 5 7                  |
|     ------------------------------------------------------------------------|
|      4                  3 2     2        4       2        5     2           |
|     a a a b b b c c  - a a a b b c c  + a a a b b c c  - a a b b c c  +     |
|      0 1 2 2 3 4 5 7    0 1 2 0 4 5 7    0 1 2 1 4 5 7    0 2 3 4 5 7       |
|     ------------------------------------------------------------------------|
|         4   2           2 3                 3 2   2          2 4            |
|     4a a a b b c c  - 7a a a b b b c c  + 3a a a b b c c  - a a b b b c c  +|
|       0 1 2 0 5 5 7     0 1 2 0 1 5 5 7     0 1 2 1 5 5 7    0 1 0 2 5 5 7  |
|     ------------------------------------------------------------------------|
|      3 3               3 2                 4                  4 2           |
|     a a b b b c c  + 6a a a b b b c c  - 5a a a b b b c c  - a a b b b c c  |
|      0 1 1 2 5 5 7     0 1 2 0 3 5 5 7     0 1 2 1 3 5 5 7    0 1 2 3 5 5 7 |
|     ------------------------------------------------------------------------|
|         5   2          3 3              4 2              5                  |
|     + 2a a b b c c  + a a b b b c c  - a a b b b c c  + a a b b b c c  -    |
|         0 2 3 5 5 7    0 1 0 4 5 5 7    0 1 1 4 5 5 7    0 1 3 4 5 5 7      |
|     ------------------------------------------------------------------------|
|         5 3          5 2               4 2           2 4                    |
|     2a a b c c  + a a b b c c  + 5a a a b b c c  - 2a a b b b c c  -        |
|       1 2 0 6 7    0 2 0 1 6 7     0 1 2 0 2 6 7     0 2 0 1 2 6 7          |
|     ------------------------------------------------------------------------|
|       2   3   2        3 3   2        3   2 3        2 4 2                  |
|     4a a a b b c c  + a a b b c c  + a a a b c c  - a a b b c c  +          |
|       0 1 2 0 2 6 7    0 2 1 2 6 7    0 1 2 2 6 7    0 2 0 4 6 7            |
|     ------------------------------------------------------------------------|
|       3 3              4 2 2           2   3 2           3 3                |
|     2a a b b b c c  - a a b b c c  - 4a a a b b c c  + 2a a b b b c c  +    |
|       0 2 0 2 4 6 7    0 2 2 4 6 7     0 1 2 0 5 6 7     0 2 0 1 5 6 7      |
|     ------------------------------------------------------------------------|
|       3   2               4 2               4     2           4 2           |
|     6a a a b b b c c  - 2a a b b b c c  - 2a a a b b c c  - 2a a b b b c c  |
|       0 1 2 0 2 5 6 7     0 2 1 2 5 6 7     0 1 2 2 5 6 7     0 2 0 4 5 6 7 |
|     ------------------------------------------------------------------------|
|         5                 4       2        5     2        5     2           |
|     + 2a a b b b c c  - 2a a a b b c c  + a a b b c c  + a a b b c c  -     |
|         0 2 2 4 5 6 7     0 1 2 0 5 6 7    0 2 1 5 6 7    0 1 2 5 6 7       |
|     ------------------------------------------------------------------------|
|      6   2        2 4 3 2        4 2   2       2 3 2   2     2   3       2  |
|     a b b c c  + a a b c  - a a a b b c  - 2a a a b b c  + 2a a a b b b c  +|
|      0 4 5 6 7    1 2 0 7    0 1 2 0 1 7     0 1 2 0 2 7     0 1 2 0 1 2 7  |
|     ------------------------------------------------------------------------|
|      2 2 2   2 2    3   2   2 2    2 4 2   2     3 3       2    4 2 2   2   |
|     a a a b b c  - a a a b b c  + a a b b c  - 2a a b b b c  + a a b b c  + |
|      0 1 2 0 2 7    0 1 2 1 2 7    0 2 0 3 7     0 2 0 2 3 7    0 2 2 3 7   |
|     ------------------------------------------------------------------------|
|       2 2 2 2   2     3   2       2     3 2         2     4           2     |
|     2a a a b b c  - 2a a a b b b c  - 2a a a b b b c  + 2a a a b b b c  +   |
|       0 1 2 0 5 7     0 1 2 0 1 5 7     0 1 2 0 2 5 7     0 1 2 1 2 5 7     |
|     ------------------------------------------------------------------------|
|       4 2       2     5         2    4 2   2 2    5     2 2    6   2 2      |
|     2a a b b b c  - 2a a b b b c  + a a b b c  - a a b b c  + a b b c  -    |
|       0 2 0 3 5 7     0 2 2 3 5 7    0 1 0 5 7    0 1 1 5 7    0 3 5 7      |
|     ------------------------------------------------------------------------|
|      2 4 3         3 3 2           4 2   2        5   3                     |
|     a a b c c  + 3a a b b c c  - 3a a b b c c  + a a b c c  +               |
|      1 2 1 0 8     1 2 1 2 0 8     1 2 1 2 0 8    1 2 2 0 8                 |
|     ------------------------------------------------------------------------|
|       2 4                   4 2           3 3                 2 3           |
|     3a a b b b c c  + 2a a a b b c c  - 3a a b b b c c  - 7a a a b b b c c  |
|       1 2 0 1 3 0 8     0 1 2 1 3 0 8     1 2 0 2 3 0 8     0 1 2 1 2 3 0 8 |
|     ------------------------------------------------------------------------|
|           3 2 2               4   2        2 4   2         2   3   2        |
|     + 5a a a b b c c  - 4a a a b b c c  - a a b b c c  + 5a a a b b c c  -  |
|         0 1 2 2 3 0 8     0 1 2 0 3 0 8    0 2 1 3 0 8     0 1 2 2 3 0 8    |
|     ------------------------------------------------------------------------|
|       3 3                2 3 2           4 2                3 2             |
|     3a a b b b c c  + a a a b b c c  + 3a a b b b c c  + a a a b b b c c  - |
|       1 2 0 1 4 0 8    0 1 2 1 4 0 8     1 2 0 2 4 0 8    0 1 2 1 2 4 0 8   |
|     ------------------------------------------------------------------------|
|         4   2             2 3               2   3                           |
|     2a a a b b c c  + 5a a a b b b c c  - 2a a a b b b c c  -               |
|       0 1 2 2 4 0 8     0 1 2 0 3 4 0 8     0 1 2 1 3 4 0 8                 |
|     ------------------------------------------------------------------------|
|       2 2 2              3 3 2            3 2   2        2 3     2          |
|     3a a a b b b c c  + a a b b c c  - a a a b b c c  + a a a b b c c  +    |
|       0 1 2 2 3 4 0 8    0 2 3 4 0 8    0 1 2 0 4 0 8    0 1 2 2 4 0 8      |
|     ------------------------------------------------------------------------|
|       4 2                 3 2 2           5                   4             |
|     3a a b b b c c  - 4a a a b b c c  - 3a a b b b c c  + 5a a a b b b c c  |
|       1 2 0 1 5 0 8     0 1 2 1 5 0 8     1 2 0 2 5 0 8     0 1 2 1 2 5 0 8 |
|     ------------------------------------------------------------------------|
|          5 2             3 2               2 2 2                            |
|     - a a b b c c  - 2a a a b b b c c  + 9a a a b b b c c  -                |
|        0 1 2 5 0 8     0 1 2 0 3 5 0 8     0 1 2 1 3 5 0 8                  |
|     ------------------------------------------------------------------------|
|       2 3                 3   2 2            4                              |
|     7a a a b b b c c  - 6a a a b b c c  - a a a b b b c c  -                |
|       0 1 2 2 3 5 0 8     0 1 2 3 5 0 8    0 1 2 0 4 5 0 8                  |
|     ------------------------------------------------------------------------|
|      2 3                 2 4               3 2                3 3 2         |
|     a a a b b b c c  + 2a a b b b c c  + 3a a a b b b c c  - a a b b c c  + |
|      0 1 2 1 4 5 0 8     0 1 2 4 5 0 8     0 1 2 3 4 5 0 8    0 1 4 5 0 8   |
|     ------------------------------------------------------------------------|
|         5   2         2 4   2         3 3   2        2 4   2                |
|     2a a b b c c  - 2a a b b c c  + 2a a b b c c  + a a b b c c  -          |
|       0 1 0 5 0 8     0 1 1 5 0 8     0 1 3 5 0 8    1 2 0 1 1 8            |
|     ------------------------------------------------------------------------|
|       3 3                2 3 2          4 2   2           3 2   2           |
|     2a a b b b c c  - a a a b b c c  + a a b b c c  + 2a a a b b c c  -     |
|       1 2 0 1 2 1 8    0 1 2 1 2 1 8    1 2 0 2 1 8     0 1 2 1 2 1 8       |
|     ------------------------------------------------------------------------|
|        4   3         2 4 2               4                 2 3              |
|     a a a b c c  - 2a a b b c c  - 2a a a b b b c c  + 6a a a b b b c c  +  |
|      0 1 2 2 1 8     1 2 0 3 1 8     0 1 2 0 1 3 1 8     0 1 2 0 2 3 1 8    |
|     ------------------------------------------------------------------------|
|       2   3               2 2 2 2           2 4   2         3 3   2         |
|     2a a a b b b c c  - 4a a a b b c c  + 2a a b b c c  - 2a a b b c c  +   |
|       0 1 2 1 2 3 1 8     0 1 2 2 3 1 8     0 2 0 3 1 8     0 2 2 3 1 8     |
|     ------------------------------------------------------------------------|
|       3 3 2             3 2               2 3   2           2   3           |
|     2a a b b c c  - 4a a a b b b c c  + 2a a a b b c c  - 2a a a b b b c c  |
|       1 2 0 4 1 8     0 1 2 0 2 4 1 8     0 1 2 2 4 1 8     0 1 2 0 3 4 1 8 |
|     ------------------------------------------------------------------------|
|         3   2              2 2 2   2        3 2     2         4 2 2         |
|     + 2a a a b b b c c  + a a a b b c c  - a a a b b c c  - 2a a b b c c  + |
|         0 1 2 2 3 4 1 8    0 1 2 0 4 1 8    0 1 2 2 4 1 8     1 2 0 5 1 8   |
|     ------------------------------------------------------------------------|
|         3 2              2 2 2 2             4                              |
|     2a a a b b b c c  + a a a b b c c  + 2a a a b b b c c  -                |
|       0 1 2 0 1 5 1 8    0 1 2 1 5 1 8     0 1 2 0 2 5 1 8                  |
|     ------------------------------------------------------------------------|
|       2 3                2 4 2           2 2 2               3   2          |
|     4a a a b b b c c  + a a b b c c  - 4a a a b b b c c  - 2a a a b b b c c |
|       0 1 2 1 2 5 1 8    0 1 2 5 1 8     0 1 2 0 3 5 1 8     0 1 2 1 3 5 1 8|
|     ------------------------------------------------------------------------|
|         3 2                 4 2 2           2 3                             |
|     + 6a a a b b b c c  + 2a a b b c c  + 2a a a b b b c c  -               |
|         0 1 2 2 3 5 1 8     0 2 3 5 1 8     0 1 2 0 4 5 1 8                 |
|     ------------------------------------------------------------------------|
|       3 3               4                  4 2 2           2 4   2          |
|     2a a b b b c c  - 2a a a b b b c c  + a a b b c c  - 2a a b b c c  +    |
|       0 1 2 4 5 1 8     0 1 2 3 4 5 1 8    0 1 4 5 1 8     0 1 0 5 1 8      |
|     ------------------------------------------------------------------------|
|       3 3   2         4 2   2        3 3   2          2 3 3                 |
|     2a a b b c c  - 2a a b b c c  - a a b b c c  + a a a b c c  +           |
|       0 1 1 5 1 8     0 1 3 5 1 8    1 2 0 1 2 8    0 1 2 1 2 8             |
|     ------------------------------------------------------------------------|
|       4 2                 3 2 2          5     2          4     2           |
|     2a a b b b c c  - 2a a a b b c c  - a a b b c c  + a a a b b c c  +     |
|       1 2 0 1 2 2 8     0 1 2 1 2 2 8    1 2 0 2 2 8    0 1 2 1 2 2 8       |
|     ------------------------------------------------------------------------|
|       3 3 2            2 3               2   3 2             3 2            |
|     2a a b b c c  - a a a b b b c c  - 2a a a b b c c  - 3a a a b b b c c  +|
|       1 2 0 3 2 8    0 1 2 0 1 3 2 8     0 1 2 1 3 2 8     0 1 2 0 2 3 2 8  |
|     ------------------------------------------------------------------------|
|       2 2 2              2 3   2           2   3   2        3 3   2         |
|     5a a a b b b c c  - a a a b b c c  + 2a a a b b c c  + a a b b c c  -   |
|       0 1 2 1 2 3 2 8    0 1 2 2 3 2 8     0 1 2 0 3 2 8    0 2 1 3 2 8     |
|     ------------------------------------------------------------------------|
|       3   2   2         4 2 2             3 2              2 2 2 2          |
|     3a a a b b c c  - 2a a b b c c  + 3a a a b b b c c  - a a a b b c c  +  |
|       0 1 2 2 3 2 8     1 2 0 4 2 8     0 1 2 0 1 4 2 8    0 1 2 1 4 2 8    |
|     ------------------------------------------------------------------------|
|        4                2 3                 2 2 2                           |
|     a a a b b b c c  - a a a b b b c c  - 3a a a b b b c c  +               |
|      0 1 2 0 2 4 2 8    0 1 2 1 2 4 2 8     0 1 2 0 3 4 2 8                 |
|     ------------------------------------------------------------------------|
|       3   2              3 2                4 2 2           5   2           |
|     2a a a b b b c c  + a a a b b b c c  - a a b b c c  + 2a a b b c c  -   |
|       0 1 2 1 3 4 2 8    0 1 2 2 3 4 2 8    0 2 3 4 2 8     1 2 0 5 2 8     |
|     ------------------------------------------------------------------------|
|         4                 2 3   2            5              2 4             |
|     5a a a b b b c c  + 3a a a b b c c  + a a b b b c c  - a a b b b c c  + |
|       0 1 2 0 1 5 2 8     0 1 2 1 5 2 8    0 1 0 2 5 2 8    0 1 1 2 5 2 8   |
|     ------------------------------------------------------------------------|
|       2 3                 3 2                3 3               4     2      |
|     6a a a b b b c c  - 7a a a b b b c c  + a a b b b c c  + 4a a a b b c c |
|       0 1 2 0 3 5 2 8     0 1 2 1 3 5 2 8    0 1 2 3 5 2 8     0 1 2 3 5 2 8|
|     ------------------------------------------------------------------------|
|        2 4              3 3              4 2              2 4 2             |
|     - a a b b b c c  + a a b b b c c  - a a b b b c c  - a a b b c c  +     |
|        0 1 0 4 5 2 8    0 1 1 4 5 2 8    0 1 3 4 5 2 8    1 2 0 1 3 8       |
|     ------------------------------------------------------------------------|
|      3 3 2             2 3                 3 2   2        2 2 2   2         |
|     a a b b c c  + 2a a a b b b c c  - 2a a a b b c c  - a a a b b c c  +   |
|      1 2 0 2 3 8     0 1 2 0 1 2 3 8     0 1 2 0 2 3 8    0 1 2 1 2 3 8     |
|     ------------------------------------------------------------------------|
|      2 3   3             4 2          2 4               2   3               |
|     a a a b c c  + 4a a a b b c c  - a a b b b c c  - 7a a a b b b c c  +   |
|      0 1 2 2 3 8     0 1 2 0 3 3 8    0 2 0 1 3 3 8     0 1 2 0 2 3 3 8     |
|     ------------------------------------------------------------------------|
|      3 3               3   2 2             2 3 2          2   3             |
|     a a b b b c c  + 3a a a b b c c  - 3a a a b b c c  + a a a b b b c c  + |
|      0 2 1 2 3 3 8     0 1 2 2 3 3 8     0 1 2 0 4 3 8    0 1 2 0 1 4 3 8   |
|     ------------------------------------------------------------------------|
|       2 2 2              3   2               3 2   2          3 3           |
|     5a a a b b b c c  - a a a b b b c c  - 2a a a b b c c  + a a b b b c c  |
|       0 1 2 0 2 4 3 8    0 1 2 1 2 4 3 8     0 1 2 2 4 3 8    0 2 0 3 4 3 8 |
|     ------------------------------------------------------------------------|
|        4 2              3   2   2        4       2           3 2 2          |
|     - a a b b b c c  - a a a b b c c  + a a a b b c c  + 2a a a b b c c  -  |
|        0 2 2 3 4 3 8    0 1 2 0 4 3 8    0 1 2 2 4 3 8     0 1 2 0 5 3 8    |
|     ------------------------------------------------------------------------|
|       2 2 2              2 3                 3 2                3 3 2       |
|     3a a a b b b c c  - a a a b b b c c  + 3a a a b b b c c  - a a b b c c  |
|       0 1 2 0 1 5 3 8    0 1 2 0 2 5 3 8     0 1 2 1 2 5 3 8    0 1 2 5 3 8 |
|     ------------------------------------------------------------------------|
|         3   2              4 2               4                              |
|     + 6a a a b b b c c  - a a b b b c c  - 5a a a b b b c c  -              |
|         0 1 2 0 3 5 3 8    0 2 1 3 5 3 8     0 1 2 2 3 5 3 8                |
|     ------------------------------------------------------------------------|
|       3 2                4                   4 2              5             |
|     3a a a b b b c c  + a a a b b b c c  + 2a a b b b c c  + a a b b b c c  |
|       0 1 2 0 4 5 3 8    0 1 2 1 4 5 3 8     0 1 2 4 5 3 8    0 2 3 4 5 3 8 |
|     ------------------------------------------------------------------------|
|        5   2           3 3   2         4 2   2         5     2              |
|     - a a b b c c  + 2a a b b c c  - 2a a b b c c  + 2a a b b c c  +        |
|        0 1 4 5 3 8     0 1 0 5 3 8     0 1 1 5 3 8     0 1 3 5 3 8          |
|     ------------------------------------------------------------------------|
|      3 3 2            2 3   2        4 2 2          2 2 2 2                 |
|     a a b b c c  - a a a b b c c  - a a b b c c  + a a a b b c c  +         |
|      1 2 0 1 4 8    0 1 2 0 1 4 8    1 2 0 2 4 8    0 1 2 1 2 4 8           |
|     ------------------------------------------------------------------------|
|        4     2        2 3     2           2 3 2           2   3             |
|     a a a b b c c  - a a a b b c c  - 2a a a b b c c  + 3a a a b b b c c  + |
|      0 1 2 0 2 4 8    0 1 2 1 2 4 8     0 1 2 0 3 4 8     0 1 2 0 1 3 4 8   |
|     ------------------------------------------------------------------------|
|      2 2 2               3   2              3 2   2           3 3   2       |
|     a a a b b b c c  - 3a a a b b b c c  + a a a b b c c  - 2a a b b c c  + |
|      0 1 2 0 2 3 4 8     0 1 2 1 2 3 4 8    0 1 2 2 3 4 8     0 2 0 3 4 8   |
|     ------------------------------------------------------------------------|
|       4 2   2          3 2 2          2 2 2              2 3                |
|     2a a b b c c  + a a a b b c c  - a a a b b b c c  - a a a b b b c c  +  |
|       0 2 2 3 4 8    0 1 2 0 4 4 8    0 1 2 0 1 4 4 8    0 1 2 0 2 4 4 8    |
|     ------------------------------------------------------------------------|
|      3 2                3   2              4                                |
|     a a a b b b c c  + a a a b b b c c  - a a a b b b c c  +                |
|      0 1 2 1 2 4 4 8    0 1 2 0 3 4 4 8    0 1 2 2 3 4 4 8                  |
|     ------------------------------------------------------------------------|
|      2 3                3 2   2          2 4              3 3               |
|     a a a b b b c c  - a a a b b c c  - a a b b b c c  + a a b b b c c  -   |
|      0 1 2 0 1 5 4 8    0 1 2 1 5 4 8    0 1 0 2 5 4 8    0 1 1 2 5 4 8     |
|     ------------------------------------------------------------------------|
|       3 2                 4                  4 2               5   2        |
|     2a a a b b b c c  + 3a a a b b b c c  - a a b b b c c  - 2a a b b c c  +|
|       0 1 2 0 3 5 4 8     0 1 2 1 3 5 4 8    0 1 2 3 5 4 8     0 2 3 5 4 8  |
|     ------------------------------------------------------------------------|
|      3 3              4 2              5                4 2 2               |
|     a a b b b c c  - a a b b b c c  + a a b b b c c  - a a b b c c  +       |
|      0 1 0 4 5 4 8    0 1 1 4 5 4 8    0 1 3 4 5 4 8    1 2 0 1 5 8         |
|     ------------------------------------------------------------------------|
|         3 2   2        2 2 2 3        5   2             4                   |
|     2a a a b b c c  - a a a b c c  + a a b b c c  - 2a a a b b b c c  +     |
|       0 1 2 0 1 5 8    0 1 2 1 5 8    1 2 0 2 5 8     0 1 2 0 1 2 5 8       |
|     ------------------------------------------------------------------------|
|      2 3   2           2 2 2               3   2 2           2 3            |
|     a a a b b c c  - 2a a a b b b c c  + 2a a a b b c c  + 2a a a b b b c c |
|      0 1 2 1 2 5 8     0 1 2 0 1 3 5 8     0 1 2 1 3 5 8     0 1 2 0 2 3 5 8|
|     ------------------------------------------------------------------------|
|         3 2                4 2   2        4       2          4   2          |
|     - 2a a a b b b c c  - a a b b c c  + a a a b b c c  + a a a b b c c  -  |
|         0 1 2 1 2 3 5 8    0 2 1 3 5 8    0 1 2 2 3 5 8    0 1 2 0 4 5 8    |
|     ------------------------------------------------------------------------|
|       2 3                3 2   2           3 2                              |
|     2a a a b b b c c  + a a a b b c c  + 2a a a b b b c c  -                |
|       0 1 2 0 1 4 5 8    0 1 2 1 4 5 8     0 1 2 0 3 4 5 8                  |
|     ------------------------------------------------------------------------|
|       4                  5   2             5 2           2 4                |
|     2a a a b b b c c  + a a b b c c  - 2a a b b c c  + 4a a b b b c c  -    |
|       0 1 2 1 3 4 5 8    0 2 3 4 5 8     0 1 0 5 5 8     0 1 0 1 5 5 8      |
|     ------------------------------------------------------------------------|
|       3 3 2           3 3               4 2               5   2             |
|     2a a b b c c  - 4a a b b b c c  + 4a a b b b c c  - 2a a b b c c  +     |
|       0 1 1 5 5 8     0 1 0 3 5 5 8     0 1 1 3 5 5 8     0 1 3 5 5 8       |
|     ------------------------------------------------------------------------|
|       2 4 3             4 2          2 4   2           2 3 2                |
|     2a a b c c  - 2a a a b b c c  + a a b b c c  - 4a a a b b c c  +        |
|       1 2 0 6 8     0 1 2 0 1 6 8    0 2 0 1 6 8     0 1 2 0 2 6 8          |
|     ------------------------------------------------------------------------|
|       2   3              3 3 2           2 2 2   2        3 2   3           |
|     2a a a b b b c c  - a a b b c c  + 3a a a b b c c  - a a a b c c  -     |
|       0 1 2 0 1 2 6 8    0 2 1 2 6 8     0 1 2 0 2 6 8    0 1 2 2 6 8       |
|     ------------------------------------------------------------------------|
|       2 4 2           3 3               4 2 2           2   3 2             |
|     2a a b b c c  + 4a a b b b c c  - 2a a b b c c  + 4a a a b b c c  -     |
|       0 2 0 3 6 8     0 2 0 2 3 6 8     0 2 2 3 6 8     0 1 2 0 4 6 8       |
|     ------------------------------------------------------------------------|
|       3 3               3   2               4 2               4     2       |
|     2a a b b b c c  - 6a a a b b b c c  + 2a a b b b c c  + 2a a a b b c c  |
|       0 2 0 1 4 6 8     0 1 2 0 2 4 6 8     0 2 1 2 4 6 8     0 1 2 2 4 6 8 |
|     ------------------------------------------------------------------------|
|        4 2   2        5     2        4 2 2           4                      |
|     + a a b b c c  - a a b b c c  + a a b b c c  - 2a a a b b b c c  +      |
|        0 2 0 4 6 8    0 2 2 4 6 8    0 2 1 5 6 8     0 1 2 1 2 5 6 8        |
|     ------------------------------------------------------------------------|
|      4 2 2           4 2               5                 4                  |
|     a a b b c c  - 4a a b b b c c  + 4a a b b b c c  + 4a a a b b b c c  -  |
|      0 1 2 5 6 8     0 2 0 3 5 6 8     0 2 2 3 5 6 8     0 1 2 0 4 5 6 8    |
|     ------------------------------------------------------------------------|
|       5                 5                6 2           4 2   2              |
|     2a a b b b c c  - 2a a b b b c c  + a b b c c  - 2a a b b c c  +        |
|       0 2 1 4 5 6 8     0 1 2 4 5 6 8    0 4 5 6 8     0 1 0 5 6 8          |
|     ------------------------------------------------------------------------|
|       5     2         6   2         3 3 3           2 3 2                   |
|     2a a b b c c  - 2a b b c c  - 2a a b c c  + 3a a a b b c c  -           |
|       0 1 1 5 6 8     0 3 5 6 8     1 2 0 7 8     0 1 2 0 1 7 8             |
|     ------------------------------------------------------------------------|
|      2   3   2           3 2 2           2 2 2              3   2 2         |
|     a a a b b c c  + 3a a a b b c c  - 4a a a b b b c c  + a a a b b c c  - |
|      0 1 2 0 1 7 8     0 1 2 0 2 7 8     0 1 2 0 1 2 7 8    0 1 2 1 2 7 8   |
|     ------------------------------------------------------------------------|
|      2 3     2        3 2     2         2   3 2          3 3                |
|     a a a b b c c  + a a a b b c c  - 2a a a b b c c  + a a b b b c c  +    |
|      0 1 2 0 2 7 8    0 1 2 1 2 7 8     0 1 2 0 3 7 8    0 2 0 1 3 7 8      |
|     ------------------------------------------------------------------------|
|       3   2              4 2              4     2          2 2 2 2          |
|     3a a a b b b c c  - a a b b b c c  - a a a b b c c  - a a a b b c c  +  |
|       0 1 2 0 2 3 7 8    0 2 1 2 3 7 8    0 1 2 2 3 7 8    0 1 2 0 4 7 8    |
|     ------------------------------------------------------------------------|
|      3   2              3 2                4                  4 2           |
|     a a a b b b c c  + a a a b b b c c  - a a a b b b c c  - a a b b b c c  |
|      0 1 2 0 1 4 7 8    0 1 2 0 2 4 7 8    0 1 2 1 2 4 7 8    0 2 0 3 4 7 8 |
|     ------------------------------------------------------------------------|
|        5                 2 3   2           3 2                4     2       |
|     + a a b b b c c  - 2a a a b b c c  + 3a a a b b b c c  - a a a b b c c  |
|        0 2 2 3 4 7 8     0 1 2 0 5 7 8     0 1 2 0 1 5 7 8    0 1 2 1 5 7 8 |
|     ------------------------------------------------------------------------|
|        3 3              4 2               4                  5              |
|     + a a b b b c c  - a a b b b c c  - 2a a a b b b c c  + a a b b b c c  +|
|        0 1 0 2 5 7 8    0 1 1 2 5 7 8     0 1 2 0 3 5 7 8    0 2 1 3 5 7 8  |
|     ------------------------------------------------------------------------|
|      5                4 2              5                6                   |
|     a a b b b c c  - a a b b b c c  + a a b b b c c  - a b b b c c  +       |
|      0 1 2 3 5 7 8    0 1 0 4 5 7 8    0 1 1 4 5 7 8    0 3 4 5 7 8         |
|     ------------------------------------------------------------------------|
|      4 2 3 2       3 2 2   2    2 2 2   2 2      4   2   2     2 3         2|
|     a a b c  - 2a a a b b c  + a a a b b c  - a a a b b c  + 2a a a b b b c |
|      1 2 0 8     0 1 2 0 1 8    0 1 2 0 1 8    0 1 2 0 2 8     0 1 2 0 1 2 8|
|     ------------------------------------------------------------------------|
|        3 2   2   2     2 2 2 2   2     3   2       2     3 2         2      |
|     - a a a b b c  + 2a a a b b c  - 2a a a b b b c  - 2a a a b b b c  +    |
|        0 1 2 1 2 8     0 1 2 0 3 8     0 1 2 0 1 3 8     0 1 2 0 2 3 8      |
|     ------------------------------------------------------------------------|
|       4           2    4 2   2 2    5     2 2    2 4 2   2     3 3       2  |
|     2a a a b b b c  + a a b b c  - a a b b c  + a a b b c  - 2a a b b b c  +|
|       0 1 2 1 2 3 8    0 2 0 3 8    0 2 2 3 8    0 1 0 5 8     0 1 0 1 5 8  |
|     ------------------------------------------------------------------------|
|      4 2 2   2     4 2       2     5         2    6 2   2    3 3 3          |
|     a a b b c  + 2a a b b b c  - 2a a b b b c  + a b b c  + a a b c c  -    |
|      0 1 1 5 8     0 1 0 3 5 8     0 1 1 3 5 8    0 3 5 8    1 2 1 0 9      |
|     ------------------------------------------------------------------------|
|       4 2 2           5     2        6 3         3 3                        |
|     3a a b b c c  + 3a a b b c c  - a b c c  - 3a a b b b c c  -            |
|       1 2 1 2 0 9     1 2 1 2 0 9    1 2 0 9     1 2 0 1 3 0 9              |
|     ------------------------------------------------------------------------|
|         2 3 2           4 2                 3 2                 4   2       |
|     3a a a b b c c  + 3a a b b b c c  + 9a a a b b b c c  - 6a a a b b c c  |
|       0 1 2 1 3 0 9     1 2 0 2 3 0 9     0 1 2 1 2 3 0 9     0 1 2 2 3 0 9 |
|     ------------------------------------------------------------------------|
|           2 3   2         2   3   2         2 2 2   2         3 3 3         |
|     + 6a a a b b c c  + 3a a a b b c c  - 9a a a b b c c  - 2a a b c c  +   |
|         0 1 2 0 3 0 9     0 1 2 1 3 0 9     0 1 2 2 3 0 9     0 2 3 0 9     |
|     ------------------------------------------------------------------------|
|       4 2               5                   4                   5 2         |
|     3a a b b b c c  - 3a a b b b c c  - 3a a a b b b c c  + 3a a b b c c  - |
|       1 2 0 1 4 0 9     1 2 0 2 4 0 9     0 1 2 1 2 4 0 9     0 1 2 4 0 9   |
|     ------------------------------------------------------------------------|
|         3 2               2 3                 3   2 2                       |
|     9a a a b b b c c  + 9a a a b b b c c  + 3a a a b b c c  +               |
|       0 1 2 0 3 4 0 9     0 1 2 2 3 4 0 9     0 1 2 3 4 0 9                 |
|     ------------------------------------------------------------------------|
|         4     2         2 4   2         3 2     2        3 3 3              |
|     3a a a b b c c  - 3a a b b c c  - 3a a a b b c c  + a a b c c  -        |
|       0 1 2 0 4 0 9     0 1 2 4 0 9     0 1 2 3 4 0 9    0 1 4 0 9          |
|     ------------------------------------------------------------------------|
|       5                   4   2           6                 5               |
|     3a a b b b c c  + 3a a a b b c c  + 3a b b b c c  - 3a a b b b c c  +   |
|       1 2 0 1 5 0 9     0 1 2 1 5 0 9     1 0 2 5 0 9     0 1 1 2 5 0 9     |
|     ------------------------------------------------------------------------|
|         4                 2 3                 2 4                           |
|     6a a a b b b c c  - 9a a a b b b c c  + 3a a b b b c c  +               |
|       0 1 2 0 3 5 0 9     0 1 2 1 3 5 0 9     0 1 2 3 5 0 9                 |
|     ------------------------------------------------------------------------|
|       3 2   2             5               2 4               3 3             |
|     6a a a b b c c  - 3a a b b b c c  + 3a a b b b c c  - 3a a b b b c c  - |
|       0 1 2 3 5 0 9     0 1 0 4 5 0 9     0 1 1 4 5 0 9     0 1 3 4 5 0 9   |
|     ------------------------------------------------------------------------|
|      3 3   2         4 2                3 2 2          5     2              |
|     a a b b c c  + 2a a b b b c c  + a a a b b c c  - a a b b c c  -        |
|      1 2 0 1 1 9     1 2 0 1 2 1 9    0 1 2 1 2 1 9    1 2 0 2 1 9          |
|     ------------------------------------------------------------------------|
|         4     2          5 3         3 3 2             2 3                  |
|     2a a a b b c c  + a a b c c  + 2a a b b c c  + 3a a a b b b c c  -      |
|       0 1 2 1 2 1 9    0 1 2 1 9     1 2 0 3 1 9     0 1 2 0 1 3 1 9        |
|     ------------------------------------------------------------------------|
|         3 2               2 2 2               2 3   2                       |
|     7a a a b b b c c  - 3a a a b b b c c  + 5a a a b b c c  -               |
|       0 1 2 0 2 3 1 9     0 1 2 1 2 3 1 9     0 1 2 2 3 1 9                 |
|     ------------------------------------------------------------------------|
|       2   3   2        3 3   2         3   2   2         4 2 2              |
|     6a a a b b c c  + a a b b c c  + 5a a a b b c c  - 2a a b b c c  -      |
|       0 1 2 0 3 1 9    0 2 1 3 1 9     0 1 2 2 3 1 9     1 2 0 4 1 9        |
|     ------------------------------------------------------------------------|
|        3 2                 4                2 3                 2 4 2       |
|     a a a b b b c c  + 5a a a b b b c c  + a a a b b b c c  - 3a a b b c c  |
|      0 1 2 0 1 4 1 9     0 1 2 0 2 4 1 9    0 1 2 1 2 4 1 9     0 1 2 4 1 9 |
|     ------------------------------------------------------------------------|
|         2 2 2               3   2               3 2                         |
|     + 9a a a b b b c c  - 2a a a b b b c c  - 7a a a b b b c c  -           |
|         0 1 2 0 3 4 1 9     0 1 2 1 3 4 1 9     0 1 2 2 3 4 1 9             |
|     ------------------------------------------------------------------------|
|      4 2 2           2 3     2        3 2     2         3 3   2             |
|     a a b b c c  - 4a a a b b c c  + a a a b b c c  + 3a a b b c c  +       |
|      0 2 3 4 1 9     0 1 2 0 4 1 9    0 1 2 1 4 1 9     0 1 2 4 1 9         |
|     ------------------------------------------------------------------------|
|       4       2        4 2 3         5   2            4                     |
|     2a a a b b c c  - a a b c c  + 2a a b b c c  - a a a b b b c c  -       |
|       0 1 2 3 4 1 9    0 1 4 1 9     1 2 0 5 1 9    0 1 2 0 1 5 1 9         |
|     ------------------------------------------------------------------------|
|      2 3   2             5               2 4               2 3              |
|     a a a b b c c  - 3a a b b b c c  + 3a a b b b c c  - 2a a a b b b c c  +|
|      0 1 2 1 5 1 9     0 1 0 2 5 1 9     0 1 1 2 5 1 9     0 1 2 0 3 5 1 9  |
|     ------------------------------------------------------------------------|
|       3 2                 3 3               4     2           2 4           |
|     5a a a b b b c c  - 3a a b b b c c  - 4a a a b b c c  + 3a a b b b c c  |
|       0 1 2 1 3 5 1 9     0 1 2 3 5 1 9     0 1 2 3 5 1 9     0 1 0 4 5 1 9 |
|     ------------------------------------------------------------------------|
|         3 3               4 2              4 2   2          3 2 3           |
|     - 3a a b b b c c  + 3a a b b b c c  + a a b b c c  - a a a b c c  -     |
|         0 1 1 4 5 1 9     0 1 3 4 5 1 9    1 2 0 1 2 9    0 1 2 1 2 9       |
|     ------------------------------------------------------------------------|
|       5                   4   2          6   2          5   2               |
|     2a a b b b c c  + 2a a a b b c c  + a b b c c  - a a b b c c  -         |
|       1 2 0 1 2 2 9     0 1 2 1 2 2 9    1 0 2 2 9    0 1 1 2 2 9           |
|     ------------------------------------------------------------------------|
|       4 2 2           2 2 2 2             4                 2 3             |
|     2a a b b c c  + 3a a a b b c c  + 4a a a b b b c c  - 6a a a b b b c c  |
|       1 2 0 3 2 9     0 1 2 1 3 2 9     0 1 2 0 2 3 2 9     0 1 2 1 2 3 2 9 |
|     ------------------------------------------------------------------------|
|        2 4 2           3   2   2         3 2     2         4 2 3            |
|     + a a b b c c  - 4a a a b b c c  + 4a a a b b c c  + 2a a b c c  +      |
|        0 1 2 3 2 9     0 1 2 1 3 2 9     0 1 2 2 3 2 9     0 2 3 2 9        |
|     ------------------------------------------------------------------------|
|       5   2             4                   5               2 4             |
|     2a a b b c c  - 2a a a b b b c c  - 2a a b b b c c  + 2a a b b b c c  + |
|       1 2 0 4 2 9     0 1 2 0 1 4 2 9     0 1 0 2 4 2 9     0 1 1 2 4 2 9   |
|     ------------------------------------------------------------------------|
|       3 2                 3 3               4     2          2 4   2        |
|     2a a a b b b c c  - 2a a b b b c c  - 2a a a b b c c  + a a b b c c  -  |
|       0 1 2 1 3 4 2 9     0 1 2 3 4 2 9     0 1 2 3 4 2 9    0 1 0 4 2 9    |
|     ------------------------------------------------------------------------|
|      3 3   2        4 2   2         6 2             5                       |
|     a a b b c c  + a a b b c c  - 2a b b c c  + 4a a b b b c c  -           |
|      0 1 1 4 2 9    0 1 3 4 2 9     1 0 5 2 9     0 1 0 1 5 2 9             |
|     ------------------------------------------------------------------------|
|       2 4 2           2 4               3 3               4 2 2             |
|     2a a b b c c  - 4a a b b b c c  + 4a a b b b c c  - 2a a b b c c  +     |
|       0 1 1 5 2 9     0 1 0 3 5 2 9     0 1 1 3 5 2 9     0 1 3 5 2 9       |
|     ------------------------------------------------------------------------|
|      3 3 2          4 2 2             3 2                 4     2           |
|     a a b b c c  - a a b b c c  - 2a a a b b b c c  + 2a a a b b c c  +     |
|      1 2 0 1 3 9    1 2 0 2 3 9     0 1 2 0 1 2 3 9     0 1 2 0 2 3 9       |
|     ------------------------------------------------------------------------|
|      2 3     2        2 4 3           2 3 2           2   3                 |
|     a a a b b c c  - a a b c c  - 6a a a b b c c  + 3a a a b b b c c  -     |
|      0 1 2 1 2 3 9    0 1 2 3 9     0 1 2 0 3 3 9     0 1 2 0 1 3 3 9       |
|     ------------------------------------------------------------------------|
|      3 3 2           2 2 2              3   2               3 2   2         |
|     a a b b c c  + 9a a a b b b c c  - a a a b b b c c  - 4a a a b b c c  + |
|      0 2 1 3 3 9     0 1 2 0 2 3 3 9    0 1 2 1 2 3 3 9     0 1 2 2 3 3 9   |
|     ------------------------------------------------------------------------|
|       3 3   2         4 2   2           3 2 2           2 2 2               |
|     2a a b b c c  - 2a a b b c c  + 5a a a b b c c  - 3a a a b b b c c  +   |
|       0 2 0 3 3 9     0 2 2 3 3 9     0 1 2 0 4 3 9     0 1 2 0 1 4 3 9     |
|     ------------------------------------------------------------------------|
|      3   2 2           2 3                3 2                 3 3 2         |
|     a a a b b c c  - 7a a a b b b c c  + a a a b b b c c  + 3a a b b c c  - |
|      0 1 2 1 4 3 9     0 1 2 0 2 4 3 9    0 1 2 1 2 4 3 9     0 1 2 4 3 9   |
|     ------------------------------------------------------------------------|
|       3   2               4 2               4                               |
|     7a a a b b b c c  + 2a a b b b c c  + 5a a a b b b c c  +               |
|       0 1 2 0 3 4 3 9     0 2 1 3 4 3 9     0 1 2 2 3 4 3 9                 |
|     ------------------------------------------------------------------------|
|       3 2     2         4       2         4 2   2        5     2            |
|     5a a a b b c c  - 2a a a b b c c  - 3a a b b c c  - a a b b c c  +      |
|       0 1 2 0 4 3 9     0 1 2 1 4 3 9     0 1 2 4 3 9    0 2 3 4 3 9        |
|     ------------------------------------------------------------------------|
|      5   3           4   2           2 3                3 2   2             |
|     a a b c c  - 4a a a b b c c  + 5a a a b b b c c  - a a a b b c c  +     |
|      0 1 4 3 9     0 1 2 0 5 3 9     0 1 2 0 1 5 3 9    0 1 2 1 5 3 9       |
|     ------------------------------------------------------------------------|
|       2 4               3 3               3 2                4              |
|     3a a b b b c c  - 3a a b b b c c  - 2a a a b b b c c  - a a a b b b c c |
|       0 1 0 2 5 3 9     0 1 1 2 5 3 9     0 1 2 0 3 5 3 9    0 1 2 1 3 5 3 9|
|     ------------------------------------------------------------------------|
|         4 2               5   2           3 3               4 2             |
|     + 3a a b b b c c  + 2a a b b c c  - 3a a b b b c c  + 3a a b b b c c  - |
|         0 1 2 3 5 3 9     0 2 3 5 3 9     0 1 0 4 5 3 9     0 1 1 4 5 3 9   |
|     ------------------------------------------------------------------------|
|       5                4 2 2            3 2   2        5   2                |
|     3a a b b b c c  - a a b b c c  + a a a b b c c  + a a b b c c  -        |
|       0 1 3 4 5 3 9    1 2 0 1 4 9    0 1 2 0 1 4 9    1 2 0 2 4 9          |
|     ------------------------------------------------------------------------|
|      2 3   2            5   2        2 4   2           3 2 2                |
|     a a a b b c c  - a a b b c c  + a a b b c c  + 4a a a b b c c  -        |
|      0 1 2 1 2 4 9    0 1 0 2 4 9    0 1 1 2 4 9     0 1 2 0 3 4 9          |
|     ------------------------------------------------------------------------|
|       2 2 2              3   2 2           2 3                              |
|     6a a a b b b c c  + a a a b b c c  - 2a a a b b b c c  +                |
|       0 1 2 0 1 3 4 9    0 1 2 1 3 4 9     0 1 2 0 2 3 4 9                  |
|     ------------------------------------------------------------------------|
|       3 2                3 3 2           3   2   2        4 2   2           |
|     4a a a b b b c c  - a a b b c c  + 4a a a b b c c  - a a b b c c  -     |
|       0 1 2 1 2 3 4 9    0 1 2 3 4 9     0 1 2 0 3 4 9    0 2 1 3 4 9       |
|     ------------------------------------------------------------------------|
|       4       2           4   2           2 3                3 2   2        |
|     3a a a b b c c  - 3a a a b b c c  + 4a a a b b b c c  - a a a b b c c  +|
|       0 1 2 2 3 4 9     0 1 2 0 4 4 9     0 1 2 0 1 4 4 9    0 1 2 1 4 4 9  |
|     ------------------------------------------------------------------------|
|       2 4               3 3               3 2                 4 2           |
|     2a a b b b c c  - 2a a b b b c c  - 2a a a b b b c c  + 2a a b b b c c  |
|       0 1 0 2 4 4 9     0 1 1 2 4 4 9     0 1 2 0 3 4 4 9     0 1 2 3 4 4 9 |
|     ------------------------------------------------------------------------|
|        5   2          3 3   2        4 2   2        5     2                 |
|     + a a b b c c  - a a b b c c  + a a b b c c  - a a b b c c  +           |
|        0 2 3 4 4 9    0 1 0 4 4 9    0 1 1 4 4 9    0 1 3 4 4 9             |
|     ------------------------------------------------------------------------|
|         5 2           2 4               3 3 2           3 3                 |
|     2a a b b c c  - 4a a b b b c c  + 2a a b b c c  + 4a a b b b c c  -     |
|       0 1 0 5 4 9     0 1 0 1 5 4 9     0 1 1 5 4 9     0 1 0 3 5 4 9       |
|     ------------------------------------------------------------------------|
|       4 2               5   2          5   2             4     2            |
|     4a a b b b c c  + 2a a b b c c  + a a b b c c  - 2a a a b b c c  +      |
|       0 1 1 3 5 4 9     0 1 3 5 4 9    1 2 0 1 5 9     0 1 2 0 1 5 9        |
|     ------------------------------------------------------------------------|
|      2 3   3        6 2             5              2 4 2                    |
|     a a a b c c  - a b b c c  + 2a a b b b c c  - a a b b c c  -            |
|      0 1 2 1 5 9    1 0 2 5 9     0 1 0 1 2 5 9    0 1 1 2 5 9              |
|     ------------------------------------------------------------------------|
|         4   2           2 3                 3 2   2           2 4           |
|     2a a a b b c c  + 6a a a b b b c c  - 4a a a b b c c  - 2a a b b b c c  |
|       0 1 2 0 3 5 9     0 1 2 0 1 3 5 9     0 1 2 1 3 5 9     0 1 0 2 3 5 9 |
|     ------------------------------------------------------------------------|
|         3 3               3 2     2         4       2        4 2   2        |
|     + 2a a b b b c c  - 4a a a b b c c  + 5a a a b b c c  - a a b b c c  -  |
|         0 1 1 2 3 5 9     0 1 2 0 3 5 9     0 1 2 1 3 5 9    0 1 2 3 5 9    |
|     ------------------------------------------------------------------------|
|       5   3          5 2           2 4              3 3 2                   |
|     2a a b c c  + a a b b c c  - 2a a b b b c c  + a a b b c c  +           |
|       0 2 3 5 9    0 1 0 4 5 9     0 1 0 1 4 5 9    0 1 1 4 5 9             |
|     ------------------------------------------------------------------------|
|       3 3               4 2              5   2           3 3 3              |
|     2a a b b b c c  - 2a a b b b c c  + a a b b c c  - 2a a b c c  +        |
|       0 1 0 3 4 5 9     0 1 1 3 4 5 9    0 1 3 4 5 9     1 2 0 6 9          |
|     ------------------------------------------------------------------------|
|         2 3 2           2   3   2        3 3 3           3 2 2              |
|     3a a a b b c c  - 3a a a b b c c  + a a b c c  + 3a a a b b c c  -      |
|       0 1 2 0 1 6 9     0 1 2 0 1 6 9    0 2 1 6 9     0 1 2 0 2 6 9        |
|     ------------------------------------------------------------------------|
|       2 3     2        3 3 3         2   3 2           3 3                  |
|     3a a a b b c c  + a a b c c  + 6a a a b b c c  - 3a a b b b c c  -      |
|       0 1 2 0 2 6 9    0 1 2 6 9     0 1 2 0 3 6 9     0 2 0 1 3 6 9        |
|     ------------------------------------------------------------------------|
|       3   2               4 2               4     2           2 2 2 2       |
|     9a a a b b b c c  + 3a a b b b c c  + 3a a a b b c c  - 9a a a b b c c  |
|       0 1 2 0 2 3 6 9     0 2 1 2 3 6 9     0 1 2 2 3 6 9     0 1 2 0 4 6 9 |
|     ------------------------------------------------------------------------|
|         3   2               4 2 2           3 2                             |
|     + 9a a a b b b c c  - 3a a b b c c  + 9a a a b b b c c  -               |
|         0 1 2 0 1 4 6 9     0 2 1 4 6 9     0 1 2 0 2 4 6 9                 |
|     ------------------------------------------------------------------------|
|       4                   4 2 2           4 2               5               |
|     3a a a b b b c c  - 3a a b b c c  + 3a a b b b c c  - 3a a b b b c c  - |
|       0 1 2 1 2 4 6 9     0 1 2 4 6 9     0 2 0 3 4 6 9     0 2 2 3 4 6 9   |
|     ------------------------------------------------------------------------|
|       4       2         5     2         5     2        6 3                  |
|     6a a a b b c c  + 3a a b b c c  + 3a a b b c c  - a b c c  +            |
|       0 1 2 0 4 6 9     0 2 1 4 6 9     0 1 2 4 6 9    0 4 6 9              |
|     ------------------------------------------------------------------------|
|       2 3   2           3 2                 4     2           3 3           |
|     6a a a b b c c  - 9a a a b b b c c  + 3a a a b b c c  - 3a a b b b c c  |
|       0 1 2 0 5 6 9     0 1 2 0 1 5 6 9     0 1 2 1 5 6 9     0 1 0 2 5 6 9 |
|     ------------------------------------------------------------------------|
|         4 2               4                   5                             |
|     + 3a a b b b c c  + 6a a a b b b c c  - 3a a b b b c c  -               |
|         0 1 1 2 5 6 9     0 1 2 0 3 5 6 9     0 2 1 3 5 6 9                 |
|     ------------------------------------------------------------------------|
|       5                 4 2               5                 6               |
|     3a a b b b c c  + 3a a b b b c c  - 3a a b b b c c  + 3a b b b c c  +   |
|       0 1 2 3 5 6 9     0 1 0 4 5 6 9     0 1 1 4 5 6 9     0 3 4 5 6 9     |
|     ------------------------------------------------------------------------|
|       4 2 3           3 2 2           2 2 2   2        3   2 3              |
|     2a a b c c  - 4a a a b b c c  + 3a a a b b c c  - a a a b c c  -        |
|       1 2 0 7 9     0 1 2 0 1 7 9     0 1 2 0 1 7 9    0 1 2 1 7 9          |
|     ------------------------------------------------------------------------|
|         4   2           2 3                2 4   2        3 3   2           |
|     2a a a b b c c  + 2a a a b b b c c  + a a b b c c  - a a b b c c  +     |
|       0 1 2 0 2 7 9     0 1 2 0 1 2 7 9    0 1 0 2 7 9    0 1 1 2 7 9       |
|     ------------------------------------------------------------------------|
|      4 2 2           4                  4 2 2           4 2   2             |
|     a a b b c c  - 2a a a b b b c c  + a a b b c c  - 2a a b b c c  +       |
|      0 2 1 3 7 9     0 1 2 1 2 3 7 9    0 1 2 3 7 9     0 2 0 3 7 9         |
|     ------------------------------------------------------------------------|
|       5     2         2 3   2           3 2                 4     2         |
|     2a a b b c c  + 4a a a b b c c  - 6a a a b b b c c  + 2a a a b b c c  - |
|       0 2 2 3 7 9     0 1 2 0 4 7 9     0 1 2 0 1 4 7 9     0 1 2 1 4 7 9   |
|     ------------------------------------------------------------------------|
|       3 3               4 2               4                   5             |
|     2a a b b b c c  + 2a a b b b c c  + 4a a a b b b c c  - 2a a b b b c c  |
|       0 1 0 2 4 7 9     0 1 1 2 4 7 9     0 1 2 0 3 4 7 9     0 2 1 3 4 7 9 |
|     ------------------------------------------------------------------------|
|         5                4 2   2        5     2        6   2                |
|     - 2a a b b b c c  + a a b b c c  - a a b b c c  + a b b c c  -          |
|         0 1 2 3 4 7 9    0 1 0 4 7 9    0 1 1 4 7 9    0 3 4 7 9            |
|     ------------------------------------------------------------------------|
|       2 4 2           3 3               4 2 2           4 2                 |
|     2a a b b c c  + 4a a b b b c c  - 2a a b b c c  - 4a a b b b c c  +     |
|       0 1 0 5 7 9     0 1 0 1 5 7 9     0 1 1 5 7 9     0 1 0 3 5 7 9       |
|     ------------------------------------------------------------------------|
|       5                 6 2           5   3           4   2                 |
|     4a a b b b c c  - 2a b b c c  - 2a a b c c  + 5a a a b b c c  -         |
|       0 1 1 3 5 7 9     0 3 5 7 9     1 2 0 8 9     0 1 2 0 1 8 9           |
|     ------------------------------------------------------------------------|
|       2 3     2        3 2   3          5 2           2 4                   |
|     4a a a b b c c  + a a a b c c  + a a b b c c  - 2a a b b b c c  +       |
|       0 1 2 0 1 8 9    0 1 2 1 8 9    0 1 0 2 8 9     0 1 0 1 2 8 9         |
|     ------------------------------------------------------------------------|
|      3 3 2           2 3   2           3 2                 4     2          |
|     a a b b c c  - 4a a a b b c c  + 6a a a b b b c c  - 2a a a b b c c  +  |
|      0 1 1 2 8 9     0 1 2 0 3 8 9     0 1 2 0 1 3 8 9     0 1 2 1 3 8 9    |
|     ------------------------------------------------------------------------|
|       3 3               4 2               4       2        5     2          |
|     2a a b b b c c  - 2a a b b b c c  - 2a a a b b c c  + a a b b c c  +    |
|       0 1 0 2 3 8 9     0 1 1 2 3 8 9     0 1 2 0 3 8 9    0 2 1 3 8 9      |
|     ------------------------------------------------------------------------|
|      5     2        2 4 2           3 3              4 2 2                  |
|     a a b b c c  - a a b b c c  + 2a a b b b c c  - a a b b c c  -          |
|      0 1 2 3 8 9    0 1 0 4 8 9     0 1 0 1 4 8 9    0 1 1 4 8 9            |
|     ------------------------------------------------------------------------|
|       4 2               5                6 2          6 3 2       5 2   2   |
|     2a a b b b c c  + 2a a b b b c c  - a b b c c  + a b c  - 3a a b b c  + |
|       0 1 0 3 4 8 9     0 1 1 3 4 8 9    0 3 4 8 9    1 0 9     0 1 0 1 9   |
|     ------------------------------------------------------------------------|
|       2 4   2 2    3 3 3 2     2 4 2   2     3 3       2     4 2 2   2      |
|     3a a b b c  - a a b c  + 3a a b b c  - 6a a b b b c  + 3a a b b c  +    |
|       0 1 0 1 9    0 1 1 9     0 1 0 3 9     0 1 0 1 3 9     0 1 1 3 9      |
|     ------------------------------------------------------------------------|
|       4 2   2 2     5     2 2    6 3 2                                      |
|     3a a b b c  - 3a a b b c  + a b c                                       |
|       0 1 0 3 9     0 1 1 3 9    0 3 9                                      |
|                                                                             |
|o5 : ZZ[a ..a , b ..b , c ..c ]                                              |
|         0   2   0   5   0   9                                               |
+-----------------------------------------------------------------------------+

On page 88 of Using Algebraic Geometry (see
http://link.springer.com/book/10.1007%2Fb138611 ) is stated that the resultant
of three ternary quadrics, written out in its full glory, has 21.894 terms.

+-----------------------------------------------------------------------------+
|i6 : F = genericPolynomials({2,2,2},ZZ)                                      |
|                                                                             |
|         2               2                        2     2               2    |
|o6 = {a x  + a x x  + a x  + a x x  + a x x  + a x , b x  + b x x  + b x  +  |
|       0 0    1 0 1    3 1    2 0 2    4 1 2    5 2   0 0    1 0 1    3 1    |
|     ------------------------------------------------------------------------|
|                          2     2               2                        2   |
|     b x x  + b x x  + b x , c x  + c x x  + c x  + c x x  + c x x  + c x }  |
|      2 0 2    4 1 2    5 2   0 0    1 0 1    3 1    2 0 2    4 1 2    5 2   |
|                                                                             |
|o6 : List                                                                    |
+-----------------------------------------------------------------------------+
|i7 : time # terms resultant F                                                |
| -- used 0.647241s (cpu); 0.519325s (thread); 0s (gc)                        |
|                                                                             |
|o7 = 21894                                                                   |
+-----------------------------------------------------------------------------+

See also
========

  * chowForm -- Chow form of a projective variety
  * discriminant(RingElement) (missing documentation)

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

  * "resultant(List)"
  * resultant(Matrix) -- multipolynomial
    resultant
-------------------------------------------------------------------------------

The source of this document is in Resultants.m2:895:0.

SingularLocus -- pass the singular locus of the variety
*******************************************************

  * Usage:
        SingularLocus => X

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

Some methods, like tangentialChowForm, and
conormalVariety, must calculate the singular locus of the
input variety, which can be hard to obtain. Sometimes one knows this locus and
this option allows to inform Macaulay2.

Functions with optional argument named SingularLocus:
=====================================================

  * "conormalVariety(...,SingularLocus=>...)"
  * "dualVariety(...,SingularLocus=>...)"
  * "hurwitzForm(...,SingularLocus=>...)"
  * "isInCoisotropic(...,SingularLocus=>...)"
  * "tangentialChowForm(...,SingularLocus=>...)"

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

The object SingularLocus, is a symbol (Macaulay2Doc).

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

The source of this document is in Resultants.m2:1329:0.

tangentialChowForm -- higher Chow forms of a projective variety
***************************************************************

  * Usage:
        tangentialChowForm(I,s)
  * Inputs:
      * I, an ideal (Macaulay2Doc), a homogeneous ideal defining a
        projective variety $X=V(I)\subset\mathbb{P}^n$, say of dimension $k$
      * s, an integer (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * AffineChartGrass, => ..., default value true,
        use an affine chart on the Grassmannian
      * AffineChartProj, => ..., default value true, use
        an affine chart on the projective space
      * AssumeOrdinary, => ..., default value null,
        whether the expected codimension is 1
      * Duality, => ..., default value null, whether to use dual
        Plücker coordinates
      * SingularLocus, => ..., default value null, pass
        the singular locus of the variety
      * Variable, => ...,
        default value null, specify a name for a variable
  * Outputs:
      * a ring element (Macaulay2Doc), or an ideal (Macaulay2Doc),
        (if there is more than one generator) in the
        coordinate ring of the Grassmannian $\mathbb{G}(n-k-1+s,\mathbb{P}^n)$
        in the Plücker embedding, representing the higher associated subvariety
        $Z_s(X)$

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

For a projective variety $X\subset\mathbb{P}^n$ of dimension $k$, the $s$-th
associated subvariety $Z_s(X)\subset\mathbb{G}(n-k-1+s,\mathbb{P}^n)$ (also
called tangential Chow form) is defined to be the closure of the set of
$(n-k-1+s)$-dimensional subspaces $L\subset \mathbb{P}^n$ such that $L\cap
X\neq\emptyset$ and $dim(L\cap T_x(X))\geq s$ for some smooth point $x\in L\cap
X$, where $T_x(X)$ denotes the embedded tangent space to $X$ at $x$. In
particular, $Z_0(X)\subset\mathbb{G}(n-k-1,\mathbb{P}^n)$ is defined by the
Chow form of $X$, while $Z_k(X)\subset\mathbb{G}(n-1,\mathbb{P}^n)$ is
identified to the dual variety
$X^{*}\subset{\mathbb{P}^n}^{*}=\mathbb{G}(0,{\mathbb{P}^n}^{*})$ via the
duality of Grassmannians $\mathbb{G}(0,{\mathbb{P}^n}^{*})=\mathbb{G}(n-1,\
mathbb{P}^n)$. For details we refer to the third chapter of Discriminants,
Resultants, and Multidimensional Determinants (see
http://link.springer.com/book/10.1007%2F978-0-8176-4771-1 ), by Israel M.
Gelfand, Mikhail M. Kapranov and Andrei V. Zelevinsky.

The algorithm used are standard, based on projections of suitable incidence
varieties. Here are some of the options available that could speed up the
computation.

Duality Taking into account the duality of Grassmannians, one can perform the
computation in $\mathbb{G}(k-s,n)$ and then passing to $\mathbb{G}(n-k-1+s,n)$.
This is done by default when it seems advantageous.

AffineChartGrass If one of the standard coordinate charts on the Grassmannian
is specified, then the internal computation is done on that chart. By default,
a random chart is used. Set this to false to not use any chart.

AffineChartProj This is quite similar to AffineChartGrass, but it allows to
specify one of the standard coordinate charts on the projective space. You
should set this to false for working with reducible or degenerate varieties.

AssumeOrdinary Set this to true if you know that $Z_s(X)$ is a hypersurface (by
default is already true if $s=0$).

+-----------------------------------------------------------------------------+
|i1 : -- cubic rational normal scroll surface in P^4=G(0,4)                   |
|     use Grass(0,4,Variable=>p); S = minors(2,matrix{{p_0,p_2,p_3},{p_1,p_3,p|
|                                                                             |
|                                             2                               |
|o2 = ideal (- p p  + p p , - p p  + p p , - p  + p p )                       |
|               1 2    0 3     1 3    0 4     3    2 4                        |
|                                                                             |
|o2 : Ideal of QQ[p ..p ]                                                     |
|                  0   4                                                      |
|-----------------------------------------------------------------------------|
|_4}})                                                                        |
+-----------------------------------------------------------------------------+
|i3 : -- 0-th associated hypersurface of S in G(1,4) (Chow form)              |
|     time tangentialChowForm(S,0)                                            |
| -- used 0.0497538s (cpu); 0.0497606s (thread); 0s (gc)                      |
|                                                                             |
|      2                                                       2              |
|o3 = p   p    - p   p   p    - p   p   p    + p   p   p    + p   p    +      |
|      1,3 2,3    1,2 1,3 2,4    0,3 1,3 2,4    0,2 1,4 2,4    1,2 3,4        |
|     ------------------------------------------------------------------------|
|      2                                                                      |
|     p   p    - 2p   p   p    - p   p   p                                    |
|      0,3 3,4     0,1 2,3 3,4    0,2 0,4 3,4                                 |
|                                                                             |
|                                                      QQ[p   ..p   , p   , p |
|                                                          0,1   0,2   1,2   0|
|o3 : ------------------------------------------------------------------------|
|     (p   p    - p   p    + p   p   , p   p    - p   p    + p   p   , p   p  |
|       2,3 1,4    1,3 2,4    1,2 3,4   2,3 0,4    0,3 2,4    0,2 3,4   1,3 0,|
|-----------------------------------------------------------------------------|
|  , p   , p   , p   , p   , p   , p   ]                                      |
|,3   1,3   2,3   0,4   1,4   2,4   3,4                                       |
|-----------------------------------------------------------------------------|
|  - p   p    + p   p   , p   p    - p   p    + p   p   , p   p    - p   p    |
|4    0,3 1,4    0,1 3,4   1,2 0,4    0,2 1,4    0,1 2,4   1,2 0,3    0,2 1,3 |
|-----------------------------------------------------------------------------|
|-----------                                                                  |
|+ p   p   )                                                                  |
|   0,1 2,3                                                                   |
+-----------------------------------------------------------------------------+
|i4 : -- 1-th associated hypersurface of S in G(2,4)                          |
|     time tangentialChowForm(S,1)                                            |
| -- used 0.157148s (cpu); 0.114456s (thread); 0s (gc)                        |
|                                                                             |
|      2     2        2     2               3        2     2                  |
|o4 = p     p      + p     p      - 2p     p      + p     p      -            |
|      1,2,3 1,2,4    0,2,4 1,2,4     0,2,3 1,2,4    0,2,4 0,3,4              |
|     ------------------------------------------------------------------------|
|             3         3               3                                     |
|     4p     p      - 4p     p      - 2p     p      +                         |
|       0,2,3 0,3,4     1,2,3 1,3,4     0,2,4 1,3,4                           |
|     ------------------------------------------------------------------------|
|                                                                             |
|     8p     p     p     p      - 2p     p     p     p      +                 |
|       0,2,3 1,2,3 1,2,4 1,3,4     0,2,3 0,2,4 1,2,4 1,3,4                   |
|     ------------------------------------------------------------------------|
|                                   2     2               2                   |
|     8p     p     p     p      - 8p     p      - 2p     p     p      -       |
|       0,2,3 0,2,4 0,3,4 1,3,4     0,2,3 1,3,4     0,1,4 0,2,4 2,3,4         |
|     ------------------------------------------------------------------------|
|                                                                             |
|     2p     p     p     p      + 8p     p     p     p      -                 |
|       0,1,3 1,2,3 1,2,4 2,3,4     0,1,3 0,2,4 1,2,4 2,3,4                   |
|     ------------------------------------------------------------------------|
|             2                                                   2           |
|     2p     p     p      + 10p     p     p     p      - 12p     p     p      |
|       0,1,2 1,2,4 2,3,4      0,1,3 0,2,4 0,3,4 2,3,4      0,1,2 0,3,4 2,3,4 |
|     ------------------------------------------------------------------------|
|                                                                  2     2    |
|     - 20p     p     p     p      + 12p     p     p     p      + p     p     |
|          0,1,3 0,2,3 1,3,4 2,3,4      0,1,2 1,2,3 1,3,4 2,3,4    0,1,3 2,3,4|
|     ------------------------------------------------------------------------|
|                      2                                                      |
|     + 12p     p     p                                                       |
|          0,1,2 0,1,4 2,3,4                                                  |
|                                                                             |
|                                                                          QQ[|
|                                                                             |
|o4 : ------------------------------------------------------------------------|
|     (p     p      - p     p      + p     p     , p     p      - p     p     |
|       1,2,4 0,3,4    0,2,4 1,3,4    0,1,4 2,3,4   1,2,3 0,3,4    0,2,3 1,3,4|
|-----------------------------------------------------------------------------|
|p     ..p     , p     , p     , p     , p     , p     , p     , p     , p    |
| 0,1,2   0,1,3   0,2,3   1,2,3   0,1,4   0,2,4   1,2,4   0,3,4   1,3,4   2,3,|
|-----------------------------------------------------------------------------|
| + p     p     , p     p      - p     p      + p     p     , p     p      - p|
|    0,1,3 2,3,4   1,2,3 0,2,4    0,2,3 1,2,4    0,1,2 2,3,4   1,2,3 0,1,4    |
|-----------------------------------------------------------------------------|
| ]                                                                           |
|4                                                                            |
|-----------------------------------------------------------------------      |
|     p      + p     p     , p     p      - p     p      + p     p     )      |
|0,1,3 1,2,4    0,1,2 1,3,4   0,2,3 0,1,4    0,1,3 0,2,4    0,1,2 0,3,4       |
+-----------------------------------------------------------------------------+
|i5 : -- 2-th associated hypersurface of S in G(3,4) (parameterizing tangent  |
|     time tangentialChowForm(S,2)                                            |
| -- used 0.11137s (cpu); 0.0677236s (thread); 0s (gc)                        |
|                                                                             |
|              2                                             2                |
|o5 = p       p        - p       p       p        + p       p                 |
|      0,1,3,4 0,2,3,4    0,1,2,4 0,2,3,4 1,2,3,4    0,1,2,3 1,2,3,4          |
|                                                                             |
|o5 : QQ[p       ..p       , p       , p       , p       ]                    |
|         0,1,2,3   0,1,2,4   0,1,3,4   0,2,3,4   1,2,3,4                     |
|-----------------------------------------------------------------------------|
|hyperplanes to S)                                                            |
+-----------------------------------------------------------------------------+
|i6 : -- we get the dual hypersurface of S in G(0,4) by dualizing             |
|     time S' = ideal dualize tangentialChowForm(S,2)                         |
| -- used 0.111265s (cpu); 0.0675446s (thread); 0s (gc)                       |
|                                                                             |
|            2               2                                                |
|o6 = ideal(p p  - p p p  + p p )                                             |
|            1 2    0 1 3    0 4                                              |
|                                                                             |
|o6 : Ideal of QQ[p ..p ]                                                     |
|                  0   4                                                      |
+-----------------------------------------------------------------------------+
|i7 : -- we then can recover S                                                |
|     time assert(dualize tangentialChowForm(S',3) == S)                      |
| -- used 0.18368s (cpu); 0.133263s (thread); 0s (gc)                         |
+-----------------------------------------------------------------------------+

See also
========

  * isCoisotropic -- whether a hypersurface of a
    Grassmannian is a tangential Chow form
  * chowForm -- Chow form of a projective variety

Ways to use tangentialChowForm:
===============================

  * "tangentialChowForm(Ideal,ZZ)"

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

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

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

The source of this document is in Resultants.m2:1029:0.

veronese -- Veronese embedding
******************************

  * Usage:
        veronese(n,d,K)
        veronese(n,d)
  * Inputs:
      * n, an integer (Macaulay2Doc),
      * d, an integer (Macaulay2Doc),
      * K, a ring (Macaulay2Doc), optional, with default value
        QQ (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * Variable, => ...,
        default value null, specify a name for a variable
  * Outputs:
      * a ring map (Macaulay2Doc), representing the $d$-th
        Veronese embedding of $\mathbb{P}^n$

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

This is an auxiliary method to build tests and examples. For instance, the two
following codes have to produce the same polynomial up to a renaming of
variables: 1) resultant genericPolynomials((n+1):d,K) and 2)
fromPluckerToStiefel dualize chowForm veronese(n,d,K).

+-------------------------------------------------------------------+
|i1 : veronese(1,4)                                                 |
|                                                                   |
|                                    4   3     2 2     3   4        |
|o1 = map (QQ[t ..t ], QQ[x ..x ], {t , t t , t t , t t , t })      |
|              0   1       0   4     0   0 1   0 1   0 1   1        |
|                                                                   |
|o1 : RingMap QQ[t ..t ] <-- QQ[x ..x ]                             |
|                 0   1          0   4                              |
+-------------------------------------------------------------------+
|i2 : veronese(1,4,Variable=>y)                                     |
|                                                                   |
|                                    4   3     2 2     3   4        |
|o2 = map (QQ[y ..y ], QQ[y ..y ], {y , y y , y y , y y , y })      |
|              0   1       0   4     0   0 1   0 1   0 1   1        |
|                                                                   |
|o2 : RingMap QQ[y ..y ] <-- QQ[y ..y ]                             |
|                 0   1          0   4                              |
+-------------------------------------------------------------------+
|i3 : veronese(1,4,Variable=>(u,z))                                 |
|                                                                   |
|                                    4   3     2 2     3   4        |
|o3 = map (QQ[u ..u ], QQ[z ..z ], {u , u u , u u , u u , u })      |
|              0   1       0   4     0   0 1   0 1   0 1   1        |
|                                                                   |
|o3 : RingMap QQ[u ..u ] <-- QQ[z ..z ]                             |
|                 0   1          0   4                              |
+-------------------------------------------------------------------+
|i4 : veronese(2,2,ZZ/101)                                          |
|                                                                   |
|           ZZ           ZZ            2               2         2  |
|o4 = map (---[t ..t ], ---[x ..x ], {t , t t , t t , t , t t , t })|
|          101  0   2   101  0   5     0   0 1   0 2   1   1 2   2  |
|                                                                   |
|              ZZ              ZZ                                   |
|o4 : RingMap ---[t ..t ] <-- ---[x ..x ]                           |
|             101  0   2      101  0   5                            |
+-------------------------------------------------------------------+

See also
========

  * genericPolynomials -- generic homogeneous
    polynomials

Ways to use veronese:
=====================

  * "veronese(ZZ,ZZ)"
  * "veronese(ZZ,ZZ,Ring)"

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

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

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

The source of this document is in Resultants.m2:1000:0.