This chapter describes multivariate polynomial rings in Magma. A multivariate polynomial ring in any number of variables n≥1 can be created over an arbitrary coefficient ring R, and we will denote it by P=R[x1, ..., xn]. Certain functions, however, will only apply for coefficient rings satisfying certain conditions.
Magma contains a powerful system for computing with ideals of multivariate polynomial rings. This is based on the construction of Gröbner bases of such ideals. This chapter only deals with polynomial rings and operations on their elements; see Chapter GRÖBNER BASES for the details concerning ideals and Gröbner bases.
Permutation and matrix groups have a natural action on multivariate polynomial rings. This leads to the subject of invariant rings of finite groups, which is covered in Chapter INVARIANT THEORY. See also the chapters on affine algebras (Chapter AFFINE ALGEBRAS) and on modules over affine algebras (Chapter MODULES OVER MULTIVARIATE RINGS).
Let P be the polynomial ring R[x1, ..., xn] of rank n over a ring R. A monomial (or power product) of P is a product of powers of the variables of P, that is, an expression of the form x1e1 ... xnen with ei ≥0 for 1 ≤i ≤n. Multivariate polynomials in Magma are stored efficiently in distributive form, using arrays of coefficient-monomial pairs, where the coefficient is in the base ring R. The word `term' will always refer to a coefficient multiplied by a monomial.
Various orders can be applied to the monomials, and these are of great importance when dealing with Gröbner bases. A polynomial ring in Magma may defined with a certain monomial order, but as this does not affect the basic arithmetic operations in the polynomial ring, these orders are not described here but in the chapter dealing with Gröbner bases (see Section Representation and Monomial Orders).
Since V2.7 (June 2000), a new generalized monomial representation has been developed, which uses differing byte sizes for monomials depending on the size of the monomials encountered. Monomial overflow is rigorously detected, and the system automatically extends the byte size of the monomials in the background if possible. Thus there is no need for the user to know beforehand the maximum degree which may occur, and much memory is also saved for low- to medium-degree computations. The total degree of any monomial may now be anything up to 230 - 1 = 1073741823.
It is possible but not advised to use distributive `multivariate' polynomials in one single variable. (See Chapter UNIVARIATE POLYNOMIAL RINGS which devoted to univariate polynomial rings.)