>
 

MATH 392 -- Seminar in Computational Commutative Algebra 

Division with Quotients 

 

The following procedure implements our division algorithm 

and prints out the quotients as well as the remainder.   

(The source code is available from the course home page. 

You can download it, then copy and paste into a Maple 

worksheet if you want to use it.) 

>
 

> with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
with(Groebner); -1; DivQuots := proc (f, G, TO) local quots, rem, i, j, p, s, divocc, lmG, lcG, lmp, lmpe, q; s := nops(G); lmG := []; lcG := []; quots := []; for i to s do lmG := [op(lmG), LeadingMon...
 

To use the procedure, we will enter the dividend and divisors first: 

> f := x^7*y^2+x^3*y^2-y+1; 1
 

x^7*y^2+x^3*y^2-y+1 

> Plist := [x*y^2-x, x-y^3]; 1
 

[x*y^2-x, x-y^3] 

Then dividing  f  by the divisors in  Plist 

using the lex order gives: 

> QR := DivQuots(f, Plist, plex(x, y)); 1
 

[x^6+x^5*y+x^4*y^2+x^4+x^3*y+x^2*y^2+2*x^2+2*x*y+2*y^2+2, x^6+x^5*y+x^4+x^3*y+2*x^2+2*x*y+2], -y+1+2*y^3
[x^6+x^5*y+x^4*y^2+x^4+x^3*y+x^2*y^2+2*x^2+2*x*y+2*y^2+2, x^6+x^5*y+x^4+x^3*y+2*x^2+2*x*y+2], -y+1+2*y^3
 

The divisors are the elements of the list; the remainder is the  

polynomial after the list.  We check that the division went correctly: 

> expand(QR[1][1]*Plist[1]+QR[1][2]*Plist[2]+QR[2]); 1
 

x^7*y^2+x^3*y^2-y+1 

>
 

Same dividend and divisors, but using the graded reverse lex 

order: 

> QRgrev := DivQuots(f, Plist, tdeg(x, y)); 1
 

[x^6+x^2, 0], x^7+x^3-y+1 

> expand(QRgrev[1][1]*Plist[1]+QRgrev[1][2]*Plist[2]+QRgrev[2]); 1
 

x^7*y^2+x^3*y^2-y+1 

>