next | previous | forward | backward | up | top | index | toc | home
Macaulay2 > modules > basis

basis -- basis of all or part of a module or ring

Synopsis

Description

The degree i is a multi-degree, represented as a list of integers. If the degree rank is 1, then i may be provided as an integer. The algorithm depends on the Heft option having been set correctly when the ring was created to provide, internally, a linear form on the space of multi-degrees that yields a positive number on the multidegree of each variable.

i1 : R = ZZ/101[a..c];
i2 : basis(2, R)

o2 = | a2 ab ac b2 bc c2 |

             1       6
o2 : Matrix R  <--- R
i3 : M = ideal(a,b,c)/ideal(a^2,b^2,c^2)

o3 = subquotient (| a b c |, | a2 b2 c2 |)

                               1
o3 : R-module, subquotient of R
i4 : f = basis(2,M)

o4 = {1} | b c 0 |
     {1} | 0 0 c |
     {1} | 0 0 0 |

o4 : Matrix
Notice that the matrix of f above is expressed in terms of the generators of M. The reason is that the module M is the target of the map f, and matrices of maps such as f are always expressed in terms of the generators of the source and target.
i5 : target f

o5 = subquotient (| a b c |, | a2 b2 c2 |)

                               1
o5 : R-module, subquotient of R
The command super is useful for rewriting f in terms of the generators of module of which M is a submodule.
i6 : super f

o6 = | ab ac bc |

o6 : Matrix
When a ring is multi-graded, we specify the degree as a list of integers.
i7 : S = ZZ/101[x,y,z,Degrees=>{{1,3},{1,4},{1,-1}}];
i8 : basis({7,24}, S)

o8 = | x4y3 |

             1       1
o8 : Matrix S  <--- S

Synopsis

  • Usage:
    basis M
  • Inputs:
    • M, a module or ring
  • Outputs:
    • a map from a free module to M which sends the basis elements to a basis, over the coefficient field, of M
i9 : R = QQ[x,y,z]/(x^2,y^3,z^5)

o9 = R

o9 : QuotientRing
i10 : basis R

o10 = | 1 x xy xy2 xy2z xy2z2 xy2z3 xy2z4 xyz xyz2 xyz3 xyz4 xz xz2 xz3 xz4 y
      -----------------------------------------------------------------------
      y2 y2z y2z2 y2z3 y2z4 yz yz2 yz3 yz4 z z2 z3 z4 |

              1       30
o10 : Matrix R  <--- R

Synopsis

  • Usage:
    basis(lo.hi,M)
  • Inputs:
  • Outputs:
    • a map from a free module to R which sends the basis elements to a basis, over the ground field, of the part of M spanned by elements of degrees between lo and hi. The degree rank must be 1.
i11 : R = QQ[x,y,z]/(x^3,y^2,z^5);
i12 : basis R

o12 = | 1 x x2 x2y x2yz x2yz2 x2yz3 x2yz4 x2z x2z2 x2z3 x2z4 xy xyz xyz2 xyz3
      -----------------------------------------------------------------------
      xyz4 xz xz2 xz3 xz4 y yz yz2 yz3 yz4 z z2 z3 z4 |

              1       30
o12 : Matrix R  <--- R
i13 : basis(-infinity,4,R)

o13 = | 1 x x2 x2y x2yz x2z x2z2 xy xyz xyz2 xz xz2 xz3 y yz yz2 yz3 z z2 z3
      -----------------------------------------------------------------------
      z4 |

              1       21
o13 : Matrix R  <--- R
i14 : basis(5,infinity,R)

o14 = | x2yz2 x2yz3 x2yz4 x2z3 x2z4 xyz3 xyz4 xz4 yz4 |

              1       9
o14 : Matrix R  <--- R
i15 : basis(2,4,R)

o15 = | x2 x2y x2yz x2z x2z2 xy xyz xyz2 xz xz2 xz3 yz yz2 yz3 z2 z3 z4 |

              1       17
o15 : Matrix R  <--- R

Ways to use basis :