Dom::DistributedPolynomial -- the
domains of distributed polynomials
IntroductionDom::DistributedPolynomial(Vars, R, ..)
creates the domain of polynomials in the variables of the list
Vars over the commutative ring R in
distributed representation.
DomainDom::DistributedPolynomial( <Vars <, R <,
Order>>>)
ParametersVars |
- | a list of indeterminates. Default is []
(the empty list, indicating ``arbitrary indeterminates''). |
R |
- | a commutative ring, i.e., a domain of category
Cat::CommutativeRing. Default
is 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 is
LexOrder. |
DetailsDom::DistributedPolynomial(Vars, R,
Order) creates a domain of polynomials in the variables of the
list Vars over a domain of category Cat::CommutativeRing in sparse
distributed representation with respect to the monomial ordering
Order.Dom::DistributedPolynomial is called without any
argument, a polynomial domain in arbitrarily many indeterminates over
the domain Dom::ExpressionField(normal)
with respect to the lexicographic monomial ordering is created.Dom::DistributedPolynomial is called only with the
variable list Vars as argument, the polynomial domain in
the variable list Vars over the domain Dom::ExpressionField(normal)
with respect to the lexicographic monomial ordering is created.Only commutative coefficient rings of type DOM_DOMAIN are allowed which
inherit from Dom::BaseDomain. If R
is of type DOM_DOMAIN but does not inherit
from Dom::BaseDomain,
the domain Dom::ExpressionField(normal)
will be used instead.
Dom::DistributedPolynomial accepts expressions as
indeterminates, similar to the kernel domain DOM_POLY. Hence, for example,
[x,cos(x)] is a valid variable list.Vars is the empty list
([]), a polynomial domain in arbitrarily many
indeterminates is created. In this case, when creating new elements
from polynomials or polynomial expressions, the system function
indets is first called
to get the variables and then the polynomial is created with respect to
these variables. Hence, in this case only identifiers can be valid
indeterminates, because indets returns only identifiers.Cat::Polynomial, but it is
possible to create multivariate polynomial domains with a given list of
variables over any polynomial domain.Dom::DistributedPolynomial represents polynomials over
arbitrary commutative rings. It is intended as a basic domain for
distributed polynomials from which it is easy to create new distributed
polynomial domains.
All usual algebraic and arithmetical polynomial operations are implemented, including Gröbner basis computation.
It is highly recommend to use only coefficient rings with unique zero representation. Otherwise it can happen that, e.g., a polynomial division will not terminate or a wrong degree will be returned.
Creating
ElementsDom::DistributedPolynomial(Vars, R,
Order)(p)
Dom::DistributedPolynomial(Vars, R,
Order)(lm)
Dom::DistributedPolynomial(Vars, R,
Order)(lm,v)
Parametersp |
- | 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. |
v |
- | list of indeterminates. This parameter is only valid
for Vars = []. |
Vars has a single variable, then
Related
DomainsDom::Polynomial,
Dom::MultivariatePolynomial,
Dom::UnivariatePolynomial
The characteristic of this domain.
The coefficient ring of this domain as defined by the parameter
R.
The name of the created domain.
The neutral element w.r.t. "_mult".
The monomial order as defined by the parameter
Order.
The list of variables as defined by the parameter
Vars.
The neutral element w.r.t. "_plus".
_divide(dom a, dom
b)_divide(dom a, R
b)_divide(dom a, DOM_INT b)a by b and returns the divisor,
if a is divisible by b otherwise
FAIL._divide for polynomials,
i.e., one may use it either in the form a / b, or in
functional form _divide(a, b).This method only exists if R is an
integral domain, i.e., a domain of category Cat::IntegralDomain.
_invert(dom a)a if it exists, otherwise
FAIL._mult( <a,b...>)R and elements of type
DOM_INT and returns an element of this domain. If any
element of a different domain occurs as an argument, the method from
that domain is called and the result of that call is returned. If this
call fails, FAIL is
returned._mult for polynomials, i.e., one may
use it either in the form a * b * ... or in functional
notation _mult(a, b...)._negate(dom a)a, i.e., multiplies a by
-1._negate for polynomials, i.e., one
may use it either in the form -a or in functional notation
_negate(a)._plus( <a,b...>)R and elements of
type DOM_INT and returns an element of this domain. When
any other element of a different domain occurs as argument, the method
from that domain is called and an element of that domain is returned.
If this call fails, FAIL
is returned._plus for polynomials, i.e., one may
use it either in the form a + b + ... or in functional
notation _plus(a, b...)._power(dom a, NonNegativeInteger n)n-th power of a, i.e.,
multiplies a n times by itself._power for polynomials, i.e., one may
use it either in the form a^n or in functional notation
_power(a,n)._subtract(a, b)a by b, whereby both arguments
can be either polynomials of this domain or elements of the coefficient
ring R or elements of type DOM_INT and
returns an element of this domain. If not possible, an error message
will occur._subtract for polynomials, i.e.,
one may use it either in the form a - b or in functional
notation _subtract(a, b).content(dom a)a, i.e., the gcd of all
coefficients.This method only exists if R is a
domain of category Cat::GcdDomain.
D(dom a)D(list of positive integers l, dom a)polylib::Dpoly for polynomials and is
simply another name for the method "Dpoly".Dpoly(dom a)Dpoly(list of positive integers l, dom a)Dpoly(a) computes the derivative of a, if
a has exactly one indeterminate.Dpoly(l,a) computes the partial derivative of
a with respect to l. For details see polylib::Dpoly.polylib::Dpoly for polynomials.decompose(dom a <, indeterminate var>)p1, ...,
pn such that a =
p1(...pn(var)...).a is a polynomial in only one variable, the second
argument is not necessary.polylib::decompose for
polynomials.diff(dom a, sequence of
indeterminates varseq)a with respect to
the sequence of indeterminates varseq.varseq is an empty sequence, a is
returned unchanged.varseq an expression occurs which is not a
variable of a, the zero polynomial is returned.diff for polynomials.dimension(list of dom ais <, monomial ordering ord>)dimension(set of dom ais <, monomial ordering ord>)ais with respect to the monomial ordering
ord, if explicitly given, otherwise Order
will be used instead.groebner::dimension.This method only exists if R is a
field, i.e., a domain of category Cat::Field and Vars is not
the empty list.
divide(dom a, dom b
<, Quo, Rem or Exact opt>)divide(dom a, dom b,
indeterminate var <, Quo, Rem or
Exact opt>)a by b, whereby both polynomials
are univariate in a common variable or with respect to the given
indeterminate var. Note that if Vars has a
single variable the second call leads to an error. If no indeterminate
is given the main variable of the first polynomial will be used.s and the
remainder r are computed such that a
= s*b + r and the degree of r in
the relevant indeterminate is smaller than that of b. The
sequence consisting of s, r is returned, otherwise
FAIL.Quo is given, only the quotient
s is returned.Rem is given, only the remainder
r is returned.Exact is given, only the quotient
s is returned, in case the remainder is zero, otherwise
FAIL.divide(a,b,Exact) divides the multivariate polynomial
a by b. If a cannot be divided
by b, the method returns FAIL.divide for polynomials.This method only exists if R is a
field, i.e., a domain of category Cat::Field and either this domain is of
category Cat::UnivariatePolynomial(R)
or R has characteristic zero
(R::characteristic = 0). If the first pair of
conditions is true then the first call is valid otherwise the second
one.
evalp(dom a, sequence of
equations var = e)a by substituting the
variables var, ... by e, .... The values
e, ... should be elements of the coefficient ring or
expressions that could be used as coefficients. The variables are
evaluated in the sequence given by the equations using Horner's rule.
An element of this domain or an element of the coefficient ring
respectively is returned.evalp for polynomials.factor(dom a)a into
irreducible factors such that a = u*a1^e1
...*an^en where u is the content of a
and ai (1 ≤i ≤n) are the irreducible
factors of a and returns an element of domain type
Factored. See
factor for more
details.factor for polynomials.This method only exists if R is a
domain of category Cat::Field or if R is the
domain Dom::Integer.
func_call(dom a, R e1, ...,
R en, <Expr>)func_call(dom a, dom e1, ...,
dom en, <Expr>)func_call(dom a, expression e1,
..., expression en, Expr)a(e1,..., en,
<Expr>) or in functional notation func_call(a,
e1,..., en, <Expr>).a(e1,..., en) applies the sequence e1,...,
en of either elements of this domain or elements of
R with respect to Vars (where n
is the number of variables) to the polynomial a. An
element of this domain or an element of the coefficient ring
respectively is returned.a(e1,..., en, Expr) applies the sequence of
expressions or of elements of this domain or of elements of
R to the polynomial a. With this call
a is first converted into an expression. Afterwards
e1,..., en is substituted into this expression with
respect to Vars. The return value may be any object.This method only exists if Vars has at
least one indeterminate.
gcd(dom a, dom
b...)a, b,
...gcd for polynomials.This method only exists if R is a
domain of category Cat::GcdDomain.
gcdex(dom a, dom
b)s and t such that g =
s*a+t*b, where g is a greatest common divisor
of a and b and degree(s)
< degree(b) and degree(t)
< degree(a). The sequence of the three
polynomials of this domain g, s, t is returned.gcdex for polynomials. Especially, it
only works for coefficient rings described there.This method only exists if R is a
domain of category Cat::GcdDomain.
groebner(list of dom ais <, monomial ordering ord> <, Reorder>)groebner(set of dom ais <, monomial ordering ord> <, Reorder>)ais with respect to the monomial
ordering ord (w.r.t. Order, if
ord is not explicitly given) and returns a list of
polynomials of this domain.Reorder is given, the lexicographical
order of variables may change to another one that is likely to decrease
the running time.
Note that this may also cause a change of the
returned list, which may now have polynomials over the same coefficient
ring R but with a possibly re-ordered variable list. Thus,
it may contain elements not belonging to this domain.
groebner::gbasis.This method only exists if R is a
field, i.e., a domain of category Cat::Field, and Vars is not
the empty list.
int(dom a <, indeterminate x>)int(dom a <, x=x0..x1>)int(a,x) returns the indefinite integral
int(a,x) as an element either of this domain (if
R is of category Cat::Field or of category Cat::Algebra(Dom::Rational) or Cat::Algebra(Dom::Fraction(Dom::Integer)))
or as an element of a polynomial domain over Dom::Fraction(R) or FAIL,
if the antiderivative cannot be converted into one of the previously
given domains. If a has only one variable, the second
argument is not necessary.int(a,x=x0..x1) returns the definite integral
int(a,x=x0..x1) or FAIL, if the result is not
an element of this domain or an element of a polynomial domain over
Dom::Fraction(R).int for polynomials.intmult(dom a, integer z)a by z."Dpoly".isone(dom a)a is the multiplicative neutral element of
this domain and returns TRUE if this is the case,
otherwise FALSE.The result can only be valid if the coefficients of
a are in normal form (i.e., if zero has a unique
representation in R). Thus, R should have at
least Ax::normalRep.
iszero(dom a)a is the additive neutral element of this
domain and returns TRUE if this is the case, otherwise
FALSE.The result can only be valid, if the coefficients of
a are in normal form (i.e., if zero has a unique
representation in R). Thus, the coefficient ring
R should have at least Ax::normalRep.
lcm(dom a, dom
b...)a, b,
...lcm for polynomials.This method only exists if R is a
domain of category Cat::GcdDomain.
makeIntegral(dom a)a by the lcm of all coefficient
denominators.This method only exists if R is a
domain of category Cat::GcdDomain and R has
the method "denom".
monic(dom a)a, i.e., the leading coefficient of the
resulting polynomial is R::one. For this, a
is divided by its leading coefficient.This method only exists if R is a
field, i.e., a domain of category Cat::Field.
normalForm(dom a, list of
dom ais <, monomial ordering
ord>)normalForm(dom a, set of
dom ais <, monomial ordering
ord>)a completely modulo all
polynomials of ais (see groebner::normalf) with respect to
the monomial ordering ord (i.e., w.r.t.
Order, if ord is not explicitly given).a always exists, but need not be unique;
if ais form a Gröbner basis, it is unique.groebner::normalf.This method only exists if R is a
field, i.e., a domain of category Cat::Field, and Vars is not
the empty list.
numericSolve(dom a <, indeterminate var> <, options>)numericSolve(dom a <, list or set of indeterminates vars> <,
options>)numericSolve(list or set of dom ais <,
indeterminate var> <,
options>)numericSolve(list or set of dom ais <,
list or set of indeterminates vars> <,
options>)numericSolve(a, ..) tries to find the zeros of
a numerically. It is possible to control the behavior of
numericSolve by passing a variable or a set or list of
variables together with options. For details see the function numeric::solve).numericSolve(ais, ..) tries to find the zeros of the
polynomial system ais numerically, with the exact behavior
depending on further arguments. For details see the function numeric::solve).DOM_EXPR, since in a
precomputation step all polynomials of this domain are converted into
the basic polynomial domain DOM_POLY over DOM_EXPR.numeric::solve.numeric::solve.pdioe(dom a, dom b,
dom c)u and
v that satisfy the equation a*u + b*v
= c or FAIL, if this equation is
not solvable.solvelib::pdioe.This method only exists if R is a
field, i.e., a domain of category Cat::Field and Vars consists
of a single variable.
pdivide(dom a, dom b
<, Quo or Rem opt>)a by b
and returns the sequence consisting of an element p of
R and two polynomials q and r of
this domain satisfying p*a =
q*b+r, where p =
lcoeff(b)^(degree(a)-degree(b)+1).Quo is given, only the pseudo-quotient
q is returned.Rem is given, only the pseudo-remainder
r is returned.pdivide for polynomials.This method only exists if Vars
consists of a single variable.
pquo(dom a, dom
b)a by b.
For details see method "pdivide".This method only exists if Vars
consists of a single variable.
prem(dom a, dom
b)a by b.
For details see method "pdivide".This method only exists if Vars
consists of a single variable.
random()SEED is changed by
a call of random(). Thus it is hard to create the same
random sequence twice, see random.Vars is the empty list, first a list
of 1 to 4 variables is generated randomly and the
random polynomial is generated in these indeterminates afterwards.polylib::randpoly for
polynomials.realSolve(dom a <, positive real number eps>)realSolve(a) returns intervals isolating the real
roots of the real univariate polynomial a.realSolve(a, eps) returns refined intervals
approximating the real roots of a to the relative
precision given by eps.polylib::realroots.polylib::realroots for
polynomials.This method only exists if Vars
consists of a single variable.
resultant(dom a, dom
b <, indeterminate var>)resultant(a, b) returns the resultant of
a and b with respect to their main variable,
i.e., the return value of the call
a::dom::mainvar(a).resultant(a, b, var) returns the resultant of
a and b with respect to the variable
var.FAIL.polylib::resultant for
polynomials.This method only exists if R has the
method "_divide".
ringmult(dom a, R
c)a by the coefficient ring element
c.solve(dom a <, indeterminate var> <, options>)solve(dom a <, list or
set of indeterminates vars> <, options>)solve(list or set of dom ais <, indeterminate var> <, options>)solve(list or set of dom ais <, list or set of indeterminates vars> <,
options>)solve(a, ..) tries to find the zeros of
a. It is possible to control the behavior of
solve by passing a variable or a set or list of variables
together with options.solve(ais, ..) tries to find the zeros of the
polynomial system ais. The exact behavior depends on
further arguments.solve.solve.SPolynomial(dom a, dom b <, monomial ordering
ord>)a and b with
respect to the monomial ordering ord (or w.r.t.
Order, if ord is not explicitly given).groebner::spoly.This method only exists if R is a
field, i.e., a domain of category Cat::Field, and Vars is not
the empty list.
sqrfree(dom a)a as a list
in the form [u, a1, e1, ..., an, en] which means that
a = u * a1^e1 * ... * an^en.ai are primitive and pairwise different
square-free divisors of a and represented as elements of
this domain. u is a unit of the coefficient ring and
represented as an element of this domain. The ei are
integers.polylib::sqrfree for
polynomials.This method only exists if R is a
field, i.e., a domain of category Cat::Field, or if R is
Dom::Integer.
coeff(dom a)coeff(dom a, indeterminate var, NonNegativeInteger
n)coeff(dom a, NonNegativeInteger n)coeff(a) returns a sequence with all coefficients of
a as elements of the coefficient ring R. The
coefficients are ordered according to the monomial ordering
Order.coeff(a,var,n) returns the coefficient of the term
var^n--as an element of this domain if it is of category
Cat::Polynomial(R), or
as an element of the coefficient ring R if it is of
Cat::UnivariatePolynomial(R),
where a is considered as a univariate polynomial in a
valid variable var.coeff(a,n) returns the coefficient of the term
var^n--as an element of this domain if it is of category
Cat::Polynomial(R), or
as an element of the coefficient ring R if it is of
Cat::UnivariatePolynomial(R),
where a is considered as a univariate polynomial in
var and var is the main variable of
a, i.e., the variable returned by
dom::mainvar(a).coeff for polynomials.degree(dom a)degree(dom a, indeterminate var)degree(a) returns the total degree of
a.degree(a, var) returns the degree of a
with respect to var.degree for polynomials.degreevec(dom a <, monomial ordering ord>)a with respect to the monomial ordering ord
as a list. If var1^e1 * ... * varm^em is the leading term
then the list [e1, ..., em] is returned. If
ord is not explicitely given, the ordering
Order will be used instead.degreevec for polynomials.euclideanDegree(dom a)a, which is here
simply defined as the degree of a.This method only exists if Vars
consists of a single variable.
ground(dom a)a in which no variable of
a occurs.ground for polynomials.has(dom a, any
obj)indets( <dom a>)a.Vars is not the empty list,
indets can be called without argument.indets for polynomials.lcoeff(dom a)lcoeff(dom a <, list
of indeterminates vars> <, monomial
ordering ord>)lcoeff(a) returns the leading coefficient of
a with respect to the monomial ordering Order
as an element of the coefficient ring R.lcoeff(a, ord) returns the leading coefficient of
a with respect to the monomial ordering ord
as an element of the coefficient ring R.lcoeff(a, vars <, ord>) returns the leading
coefficient of a with respect to the variable list
vars and the monomial ordering ord as an
element of this domain if it is of category Cat::Polynomial(R), or as an element
of the coefficient ring R if it is of Cat::UnivariatePolynomial(R).
ord is not explicitly given, the lexicographical
order LexOrder will be used instead.a into a polynomial in the
specified list of indeterminates vars over the coefficient
ring R and returns FAIL if this conversions fails.lcoeff for polynomials.ldegree(dom a)ldegree(dom a, indeterminate x)ldegree(a) returns the lowest total degree of the
terms of a.ldegree(a, x) returns the lowest degree of the
variable x in a.ldegree for polynomials.lmonomial(dom a <, monomial ordering ord>)lmonomial(dom a <, list of indeterminates vars> <, monomial ordering ord> <, Rem>)lmonomial(a <, ord>) returns the leading
monomial of a with respect to the monomial ordering
ord as an element of this domain. If ord is
not explicitly given, the ordering Order will be used
instead.lmonomial(a, vars <, ord>) returns the leading
monomial of a with respect to the variable list
vars and the monomial ordering ord as an
element of this domain.
ord is not explicitly given, the lexicographical
order LexOrder will be used instead.a into a polynomial in the
specified list of indeterminates vars over the coefficient
ring R and returns FAIL if this conversions fails.lmonomial(a <, vars> <, ord>, Rem) returns
the list consisting of the leading monomial and the reductum of
a with respect to the variable list vars and
the monomial ordering ord as a list of elements of this
domain.
ord is not explicitly given, the lexicographical
order LexOrder will be used instead.a into a polynomial in the
specified list of indeterminates vars over the coefficient
ring R and returns FAIL if this conversions fails.In MuPAD a monomial denotes a coefficient together with a power product as, e.g., 3x2.
lmonomial for polynomials.lterm(dom a)lterm(dom a <, list of
indeterminates vars> <, monomial ordering
ord>)lterm(a) returns the leading term of a
with respect to the monomial ordering Order as an element
of this domain.lterm(a, ord) returns the leading coefficient of
a with respect to the monomial ordering ord
as an element of this domain.lterm(a, vars <, ord>) returns the leading term
of a with respect to the variable list vars
and the monomial ordering ord as an element of this
domain.
ord is not explicitly given, the lexicographical
order LexOrder will be used instead.a into a polynomial in the
specified list of indeterminates vars over the coefficient
ring R and returns FAIL if this conversions fails.In MuPAD a term denotes a power product without a coefficient as, e.g., x2y3z.
lterm for polynomials.mainvar( <dom a>)a, i.e., the first
element of dom::orderedVariableList(a).Vars is not the empty list, mainvar
can be called without argument.mapcoeffs(dom a, function f <, sequence of arguments
e1... >)f to the coefficients of
a and returns a with the new coefficients.
mapcoeffs(a, f): f(ci) is executed for
each coefficient ci of a.mapcoeffs(a, f, e1, ..., en): f(ci, e1, ...,
en) is executed for each coefficient ci of
a with the additional arguments e1, ...,
en.mapcoeffs for polynomials.multcoeffs(dom a, R
c)a with the factor
c.multcoeffs for polynomials.nterms(dom a)a. The zero
polynomial has no terms.nterms for polynomials.nthcoeff(dom a, integer n <,monomial ordering
ord>)n-th (non-zero) coefficient of
a with respect to the monomial ordering ord.
If ord is not explicitly given, the ordering
Order will be used instead.n is larger than the number of monomials of the
polynomial then the function returns FAIL.nthcoeff returns
FAIL when invoked on the zero polynomial.nthcoeff for polynomials.nthmonomial(dom a, integer n <,monomial ordering
ord>)n-th (non-zero) monomial of a
with respect to the monomial ordering ord. If
ord is not explicitly given, the ordering
Order will be used instead.n is larger than the number of monomials of the
polynomial then the function returns FAIL.nthmonomial
returns FAIL for the zero polynomial.nthmonomial for
polynomials.nthterm(dom a, integer n <,monomial ordering
ord>)n-th (non-zero) term of a
with respect to the monomial ordering ord. If
ord is not explicitly given, the ordering
Order will be used instead.n is larger than the number of monomials of the
polynomial then the function returns FAIL.nthterm returns
FAIL when called with the zero polynomial.nthterm for polynomials.orderedVariableList( <dom
a>)Vars = [], a sorted list of all variables of
a is returned.Vars is not the empty list,
orderedVariableList can be called without an
argument.pivotSize(dom a)a as a pivot element, which is
simply the total degree of a.reductum(dom a <,monomial ordering ord>)a (i.e.,
a-lmonomial(a)) with respect to the monomial ordering
ord. If ord is not explicitly given, the
ordering Order will be used instead.tcoeff(dom a <,monomial ordering ord>)a with respect to
the monomial ordering ord. If ord is not
explicitly given, the ordering Order will be used
instead.tcoeff for polynomials.convert(any p)p to an element of this domain and returns either an
element of this domain or FAIL.expr(dom a)a of this domain into an
element of a basic domain. Thus the coefficients may no longer belong
to the coefficient ring R.expr.poly(dom a)a of this domain into an
element of the basic domain DOM_POLY.poly.TeX(dom a)a.TeXCoeff(R c)c.TeXident(indeterminate var)var.TeXTerm(dom t)t.adaptIndets( <dom a, dom b ...>)DOM_POLY with
respect to this list of indeterminates.This method only exists if the parameter
Vars is the empty list ([]).
isNeg(dom a)a and returns
TRUE if it is the minus token - and
FALSE if that is not the case or MuPAD cannot
determine that token (e.g., if a domain involved does not have this
method).mult(dom a, dom
b...)new(any p)new(list of lists lm)new(list of lists lm, list of indeterminates v)dom::new(p)
or in the form dom(p).dom(p) creates an element of this domain from a
polynomial or a polynomial expression p and returns that
element. If this is not possible, an error message is given.Vars is chosen as the empty list ([])
then in creating new elements from a polynomial or polynomial
expression the function indets is first called to get the
identifiers. Afterwards the element is created with this list of
identifiers. For creating an element from a constant the dummy variable
_dummy is introduced. The drawback of this approach is
that two mathematically equal polynomials may have variable lists which
differ by the dummy variable.dom(lm) creates, if Vars ≠
[], a polynomial from the list lm of the form
[[c1, [e11,... e1n]],... [cm,[em1,... emn]]] where the
ci are coefficients and the eij are the
exponents with respect to Vars. For a univariate
polynomial this list can be simplified to [[c1,e1],...
[cm,em]].dom(lm,v) creates, if Vars =
[], a polynomial from the list lm of the form
[[c1, [e11,... e1n]],... [cm,[em1,... emn]]] where the
ci are coefficients and the eij are the
exponents with respect to v. For a univariate polynomial
this list can be simplified to [[c1,e1],... [cm,em]]. The
list of indeterminates v must contain valid
indeterminates.plus(dom a, dom
b...)print(dom a)a. The terms are printed with
respect to the given monomial ordering Order in descending
order.print.printMonomial(R c, list
of NonNegativeIntegers d, list of
indeterminates v)c*v[1]^d[1]*.., where
d is the degree vector with respect to variable list
v.printTerm(list of NonNegativeIntegers
d)printTerm(list of NonNegativeIntegers d,
list of indeterminates v)printTerm(d) returns an ordered sequence of the
indeterminates together with their powers as given in Vars
and the degree vector d respectively.
Note that this call is only valid if Vars is not the
empty list.
printTerm(d,v) returns an ordered sequence of the
indeterminates together with their powers as given in the variable list
v and the degree vector d respectively.
Note that this call is only valid if
nops(v)=nops(d).
Rep(dom a)a.sign(dom a)a, which is 0 if a
is zero, 1 if a is either a positive constant or a
positive monomial, sign(a) if nterms(a)
> 1 and -1 otherwise. This method is currently used
within the "printMonomial" method for pretty printing
elements of this domain and is more or less intended to be an internal
procedure. It is planned to replace this method by the method
"isNeg" in future versions.
Example
1The following call creates a polynomial domain in x, y and z.
>> DP := Dom::DistributedPolynomial([x, y, z])
Dom::DistributedPolynomial([x, y, z],
Dom::ExpressionField(normal, iszero@normal), LexOrder)
Since neither the coefficient ring nor the monomial ordering was specified, this domain is created with the default values for these parameters.
It is rather easy to create elements of this domain, as e.g.
>> a := DP(x + 2*y*z + 3)
x + 2 y z + 3
>> b := DP(z^4 - 2*y^2*x^2)
2 2 4
- 2 x y + z
In contrast to expressions all elements of this domain
have a representation which is fixed by the chosen Order,
the representation of the coefficient ring R and the way
of representing monomials.
With these elements one can now perform usual arithmetic operations as, e.g., (scalar) multiplication, multiplication with integers and adding polynomials and ring elements:
>> 4*b^2 + a/3 + 1/2
4 4 2 2 4 8
16 x y - 16 x y z + 1/3 x + 2/3 y z + 4 z + 3/2
There are a lot of methods for manipulating polynomials
and to get access to all parts of a polynomial. For example one has
access to the leading monomial of a as follows:
>> lmonomial(a)
x
The leading monomial of a polynomial depends on the monomial ordering, so with respect to the degree order one gets a different result:
>> lmonomial(a, DegreeOrder)
2 y z
To get a minus its leading monomial one may
call:
>> DP::reductum(a)
2 y z + 3
Obviously the following identity holds:
>> a - lmonomial(a) - DP::reductum(a)
0
There are also methods for converting elements of this domain into other domains, like a basic polynomial domain or the domain of arbitrary expressions:
>> poly(a), domtype(poly(a))
poly(x + 2 y z + 3, [x, y, z], Dom::ExpressionField(normal,
iszero@normal)), DOM_POLY
>> expr(b), domtype(expr(b))
4 2 2
z - 2 x y , DOM_EXPR
Super-DomainDom::PolynomialExplicitDom::PolynomialExplicit."indets" now returns a set of
indeterminates."Rep", "SPolynomial",
"decompose", "dimension",
"func_call", "groebner",
"ground", "int", "makeIntegral",
"monic", "numericSolve",
"orderedVariableList", "ordering",
"realSolve", "reductum",
"resultant", "variables" were added."Factor" was removed.