The leadingterm command computes the leading coefficients and monomials of a polynomial A in the variables X and Y. The command uses an elimination ordering with X greater than Y.
A = [x^2+y, x*y-1]; leadingterm(A[0],[x,y],[]); [1, x^2] leadingterm(A[1],[x,y],[]); [1, x*y]