next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Macaulay2Doc > modules > free modules

free modules

We use Ring ^ ZZ to make a new free module.

i1 : R = ZZ/101[x,y,z];
i2 : M = R^4

      4
o2 = R

o2 : R-module, free
Such modules are often made implicitly when constructing matrices.
i3 : m = matrix{{x,y,z},{y,z,0}}

o3 = | x y z |
     | y z 0 |

             2       3
o3 : Matrix R  <--- R
i4 : target m == R^2

o4 = true

When a ring is graded, so are its free modules. By default, the degrees of the basis elements are taken to be 0.

i5 : degrees M

o5 = {{0}, {0}, {0}, {0}}

o5 : List
We can use Ring ^ List to specify other degrees, or more precisely, their additive inverses.
i6 : F = R^{1,4:2,3,3:4}

      9
o6 = R

o6 : R-module, free, degrees {-1, 4:-2, -3, 3:-4}
i7 : degrees F

o7 = {{-1}, {-2}, {-2}, {-2}, {-2}, {-3}, {-4}, {-4}, {-4}}

o7 : List
Notice the use of : above to indicate repetition.

If the variables of the ring have multi-degrees represented by lists (vectors) of integers, then the degrees of a free module must also be multi-degrees.

i8 : S = ZZ[a,b,c, Degrees=>{{1,2},{2,0},{3,3}}]

o8 = S

o8 : PolynomialRing
i9 : N = S ^ {{-1,-1},{-4,4},{0,0}}

      3
o9 = S

o9 : S-module, free, degrees {{1, 1}, {4, -4}, {0, 0}}
i10 : degree N_0

o10 = {1, 1}

o10 : List
i11 : degree (a*b*N_1)

o11 = {7, -2}

o11 : List

See also