TestOrder - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Groebner

 TestOrder
 compare monomials in a monomial order

 Calling Sequence TestOrder(u, v, T)

Parameters

 u, v - monomials T - MonomialOrder or ShortMonomialOrder

Description

 • The TestOrder command compares monomials with respect to a monomial order. It returns true if and only if u is less than or equal to v.
 • The third argument T can be either a MonomialOrder or a ShortMonomialOrder description. See the Monomial Orders help page for a list of the available monomial orders.

Examples

 > $\mathrm{with}\left(\mathrm{Groebner}\right):$
 > M := [op(randpoly([x,y,z],degree=3,dense,coeffs=proc() 1 end))];
 ${M}{≔}\left[{{x}}^{{3}}{,}{{x}}^{{2}}{}{y}{,}{{x}}^{{2}}{}{z}{,}{x}{}{{y}}^{{2}}{,}{x}{}{y}{}{z}{,}{x}{}{{z}}^{{2}}{,}{{y}}^{{3}}{,}{{y}}^{{2}}{}{z}{,}{y}{}{{z}}^{{2}}{,}{{z}}^{{3}}{,}{{x}}^{{2}}{,}{x}{}{y}{,}{x}{}{z}{,}{{y}}^{{2}}{,}{y}{}{z}{,}{{z}}^{{2}}{,}{x}{,}{y}{,}{z}{,}{1}\right]$ (1)
 > $\mathrm{sort}\left(M,\left(a,b\right)→\mathrm{TestOrder}\left(a,b,\mathrm{plex}\left(x,y,z\right)\right)\right)$
 $\left[{1}{,}{z}{,}{{z}}^{{2}}{,}{{z}}^{{3}}{,}{y}{,}{y}{}{z}{,}{y}{}{{z}}^{{2}}{,}{{y}}^{{2}}{,}{{y}}^{{2}}{}{z}{,}{{y}}^{{3}}{,}{x}{,}{x}{}{z}{,}{x}{}{{z}}^{{2}}{,}{x}{}{y}{,}{x}{}{y}{}{z}{,}{x}{}{{y}}^{{2}}{,}{{x}}^{{2}}{,}{{x}}^{{2}}{}{z}{,}{{x}}^{{2}}{}{y}{,}{{x}}^{{3}}\right]$ (2)
 > $\mathrm{sort}\left(M,\left(a,b\right)→\mathrm{TestOrder}\left(a,b,\mathrm{grlex}\left(x,y,z\right)\right)\right)$
 $\left[{1}{,}{z}{,}{y}{,}{x}{,}{{z}}^{{2}}{,}{y}{}{z}{,}{{y}}^{{2}}{,}{x}{}{z}{,}{x}{}{y}{,}{{x}}^{{2}}{,}{{z}}^{{3}}{,}{y}{}{{z}}^{{2}}{,}{{y}}^{{2}}{}{z}{,}{{y}}^{{3}}{,}{x}{}{{z}}^{{2}}{,}{x}{}{y}{}{z}{,}{x}{}{{y}}^{{2}}{,}{{x}}^{{2}}{}{z}{,}{{x}}^{{2}}{}{y}{,}{{x}}^{{3}}\right]$ (3)
 > $\mathrm{sort}\left(M,\left(a,b\right)→\mathrm{TestOrder}\left(a,b,\mathrm{tdeg}\left(x,y,z\right)\right)\right)$
 $\left[{1}{,}{z}{,}{y}{,}{x}{,}{{z}}^{{2}}{,}{y}{}{z}{,}{x}{}{z}{,}{{y}}^{{2}}{,}{x}{}{y}{,}{{x}}^{{2}}{,}{{z}}^{{3}}{,}{y}{}{{z}}^{{2}}{,}{x}{}{{z}}^{{2}}{,}{{y}}^{{2}}{}{z}{,}{x}{}{y}{}{z}{,}{{x}}^{{2}}{}{z}{,}{{y}}^{{3}}{,}{x}{}{{y}}^{{2}}{,}{{x}}^{{2}}{}{y}{,}{{x}}^{{3}}\right]$ (4)