next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Macaulay2Doc :: generators(Ideal)

generators(Ideal) -- the generator matrix of an ideal

Synopsis

Description

Each ideal in Macaulay2 comes equipped with a one-row matrix with the generators of the ideal. It is this matrix that is returned.
i1 : R = ZZ/101[a,b,c];
i2 : I = ideal(a^2,a*b-2,c^4,a*c-1,a*c-1)

             2            4
o2 = ideal (a , a*b - 2, c , a*c - 1, a*c - 1)

o2 : Ideal of R
i3 : generators I

o3 = | a2 ab-2 c4 ac-1 ac-1 |

             1       5
o3 : Matrix R  <--- R
To obtain a list of generators, rather than a matrix, use
i4 : first entries generators I

       2            4
o4 = {a , a*b - 2, c , a*c - 1, a*c - 1}

o4 : List
If you want to remove unnecessary generators, use trim.
i5 : I = trim I

                               2
o5 = ideal (a*c - 1, a*b - 2, a )

o5 : Ideal of R
i6 : gens I

o6 = | ac-1 ab-2 a2 |

             1       3
o6 : Matrix R  <--- R