Macaulay2 » Documentation
Packages » SparseResultants :: sparseDiscriminant
next | previous | forward | backward | up | index | toc

sparseDiscriminant -- sparse discriminant (A-discriminant)

Synopsis

Description

Alternatively, one can apply the method directly to the Laurent polynomial $f$. In this case, the matrix $A$ is automatically determined by exponentsMatrix.

As an example, we now calculate the sparse discriminant of a generic trilinear form on $\mathbb{P}^1\times\mathbb{P}^2\times \mathbb{P}^1$, that is, the hyperdeterminant of a generic three-dimensional matrix of shape $2\times 3\times 2$.

i1 : f = genericMultihomogeneousPolynomial((2,3,2),(1,1,1))

o1 = a     x y z  + a     x y z  + a     x y z  + a     x y z  + a     x y z 
      0,0,0 0 0 0    0,0,1 0 0 1    0,1,0 0 1 0    0,1,1 0 1 1    0,2,0 0 2 0
     ------------------------------------------------------------------------
     + a     x y z  + a     x y z  + a     x y z  + a     x y z  +
        0,2,1 0 2 1    1,0,0 1 0 0    1,0,1 1 0 1    1,1,0 1 1 0  
     ------------------------------------------------------------------------
     a     x y z  + a     x y z  + a     x y z
      1,1,1 1 1 1    1,2,0 1 2 0    1,2,1 1 2 1

o1 : ZZ[a     ..a     ][x ..x , y ..y , z ..z ]
         0,0,0   1,2,1   0   1   0   2   0   1
i2 : time sparseDiscriminant f
 -- used 1.91898s (cpu); 1.7312s (thread); 0s (gc)

                                                   2                        
o2 = a     a     a     a     a     a      - a     a     a     a     a      -
      0,1,1 0,2,0 0,2,1 1,0,0 1,0,1 1,1,0    0,1,0 0,2,1 1,0,0 1,0,1 1,1,0  
     ------------------------------------------------------------------------
            2     2                                2            
     a     a     a     a      + a     a     a     a     a      -
      0,1,1 0,2,0 1,0,1 1,1,0    0,1,0 0,2,0 0,2,1 1,0,1 1,1,0  
     ------------------------------------------------------------------------
                              2              2           2      
     a     a     a     a     a      + a     a     a     a      -
      0,0,1 0,2,0 0,2,1 1,0,1 1,1,0    0,0,0 0,2,1 1,0,1 1,1,0  
     ------------------------------------------------------------------------
                        2                    2     2            
     a     a     a     a     a      + a     a     a     a      +
      0,1,1 0,2,0 0,2,1 1,0,0 1,1,1    0,1,0 0,2,1 1,0,0 1,1,1  
     ------------------------------------------------------------------------
            2                                                               
     a     a     a     a     a      - a     a     a     a     a     a      +
      0,1,1 0,2,0 1,0,0 1,0,1 1,1,1    0,1,0 0,2,0 0,2,1 1,0,0 1,0,1 1,1,1  
     ------------------------------------------------------------------------
                                                   2                        
     a     a     a     a     a     a      - a     a     a     a     a      +
      0,0,1 0,2,0 0,2,1 1,0,0 1,1,0 1,1,1    0,0,0 0,2,1 1,0,0 1,1,0 1,1,1  
     ------------------------------------------------------------------------
            2                                                               
     a     a     a     a     a      - a     a     a     a     a     a      -
      0,0,1 0,2,0 1,0,1 1,1,0 1,1,1    0,0,0 0,2,0 0,2,1 1,0,1 1,1,0 1,1,1  
     ------------------------------------------------------------------------
            2           2                                2      
     a     a     a     a      + a     a     a     a     a      -
      0,0,1 0,2,0 1,0,0 1,1,1    0,0,0 0,2,0 0,2,1 1,0,0 1,1,1  
     ------------------------------------------------------------------------
      2                                                                     
     a     a     a     a     a      + a     a     a     a     a     a      +
      0,1,1 0,2,0 1,0,0 1,0,1 1,2,0    0,1,0 0,1,1 0,2,1 1,0,0 1,0,1 1,2,0  
     ------------------------------------------------------------------------
                        2              2           2            
     a     a     a     a     a      - a     a     a     a      +
      0,1,0 0,1,1 0,2,0 1,0,1 1,2,0    0,1,0 0,2,1 1,0,1 1,2,0  
     ------------------------------------------------------------------------
                                           
     a     a     a     a     a     a      +
      0,0,1 0,1,1 0,2,0 1,0,1 1,1,0 1,2,0  
     ------------------------------------------------------------------------
                                           
     a     a     a     a     a     a      -
      0,0,1 0,1,0 0,2,1 1,0,1 1,1,0 1,2,0  
     ------------------------------------------------------------------------
                                            
     2a     a     a     a     a     a      +
       0,0,0 0,1,1 0,2,1 1,0,1 1,1,0 1,2,0  
     ------------------------------------------------------------------------
                                           
     a     a     a     a     a     a      -
      0,0,1 0,1,1 0,2,0 1,0,0 1,1,1 1,2,0  
     ------------------------------------------------------------------------
                                            
     2a     a     a     a     a     a      +
       0,0,1 0,1,0 0,2,1 1,0,0 1,1,1 1,2,0  
     ------------------------------------------------------------------------
                                           
     a     a     a     a     a     a      -
      0,0,0 0,1,1 0,2,1 1,0,0 1,1,1 1,2,0  
     ------------------------------------------------------------------------
                                           
     a     a     a     a     a     a      -
      0,0,1 0,1,0 0,2,0 1,0,1 1,1,1 1,2,0  
     ------------------------------------------------------------------------
                                           
     a     a     a     a     a     a      +
      0,0,0 0,1,1 0,2,0 1,0,1 1,1,1 1,2,0  
     ------------------------------------------------------------------------
                                              2                              
     2a     a     a     a     a     a      - a     a     a     a     a      +
       0,0,0 0,1,0 0,2,1 1,0,1 1,1,1 1,2,0    0,0,1 0,2,0 1,1,0 1,1,1 1,2,0  
     ------------------------------------------------------------------------
                                                               2            
     a     a     a     a     a     a      + a     a     a     a     a      -
      0,0,0 0,0,1 0,2,1 1,1,0 1,1,1 1,2,0    0,0,0 0,0,1 0,2,0 1,1,1 1,2,0  
     ------------------------------------------------------------------------
      2           2                                      2      
     a     a     a     a      - a     a     a     a     a      +
      0,0,0 0,2,1 1,1,1 1,2,0    0,0,1 0,1,0 0,1,1 1,0,1 1,2,0  
     ------------------------------------------------------------------------
            2           2        2                 2      
     a     a     a     a      + a     a     a     a      -
      0,0,0 0,1,1 1,0,1 1,2,0    0,0,1 0,1,0 1,1,1 1,2,0  
     ------------------------------------------------------------------------
                              2        2           2            
     a     a     a     a     a      + a     a     a     a      -
      0,0,0 0,0,1 0,1,1 1,1,1 1,2,0    0,1,1 0,2,0 1,0,0 1,2,1  
     ------------------------------------------------------------------------
                        2                                                   
     a     a     a     a     a      - a     a     a     a     a     a      +
      0,1,0 0,1,1 0,2,1 1,0,0 1,2,1    0,1,0 0,1,1 0,2,0 1,0,0 1,0,1 1,2,1  
     ------------------------------------------------------------------------
      2                                                                      
     a     a     a     a     a      - 2a     a     a     a     a     a      +
      0,1,0 0,2,1 1,0,0 1,0,1 1,2,1     0,0,1 0,1,1 0,2,0 1,0,0 1,1,0 1,2,1  
     ------------------------------------------------------------------------
                                           
     a     a     a     a     a     a      +
      0,0,1 0,1,0 0,2,1 1,0,0 1,1,0 1,2,1  
     ------------------------------------------------------------------------
                                           
     a     a     a     a     a     a      -
      0,0,0 0,1,1 0,2,1 1,0,0 1,1,0 1,2,1  
     ------------------------------------------------------------------------
                                           
     a     a     a     a     a     a      +
      0,0,1 0,1,0 0,2,0 1,0,1 1,1,0 1,2,1  
     ------------------------------------------------------------------------
                                            
     2a     a     a     a     a     a      -
       0,0,0 0,1,1 0,2,0 1,0,1 1,1,0 1,2,1  
     ------------------------------------------------------------------------
                                             2           2            
     a     a     a     a     a     a      + a     a     a     a      -
      0,0,0 0,1,0 0,2,1 1,0,1 1,1,0 1,2,1    0,0,1 0,2,0 1,1,0 1,2,1  
     ------------------------------------------------------------------------
                        2                                                    
     a     a     a     a     a      + 2a     a     a     a     a     a      -
      0,0,0 0,0,1 0,2,1 1,1,0 1,2,1     0,0,1 0,1,0 0,2,0 1,0,0 1,1,1 1,2,1  
     ------------------------------------------------------------------------
                                           
     a     a     a     a     a     a      -
      0,0,0 0,1,1 0,2,0 1,0,0 1,1,1 1,2,1  
     ------------------------------------------------------------------------
                                           
     a     a     a     a     a     a      -
      0,0,0 0,1,0 0,2,1 1,0,0 1,1,1 1,2,1  
     ------------------------------------------------------------------------
                                             2                              
     a     a     a     a     a     a      + a     a     a     a     a      +
      0,0,0 0,0,1 0,2,0 1,1,0 1,1,1 1,2,1    0,0,0 0,2,1 1,1,0 1,1,1 1,2,1  
     ------------------------------------------------------------------------
                                                   2                        
     a     a     a     a     a     a      - a     a     a     a     a      +
      0,0,1 0,1,0 0,1,1 1,0,0 1,2,0 1,2,1    0,0,0 0,1,1 1,0,0 1,2,0 1,2,1  
     ------------------------------------------------------------------------
            2                                                               
     a     a     a     a     a      - a     a     a     a     a     a      -
      0,0,1 0,1,0 1,0,1 1,2,0 1,2,1    0,0,0 0,1,0 0,1,1 1,0,1 1,2,0 1,2,1  
     ------------------------------------------------------------------------
      2                                                                     
     a     a     a     a     a      + a     a     a     a     a     a      -
      0,0,1 0,1,0 1,1,0 1,2,0 1,2,1    0,0,0 0,0,1 0,1,1 1,1,0 1,2,0 1,2,1  
     ------------------------------------------------------------------------
                                             2                              
     a     a     a     a     a     a      + a     a     a     a     a      -
      0,0,0 0,0,1 0,1,0 1,1,1 1,2,0 1,2,1    0,0,0 0,1,1 1,1,1 1,2,0 1,2,1  
     ------------------------------------------------------------------------
            2           2                                2      
     a     a     a     a      + a     a     a     a     a      +
      0,0,1 0,1,0 1,0,0 1,2,1    0,0,0 0,1,0 0,1,1 1,0,0 1,2,1  
     ------------------------------------------------------------------------
                              2        2                 2
     a     a     a     a     a      - a     a     a     a
      0,0,0 0,0,1 0,1,0 1,1,0 1,2,1    0,0,0 0,1,1 1,1,0 1,2,1

o2 : ZZ[a     ..a     ]
         0,0,0   1,2,1
i3 : A = exponentsMatrix f

o3 = | 0 0 0 0 0 0 1 1 1 1 1 1 |
     | 1 1 1 1 1 1 0 0 0 0 0 0 |
     | 0 0 0 0 1 1 0 0 0 0 1 1 |
     | 0 0 1 1 0 0 0 0 1 1 0 0 |
     | 1 1 0 0 0 0 1 1 0 0 0 0 |
     | 0 1 0 1 0 1 0 1 0 1 0 1 |
     | 1 0 1 0 1 0 1 0 1 0 1 0 |

              7       12
o3 : Matrix ZZ  <-- ZZ
i4 : Disc = sparseDiscriminant A

o4 = Disc

o4 : SparseDiscriminant (sparse discriminant associated to | 0 0 0 0 0 0 1 1 1 1 1 1 |)
                                                           | 1 1 1 1 1 1 0 0 0 0 0 0 |
                                                           | 0 0 0 0 1 1 0 0 0 0 1 1 |
                                                           | 0 0 1 1 0 0 0 0 1 1 0 0 |
                                                           | 1 1 0 0 0 0 1 1 0 0 0 0 |
                                                           | 0 1 0 1 0 1 0 1 0 1 0 1 |
                                                           | 1 0 1 0 1 0 1 0 1 0 1 0 |
i5 : assert(Disc f == sparseDiscriminant f)

See also

Ways to use sparseDiscriminant:

For the programmer

The object sparseDiscriminant is a method function with options.