[Next] [Prev] [Right] [Left] [Up] [Index] [Root]
Graded Polynomial Rings

Graded Polynomial Rings

It is possible within Magma to assign weights to the variables of a multivariate polynomial ring. This means that monomials of the ring then have a weighted degree with respect to the weights of the variables. Such a multivariate polynomial ring is called graded or weighted. A polynomial of the ring whose monomials all have the same weighted degree is called homogeneous. The polynomial ring can be decomposed as the direct sum of graded homogeneous components.

Suppose a polynomial ring P has n variables x_1, ..., x_n and the weights for the variables are d_1, ..., d_n respectively. Then for a monomial m = x_1^(e_1) ... x_n^(e_n) of P (with e_i >= 0 for 1 <= i <= n), the weighted degree of m is defined to be sum_(i=1)^(n) e_i d_i.

A polynomial ring created without a specific weighting (using the default version of the PolynomialRing function or similar) has weight 1 for each variable so the weighted degree coincides with the total degree.

The following functions allow one to create and operate on elements of polynomial rings with specific weights for the variables.

PolynomialRing(R, Q) : Rng, [ RngIntElt ] -> RngMPol
PolynomialAlgebra(R, Q) : Rng, [ RngIntElt ] -> RngMPol
Given a ring R and a non-empty sequence Q of positive integers, create a multivariate polynomial ring in n=#Q indeterminates over the ring R with the weighted degree of the i-th indeterminate set to be Q[i] for each i. The rank n of the polynomial is determined by the length of the sequence Q. (The angle bracket notation can be used to assign names to the indeterminates, just like in the usual invocation of the PolynomialRing function.)
VariableWeights(P) : RngMPol -> [ RngIntElt ]
Given a graded polynomial ring P (or an ideal thereof), return the variable weights of P as a sequence of n integers where n is the rank of P. If P was constructed without specific weights, the sequence containing n copies of the integer 1 is returned.
WeightedDegree(f) : RngMPolElt -> RngIntElt
Given a polynomial f of the graded polynomial ring P, this function returns the weighted degree of f, which is the maximum of the weighted degrees of all monomials that occur in f. The weighted degree of a monomial m depends on the weights assigned to the variables of the polynomial ring P -- see the introduction of this section for details. Note that this is different from the total degree of f which ignores any weights.
IsHomogeneous(f) : RngMPolElt -> BoolElt
Given a polynomial f of the graded polynomial ring P, this function returns whether f is homogeneous with respect to the weights on the variables of P (i.e., whether the weighted degrees of the monomials of f are all equal).
IsHomogeneous(I) : RngMPol -> BoolElt
Given an ideal I of the graded polynomial ring P, this function returns whether I is homogeneous with respect to the weights on the variables of P (i.e., whether I possesses a basis consisting of homogeneous polynomials alone).

Example RngMPol_Graded (H29E22)

We create a simple graded polynomial ring and perform various simple operations on it.

> P<x, y, z> := PolynomialRing(RationalField(), [1, 2, 4]);
> print P;
Graded Polynomial ring of rank 3 over Rational Field
Lexicographical Order
Variables: x, y, z
Variable weights: 1 2 4
> print VariableWeights(P);
[ 1, 2, 4 ]
> print WeightedDegree(x);
1
> print WeightedDegree(y);
2
> print WeightedDegree(z);
4
> print WeightedDegree(x^2*y*z^3);
16
> print TotalDegree(x^2*y*z^3);
6
> print IsHomogeneous(x);
true
> print IsHomogeneous(x + y);
false
> print IsHomogeneous(x^2 + y);
true
> I := ideal<P | y^2 + 2*x^2*y, (x^4 + z)^2, x + y, x^2 + x>;
> print IsHomogeneous(I);
true

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