|  |  5.1.26 division 
See
 ideal;
 lift;
 module;
 poly operations;
 reduce.Syntax:division (ideal_expression,ideal_expression)
 division (module_expression,module_expression)
 division (ideal_expression,ideal_expression,int_expression)
 division (module_expression,module_expression,int_expression)
 division (ideal_expression,ideal_expression,int_expression,intvec_expression)
 division (module_expression,module_expression,int_expression,intvec_expression
 )Type:list
Purpose:divisioncomputes a division with remainder.
For two ideals resp. modulesM(first argument) andN(second argument), it returns a listT,R,UwhereTis a matrix,Ris an ideal resp. a module, andUis a diagonal matrix of units
such thatmatrix(M)*U=matrix(N)*T+matrix(R)is a standard representation
for the normal formRofMwith respect to a standard basis ofN.divisionuses different algorithms depending on whetherNis
represented by a standard basis.
For a polynomial basering, the matrixUis the identity matrix.
A matrixTas above is also computed bylift.For additional arguments
 n(third argument) andw(fourth argument),divisionreturns a listT,Ras above such thatmatrix(M)=matrix(N)*T+matrix(R)is a standard representation for the
normal formRofMwith respect toNup to weighted degreenwith respect to the weight vectorw.
The weighted degree ofTandRrespect towis at mostn.
If the weight vectorwis not given,divisionuses the standard weight vectorw=1,...,1.Example:|  | ring R=0,(x,y),ds;
poly f=x5+x2y2+y5;
division(f,jacob(f)); // automatic conversion: poly -> ideal
==> [1]:
==>    _[1,1]=1/5x
==>    _[2,1]=3/10y
==> [2]:
==>    _[1]=-1/2y5
==> [3]:
==>    _[1,1]=1
division(f^2,jacob(f));
==> [1]:
==>    _[1,1]=1/20x6-9/80xy5-5/16x7y+5/8x2y6
==>    _[2,1]=1/8x2y3+1/5x5y+1/20y6-3/4x3y4-5/4x6y2-5/16xy7
==> [2]:
==>    _[1]=0
==> [3]:
==>    _[1,1]=1/4-25/16xy
division(ideal(f^2),jacob(f),10);
==> // ** _ is no standard basis
==> [1]:
==>    _[1,1]=-75/8y9
==>    _[2,1]=1/2x2y3+x5y-1/4y6-3/2x3y4+15/4xy7+375/16x2y8
==> [2]:
==>    _[1]=x10+9/4y10
 | 
 |