up previous next
DivAlg

division algorithm

Syntax
DivAlg(X:POLY, L:LIST of POLY):RECORD
DivAlg(X:VECTOR, L:LIST of VECTOR):RECORD --***OBSOLETE MANUAL: WORK IN PROGRESS***

Description
This function performs the division algorithm on X with respect to L. It returns a record with two fields: Quotients holding a list of polynomials, and Remainder holding the remainder of X upon division by L.

Example
/**/  Use R ::= QQ[x,y,z];
/**/  F := x^2*y +x*y^2 +y^2;
/**/  L := [x*y-1, y^2-1];
/**/  DivAlg(F, L);
Record[Quotients := [x +y, 1], Remainder := x +y +1]

/**/  D := It;
/**/  D.Quotients;
[x +y, 1]

/**/  D.Remainder;
x +y + 1

/**/  ScalarProduct(D.Quotients, L) + D.Remainder = F;
true

/**/  V := Vector(x^2+y^2+z^2, xyz); --***OBSOLETE MANUAL: WORK IN PROGRESS***
/**/  L := [Vector(x,y), Vector(y,z), Vector(z,x)];
/**/  DivAlg(V, L);
Record[Quotients := [0, -z^2, yz], Remainder := Vector(x^2 + y^2 + z^2, z^3)]
-------------------------------

See Also