up previous next
2.11.1 Introduction to RINGELEM

An object of type RINGELEM in CoCoA represents an element of a ring.
To fix terminology about polynomials (elements of a polynomial ring):
a polynomial is a sum of terms; each term is the product of a
coefficient and powerproduct, and a powerproduct is 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
powerproduct multiplied by a scalar. In the interest of world peace, we
will use the term powerproduct in those cases where confusion may arise.
/**/ use P ::= QQ[x,y,z];
/**/ f := 3*x*y*z + x*y^2;
/**/ f;
x*y^2 + 3*x*y*z

/**/ use P ::= 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 +x*y;
/**/ G := x;
/**/ F/G;
x + y
 /**/ F/(x+z); > !!! ERROR !!! as expected: Inexact division
/**/ F^2;
x^4 +2*x^3*y +x^2*y^2
