Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » Type » Monoid » tensor(Monoid,Monoid)
next | previous | forward | backward | up | index | toc

tensor(Monoid,Monoid) -- tensor product of monoids

Description

tensor(A, B) is the same as A ** B except that options are allowed, see Monoid ** Monoid and Ring ** Ring. This method allows many of the options available for monoids, see monoid for details. This method essentially combines the variables of A and B into one monoid or ring.

i1 : kk = ZZ/101

o1 = kk

o1 : QuotientRing
i2 : A = kk[a,b]

o2 = A

o2 : PolynomialRing
i3 : B = kk[c,d,e]

o3 = B

o3 : PolynomialRing

The simplest version is to simply use **:

i4 : describe(A**B)

o4 = kk[a..e, Degrees => {2:{1}, 3:{0}}, Heft => {2:1}, MonomialOrder => {MonomialSize => 32}]
                            {0}    {1}                                   {GRevLex => {2:1}  }
                                                                         {Position => Up    }
                                                                         {GRevLex => {3:1}  }

If you wish to change the variable names:

i5 : describe tensor(A, B, VariableBaseName => p)

o5 = kk[p ..p , Degrees => {2:{1}, 3:{0}}, Heft => {2:1}, MonomialOrder => {MonomialSize => 32}]
         0   4                {0}    {1}                                   {GRevLex => {2:1}  }
                                                                           {Position => Up    }
                                                                           {GRevLex => {3:1}  }
i6 : describe tensor(A, B, Variables => {a1,a2,b1,b2,b3})

o6 = kk[a1, a2, b1, b2, b3, Degrees => {2:{1}, 3:{0}}, Heft => {2:1}, MonomialOrder => {MonomialSize => 32}]
                                          {0}    {1}                                   {GRevLex => {2:1}  }
                                                                                       {Position => Up    }
                                                                                       {GRevLex => {3:1}  }

The tensor product of two singly graded rings is bigraded. Sometimes you want a singly graded ring. Here is one way to get it:

i7 : describe (C = tensor(A, B, DegreeRank => 1, Degrees => {5:1}))

o7 = kk[a..e, Degrees => {5:1}, Heft => {1}, MonomialOrder => {MonomialSize => 32}]
                                                              {GRevLex => {2:1}  }
                                                              {Position => Up    }
                                                              {GRevLex => {3:1}  }
i8 : degreeLength C

o8 = 1
i9 : degreesRing C

o9 = ZZ[T]

o9 : PolynomialRing

You can take tensor powers of a single ring or module. Iterated tensor products are associated from the right so R^**3 is a synonym for R ** ( R ** R).

i10 : kk = ZZ/101

o10 = kk

o10 : QuotientRing
i11 : R = kk[a, b]

o11 = R

o11 : PolynomialRing
i12 : R^**3

o12 = kk[a..b, a , b , a , b ]
                0   0   1   1

o12 : PolynomialRing
i13 : R ** (R ** R)

o13 = kk[a..b, a , b , a , b ]
                0   0   1   1

o13 : PolynomialRing

Packing monomials into smaller space is more efficient, but less flexible. The default is 32 bits, so if you want to pack them into 8 bit exponents, use:

i14 : describe tensor(A, B, MonomialSize => 8)

o14 = kk[a..e, Degrees => {2:{1}, 3:{0}}, Heft => {2:1}, MonomialOrder => {MonomialSize => 8 }]
                             {0}    {1}                                   {MonomialSize => 32}
                                                                          {GRevLex => {2:1}  }
                                                                          {Position => Up    }
                                                                          {GRevLex => {3:1}  }

The default monomial order for tensor products is a product order. Sometimes other orders are more desirable, e.g. GRevLex, or an elimination order:

i15 : describe (C = tensor(A, B, MonomialOrder => Eliminate numgens A))

o15 = kk[a..e, Degrees => {2:{1}, 3:{0}}, Heft => {2:1}, MonomialOrder => {MonomialSize => 32}]
                             {0}    {1}                                   {Weights => {2:1}  }
                                                                          {GRevLex => {5:1}  }
                                                                          {Position => Up    }
i16 : describe (C = tensor(A, B, MonomialOrder => GRevLex))

o16 = kk[a..e, Degrees => {2:{1}, 3:{0}}, Heft => {2:1}]
                             {0}    {1}

If you tensor two skew-commutative rings, (or one skew commutative ring with a commutative polynomial ring), then all of the skew-commuting variables skew commute with each other:

i17 : As = kk[a, b, SkewCommutative => true]

o17 = As

o17 : PolynomialRing, 2 skew commutative variable(s)
i18 : D  = kk[c, d, e, SkewCommutative => true]

o18 = D

o18 : PolynomialRing, 3 skew commutative variable(s)
i19 : E = tensor(As, D)

o19 = E

o19 : PolynomialRing, 5 skew commutative variable(s)
i20 : describe E

o20 = kk[a..e, Degrees => {2:{1}, 3:{0}}, Heft => {2:1}, MonomialOrder => {MonomialSize => 32}, SkewCommutative => {0..4}]
                             {0}    {1}                                   {GRevLex => {2:1}  }
                                                                          {Position => Up    }
                                                                          {GRevLex => {3:1}  }
i21 : c * a

o21 = -a*c

o21 : E

Similarly, tensoring two Weyl algebras (or one and a polynomial ring) produces a Weyl algebra with both sets of non-commuting pairs.

i22 : E = kk[x, Dx, WeylAlgebra => {x => Dx}]

o22 = E

o22 : PolynomialRing, 1 differential variable(s)
i23 : tensor(E, E, Variables => {x, Dx, y, Dy})

o23 = kk[x, Dx, y, Dy]

o23 : PolynomialRing, 2 differential variable(s)
i24 : describe oo

o24 = kk[x, Dx, y, Dy, Degrees => {2:{1}, 2:{0}}, Heft => {2:1}, MonomialOrder => {MonomialSize => 32}, WeylAlgebra => {{x, Dx}, {y, Dy}}]
                                     {0}    {1}                                   {GRevLex => {2:1}  }
                                                                                  {Position => Up    }
                                                                                  {GRevLex => {2:1}  }

Two polynomial rings must have the same coefficient ring, otherwise an error is issued. Currently, there is no way to specify other rings over which to define the tensor product.

i25 : A = ZZ/101[a, b]

o25 = A

o25 : PolynomialRing
i26 : B = A[x, y]

o26 = B

o26 : PolynomialRing
i27 : C = tensor(B, B, Variables => {x1, y1, x2, y2})

o27 = C

o27 : PolynomialRing
i28 : describe C

o28 = A[x1, y1, x2, y2, Degrees => {2:{1}, 2:{0}}, Heft => {2:1}, MonomialOrder => {MonomialSize => 32}]
                                      {0}    {1}                                   {GRevLex => {2:1}  }
                                                                                   {Position => Up    }
                                                                                   {GRevLex => {2:1}  }

The flat monoid with the all variables visible, including those from the base ring, can be obtained as follows.

i29 : C.FlatMonoid

o29 = monoid[x1, y1, x2, y2, a..b, Degrees => {2:{1}, 2:{0}, 2:{0}}, Heft => {3:1}, MonomialOrder => {MonomialSize => 32   }]
                                                 {0}    {1}    {0}                                   {GRevLex => {2:1}     }
                                                 {0}    {0}    {1}                                   {Position => Up       }
                                                                                                     {2:(GRevLex => {1, 1})}

o29 : GeneralOrderedMonoid

Caveat

Not all of the options for monoid are useful here. Some are silently ignored.

See also

Ways to use this method:


The source of this document is in /build/reproducible-path/macaulay2-1.26.06+ds/M2/Macaulay2/packages/Macaulay2Doc/functions/tensor-doc.m2:204:0.