| LIB "freegb.lib";
ring r = 0,(x,y),dp;
ring R = freeAlgebra(r, 4);
ideal I = x*x + y*y - 1; // 2D sphere
ideal J = twostd(I); // compute a two-sided Groebner basis
J; // it is finite and nice
==> J[1]=x*x+y*y-1
==> J[2]=y*y*x-x*y*y
poly h = x*x*y-y*x*x+x*y;
list L = lpDivision(h,J);
L[1]; // what means that the normal form (or the remainder) of h wrt J is x*y
==> x*y
lpGBPres2Poly(L,J); // we see, that it is equal to h from above
==> -y*x*x+x*x*y+x*y
|