Macaulay2 » Documentation
Packages » Macaulay2Doc > basic commutative algebra > M2SingularBook > Singular Book 2.1.20
next | previous | forward | backward | up | index | toc

Singular Book 2.1.20 -- sum, intersection, module quotient

i1 : A = QQ[x,y,z];
i2 : M = image matrix{{x*y,x},{x*z,x}}

o2 = image | xy x |
           | xz x |

                             2
o2 : A-module, submodule of A
i3 : N = image matrix{{y^2,x},{z^2,x}}

o3 = image | y2 x |
           | z2 x |

                             2
o3 : A-module, submodule of A
i4 : M + N

o4 = image | xy x y2 x |
           | xz x z2 x |

                             2
o4 : A-module, submodule of A
Notice that, in Macaulay2, each module comes equipped with a list of generators, and operations such as sum do not try to simplify the list of generators.

Intersection, quotients, annihilators are found using standard notation:
i5 : intersect(M,N)

o5 = image | x xy2-xz2 |
           | x 0       |

                             2
o5 : A-module, submodule of A
i6 : M : N

o6 = ideal x

o6 : Ideal of A
i7 : N : M

o7 = ideal(y + z)

o7 : Ideal of A
i8 : Q = A/x^5;
i9 : M = substitute(M,Q)

o9 = image | xy x |
           | xz x |

                             2
o9 : Q-module, submodule of Q
i10 : ann M

             4
o10 = ideal x

o10 : Ideal of Q
i11 : M : x

o11 = image | 1 y-z x4 |
            | 1 0   0  |

                              2
o11 : Q-module, submodule of Q