next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Macaulay2Doc > rings > monoid

monoid -- make or retrieve a monoid

Synopsis

Description

The function monoid is called whenever a polynomial ring is created, see Ring Array, or when a local polynomial ring is made, see Ring List. Some of the options provided when making a monoid don't take effect until the monoid is made into a polynomial ring.

Let's make a free ordered commutative monoid on the variables a,b,c, with degrees 2, 3, and 4, respectively.
i1 : M = monoid [a,b,c,Degrees=>{2,3,4}]

o1 = M

o1 : GeneralOrderedMonoid
i2 : degrees M

o2 = {{2}, {3}, {4}}

o2 : List
i3 : M_0 * M_1^6

        6
o3 = a*b

o3 : M
Use use to arrange for the variables to be assigned their values in the monoid.
i4 : a

o4 = a

o4 : M
i5 : use M

o5 = M

o5 : GeneralOrderedMonoid
i6 : a * b^6

        6
o6 = a*b

o6 : M
The options used when the monoid was created can be recovered with options.
i7 : options M

o7 = OptionTable{Constants => false                     }
                 DegreeLift => null
                 DegreeMap => null
                 DegreeRank => 1
                 Degrees => {{2}, {3}, {4}}
                 Global => true
                 Heft => {1}
                 Inverses => false
                 Join => null
                 Local => false
                 MonomialOrder => {MonomialSize => 32  }
                                  {GRevLex => {2, 3, 4}}
                                  {Position => Up      }
                 SkewCommutative => {}
                 Variables => {a, b, c}
                 WeylAlgebra => {}

o7 : OptionTable
The variables listed may be symbols or indexed variables. The values assigned to these variables are the corresponding monoid generators. The function baseName may be used to recover the original symbol or indexed variable.

The Heft option is used in particular by Ext(Module,Module).

i8 : R = ZZ[x,y, Degrees => {-1,-2}, Heft => {-1}]

o8 = R

o8 : PolynomialRing
i9 : degree \ gens R

o9 = {{-1}, {-2}}

o9 : List
i10 : transpose vars R

o10 = {1} | x |
      {2} | y |

              2       1
o10 : Matrix R  <--- R
In this example we make a Weyl algebra.
i11 : R = ZZ/101[x,dx,y,dy,WeylAlgebra => {x=>dx, y=>dy}]

o11 = R

o11 : PolynomialRing
i12 : dx*x

o12 = x*dx + 1

o12 : R
i13 : dx*x^10

       10        9
o13 = x  dx + 10x

o13 : R
i14 : dx*y^10

          10
o14 = dx*y

o14 : R
In this example we make a skew commutative ring.
i15 : R = ZZ[x,y,z,SkewCommutative=>{x,y}]

o15 = R

o15 : PolynomialRing
i16 : x*y

o16 = x*y

o16 : R
i17 : y*x

o17 = -x*y

o17 : R
i18 : x*z-z*x

o18 = 0

o18 : R
By default, (multi)degrees are concatenated when forming polynomial rings over polynomial rings, as can be seen by examining the corresponding flattened monoid, which displays information about all of the variables.
i19 : QQ[x][y]

o19 = QQ[x][y]

o19 : PolynomialRing
i20 : oo.FlatMonoid

o20 = monoid[y, x, Degrees => {{1}, {0}}, Heft => {2:1}, MonomialOrder => {MonomialSize => 32}, DegreeRank => 2]
                               {0}  {1}                                   {GRevLex => {1}    }
                                                                          {Position => Up    }
                                                                          {GRevLex => {1}    }

o20 : GeneralOrderedMonoid
i21 : QQ[x][y][z]

o21 = QQ[x][y][z]

o21 : PolynomialRing
i22 : oo.FlatMonoid

o22 = monoid[z, y, x, Degrees => {{1}, {0}, {0}}, Heft => {3:1}, MonomialOrder => {MonomialSize => 32}, DegreeRank => 3]
                                  {0}  {1}  {0}                                   {GRevLex => {1}    }
                                  {0}  {0}  {1}                                   {Position => Up    }
                                                                                  {2:(GRevLex => {1})}

o22 : GeneralOrderedMonoid
That behavior can be overridden with the Join option.
i23 : QQ[x][y,Join => false]

o23 = QQ[x][y]

o23 : PolynomialRing
i24 : oo.FlatMonoid

o24 = monoid[y, x, Degrees => {2:1}, Heft => {1}, MonomialOrder => {MonomialSize => 32}, DegreeRank => 1]
                                                                   {GRevLex => {1}    }
                                                                   {Position => Up    }
                                                                   {GRevLex => {1}    }

o24 : GeneralOrderedMonoid
A degree map may be provided, and it will be used in computing tensor products.
i25 : A = QQ[x];
i26 : B = A[y,Join => false,DegreeMap => x -> 7*x]

o26 = B

o26 : PolynomialRing
i27 : B.FlatMonoid

o27 = monoid[y, x, Degrees => {1, 7}, Heft => {1}, MonomialOrder => {MonomialSize => 32}, DegreeRank => 1]
                                                                    {GRevLex => {1}    }
                                                                    {Position => Up    }
                                                                    {GRevLex => {1}    }

o27 : GeneralOrderedMonoid
i28 : degrees A^{-1,-2}

o28 = {{1}, {2}}

o28 : List
i29 : degrees (B**A^{-1,-2})

o29 = {{7}, {14}}

o29 : List
For certain applications, such as lifting matrices, a degree lift function can be provided.
i30 : B = A[y,Join => false,DegreeMap => x -> 7*x,
           DegreeLift => x -> apply(x, d -> lift(d/7,ZZ))]

o30 = B

o30 : PolynomialRing
i31 : matrix {{x_B}}

o31 = | x |

              1       1
o31 : Matrix B  <--- B
i32 : degrees oo

o32 = {{{0}}, {{7}}}

o32 : List
i33 : lift(matrix {{x_B}},A)

o33 = | x |

              1       1
o33 : Matrix A  <--- A
i34 : degrees oo

o34 = {{{0}}, {{1}}}

o34 : List

Synopsis

  • Usage:
    monoid R
  • Inputs:
  • Outputs:
    • the monoid of monomials in the polynomial ring R

If R is a quotient ring of a polynomial ring S, then the monoid of S is returned.

i35 : R = QQ[a..d, Weights=>{1,2,3,4}]

o35 = R

o35 : PolynomialRing
i36 : monoid R

o36 = monoid[a..d, Degrees => {4:1}, Heft => {1}, MonomialOrder => {Weights => {1..4} }, DegreeRank => 1]
                                                                   {MonomialSize => 32}
                                                                   {GRevLex => {4:1}  }
                                                                   {Position => Up    }

o36 : GeneralOrderedMonoid

Ways to use monoid :