up previous next
4.9.1 Introduction to Polynomials

An object of type POLY in CoCoA represents a polynomial. To fix
terminology: a polynomial is a sum of terms; each term is the product
of a coefficient and powerproduct, a powerproduct being a product of
powers of indeterminates. (In English it is standard to use
monomial
to mean a powerproduct, however, in other languages, such as Italian,
monomial connotes a power product multiplied by a scalar. In the
interest of world peace, we will use the term powerproduct in those
cases where confusion may arise.)
The following are CoCoA polynomials:
Use R ::= QQ[x,y,z];
F := 3xyz + xy^2;
F;
xy^2 + 3xyz

Use R ::= QQ[x[1..5]];
Sum([x[N]^2  N In 1..5]);
x[1]^2 + x[2]^2 + x[3]^2 + x[4]^2 + x[5]^2


CoCoA always keeps polynomials ordered with respect to the
termorderings of their corresponding rings.
The following algebraic operations on polynomials are supported:
F^N, +F, F, F*G, F/G if G divides F, F+G, FG,
where F, G are polynomials and N is an integer. The result may be a
rational function.
Use R ::= QQ[x,y,z];
F := x^2+xy;
G := x;
F/G;
x + y

F/(x+z);
(x^2 + xy)/(x + z)

F^2;
x^4 + 2x^3y + x^2y^2

F^(1);
1/(x^2 + xy)

