up previous next
 GenRepr

representation in terms of generators

 Syntax
 GenRepr(X: RINGELEM, I: IDEAL): LIST of RINGELEM GenRepr(X: MODULEELEM, I: MODULE): LIST of RINGELEM

 Description
This function returns a list giving a representation of X in terms of generators for I. Let the generators for I be [G_1,...,G_t] . If X is in I, then GenRepr will return a list [F_1,...,F_t] such that
X = F_1*G_1 + ... + F_t*G_t.
If X is not in I, then GenRepr returns the empty list, [].

 Example
 /**/ Use R ::= QQ[x,y]; /**/ I := ideal(x+y^2, x^2-x*y); /**/ GenRepr(x^3-x^2*y-y^3-x*y, I); [-y, x] /**/ -y*gens(I)[1] + x*gens(I)[2]; x^3 -x^2*y -y^3 -x*y /**/ GenRepr(x+y, I); -- x+y is not in I [ ] /**/ K := NewFractionField(NewPolyRing(QQ, "a")); /**/ Use R ::= K[x,y]; /**/ L := [x+y^2, x^2-x*y]; /**/ GenRepr((a-2)*L[1] - (x-a)*L[2], ideal(L)); [a -2, -x +a] /**/ R3 := NewFreeModule(R,3); /**/ V1 := ModuleElem(R3, [x, y, y^2]); /**/ V2 := ModuleElem(R3, [x-y, 0, x^2]); /**/ V := x^2*V1 - y^2*V2; /**/ M := submodule(R3, [V1, V2]); --/**/ GenRepr(V, M); -- NOT YET IMPLEMENTED ***** --[x^2, -y^2]