The monoms command is identical to the binoms command, except that it creates monomials from the positive sums of coefficients, ignoring the negative sums of coefficients.
% monoms monoms <matrix> <ideal> <result> % type a 0 1 2 3 1 1 1 1 % type r a b % monoms a r b % type b b ab a2b a3b