The normalform command divides the polynomials in A by a basis B in the variables X. An optional argument P is the modulus, which should be a machine size prime. The computation uses graded reverse lexicographical order. A can be either a polynomial or a vector of polynomials.
A = [x^2+y, x*y-1]; G = groebnerbasis(A,[x,y]); normalform(A,G,[x,y]); [0, 0]