I tried to use Buchberger's Algorithm(see also: http://en.wikipedia.org/wiki/Buchberger%27s%5FAlgorithm and http://www.geocities.com/famancin/buchberger.html) to compute a Groebner basis for an ideal in rational field, here is my GAP script:
F := Rationals;
R := PolynomialRing( F, [ "x", "y", "z" ]);
x := IndeterminatesOfPolynomialRing(R)[1];
y := IndeterminatesOfPolynomialRing(R)[2];
z := IndeterminatesOfPolynomialRing(R)[3];
I := Ideal (R, [x^2+2*x*y^2, x*y + 2*y^3 - 1]);
ord := MonomialLexOrdering(x,y,z);
GroebnerBasis( I, ord );
but the result is always this:
[ 2*x*y^2+x^2, 2*y^3+x*y-1, -x, -4*y^4+2*y, 2*y^3-1 ]
Obviously, the fourth can be completely divided by the last basis, the first and second can be completely divided by the third basis. The expected result should be like this:
[ -x, 2*y^3-1 ]
So my question is how to get the simplified Groebner basis in GAP?