 Overview of the Groebner Package - Maple Programming Help

Home : Support : Online Help : Mathematics : Packages : Groebner

Overview of the Groebner Package

 Calling Sequence Groebner[command](arguments) command(arguments)

Description

 • This page describes the most common use of the Groebner package, namely calculations of Groebner bases and related operations for ideals in (commutative) polynomial rings.  The Groebner package is actually much more general and can handle polynomials in skew polynomial rings (see Groebner/details) and modules over (commutative or skew) polynomial rings (see Groebner Bases for Modules).
 • Each command in the Groebner package can be accessed by using either the long form or the short form of the command name in the command calling sequence.
 As the underlying implementation of the Groebner package is a module, it is also possible to use the form Groebner:-command to access a command from the package. For more information,  see Module Members.

List of Groebner Package Commands

 • The following is a list of available commands.

 • To display the help page for a particular Groebner command, see Getting Help with a Command in a Package.
 • Many predefined monomial orderings are available for use with Groebner commands.  This includes total degree, lexicographic, elimination, and matrix-defined orderings.  See the page on monomial orders.
 • The TestOrder command checks if two monomials are in a given monomial ordering and can be used to sort a list of monomials by a given monomial ordering.
 • The NormalForm command computes the normal form of a polynomial modulo an ideal.  The command Reduce returns the pseudo-remainder of a polynomial in the division by a list of polynomials.  The InterReduce command inter-reduces a list of polynomials.  Both the NormalForm and Reduce commands are usually used after a (reduced) Groebner basis has been computed.
 • The Basis command computes a (reduced) Groebner bases of a polynomial ideal. The RememberBasis command makes a Groebner basis known to the system without performing any computation.
 • The IsBasis command tests if a basis is a Groebner basis for a given monomial ordering.
 • The Solve command preprocesses a set of generators in view of solving.
 • The SPolynomial command computes the S-polynomial of two polynomials.
 • The UnivariatePolynomial command finds univariate polynomials of least degree in a polynomial ideal.
 • The commands IsZeroDimensional and IsProper decide whether an ideal has finitely many solutions, or at least one solution, respectively.
 • The commands HilbertDimension, HilbertPolynomial, and HilbertSeries compute the Hilbert dimension, Hilbert polynomial, and Hilbert series of an ideal, respectively.
 • A typical test of membership in an ideal is:
 1. Perform a Groebner basis computation to find a Groebner basis of the ideal (usually with tdeg);
 2. Call Groebner[NormalForm] to test whether it returns zero.
 • A typical use of Groebner bases for elimination is:
 1. Compute a Groebner basis with respect to an elimination monomial order (with the lexdeg syntax);
 2. Select those polynomials in which the indeterminate to be eliminated has disappeared.
 • When relevant, most commands of the Groebner package accept algebraic numbers and algebraic functions denoted by I, radicals, or RootOfs in their the inputs. Exceptions are MultiplicationMatrix, NormalSet, and Solve. Also when relevant, they accept PolynomialIdeal data structures in their input.
 • You can use the Groebner package in conjunction with the PolynomialIdeals package.
 Note: Both packages have the following exports of the same name and almost identical functionality: HilbertDimension, IsProper, IsZeroDimensional, and UnivariatePolynomial. After loading both packages using with, these names refer to the corresponding exports of the most recently loaded package, but you can still access the exports with the same name in the other package using the long form, that is, by prepending the package name.

Examples

 > $\mathrm{with}\left(\mathrm{Groebner}\right)$
 $\left[{\mathrm{Basis}}{,}{\mathrm{FGLM}}{,}{\mathrm{HilbertDimension}}{,}{\mathrm{HilbertPolynomial}}{,}{\mathrm{HilbertSeries}}{,}{\mathrm{Homogenize}}{,}{\mathrm{InitialForm}}{,}{\mathrm{InterReduce}}{,}{\mathrm{IsBasis}}{,}{\mathrm{IsProper}}{,}{\mathrm{IsZeroDimensional}}{,}{\mathrm{LeadingCoefficient}}{,}{\mathrm{LeadingMonomial}}{,}{\mathrm{LeadingTerm}}{,}{\mathrm{MatrixOrder}}{,}{\mathrm{MaximalIndependentSet}}{,}{\mathrm{MonomialOrder}}{,}{\mathrm{MultiplicationMatrix}}{,}{\mathrm{MultivariateCyclicVector}}{,}{\mathrm{NormalForm}}{,}{\mathrm{NormalSet}}{,}{\mathrm{RationalUnivariateRepresentation}}{,}{\mathrm{Reduce}}{,}{\mathrm{RememberBasis}}{,}{\mathrm{SPolynomial}}{,}{\mathrm{Solve}}{,}{\mathrm{SuggestVariableOrder}}{,}{\mathrm{Support}}{,}{\mathrm{TestOrder}}{,}{\mathrm{ToricIdealBasis}}{,}{\mathrm{TrailingTerm}}{,}{\mathrm{UnivariatePolynomial}}{,}{\mathrm{Walk}}{,}{\mathrm{WeightedDegree}}\right]$ (1)

Groebner Bases and Ideal Membership Testing

 > $B≔\left[x+y+z,xy+yz+zx,xyz-1\right]$
 ${B}{≔}\left[{x}{+}{y}{+}{z}{,}{x}{}{y}{+}{z}{}{x}{+}{y}{}{z}{,}{x}{}{y}{}{z}{-}{1}\right]$ (2)

First we compute a Groebner basis G for the ideal generated by B using the graded reverse lexicographical monomial ordering tdeg with $x$>$y$>$z$.

 > $G≔\mathrm{Basis}\left(B,\mathrm{tdeg}\left(x,y,z\right)\right)$
 ${G}{≔}\left[{x}{+}{y}{+}{z}{,}{{y}}^{{2}}{+}{y}{}{z}{+}{{z}}^{{2}}{,}{{z}}^{{3}}{-}{1}\right]$ (3)

Thus ${z}^{3}-1$ is in the ideal generated by B.  Notice that B is symmetric in the variables and hence ${x}^{3}-1$ and ${y}^{3}-1$ must also be in the ideal. We test this as follows.

 > $\mathrm{NormalForm}\left({x}^{3}-1,G,\mathrm{tdeg}\left(x,y,z\right)\right)$
 ${0}$ (4)
 > $\mathrm{NormalForm}\left({x}^{2},G,\mathrm{tdeg}\left(x,y,z\right)\right)$
 ${y}{}{z}$ (5)

Thus, ${x}^{3}-1$ is in the ideal generated by B while ${x}^{2}$ is not.  We show that B is not a Groebner basis and G is.

 > $\mathrm{IsBasis}\left(B,\mathrm{tdeg}\left(x,y,z\right)\right)$
 ${\mathrm{false}}$ (6)
 > $\mathrm{IsBasis}\left(G,\mathrm{tdeg}\left(x,y,z\right)\right)$
 ${\mathrm{true}}$ (7)

For our second example we triangularize a polynomial system {${x}^{2}+{y}^{2}=1$, $x+y+1=0$} by computing a Groebner basis using the pure lexicographical monomial ordering plex with $x$>$y$.

 > $B≔\left[{x}^{2}+{y}^{2}-1,x+y+1\right]$
 ${B}{≔}\left[{{x}}^{{2}}{+}{{y}}^{{2}}{-}{1}{,}{x}{+}{y}{+}{1}\right]$ (8)
 > $G≔\mathrm{Basis}\left(B,\mathrm{plex}\left(x,y\right)\right)$
 ${G}{≔}\left[{{y}}^{{2}}{+}{y}{,}{x}{+}{y}{+}{1}\right]$ (9)

Note Maple does not automatically order the terms of polynomials in the monomial ordering being used.  Here are the leading monomials of the polynomials in G.

 > $\mathrm{LeadingMonomial}\left(G,\mathrm{plex}\left(x,y\right)\right)$
 $\left[{{y}}^{{2}}{,}{x}\right]$ (10)

From the triangular form of the Groebner basis, it is easy to see how to solve the system.  Note, the solutions of the original system are the same as the zeros of the polynomials in the Groebner basis.  This is true for any monomial ordering.

 > $\mathrm{factor}\left(G\right)$
 $\left[{y}{}\left({y}{+}{1}\right){,}{x}{+}{y}{+}{1}\right]$ (11)
 > $\mathrm{solve}\left(G,\left\{x,y\right\}\right)$
 $\left\{{x}{=}{-1}{,}{y}{=}{0}\right\}{,}\left\{{x}{=}{0}{,}{y}{=}{-1}\right\}$ (12)

Monomial Orderings

Besides the tdeg monomial ordering for "fast" normal form computation and the plex monomial ordering for "slow" triangularization, lexdeg orderings are available for more efficient elimination.  For the purpose of generality, the Groebner package implements weighted monomial orderings (wdeg) and matrix-defined monomial orderings.  Products of orders and user-defined orderings are also available.

For our first example, we find the implicit equation ${x}^{2}+{y}^{2}-1$ of a circle from its rational parametrization by eliminating the parameter $t$.

 > $\mathrm{param}≔\left\{x=\frac{1-{t}^{2}}{1+{t}^{2}},y=\frac{2t}{1+{t}^{2}}\right\}$
 ${\mathrm{param}}{≔}\left\{{x}{=}\frac{{-}{{t}}^{{2}}{+}{1}}{{{t}}^{{2}}{+}{1}}{,}{y}{=}\frac{{2}{}{t}}{{{t}}^{{2}}{+}{1}}\right\}$ (13)

First we convert to polynomials and clear the fractions.

 > $B≔\mathrm{map}\left(\mathrm{eq}↦\mathrm{numer}\left(\mathrm{lhs}\left(\mathrm{eq}\right)-\mathrm{rhs}\left(\mathrm{eq}\right)\right),\mathrm{param}\right)$
 ${B}{≔}\left\{{{t}}^{{2}}{}{y}{-}{2}{}{t}{+}{y}{,}{{t}}^{{2}}{}{x}{+}{{t}}^{{2}}{+}{x}{-}{1}\right\}$ (14)
 > $G≔\mathrm{Basis}\left(B,\mathrm{lexdeg}\left(\left[t\right],\left[x,y\right]\right)\right)$
 ${G}{≔}\left[{{x}}^{{2}}{+}{{y}}^{{2}}{-}{1}{,}{t}{}{y}{+}{x}{-}{1}{,}{t}{}{x}{+}{t}{-}{y}\right]$ (15)
 > $\mathrm{remove}\left(\mathrm{has},G,t\right)$
 $\left[{{x}}^{{2}}{+}{{y}}^{{2}}{-}{1}\right]$ (16)

As a second example, here is a calculation that is performed far faster by using lexdeg than by using plex.  Assume that we want to find the extrema of

 > $\mathrm{\phi }≔{x}^{3}+2xyz-{z}^{2}$
 ${\mathrm{\phi }}{≔}{{x}}^{{3}}{+}{2}{}{x}{}{y}{}{z}{-}{{z}}^{{2}}$ (17)

on the sphere

 > $\mathrm{const}≔{x}^{2}+{y}^{2}+{z}^{2}-1$
 ${\mathrm{const}}{≔}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}{-}{1}$ (18)

Using the method of Lagrange multipliers, we compute

 > $G≔\left\{\mathrm{const},\mathrm{seq}\left(\mathrm{diff}\left(\mathrm{\phi },v\right)-\mathrm{diff}\left(\mathrm{const},v\right)t,v=\left[x,y,z\right]\right)\right\}$
 ${G}{≔}\left\{{-}{2}{}{t}{}{y}{+}{2}{}{z}{}{x}{,}{-}{2}{}{z}{}{t}{+}{2}{}{x}{}{y}{-}{2}{}{z}{,}{-}{2}{}{t}{}{x}{+}{3}{}{{x}}^{{2}}{+}{2}{}{y}{}{z}{,}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}{-}{1}\right\}$ (19)

and we eliminate the multiplier $t$ by the use of an appropriate monomial order

 > $\mathrm{GB}≔\mathrm{Basis}\left(G,\mathrm{lexdeg}\left(\left[t\right],\left[x,y,z\right]\right)\right)$
 ${\mathrm{GB}}{≔}\left[{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}{-}{1}{,}{17}{}{y}{}{{z}}^{{2}}{-}{13}{}{{z}}^{{3}}{-}{x}{}{y}{+}{17}{}{z}{}{x}{+}{13}{}{z}{,}{17}{}{{y}}^{{2}}{}{z}{+}{7}{}{{z}}^{{3}}{-}{6}{}{x}{}{y}{-}{7}{}{z}{,}{17}{}{{y}}^{{3}}{+}{11}{}{{z}}^{{3}}{-}{7}{}{x}{}{y}{-}{17}{}{z}{}{x}{-}{17}{}{y}{-}{11}{}{z}{,}{x}{}{{y}}^{{2}}{-}{{z}}^{{2}}{}{x}{-}{y}{}{z}{,}{48}{}{{z}}^{{4}}{-}{63}{}{x}{}{y}{}{z}{-}{34}{}{{z}}^{{2}}{}{x}{-}{34}{}{y}{}{z}{-}{48}{}{{z}}^{{2}}{,}{408}{}{x}{}{{z}}^{{3}}{+}{233}{}{{z}}^{{3}}{+}{65}{}{x}{}{y}{-}{408}{}{z}{}{x}{-}{233}{}{z}{,}{-}{6}{}{x}{}{y}{}{z}{+}{6}{}{{z}}^{{2}}{}{x}{+}{3}{}{y}{}{z}{+}{2}{}{{z}}^{{2}}{+}{2}{}{t}{-}{3}{}{x}\right]$ (20)
 > $\mathrm{remove}\left(\mathrm{has},\mathrm{GB},t\right)$
 $\left[{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}{-}{1}{,}{17}{}{y}{}{{z}}^{{2}}{-}{13}{}{{z}}^{{3}}{-}{x}{}{y}{+}{17}{}{z}{}{x}{+}{13}{}{z}{,}{17}{}{{y}}^{{2}}{}{z}{+}{7}{}{{z}}^{{3}}{-}{6}{}{x}{}{y}{-}{7}{}{z}{,}{17}{}{{y}}^{{3}}{+}{11}{}{{z}}^{{3}}{-}{7}{}{x}{}{y}{-}{17}{}{z}{}{x}{-}{17}{}{y}{-}{11}{}{z}{,}{x}{}{{y}}^{{2}}{-}{{z}}^{{2}}{}{x}{-}{y}{}{z}{,}{48}{}{{z}}^{{4}}{-}{63}{}{x}{}{y}{}{z}{-}{34}{}{{z}}^{{2}}{}{x}{-}{34}{}{y}{}{z}{-}{48}{}{{z}}^{{2}}{,}{408}{}{x}{}{{z}}^{{3}}{+}{233}{}{{z}}^{{3}}{+}{65}{}{x}{}{y}{-}{408}{}{z}{}{x}{-}{233}{}{z}\right]$ (21)

In the general case, we would have to compute numerical estimates and substitute into $\mathrm{\phi }$.  Here, we can go further and compute all the possible values for $z$ by the elimination of $x$ and $y$.

 > $\mathrm{GB2}≔\mathrm{Basis}\left(,\mathrm{lexdeg}\left(\left[x,y\right],\left[z\right]\right)\right)$
 ${\mathrm{GB2}}{≔}\left[{1152}{}{{z}}^{{7}}{-}{1763}{}{{z}}^{{5}}{+}{655}{}{{z}}^{{3}}{-}{44}{}{z}{,}{-}{1152}{}{{z}}^{{6}}{+}{118}{}{y}{}{{z}}^{{3}}{+}{1605}{}{{z}}^{{4}}{-}{118}{}{y}{}{z}{-}{453}{}{{z}}^{{2}}{,}{-}{1152}{}{{z}}^{{5}}{+}{3835}{}{y}{}{{z}}^{{2}}{-}{1404}{}{{z}}^{{3}}{+}{3835}{}{z}{}{x}{+}{2556}{}{z}{,}{-}{6912}{}{{z}}^{{5}}{+}{3835}{}{{y}}^{{2}}{}{z}{+}{10751}{}{{z}}^{{3}}{-}{3839}{}{z}{,}{-}{19584}{}{{z}}^{{5}}{+}{25987}{}{{z}}^{{3}}{+}{3835}{}{x}{}{y}{-}{6403}{}{z}{,}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}{-}{1}{,}{-}{9216}{}{{z}}^{{5}}{+}{3835}{}{{y}}^{{3}}{+}{3835}{}{y}{}{{z}}^{{2}}{+}{11778}{}{{z}}^{{3}}{-}{3835}{}{y}{-}{2562}{}{z}\right]$ (22)
 > $\mathrm{op}\left(\mathrm{remove}\left(\mathrm{has},\mathrm{GB2},\left\{x,y\right\}\right)\right)$
 ${1152}{}{{z}}^{{7}}{-}{1763}{}{{z}}^{{5}}{+}{655}{}{{z}}^{{3}}{-}{44}{}{z}$ (23)
 > $\mathrm{sol_z}≔\mathrm{solve}\left(,z\right)$
 ${\mathrm{sol_z}}{≔}{0}{,}{1}{,}{-1}{,}\frac{{2}}{{3}}{,}{-}\frac{{2}}{{3}}{,}\frac{\sqrt{{22}}}{{16}}{,}{-}\frac{\sqrt{{22}}}{{16}}$ (24)

Substituting into the system yields the possible extremal points.

 > $\left[\mathrm{seq}\left(\left(\mathrm{@}\left(\mathrm{op},\mathrm{map}\right)\right)\left(\mathrm{union},\left[\mathrm{solve}\left(\mathrm{eval}\left(\mathrm{GB2},z=i\right),\left\{x,y\right\}\right)\right],\left\{z=i\right\}\right),i=\mathrm{sol_z}\right)\right]$
 $\left[\left\{{x}{=}{1}{,}{y}{=}{0}{,}{z}{=}{0}\right\}{,}\left\{{x}{=}{-1}{,}{y}{=}{0}{,}{z}{=}{0}\right\}{,}\left\{{x}{=}{0}{,}{y}{=}{1}{,}{z}{=}{0}\right\}{,}\left\{{x}{=}{0}{,}{y}{=}{-1}{,}{z}{=}{0}\right\}{,}\left\{{x}{=}{0}{,}{y}{=}{0}{,}{z}{=}{1}\right\}{,}\left\{{x}{=}{0}{,}{y}{=}{0}{,}{z}{=}{-1}\right\}{,}\left\{{x}{=}{-}\frac{{2}}{{3}}{,}{y}{=}\frac{{1}}{{3}}{,}{z}{=}\frac{{2}}{{3}}\right\}{,}\left\{{x}{=}{-}\frac{{2}}{{3}}{,}{y}{=}{-}\frac{{1}}{{3}}{,}{z}{=}{-}\frac{{2}}{{3}}\right\}{,}\left\{{x}{=}{-}\frac{{3}}{{8}}{,}{y}{=}{-}\frac{{3}{}\sqrt{{22}}}{{16}}{,}{z}{=}\frac{\sqrt{{22}}}{{16}}\right\}{,}\left\{{x}{=}{-}\frac{{3}}{{8}}{,}{y}{=}\frac{{3}{}\sqrt{{22}}}{{16}}{,}{z}{=}{-}\frac{\sqrt{{22}}}{{16}}\right\}\right]$ (25)

Finally, we get the minimum and maximum values.

 > $\mathrm{min}\left(\mathrm{map2}\left(\mathrm{eval},\mathrm{\phi },\right)\right),\mathrm{max}\left(\mathrm{map2}\left(\mathrm{eval},\mathrm{\phi },\right)\right)$
 ${-}\frac{{28}}{{27}}{,}{1}$ (26)

Similar calculations using plex require a significantly longer amount of time.

Ideal Invariants

The dimension of a variety (zero for isolated points, one for lines, two for planes) is the Hilbert dimension of the corresponding annihilating ideal. The Groebner package allows one to compute this Hilbert dimension, together with the Hilbert polynomial and the Hilbert series.

As a first example, here is a zero-dimensional ideal, corresponding to finitely many points in the variety.

 > $G≔\left[3{y}^{2}-8{z}^{3},{x}^{2}-2zx+5,3{y}^{3}+8x{y}^{2}\right]:$
 > $\mathrm{HilbertDimension}\left(G,\mathrm{tdeg}\left(y,x,z\right)\right)$
 ${0}$ (27)
 > $\mathrm{HilbertSeries}\left(G,\mathrm{tdeg}\left(y,x,z\right),s\right)$
 ${{s}}^{{5}}{+}{3}{}{{s}}^{{4}}{+}{5}{}{{s}}^{{3}}{+}{5}{}{{s}}^{{2}}{+}{3}{}{s}{+}{1}$ (28)
 > $\mathrm{eval}\left(,s=1\right)$
 ${18}$ (29)
 > $\mathrm{HilbertPolynomial}\left(G,\mathrm{tdeg}\left(y,x,z\right),s\right)$
 ${0}$ (30)

As another example, here is an ideal of positive dimension.

 > $G≔\left[{x}^{3}{y}^{2}+3{x}^{2}{y}^{2}+{y}^{3}+1\right]:$
 > $\mathrm{HilbertDimension}\left(G,\mathrm{tdeg}\left(x,y\right)\right)$
 ${1}$ (31)
 > $\mathrm{HilbertSeries}\left(G,\mathrm{tdeg}\left(x,y\right),s\right)$
 ${-}\frac{{{s}}^{{4}}{+}{{s}}^{{3}}{+}{{s}}^{{2}}{+}{s}{+}{1}}{{-}{1}{+}{s}}$ (32)
 > $\mathrm{series}\left(,s,10\right)$
 ${1}{+}{2}{}{s}{+}{3}{}{{s}}^{{2}}{+}{4}{}{{s}}^{{3}}{+}{5}{}{{s}}^{{4}}{+}{5}{}{{s}}^{{5}}{+}{5}{}{{s}}^{{6}}{+}{5}{}{{s}}^{{7}}{+}{5}{}{{s}}^{{8}}{+}{5}{}{{s}}^{{9}}{+}{O}{}\left({{s}}^{{10}}\right)$ (33)
 > $\mathrm{HilbertPolynomial}\left(G,\mathrm{tdeg}\left(y,x\right),s\right)$
 ${5}$ (34)

Ground Fields

The Groebner package supports transcendental and algebraic extensions of the field of rational numbers and finite fields. This includes algebraic number fields. Here is a sample computation with complex numbers in $ℚ\left[i,\sqrt{2}\right]\left[x,y\right]$.

 > $G≔\left[{x}^{2}+{y}^{2}-I,\mathrm{sqrt}\left(2\right)y+\mathrm{sqrt}\left(2\right)\left(x-\mathrm{sqrt}\left(2\right)\right)-1\right]$
 ${G}{≔}\left[{{x}}^{{2}}{+}{{y}}^{{2}}{-}{I}{,}\sqrt{{2}}{}{y}{+}\sqrt{{2}}{}\left({x}{-}\sqrt{{2}}\right){-}{1}\right]$ (35)
 > $\mathrm{GB}≔\mathrm{Basis}\left(G,\mathrm{tdeg}\left(x,y\right)\right)$
 ${\mathrm{GB}}{≔}\left[{2}{}{x}{+}{2}{}{y}{-}{3}{}\sqrt{{2}}{,}{-}{6}{}\sqrt{{2}}{}{y}{+}{4}{}{{y}}^{{2}}{+}{9}{-}{2}{}{I}\right]$ (36)

Computations with modular integers are supported as well, by means of an option.

 > $G≔\left[{x}^{2}-2xz+5,x{y}^{2}+y{z}^{3},3{y}^{2}-8{z}^{3}\right]:$
 > $G\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}5$
 $\left[{{x}}^{{2}}{+}{3}{}{z}{}{x}{,}{y}{}{{z}}^{{3}}{+}{x}{}{{y}}^{{2}}{,}{2}{}{{z}}^{{3}}{+}{3}{}{{y}}^{{2}}\right]$ (37)
 > $\mathrm{Basis}\left(G,\mathrm{plex}\left(x,y,z\right),\mathrm{characteristic}=5\right)$
 $\left[{{z}}^{{8}}{+}{{z}}^{{7}}{,}{3}{}{{z}}^{{6}}{+}{y}{}{{z}}^{{4}}{,}{4}{}{{z}}^{{3}}{+}{{y}}^{{2}}{,}{x}{}{{z}}^{{3}}{+}{y}{}{{z}}^{{3}}{,}{{x}}^{{2}}{+}{3}{}{z}{}{x}\right]$ (38)

Standard Bases

As another example, the Groebner package allows for the computation of standard bases.  We define the leading monomial of a polynomial as its minimum monomial instead of its maximum monomial by using a plex_min monomial order rather than a plex monomial order.

 > $L≔1+x+y+z+{x}^{2}+{y}^{2}+{z}^{2}$
 ${L}{≔}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}{+}{x}{+}{y}{+}{z}{+}{1}$ (39)
 > $\mathrm{LeadingMonomial}\left(L,\mathrm{plex}\left(x,y,z\right)\right)$
 ${{x}}^{{2}}$ (40)
 > $\mathrm{LeadingMonomial}\left(L,\mathrm{plex_min}\left(x,y,z\right)\right)$
 ${1}$ (41)

Then Groebner bases can be computed for homogeneous ideals.  Here is an example in $ℚ\left[x,y,z,w\right]$.

 > $G≔\left[y{w}^{2}-{z}^{3},x{w}^{3}-{z}^{4}\right]$
 ${G}{≔}\left[{y}{}{{w}}^{{2}}{-}{{z}}^{{3}}{,}{x}{}{{w}}^{{3}}{-}{{z}}^{{4}}\right]$ (42)

Compare the usual Groebner basis

 > $\mathrm{Basis}\left(G,\mathrm{plex}\left(w,x,y,z\right)\right)$
 $\left[{{x}}^{{2}}{}{{z}}^{{6}}{-}{{y}}^{{3}}{}{{z}}^{{5}}{,}{w}{}{{y}}^{{2}}{}{{z}}^{{4}}{-}{x}{}{{z}}^{{6}}{,}{w}{}{x}{}{{z}}^{{3}}{-}{y}{}{{z}}^{{4}}{,}{y}{}{{w}}^{{2}}{-}{{z}}^{{3}}{,}{x}{}{{w}}^{{3}}{-}{{z}}^{{4}}\right]$ (43)

which allows for divisions by decreasing powers:

 > $\mathrm{Reduce}\left({w}^{5}{x}^{3}{y}^{2}z,,\mathrm{plex}\left(w,x,y,z\right)\right)$
 ${{y}}^{{4}}{}{{z}}^{{7}}$ (44)

and the standard basis

 > $\mathrm{Basis}\left(G,\mathrm{plex_min}\left(w,x,y,z\right)\right)$
 $\left[{-}{{w}}^{{4}}{}{{x}}^{{2}}{}{z}{+}{{w}}^{{4}}{}{{y}}^{{3}}{,}{-}{{w}}^{{4}}{}{{y}}^{{2}}{+}{{w}}^{{3}}{}{x}{}{{z}}^{{2}}{,}{-}{x}{}{{w}}^{{3}}{+}{{w}}^{{2}}{}{y}{}{z}{,}{-}{y}{}{{w}}^{{2}}{+}{{z}}^{{3}}\right]$ (45)

which allows for divisions by increasing powers:

 > $\mathrm{Reduce}\left({w}^{5}{x}^{3}{y}^{2}z,,\mathrm{plex_min}\left(w,x,y,z\right)\right)$
 ${{w}}^{{6}}{}{{x}}^{{4}}{}{y}$ (46)