The groebnerbasis command computes the reduced Groebner basis for a set of polynomials A in the variables X and Y modulo P. The command uses the F4 algorithm in an elimination ordering with X greater than Y. Progress information is available by setting info().
A = [x^2+y, x*y-1]; groebnerbasis(A,[x,y],0); [x+y^2, -1+x*y, y+x^2]