Macaulay2 » Documentation
Packages » Regularity :: mRegularity
next | previous | forward | backward | up | index | toc

mRegularity -- compute Castelnuovo-Mumford regularity

Synopsis

Description

This package is based on two articles by Bermejo and Gimenez: Saturation and Castelnuovo-mumford Regularity, Journal of Algebra 303/2006 and Computing the Castelnuovo-Mumford Regularity of some subschemes of P^n using quotients of monomial ideals, Journal of Pure and Applied Algebra 164/2001.

computing the regularity of the defining ideal of the second Veronesean of P3

i1 : R=QQ[a,b,c,d,x_0..x_9,MonomialOrder =>  Eliminate 4]

o1 = R

o1 : PolynomialRing
i2 : i=ideal( x_0-a*b,x_1-a*c,x_2-a*d,x_3-b*c,x_4-b*d,x_5-c*d,x_6-a^2,x_7-b^2,x_8-c^2,x_9-d^2)

                                                                             
o2 = ideal (- a*b + x , - a*c + x , - a*d + x , - b*c + x , - b*d + x , - c*d
                     0           1           2           3           4       
     ------------------------------------------------------------------------
              2          2          2          2
     + x , - a  + x , - b  + x , - c  + x , - d  + x )
        5          6          7          8          9

o2 : Ideal of R
i3 : j=selectInSubring(1, gens gb i)

o3 = | x_5^2-x_8x_9 x_4x_5-x_3x_9 x_3x_5-x_4x_8 x_2x_5-x_1x_9 x_1x_5-x_2x_8
     ------------------------------------------------------------------------
     x_4^2-x_7x_9 x_3x_4-x_5x_7 x_2x_4-x_0x_9 x_1x_4-x_0x_5 x_0x_4-x_2x_7
     ------------------------------------------------------------------------
     x_3^2-x_7x_8 x_2x_3-x_0x_5 x_1x_3-x_0x_8 x_0x_3-x_1x_7 x_2^2-x_6x_9
     ------------------------------------------------------------------------
     x_1x_2-x_5x_6 x_0x_2-x_4x_6 x_1^2-x_6x_8 x_0x_1-x_3x_6 x_0^2-x_6x_7 |

             1      20
o3 : Matrix R  <-- R
i4 : I=ideal flatten entries j -- this is the ideal of the Veronesean,

             2                                                              2
o4 = ideal (x  - x x , x x  - x x , x x  - x x , x x  - x x , x x  - x x , x 
             5    8 9   4 5    3 9   3 5    4 8   2 5    1 9   1 5    2 8   4
     ------------------------------------------------------------------------
                                                                  2        
     - x x , x x  - x x , x x  - x x , x x  - x x , x x  - x x , x  - x x ,
        7 9   3 4    5 7   2 4    0 9   1 4    0 5   0 4    2 7   3    7 8 
     ------------------------------------------------------------------------
                                             2                            
     x x  - x x , x x  - x x , x x  - x x , x  - x x , x x  - x x , x x  -
      2 3    0 5   1 3    0 8   0 3    1 7   2    6 9   1 2    5 6   0 2  
     ------------------------------------------------------------------------
            2                       2
     x x , x  - x x , x x  - x x , x  - x x )
      4 6   1    6 8   0 1    3 6   0    6 7

o4 : Ideal of R
i5 : mRegularity I 

o5 = 3

This is an example where mRegularity is faster than regularity. Regularity takes approximately 190 seconds.

i6 : R = QQ[x_0..x_5]

o6 = R

o6 : PolynomialRing
i7 : I1 = ideal (x_0^2*x_1+x_0*x_1*x_2-x_0*x_4^2,-x_0*x_2^2+x_0^2*x_5,x_0^2*x_2-x_0*x_1*x_4,x_0^3-x_2^3+x_0*x_1*x_3,x_0^3+x_0^2*x_1-x_1*x_2^2-x_0*x_2*x_5,x_0^3+x_2^3-x_0*x_5^2)

             2                 2       2    2     2              3    3  
o7 = ideal (x x  + x x x  - x x , - x x  + x x , x x  - x x x , x  - x  +
             0 1    0 1 2    0 4     0 2    0 5   0 2    0 1 4   0    2  
     ------------------------------------------------------------------------
              3    2        2            3    3      2
     x x x , x  + x x  - x x  - x x x , x  + x  - x x )
      0 1 3   0    0 1    1 2    0 2 5   0    2    0 5

o7 : Ideal of R
i8 : benchmark "mRegularity I1"

o8 = .19526772975

o8 : RR (of precision 53)

This is an example where regularity is faster than mRegularity.

i9 : R = QQ[x_0..x_5]

o9 = R

o9 : PolynomialRing
i10 : I2 = ideal ( x_0^2+x_5^2, x_0^2+x_0*x_3+x_4^2, x_0^2+x_0*x_5+x_2*x_5, x_0^2-x_0*x_3-x_3*x_5, x_0^2-x_3*x_4, x_0*x_3);

o10 : Ideal of R
i11 : benchmark " mRegularity I2"

o11 = .0258594338426967

o11 : RR (of precision 53)
i12 : time regularity I2  
     -- used 0.00183705 seconds

o12 = 4

This symbol is provided by the package Regularity.

See also

Ways to use mRegularity :

For the programmer

The object mRegularity is a method function with options.