[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.
LeadingWeightedDegree(f) : RngMPolElt -> RngIntElt
Given a polynomial f of the graded polynomial ring P, this function returns the leading weighted degree of f, which is the weighted degree of the leading monomial of 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.
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).
HomogeneousComponent(f, d) : RngMPolElt, RngIntElt -> RngMPolElt
Given a polynomial f of the graded polynomial ring P, this function returns the weighted degree-d homogeneous component of f which is the sum of all the terms of f whose monomials have weighted degree d. d must be greater than or equal to 0. If f has no terms of weighted degree d, then the result is 0.
HomogeneousComponents(f) : RngMPolElt -> [ RngMPolElt ]
Given a polynomial f of the graded polynomial ring P, this function returns the weighted degree-d homogeneous component of f which is the sum of all the terms of f whose monomials have weighted degree d. d must be greater than or equal to 0. If f has no terms of weighted degree d, then the result is 0.
MonomialsOfDegree(P) : RngMPolElt -> {@ RngMPolElt @}
Given a polynomial ring P and a non-negative integer d, return an indexed set consisting of all monomials in P with total degree d. If P is graded, the grading is ignored.
MonomialsOfWeightedDegree(P) : RngMPolElt -> {@ RngMPolElt @}
Given a graded polynomial ring P and a non-negative integer d, return an indexed set consisting of all monomials in P with weighted degree d. If P has the trivial grading, then this function is equivalent to the function MonomialsOfDegree.

Example RngMPol_Graded (H29E24)

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

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

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