[Next][Prev] [Right] [Left] [Up] [Index] [Root]

Creation of Polynomial Rings and Ideals

Subsections

Creation of Polynomial Rings

Multivariate polynomial rings are created from a coefficient ring, the number of variables, and a monomial order. If no order is specified, the monomial order is taken to be the lexicographical order. This section is briefly repeated from the section Creation of Polynomial Rings in the multivariate polynomial rings chapter, so as to show how one can set up the polynomial ring in which to create an ideal.

Please note that the Gröbner basis of an ideal with respect to the lexicographical order is often much more complicated and difficult to compute than the Gröbner basis of the same ideal with respect to other monomial orders (e.g. the grevlex order), so it may be preferable to use another order if the Gröbner basis with respect to any order is desired (see also the function EasyIdeal below). Yet the lexicographical order is the most natural order and is often the desired order so that is why it is used by default if no specific order is given.

PolynomialRing(R, n) : Rng, RngIntElt -> RngMPol
PolynomialAlgebra(R, n) : Rng, RngIntElt -> RngMPol
    Global: BoolElt                     Default: false
Create a multivariate polynomial ring in n>0 variables over the ring R. The ring is regarded as an R-algebra via the usual identification of elements of R and the constant polynomials. The lexicographical ordering on the monomials is used for this default construction (see next function).

By default, a non-global polynomial ring will be returned; if the parameter Global is set to true, then the unique global polynomial ring over R with n variables will be returned. This may be useful in some contexts, but a non-global result is returned by default since one often wishes to have several rings with the same numbers of variables but with different variable names (and create mappings between them, for example). Explicit coercion is always allowed between polynomial rings having the same number of variables (and suitable base rings), whether they are global or not, and the coercion maps the i-variable of one ring to the i-th variable of the other ring.

PolynomialRing(R, n, order) : Rng, RngIntElt, MonStgElt, ... -> RngMPol
PolynomialAlgebra(R, n, order) : Rng, RngIntElt, MonStgElt, ... -> RngMPol
Create a multivariate polynomial ring in n>0 variables over the ring R with the given order order on the monomials. See the section on monomial orders for the valid values for the argument order.

Example GB_Order (H47E1)

We show how one can construct different polynomial rings with different orders.

> Z := IntegerRing();
> // Construct polynomial ring with block elimination and a > d > b > c
> P<a,b,c,d> := PolynomialRing(Z, 4, "elim", [1, 4], [2, 3]);
> a + b + c + d;
a + d + b + c
> a + d^10 + b + c^10;
d^10 + a + c^10 + b
> a + d^10 + b + c;   
d^10 + a + b + c
> // Construct polynomial ring with weight order and x > y > z
> P<x, y, z> := PolynomialRing(Z, 3, "weight", [100,10,1, 1,10,100, 1,1,1]);
> x + y + z;
x + y + z
> (x+y^2+z^3)^4;
x^4 + 4*x^3*y^2 + 4*x^3*z^3 + 6*x^2*y^4 + 12*x^2*y^2*z^3 +
    6*x^2*z^6 + 4*x*y^6 + 12*x*y^4*z^3 + 12*x*y^2*z^6 +
    4*x*z^9 + y^8 + 4*y^6*z^3 + 6*y^4*z^6 +
    4*y^2*z^9 + z^12

Creation of Ideals and Accessing their Bases

Within the general context of ideals of polynomial rings, the term "basis" will refer to an ordered sequence of polynomials which generate an ideal. (Thus a basis can contain duplicates and zero elements so is not like a basis of a vector space.)

One normally creates an ideal by the ideal constructor, described below. But it is also possible to create an ideal with a specific basis U and then find the coordinates of polynomials from the polynomial ring with respect to U (see the function Coordinates below). This is done by specifying a user basis with the Ideal intrinsic function, not the ideal constructor. In this case, when Magma computes the Gröbner basis of the ideal (see below), extra information is stored so that polynomials of the ideal can be rewritten in terms of the original basis. However, the use of this feature makes the Gröbner basis computation much more expensive so an ideal should usually not be created with a user basis.

ideal<P | L> : RngMPol, List -> RngMPol
Given a multivariate polynomial ring P over a ring R, return the ideal of P generated by the elements of P specified by the list L. Each term of the list L must be an expression defining an object of one of the following types:
(a)
An element of P;
(b)
A set or sequence of elements of P;
(c)
An ideal of P;
(d)
A set or sequence of ideals of P.
Ideal(Q) : [ RngMPolElt ] -> RngMPol
Given a sequence Q of polynomials from a polynomial ring P over a ring R, return the ideal of P generated by the elements of Q with given user basis Q. WARNING: this function should only be used when it is desired to express polynomials of the ideal in terms of the elements of Q, as the computation of the Gröbner basis in this case is very expensive, so should be avoided if these expressions are not wanted.
Basis(I) : RngMPol -> RngMPolElt
Given an ideal I, return the current basis of I. If I has a user basis, that is returned; otherwise the current basis of I (whether it has been converted to a Gröbner basis or not -- see below) is returned.
BasisElement(I, i) : RngMPol, RngIntElt -> RngMPolElt
Given an ideal I together with an integer i, return the i-th element of the current basis of I. This the same as Basis(I)[i].

 [Next][Prev] [Right] [Left] [Up] [Index] [Root]