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 gens(I): if X is in I, then GenRepr returns a list [F_1,...,F_t] such that ([G_1,...,G_t] = gens(I))
             X = F_1*G_1 + ... + F_t*G_t.
If X is not in I, then GenRepr returns the empty list, [].

NOTE: for a representation in terms of GBasis(I) call DivAlg(X, GBasis(I)).

Example
/**/  use R ::= QQ[x,y];
/**/  I := ideal(x*y -2, x^2 -x*y);
/**/  GenRepr(x -y, I);
[(-1/2)*x +(1/2)*y, (1/2)*y]
/**/  ScalarProduct(It, gens(I));
x -y
/**/ ReducedGBasisRepr(x -y, I);
[1, 0]
/**/  ScalarProduct(It, ReducedGBasis(I));
x -y

/**/  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]

See Also