up previous next
gens

list of generators of an ideal

Syntax
gens(I: IDEAL): LIST
gens(M: MODULE): LIST

Description
This function returns a list of polynomials which generate the ideal I or the module M. The list is not necessarily minimal.

Example
/**/  Use R ::= QQ[x,y,z];
/**/  I := ideal(y^2-x^3, x*y);
/**/  gens(I);
[-x^3 +y^2, x*y]

/**/  gens(I^2);
[x^6 -2x^3*y^2 +y^4, -x^4*y +x*y^3, x^2*y^2]

/**/  R3 := NewFreeModule(R, 3);
/**/  e := gens(R3);  // canonical basis
/**/  e[2];
[0, 1, 0]

/**/  M := SubmoduleRows(R3, mat([[x,y,z], [x-1,0,z]]));
/**/  gens(M);
[[x, y, z], [x -1, 0, z]]
/**/  shape(It);
[MODULEELEM, MODULEELEM]
/**/  GensAsRows(M);
matrix( /*RingDistrMPolyClean(QQ, 3)*/
 [[x, y, z],
  [x -1, 0, z]])

See Also