restart R=QQ[x] I=ideal(x^6-1,x^10-1,x^15-1) ideal groebnerBasis I gcd(x^6-1,x^10-1,x^15-1) restart R=QQ[x..z] I=ideal(2*x + 3*y + 5*z + 7, 11*x + 13*y + 17*z + 19, 23*x + 29*y + 31*z + 37) ideal groebnerBasis I M1=matrix{{2 , 3 , 5 , 7},{11,13,17,19},{23,29,31,37/1}} r = rank source M1;c = rank target M1; --order so that the system is M^T *(1,z,y,x)^T M=matrix table(r, c, (i,j) -> M1_(c-j-1, r-i-1)) --now row reduce the matrix with Gausssian elimination RowRedM=transpose groebnerBasis M ideal (7*sub(RowRedM,R)*(transpose matrix{{1,z,y,x}})) restart R=QQ[x..z,MonomialOrder=>Lex] x^2*z^3y y>z y>z^5 f=4*x*y^2*z + 4*z^2 - 5*x^3 + 7*x^2*z^2 leadTerm f restart --this is the default R=QQ[x..z,MonomialOrder=>GRevLex] x^2*z^3y y>z z^2>x y>z^5 f=4*x*y^2*z + 4*z^2 - 5*x^3 + 7*x^2*z^2 leadTerm f x^5*y*z>x^4*y*z^2 restart R=QQ[x,y,z,MonomialOrder=>GLex] x^2*z^3y y>z z^2>x y>z^5 f=4*x*y^2*z + 4*z^2 - 5*x^3 + 7*x^2*z^2 leadTerm f x^5*y*z>x^4*y*z^2 --how term order changes GB complexity and runtime restart R = QQ[x,y,z]; I = ideal(x^5+y^4+z^3-1, x^3+y^2+z^2-1); time ideal groebnerBasis I S = QQ[x,y,z, MonomialOrder => Lex]; J = sub(I,S) time ideal groebnerBasis J