Macaulay2 » Documentation
Packages » Macaulay2Doc :: generators of ideals and modules
next | previous | forward | backward | up | index | toc

generators of ideals and modules

Synopsis

As usual in Macaulay2, the first generator has index zero.

i1 : R = QQ[a..d];
i2 : I = ideal(a^3, b^3-c^3, a^4, a*c);

o2 : Ideal of R
i3 : numgens I

o3 = 4
i4 : I_0, I_2

       3   4
o4 = (a , a )

o4 : Sequence

Notice that the generators are the ones provided. Alternatively we can minimalize the set of generators.
i5 : J = trim I

                  3    3   3
o5 = ideal (a*c, b  - c , a )

o5 : Ideal of R
i6 : J_0

o6 = a*c

o6 : R

Elements of modules are useful for producing submodules or quotients.
i7 : M = cokernel matrix{{a,b},{c,d}}

o7 = cokernel | a b |
              | c d |

                            2
o7 : R-module, quotient of R
i8 : M_0

o8 = | 1 |
     | 0 |

o8 : M
i9 : M/M_0

o9 = cokernel | 1 a b |
              | 0 c d |

                            2
o9 : R-module, quotient of R
i10 : N = M/(a*M + R*M_0)

o10 = cokernel | a 0 1 a b |
               | 0 a 0 c d |

                             2
o10 : R-module, quotient of R
i11 : N_0 == 0_N

o11 = true
Columns of matrices may also be used as vectors in the target module.
i12 : M = matrix{{a,b,c},{c,d,a},{a-1,b-3,c-13}}

o12 = | a   b   c    |
      | c   d   a    |
      | a-1 b-3 c-13 |

              3      3
o12 : Matrix R  <-- R
i13 : M_0

o13 = |  a  |
      |  c  |
      | a-1 |

       3
o13 : R
i14 : prune((image M_{1,2})/(R*M_1))

       1
o14 = R

o14 : R-module, free

Caveat

Fewer methods exist for manipulating vectors than other types, such as modules and matrices