next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Macaulay2Doc > basic commutative algebra > M2SingularBook > Singular Book 1.7.10

Singular Book 1.7.10 -- standard bases

We show the Groebner and standard bases of an ideal under several different orders and localizations. First, the default order is graded (degree) reverse lexicographic.
i1 : A = QQ[x,y];
i2 : I = ideal "x10+x9y2,y8-x2y7";

o2 : Ideal of A
i3 : transpose gens gb I

o3 = {-9}  | x2y7-y8   |
     {-11} | x9y2+x10  |
     {-13} | x12y+xy11 |
     {-13} | x13-xy12  |
     {-14} | y14+xy12  |
     {-14} | xy13+y12  |

             6       1
o3 : Matrix A  <--- A

Lexicographic order:

i4 : A1 = QQ[x,y,MonomialOrder=>Lex];
i5 : I = substitute(I,A1)

             10    9 2     2 7    8
o5 = ideal (x   + x y , - x y  + y )

o5 : Ideal of A1
i6 : transpose gens gb I

o6 = {-15} | y15-y12  |
     {-14} | xy12+y14 |
     {-9}  | x2y7-y8  |
     {-11} | x10+x9y2 |

              4        1
o6 : Matrix A1  <--- A1

Now we change to a local order

i7 : B = QQ[x,y,MonomialOrder=>{Weights=>{-1,-1},2},Global=>false];
i8 : I = substitute(I,B)

             10    9 2   8    2 7
o8 = ideal (x   + x y , y  - x y )

o8 : Ideal of B
i9 : transpose gens gb I

o9 = {-9}  | y8-x2y7  |
     {-11} | x10+x9y2 |

             2       1
o9 : Matrix B  <--- B

Another local order: negative lexicographic.

i10 : B = QQ[x,y,MonomialOrder=>{Weights=>{-1,0},Weights=>{0,-1}},Global=>false];
i11 : I = substitute(I,B)

              9 2    10   8    2 7
o11 = ideal (x y  + x  , y  - x y )

o11 : Ideal of B
i12 : transpose gens gb I

o12 = {-9}  | y8-x2y7   |
      {-11} | x9y2+x10  |
      {-16} | x13-x13y3 |

              3       1
o12 : Matrix B  <--- B

One method to compute a standard basis is via homogenization. The example below does this, obtaining a standard basis which is not minimal.

i13 : M = matrix{{1,1,1},{0,-1,-1},{0,0,-1}}

o13 = | 1 1  1  |
      | 0 -1 -1 |
      | 0 0  -1 |

               3        3
o13 : Matrix ZZ  <--- ZZ
i14 : mo = apply(entries M, e -> Weights => e)

o14 = {Weights => {1, 1, 1}, Weights => {0, -1, -1}, Weights => {0, 0, -1}}

o14 : List
i15 : C = QQ[t,x,y,MonomialOrder=>mo];
i16 : I = homogenize(substitute(I,C),t)

                  8    2 7     10    9 2       11    12    13      12 
o16 = ideal (- t*y  + x y , t*x   + x y , t*x*y   + x  y, x   - x*y  ,
      -----------------------------------------------------------------------
           12    14   2 12      13
      t*x*y   + y  , t y   + x*y  )

o16 : Ideal of C
i17 : transpose gens gb I

o17 = {-9}  | ty8-x2y7   |
      {-11} | tx10+x9y2  |
      {-13} | x12y+x3y10 |
      {-13} | x13-xy12   |
      {-14} | x3y11+y14  |
      {-14} | x4y10+xy13 |
      {-14} | x11y3-x5y9 |
      {-15} | x6y9-y15   |
      {-15} | x10y5+x7y8 |
      {-16} | x8y8-x2y14 |

              10       1
o17 : Matrix C   <--- C
i18 : substitute(transpose gens gb I, {t=>1})

o18 = {-9}  | -x2y7+y8   |
      {-11} | x9y2+x10   |
      {-13} | x12y+x3y10 |
      {-13} | x13-xy12   |
      {-14} | x3y11+y14  |
      {-14} | x4y10+xy13 |
      {-14} | x11y3-x5y9 |
      {-15} | x6y9-y15   |
      {-15} | x10y5+x7y8 |
      {-16} | x8y8-x2y14 |

              10       1
o18 : Matrix C   <--- C
The first two elements form a standard basis.