R=QQ[x,y,z,MonomialOrder=>Lex] f=x^2*y+y^3 f1=x^2+y^2 f2=x*y quotientRemainder(matrix{{f}},matrix{{f1,f2}}) quotientRemainder(matrix{{y^3}},matrix{{f1,f2}}) leadTerm( f1) I=ideal(f1,f2) leadTerm(I) gens gb ideal(x^2+y^2,x*y) R1=QQ[x,y,MonomialOrder=>Lex] gens gb ideal(x^2*y-1,x*y^2-x) gens gb ideal(x^2+y,x^4+2*x^2*y+y^2+3) R1=QQ[x,y] gens gb ideal(x^2*y-1,x*y^2-x) gens gb ideal(x^2+y^2,x*y) R=QQ[x,y,z,a,b,c,MonomialOrder=>Lex] I=ideal(x+y+z-a,x*y+x*z+y*z-b,x*y*z-c) leadTerm generators gb I (x+y+z)%I (x+y+z)^2%I (x^2+y^2+z^2)%I for n from 1 to 10 do print(n,(x^n+y^n+z^n)%I) I=ideal random(R^{1:1},R^{5:0}) generators gb I exit