Univariate polynomial rings may be defined over any ring R. Let us denote the univariate polynomial ring in indeterminate x over the coefficient ring R by P=R[x].
There are two kinds of polynomials in Magma: univariate polynomials, represented as vectors of coefficients; and multivariate polynomials represented in distributive form (linear sums of coefficient-monomial pairs). In this chapter we discuss univariate polynomials.
The vector representation enables fast arithmetic on univariate polynomials, but it requires considerable amounts of memory for multivariate polynomials; therefore, only univariate polynomial rings using the vector representation can be created directly (but, if one insists, it is possible to create univariate polynomial rings over univariate polynomial rings, etc.). Multivariate polynomials can be stored efficiently in distributive form, but the arithmetic operations on polynomials of one variable stored in this way may be considerably slower.