Procedure from library qhmoduli.lib (see section qhmoduli_lib).
qhmoduli.lib
UpperMonomials(poly f, [intvec w])
compute the upper monomials of the milnor algebra of f.
f is quasihomogeneous (w.r.t. w)
ideal
Example:
LIB "qhmoduli.lib"; ring B = 0,(x,y,z), ls; poly f = -z5+y5+x2z+x2y; UpperMonomials(f); → _[1]=y3z3 → _[2]=x2y3 → _[3]=x2y2