next | previous | forward | backward | up | top | index | toc | home
Macaulay2 > 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 = {-11} | x10+x9y2 |
     {-9}  | y8-x2y7  |

             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 = {-15} | x13+x14y |
      {-11} | x9y2+x10 |
      {-9}  | y8-x2y7  |

              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)

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

o16 : Ideal of C
i17 : transpose gens gb I

o17 = {-9}  | ty8-x2y7    |
      {-11} | tx10+x9y2   |
      {-19} | x12y7+x9y10 |

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

o18 = {-9}  | -x2y7+y8    |
      {-11} | x9y2+x10    |
      {-19} | x12y7+x9y10 |

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