next | previous | forward | backward | up | top | index | toc | home

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

Synopsis

Description

Each ideal in Macaulay 2 comes equipped with a one-row matrix with the generators of the ideal. It is this matrix which 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

o5 = ideal 1

o5 : Ideal of R
i6 : gens I

o6 = | 1 |

             1       1
o6 : Matrix R  <--- R