Polynomials are the commonly used algebraic types in symbolic
computation. Interactive users of FriCAS generally only see
one type of polynomial:
Polynomial(R). This type represents polynomials
in any number of unspecified variables over a particular coefficient
domain R. This type represents its coefficients sparsely: only terms
with non-zero coefficients are represented.
In building applications, many other kinds of polynomial representations are useful. Polynomials may have one variable or multiple variables, the variables can be named or unnamed, the coefficients can be stored sparsely or densely. So-called distributed multivariate polynomials store polynomials as coefficients paired with vectors of exponents. This type is particularly efficient for use in algorithms for solving systems of non-linear polynomial equations.
The polynomial constructor most familiar to the interactive user is
(x^2 - x*y^3 +3*y)^2
Type: Polynomial Integer
If you wish to restrict the variables used,
provides polynomials in one variable.
p: UP(x,INT) := (3*x-1)^2 * (2*x + 8)
MultivariatePolynomial provides polynomials in one or
more specified variables.
m: MPOLY([x,y],INT) := (x^2-x*y^3+3*y)^2
You can change the way the polynomial appears by modifying the variable ordering in the explicit list.
m :: MPOLY([y,x],INT)
The constructor DistributedMultivariatePolynomial provides polynomials in one or more specified variables with the monomials ordered lexicographically.
m :: DMP([y,x],INT)
The constructor HomogeneousDistributedMultivariatePolynomial is similar except that the monomials are ordered by total order refined by reverse lexicographic order.
m :: HDMP([y,x],INT)
More generally, the domain constructor
GeneralDistributedMultivariatePolynomial allows the user to provide an
arbitrary predicate to define his own term ordering. These last three
constructors are typically used in Gröbner basis applications and when a
flat (that is, non-recursive) display is wanted and the term ordering is
critical for controlling the computation.