 Overview - Maple Help

Introduction to the PolynomialIdeals Package Calling Sequence PolynomialIdeals[command](arguments) command(arguments) Description

 • The PolynomialIdeals package is a collection of commands that support computations with commutative polynomial ideals in one or more variables over fields, such as computing the primary decomposition of a polynomial ideal.
 • The main computational engine behind the package is Groebner bases, but no knowledge of them is required to use this package.
 • Most of the commands support polynomials over the rational numbers, algebraic number fields, rational function fields, and algebraic function fields, as well as finite fields. Coefficients from algebraic extension fields can be specified using radicals or RootOfs.
 • For an overview of the PolynomialIdeals package, see the PolynomialIdeals Package Example Worksheet.
 • Each command in the PolynomialIdeals package can be accessed by using either the long form or the short form of the command name in the command calling sequence.
 Because the underlying implementation of the PolynomialIdeals package is a module, it is also possible to use the form PolynomialIdeals:-command to access a command from the package. For more information, see Module Members.
 • 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 name, that is, by prepending the package name. List of PolynomialIdeals Package Commands

 The following is a list of available commands.

 To display the help page for a particular PolynomialIdeals command, click the corresponding link in the table, or enter ?PolynomialIdeals[command] at the Maple prompt. List of Subpackages

 • The following is a list of available subpackages.

 interface to PolynomialIdeal data structure binary operators: +, *, /, and ^, as well as a form of Simplify that simplifies to a canonical form Examples

 > $\mathrm{with}\left(\mathrm{PolynomialIdeals}\right):$

We first create an ideal J using the PolynomialIdeal command. This ideal is generated by the two polynomials given to the constructor. The ideal is assumed to lie in the polynomial ring ${Q}_{x,y,z}$ by default.

 > $J≔\mathrm{PolynomialIdeal}\left(xz-{y}^{2},{x}^{3}-yz\right)$
 ${J}{≔}⟨{x}{}{z}{-}{{y}}^{{2}}{,}{{x}}^{{3}}{-}{y}{}{z}⟩$ (1)

Now we test if a polynomial $f$ in the polynomial ring ${Q}_{x,y,z}$ is in the ideal $J$ using the IdealMembership command. Because the polynomial $f$ is a polynomial combination of the generators, it is in $J$.

 > $f≔\mathrm{expand}\left(\left(x-y+1\right)\left({x}^{3}-yz\right)-\left({z}^{2}+{x}^{3}\right)\left(xz-{y}^{2}\right)\right)$
 ${f}{≔}{-}{{x}}^{{4}}{}{z}{+}{{x}}^{{3}}{}{{y}}^{{2}}{+}{{x}}^{{4}}{-}{{x}}^{{3}}{}{y}{-}{x}{}{{z}}^{{3}}{+}{{y}}^{{2}}{}{{z}}^{{2}}{+}{{x}}^{{3}}{-}{x}{}{y}{}{z}{+}{{y}}^{{2}}{}{z}{-}{y}{}{z}$ (2)
 > $\mathrm{IdealMembership}\left(f,J\right)$
 ${\mathrm{true}}$ (3)

Now we show how to do this using a shortcut syntax that corresponds more closely to a standard notation for ideals. This syntax is available whenever the package has been loaded using with(PolynomialIdeals). Otherwise, enclosing a quantity in angled brackets constructs a Vector for use with the LinearAlgebra package. For further options and details for constructing polynomial ideals, see PolynomialIdeal.

 > $J≔⟨xz-{y}^{2},{x}^{3}-yz⟩$
 ${J}{≔}⟨{x}{}{z}{-}{{y}}^{{2}}{,}{{x}}^{{3}}{-}{y}{}{z}⟩$ (4)
 > $f\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{in}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}J$
 ${\mathrm{true}}$ (5)

The PrimeDecomposition and PrimaryDecomposition commands compute prime and primary decompositions, respectively. Both return a sequence of ideals whose intersection contains the input ideal.  For a prime decomposition, this intersection has the same solutions as the original ideal (the intersection is equal to the radical), whereas for a primary decomposition the intersection is identically equal to the given ideal. The Intersect command is used below to compute this intersection.  In this case, our ideal $J$ is radical, so the prime and primary decompositions are the same.

 > $\mathrm{IsRadical}\left(J\right)$
 ${\mathrm{true}}$ (6)
 > $P≔\mathrm{PrimeDecomposition}\left(J\right)$
 ${P}{≔}⟨{x}{,}{y}⟩{,}⟨{-}{x}{}{z}{+}{{y}}^{{2}}{,}{{x}}^{{2}}{}{y}{-}{{z}}^{{2}}{,}{{x}}^{{3}}{-}{y}{}{z}⟩$ (7)
 > $K≔\mathrm{Intersect}\left(P\right)$
 ${K}{≔}⟨{-}{x}{}{z}{+}{{y}}^{{2}}{,}{{x}}^{{3}}{-}{y}{}{z}⟩$ (8)

How do we know that $K=J$? The IdealContainment command can be used to test multiple inclusions simultaneously.  It returns true if all of the inclusions are true, and false if any of them fail. A particularly useful form of the command is shown below, where it is used to test ideal equality.

 > $\mathrm{IdealContainment}\left(J,K,J\right)$
 ${\mathrm{true}}$ (9)

Turning back to the prime decomposition, to extract the set of generators for one of the components:  the Generators command accepts a single ideal, and returns the set of generators in a set.

 > $P\left[1\right]$
 $⟨{x}{,}{y}⟩$ (10)
 > $\mathrm{Generators}\left(P\left[1\right]\right)$
 $\left\{{x}{,}{y}\right\}$ (11)

How are these computations done? An ideal membership test and an ideal decomposition are performed by first computing a Groebner basis for the ideal. If we inspect the data representation for the ideal J, we notice that a Groebner basis was implicitly computed.

 > $\mathrm{lprint}\left(J\right)$
 POLYNOMIALIDEAL(x*z-y^2,x^3-y*z,variables = {x, y, z},characteristic = 0,known_groebner_bases = (table([(tdeg(z,y,x))=[[1, y^2, -x*z+y^2], [1, x^3, x^3-y*z]]])))

Groebner bases are used extensively by almost every command in this package. They are computed by the system as required. You need not be familiar with Groebner bases to use this package. The Groebner[Basis] command computes a Groebner basis explicitly for an ideal with respect to a given monomial order.  A variety of monomial orders are implemented, with a complete list available under MonomialOrders. The default monomial ordering used is known as graded reverse lexicographical order or tdeg in Maple. Here, we explicitly compute a Groebner basis for our ideal J using lexicographic order with $z>y>x$. See Groebner[Basis] for details. From this example, you can see that the Groebner basis depends on the monomial ordering used.  We extract the leading terms of the generators for the Groebner basis; they are ${y}^{3}$, $xz$, and $yz$.

 > $G≔\mathrm{Groebner}\left[\mathrm{Basis}\right]\left(J,\mathrm{plex}\left(z,y,x\right)\right)$
 ${G}{≔}\left[{-}{{x}}^{{4}}{+}{{y}}^{{3}}{,}{x}{}{z}{-}{{y}}^{{2}}{,}{-}{{x}}^{{3}}{+}{y}{}{z}\right]$ (12)
 > $\mathrm{Groebner}\left[\mathrm{LeadingMonomial}\right]\left(G\left[1\right],\mathrm{plex}\left(z,y,x\right)\right)$
 ${{y}}^{{3}}$ (13)
 > $\mathrm{Groebner}\left[\mathrm{LeadingMonomial}\right]\left(G\left[2\right],\mathrm{plex}\left(z,y,x\right)\right)$
 ${x}{}{z}$ (14)
 > $\mathrm{Groebner}\left[\mathrm{LeadingMonomial}\right]\left(G\left[3\right],\mathrm{plex}\left(z,y,x\right)\right)$
 ${y}{}{z}$ (15)

The next ideal is the intersection of two components, both of which are maximal, that is, prime over $Q$ and zero-dimensional. We extract the smaller component of interest, and then simplify it.

 > $T≔⟨45p+35s-165b-36,35p+40z+25t-27s,15w+25ps+30z-18t-165{b}^{2},-9w+15pt+20zs,wp+2zt-11{b}^{3},99w-11sb+3{b}^{2}⟩:$

There are a finite number of solutions.

 > $\mathrm{IsZeroDimensional}\left(T\right)$
 ${\mathrm{true}}$ (16)

There are no repeated solutions.

 > $\mathrm{IsRadical}\left(T\right)$
 ${\mathrm{true}}$ (17)

There is more than one irreducible component.

 > $\mathrm{IsPrime}\left(T\right)$
 ${\mathrm{false}}$ (18)
 > $L≔\mathrm{IdealInfo}\left[\mathrm{KnownGroebnerBases}\right]\left(T\right)$
 ${L}{≔}\left\{{\mathrm{plex}}{}\left({w}{,}{z}{,}{t}{,}{p}{,}{s}{,}{b}\right){,}{\mathrm{tdeg}}{}\left({w}{,}{z}{,}{t}{,}{p}{,}{s}{,}{b}\right)\right\}$ (19)

There are 10 distinct solutions.

 > $\mathrm{Groebner}\left[\mathrm{LeadingMonomial}\right]\left(T,\mathrm{plex}\left(w,z,t,p,s,b\right)\right)$
 $⟨{p}{,}{s}{,}{t}{,}{w}{,}{z}{,}{{b}}^{{10}}⟩$ (20)

There are two irreducible components.

 > $\mathrm{factor}\left(\mathrm{UnivariatePolynomial}\left(b,T\right)\right)$
 $\left({10000}{}{{b}}^{{2}}{+}{6600}{}{b}{+}{2673}\right){}\left({4380800000000000}{}{{b}}^{{8}}{+}{16108202000000000}{}{{b}}^{{7}}{+}{22514571860000000}{}{{b}}^{{6}}{+}{18624678595600000}{}{{b}}^{{5}}{+}{9432310305572000}{}{{b}}^{{4}}{+}{2959977269862580}{}{{b}}^{{3}}{+}{617295990812985}{}{{b}}^{{2}}{+}{80609374775160}{}{b}{+}{3361317558192}\right)$ (21)

The smaller component:

 > $\mathrm{Simplify}\left(⟨T,10000{b}^{2}+6600b+2673⟩\right)$
 $⟨{-}{1377}{-}{3100}{}{b}{+}{1800}{}{p}{,}{-}{9}{-}{500}{}{b}{+}{200}{}{s}{,}{81}{-}{1850}{}{b}{+}{750}{}{t}{,}{3969}{+}{9500}{}{b}{+}{60000}{}{w}{,}{10287}{+}{24500}{}{b}{+}{18000}{}{z}{,}{10000}{}{{b}}^{{2}}{+}{6600}{}{b}{+}{2673}⟩$ (22)

In the mathematical literature, the letters I, J, and K are often used to denote ideals. We have so far refrained from using I because Maple, by default, uses I to denote the imaginary unit whose square is $-1$.  We can use a different letter for the square root of $-1$ after using the following command, leaving us free to use the letter I for an ideal.  We show an example of this next.

 > ${I}^{2}$
 ${-1}$ (23)
 > $\mathrm{interface}\left(\mathrm{imaginaryunit}=\mathrm{_i}\right)$
 ${I}$ (24)
 > ${\mathrm{_i}}^{2}$
 ${-1}$ (25)
 > ${I}^{2}$
 ${{I}}^{{2}}$ (26)

In addition to the generators (which are always specified as polynomials), we can also input options for the polynomial ring (which are always specified as equations). Two of the most important options are $\mathrm{characteristic}=p$, which forces all computations onto the integers modulo p, and $\mathrm{variables}=S$, in which a set S specifies the variables of the polynomial ring.  We make use of both options in the following example. The resulting ideal will lie in the polynomial ring ${{Z}_{5}\left(a\right)}_{x,y}$, rather than the default ${Q}_{x,y,a}$. When using the shortcut $<...>$ syntax, the Maple operator precedence rules require that you enclose any options in parentheses.

 > $J≔⟨{a}^{2}{x}^{3}-2xy,{x}^{2}y-2a{y}^{2}+{a}^{3}x,\mathrm{characteristic}=5,\mathrm{variables}=\left\{x,y\right\}⟩$
 ${J}{≔}⟨{{a}}^{{2}}{}{{x}}^{{3}}{+}{3}{}{x}{}{y}{,}{{a}}^{{3}}{}{x}{+}{3}{}{a}{}{{y}}^{{2}}{+}{{x}}^{{2}}{}{y}⟩$ (27)

As an example of a computation with ideals, the intersection of two ideals $\mathrm{J1}$ and $\mathrm{J2}$ in $k[\mathrm{x1},\mathrm{x2},...,\mathrm{xn}]$ is given by the following formula: $\mathrm{J1}\mathrm{intersect}\mathrm{J2}=\left(t\mathrm{J1}+\left(1-t\right)\mathrm{J2}\right)\mathrm{intersect}k[\mathrm{x1},\mathrm{x2},\mathrm{...},\mathrm{xn}]$. We make use of the Operators subpackage, which provides binary operators for ideal arithmetic.

 > $\mathrm{with}\left(\mathrm{Operators}\right):$
 > $\mathrm{J1}≔⟨{x}^{2}-{y}^{2}⟩$
 ${\mathrm{J1}}{≔}⟨{{x}}^{{2}}{-}{{y}}^{{2}}⟩$ (28)
 > $\mathrm{J2}≔⟨{x}^{3}-{y}^{3}⟩$
 ${\mathrm{J2}}{≔}⟨{{x}}^{{3}}{-}{{y}}^{{3}}⟩$ (29)
 > $K≔t\mathrm{J1}+\left(1-t\right)\mathrm{J2}$
 ${K}{≔}⟨{t}{}{{x}}^{{2}}{-}{t}{}{{y}}^{{2}}{,}{{x}}^{{4}}{+}{{x}}^{{3}}{}{y}{-}{x}{}{{y}}^{{3}}{-}{{y}}^{{4}}{,}{t}{}{x}{}{{y}}^{{2}}{-}{t}{}{{y}}^{{3}}{-}{{x}}^{{3}}{+}{{y}}^{{3}}⟩$ (30)
 > $\mathrm{EliminationIdeal}\left(K,\left\{x,y\right\}\right)=\mathrm{Intersect}\left(\mathrm{J1},\mathrm{J2}\right)$
 $⟨{{x}}^{{4}}{+}{{x}}^{{3}}{}{y}{-}{x}{}{{y}}^{{3}}{-}{{y}}^{{4}}⟩{=}⟨{{x}}^{{4}}{+}{{x}}^{{3}}{}{y}{-}{x}{}{{y}}^{{3}}{-}{{y}}^{{4}}⟩$ (31)

Note: When ideal operations are applied to different rings, for example, ${k}_{t,x}$ and ${k}_{x,y}$, the ideals are first put into a common ring, in this case, the ring ${k}_{t,x,y}$. For our final example, we explain how to test if an ideal is zero-dimensional, that is, the polynomial system of equations has finitely many solutions if in characteristic zero. You can use the HilbertDimension command to compute the dimension of an ideal to do this. Another way is the following; an ideal J in $k[\mathrm{x1},...,\mathrm{xn}]$ has dimension zero if the set of leading monomials of the ideal contains $\left\{{\mathrm{x1}}^{\mathrm{e1}},...,{\mathrm{xn}}^{\mathrm{en}}\right\}$, for $0\le \mathrm{ei}$.

 > $J≔⟨{x}^{2}+{y}^{2}-1,{x}^{2}-2xy+{y}^{2},{z}^{2}-2⟩$
 ${J}{≔}⟨{{z}}^{{2}}{-}{2}{,}{{x}}^{{2}}{+}{{y}}^{{2}}{-}{1}{,}{{x}}^{{2}}{-}{2}{}{x}{}{y}{+}{{y}}^{{2}}⟩$ (32)
 > $\mathrm{IsRadical}\left(J\right)$
 ${\mathrm{false}}$ (33)
 > $\mathrm{HilbertDimension}\left(J\right)$
 ${0}$ (34)
 > $\mathrm{Groebner}\left[\mathrm{LeadingMonomial}\right]\left(J,\mathrm{tdeg}\left(x,y,z\right)\right)$
 $⟨{{x}}^{{2}}{,}{{y}}^{{3}}{,}{{z}}^{{2}}{,}{x}{}{y}⟩$ (35)
 > $G≔\mathrm{Groebner}\left[\mathrm{Basis}\right]\left(J,\mathrm{tdeg}\left(x,y,z\right)\right)$
 ${G}{≔}\left[{{z}}^{{2}}{-}{2}{,}{2}{}{x}{}{y}{-}{1}{,}{{x}}^{{2}}{+}{{y}}^{{2}}{-}{1}{,}{2}{}{{y}}^{{3}}{+}{x}{-}{2}{}{y}\right]$ (36)
 > $\mathrm{map}\left(\mathrm{Groebner}\left[\mathrm{LeadingMonomial}\right],G,\mathrm{tdeg}\left(x,y,z\right)\right)$
 $\left[{{z}}^{{2}}{,}{x}{}{y}{,}{{x}}^{{2}}{,}{{y}}^{{3}}\right]$ (37)