# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

# `Dom`::`MultivariatePolynomial`

Domains of multivariate polynomials

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

## 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"`.

## Methods

expand all

#### Mathematical Methods

```borderedHessianDet(a, b, <v>)```

```borderedHessianMat(a, b, <v>)```

`degLex(a, b)`

`degRevLex(a, b)`

`hessianDet(a, <v>)`

`hessianMat(a, <v>)`

`homogeneousComponents(a)`

`isHomogeneous(a)`

`jacobianDet(ais, <v>)`

`jacobianMat(ais, <v>)`

`rewriteHomPoly(a, ais, v)`

All the polynomials `a` and `ais` must be homogeneous.

The variables of `v` should be new variables.

```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.

#### Access Methods

`order(a, b, o)`

`sortList(ais, o)`

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

`stableSort(ais, o)`

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

## References

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