# Dom::MultivariatePolynomial

Domains of multivariate polynomials

## Syntax

### Domain Creation

Dom::MultivariatePolynomial(<Vars, <R, <Order>>>)

### Element Creation

Dom::MultivariatePolynomial(Vars, R, Order)(p)
Dom::MultivariatePolynomial(Vars, R, Order)(lm)

## Description

Dom::MultivariatePolynomial(Vars, R, ..) creates the domain of multivariate polynomials in the variable list Vars over the commutative ring R in distributed representation.

Dom::MultivariatePolynomial represents multivariate polynomials over arbitrary commutative rings.

All usual algebraic and arithmetical polynomial operations are implemented, including Gröbner basis computation and some classical construction tools used in invariant theory.

 Note:   It is highly recommend to use only coefficient rings with unique zero representation. Otherwise it may happen that, e.g., a polynomial division will not terminate or a wrong degree will be returned.

Dom::MultivariatePolynomial(Vars, R, Order) creates a domain of multivariate polynomials in the variable list Vars over a domain R of category Cat::CommutativeRing in sparse distributed representation with respect to the monomial ordering Order.

Dom::MultivariatePolynomial() creates a polynomial domain in the variable list [x,y,z] over the domain Dom::ExpressionField(normal) with respect to the lexicographic monomial ordering.

Dom::MultivariatePolynomial(Vars) generates the polynomial domain in the variable list Vars over the domain Dom::ExpressionField(normal) with respect to the lexicographic monomial ordering is created.

 Note:   Only commutative coefficient rings of type DOM_DOMAIN which inherit from Dom::BaseDomain are allowed. If R is of type DOM_DOMAIN but does not inherit from Dom::BaseDomain, the domain Dom::ExpressionField(normal) will be used instead.

In contrast to the domain Dom::DistributedPolynomial, Dom::MultivariatePolynomial accepts only identifiers (DOM_IDENT) as indeterminates. This restriction enables some further methods described below.

Please note: For reasons of efficiency not all methods check their arguments, not even at the interactive level. In particular this is true for many access methods, converting methods and technical methods. This may cause strange error messages.

## Superdomain

Dom::DistributedPolynomial

## Axioms

If R has Ax::normalRep, then Ax::normalRep.

If R has Ax::canonicalRep, then Ax::canonicalRep.

## Categories

If Vars has a single variable, then Cat::UnivariatePolynomial(R), else Cat::Polynomial(R).

## Examples

### Example 1

To create the ring of multivariate polynomials in x, y and z over the rationals one may define

MP := Dom::MultivariatePolynomial([x, y, z], Dom::Rational)

The elementary symmetric polynomials of this domain are

s1 := MP(x + y + z)

s2 := MP(x*y + x*z + y*z)

s3:=MP(x*y*z)

A polynomial is called symmetric if it remains unchanged under every possible permutation of variables as, e.g.:

s3=s3(MP(y), MP(z), MP(x))

These polynomials arise naturally in studying the roots of a polynomial. To show this, we first have to create an univariate polynomial, e.g., in U over MP, and generate a polynomial in U with roots in x, y and z.

UP:=Dom::UnivariatePolynomial(U, MP)

f := UP((U - x)*(U - y)*(U - z))

UP(U^3)-s1*UP(U^2)+s2*UP(U)+(-1)^3*s3

This exemplifies that the coefficients of f are (elementary) symmetric polynomials in its roots.

From the fundamental theorem of symmetric polynomials we know that every symmetric polynomial can be written uniquely as a polynomial in the elementary symmetric polynomials. Thus we can rewrite the following symmetric polynomial s in the elementary symmetric polynomials s1, s2 and s3,

s:=MP(x^3*y+x^3*z+x*y^3+x*z^3+y^3*z+y*z^3)

S:=MP::rewritePoly(s,[s1=S1,s2=S2,s3=S3])

where these polynomials are represented by the three new variables S1, S2 and S3 respectively. To see that this new polynomial S in the new variables indeed represents the old original polynomial s, we simply have to plug in the three elementary symmetric polynomials into S:

poly(S, Expr)(s1,s2,s3)

When one has a given list of polynomials, e.g., like:

l:=[3*s1,2*s1,s1,s3]

and one wants to sort them in an appropriate order, one may use one of the following two methods.

MP::sortList(l,Dom::MonomOrdering(DegLex(3)))

MP::stableSort(l,Dom::MonomOrdering(DegLex(3)))

In the first sorted list the order of the three polynomials of the same degree has changed, while with the second method this order remains stable.

### Example 2

Let be a finite (matrix) subgroup of the general linear group. Then a polynomial is called invariant underG, if for all AG

where . The symmetric polynomials s1, s2 and s3 from the previous example are invariants under the symmetric group S3. In fact, these three fundamental invariants yet generate the whole ring of invariants of S3.

Now let us examine the invariants of the famous icosahedral group. One may find a representation of this group on page 73 of H. F. Blichfeldt: Finite collineation groups, University of Chicago Press, 1917.

The group is generated from these three matrices, has 120 elements and is thus a finite subgroup, even of the special linear group SL(2, (ε)). It is also well known that

is a fundamental invariant of degree 12 of this group. To declare i1 in MuPAD® one has first to define the polynomial domain.

MP:=Dom::MultivariatePolynomial([x1,x2],Dom::Rational)

i1:=MP(x1*x2^(11)-11*x1^6*x2^6-x1^(11)*x2)

From the invariant i1 one can compute a further fundamental invariant i2 with

i2:=MP::hessianDet(i1)

But to get more simple coefficients we choose i2 as

i2:=-1/121*MP::hessianDet(i1)

instead. Similar we obtain a third fundamental invariant i3 with

i3:=1/20*MP::jacobianDet([i1,i2])

In contrast to the symmetric groups, where all invariants can be uniquely represented by the fundamental invariants, the fundamental invariants of this group have an algebraic relation, a so-called syzygy between them. It is possible to represent i32 in two ways:

MP::rewritePoly(i3^2,[i1=I1,i2=I2,i3=I3])

MP::rewritePoly(i3^2,[i1=I1,i2=I2,i3=I3],Unsorted)

And hence we get the syzygy:

MP::rewritePoly(i3^2,[i1=I1,i2=I2,i3=I3],Unsorted)-
MP::rewritePoly(i3^2,[i1=I1,i2=I2,i3=I3]) = 0

## Parameters

 Vars A list of indeterminates. Default: [x,y,z]. R A commutative ring, i.e., a domain of category Cat::CommutativeRing. Default: Dom::ExpressionField(normal). Order A monomial ordering, i.e., one of the predefined orderings LexOrder, DegreeOrder, or DegInvLexOrder or any object of type Dom::MonomOrdering. Default: LexOrder. p A polynomial or a polynomial expression. lm List of monomials, which are represented as lists containing the coefficients together with the exponents or exponent vectors.

## Entries

 "characteristic" The characteristic of this domain. "coeffRing" The coefficient ring of this domain as defined by the parameter R. "key" The name of the domain created. "one" The neutral element w.r.t. "_mult". "ordering" The monomial ordering defined by the parameter Order. "variables" The list of variables defined by the parameter Vars. "zero" The neutral element w.r.t. "_plus".

collapse all

## Mathematical Methods

### D — Differential operator for polynomials

Inherited from Dom::DistributedPolynomial.

### Dpoly — Differential operator for polynomials

Inherited from Dom::DistributedPolynomial.

### SPolynomial — Compute the S-polynomial of two polynomials

Inherited from Dom::DistributedPolynomial.

### _divide — Exact polynomial division

Inherited from Dom::DistributedPolynomial.

### _invert — Inverse of an element

Inherited from Dom::DistributedPolynomial.

### _mult — Multiplie polynomials and coefficient ring elements

Inherited from Dom::DistributedPolynomial.

### _negate — Negate a polynomial

Inherited from Dom::DistributedPolynomial.

### _plus — Add polynomials and coefficent ring elements

Inherited from Dom::DistributedPolynomial.

### _power — Nth power of a polynomial

Inherited from Dom::DistributedPolynomial.

### _subtract — Subtract a polynomial or a coefficient ring element

Inherited from Dom::DistributedPolynomial.

### associates — Test if elements are associates

Inherited from Cat::IntegralDomain.

### borderedHessianDet — Bordered Hessian determinant of a polynomial

borderedHessianDet(a, b, <v>)

### borderedHessianMat — Bordered Hessian matrix of a polynomial

borderedHessianMat(a, b, <v>)

### content — Content of a polynomial

Inherited from Dom::DistributedPolynomial.

### decompose — Functional decomposition of a polynomial

Inherited from Dom::DistributedPolynomial.

degLex(a, b)

degRevLex(a, b)

### diff — Differentiate a polynomial

Inherited from Dom::DistributedPolynomial.

### dimension — Dimension of affine variety

Inherited from Dom::DistributedPolynomial.

### divide — Divide polynomials

Inherited from Dom::DistributedPolynomial.

### divides — Test if elements divides another

Inherited from Cat::IntegralDomain.

### equal — Test for mathematical equality

Inherited from Dom::BaseDomain.

### equiv — Test for equivalence

Inherited from Cat::BaseCategory.

### evalp — Evaluate a polynomial

Inherited from Dom::DistributedPolynomial.

### factor — Factor a polynomial

Inherited from Dom::DistributedPolynomial.

### func_call — Applie expressions to a polynomial

Inherited from Dom::DistributedPolynomial.

### gcd — Greatest common divisor of polynomials

Inherited from Dom::DistributedPolynomial.

### gcdex — Extended Euclidean algorithm for polynomials

Inherited from Dom::DistributedPolynomial.

### groebner — Reduced Gröbner basis

Inherited from Dom::DistributedPolynomial.

### hessianDet — Hessian determinant of a polynomial

hessianDet(a, <v>)

### hessianMat — Hessian matrix of a polynomial

hessianMat(a, <v>)

### homogeneousComponents — List of homogeneous components of a polynomial

homogeneousComponents(a)

### idealGenerator — Generator of finitely generated ideal

Inherited from Cat::EuclideanDomain.

### int — Definite and indefinite integration of a polynomial

Inherited from Dom::DistributedPolynomial.

### intmult — Multiplie a polynomial with an integer

Inherited from Dom::DistributedPolynomial.

### irreducible — Test if element is irreducible

Inherited from Cat::FactorialDomain.

isHomogeneous(a)

### isUnit — Test if element is a unit

Inherited from Cat::Polynomial.

### isone — Test for one

Inherited from Dom::DistributedPolynomial.

### iszero — Test for zero

Inherited from Dom::DistributedPolynomial.

### jacobianDet — Jacobian determinant of a polynomial

jacobianDet(ais, <v>)

### jacobianMat — Jacobian matrix of a polynomial

jacobianMat(ais, <v>)

### lcm — Least common multiple of polynomials

Inherited from Dom::DistributedPolynomial.

### makeIntegral — Make the coefficients fraction free

Inherited from Dom::DistributedPolynomial.

### monic — Normalize a polynomial

Inherited from Dom::DistributedPolynomial.

### normalForm — Complete reduction modulo an ideal

Inherited from Dom::DistributedPolynomial.

### pdioe — Solve polynomial Diophantine equations

Inherited from Dom::DistributedPolynomial.

### pdivide — Pseudo-division of polynomials

Inherited from Dom::DistributedPolynomial.

### pquo — Pseudo-quotient of polynomials

Inherited from Dom::DistributedPolynomial.

### prem — Pseudo-remainder of polynomials

Inherited from Dom::DistributedPolynomial.

### primpart — Return primitive part

Inherited from Cat::Polynomial.

### quo — Euclidean quotient

Inherited from Cat::EuclideanDomain.

### random — Create a random polynomial

Inherited from Dom::DistributedPolynomial.

### rem — Euclidean remainder

Inherited from Cat::EuclideanDomain.

### resultant — Resultant of two polynomials

Inherited from Dom::DistributedPolynomial.

### rewriteHomPoly — Rewrite a polynomial in terms of other polynomials

rewriteHomPoly(a, ais, v)

All the polynomials a and ais must be homogeneous.

The variables of v should be new variables.

### rewritePoly — Rewrite a polynomial in terms of other polynomials

rewritePoly(a, [ai = vi], <Unsorted>)

This method can be used for representing a polynomial with respect to a given polynomial basis.

When option Unsorted is given, the list [ai=vi] is not sorted. Otherwise, in a precomputation step this list will be sorted in the ai's w.r.t. the graded lexicographical order ("degLex").

Please note: the algorithm depends on the order of Vars and ais.

All the polynomials ai must be homogeneous.

The variables of vi should be new variables.

### ringmult — Multiplie a polynomial with a coefficient ring element

Inherited from Dom::DistributedPolynomial.

### solve — Zero of polynomials

Inherited from Dom::DistributedPolynomial.

### sqrfree — Square-free factorization of polynomials

Inherited from Dom::DistributedPolynomial.

### unitNormal — Return unit normal

Inherited from Cat::Polynomial.

### unitNormalRep — Return unit normal representation

Inherited from Cat::Polynomial.

## Access Methods

### coeff — Coefficient of a polynomial

Inherited from Dom::DistributedPolynomial.

### degree — Degree of a polynomial

Inherited from Dom::DistributedPolynomial.

### degreevec — Vector of exponents of the leading term of a polynomial

Inherited from Dom::DistributedPolynomial.

### euclideanDegree — Euclidean degree function

Inherited from Dom::DistributedPolynomial.

### ground — Ground term of a polynomial

Inherited from Dom::DistributedPolynomial.

### has — Existence of an object in a polynomial

Inherited from Dom::DistributedPolynomial.

### indets — Indeterminate of a polynomial

Inherited from Dom::DistributedPolynomial.

### lcoeff — Leading coefficient of a polynomial

Inherited from Dom::DistributedPolynomial.

### ldegree — Lowest degree of a polynomial

Inherited from Dom::DistributedPolynomial.

### lmonomial — Leading monomial of a polynomial

Inherited from Dom::DistributedPolynomial.

### lterm — Leading term of a polynomial

Inherited from Dom::DistributedPolynomial.

### mainvar — Main variable of a polynomial

Inherited from Dom::DistributedPolynomial.

### mapcoeffs — Applie a function to the coefficients of a polynomial

Inherited from Dom::DistributedPolynomial.

### multcoeffs — Multiplie the coefficients of a polynomial with a factor

Inherited from Dom::DistributedPolynomial.

### nterms — Number of terms of a polynomial

Inherited from Dom::DistributedPolynomial.

### nthcoeff — N-th coefficient of a polynomial

Inherited from Dom::DistributedPolynomial.

### nthmonomial — N-th monomial of a polynomial

Inherited from Dom::DistributedPolynomial.

### nthterm — N-th term of a polynomial

Inherited from Dom::DistributedPolynomial.

order(a, b, o)

### orderedVariableList — Ordered list of indeterminates of a polynomial

Inherited from Dom::DistributedPolynomial.

### pivotSize — Size of a pivot element

Inherited from Dom::DistributedPolynomial.

### reductum — Reductum of a polynomial

Inherited from Dom::DistributedPolynomial.

### sortList — Sort a list of polynomials w.r.t. a given order

sortList(ais, o)

This sorting method may be not stable if o is not a total order.

### stableSort — Sort a list of polynomials w.r.t. a given order

stableSort(ais, o)

This sorting method is stable, even if o is not a total order.

### subs — Avoid substitution

Inherited from Dom::BaseDomain.

### subsex — Avoid extended substitution

Inherited from Dom::BaseDomain.

### tcoeff — Lowest coefficient of a polynomial

Inherited from Dom::DistributedPolynomial.

## References

[1] Winfried Fakler. "Algorithmen zur symbolischen Lösung homogener linearer Differentialgleichungen". Diplomarbeit, Universität Karlsruhe, 1994.