An ambient free module M=Rk is created by giving the base ring R (see introduction above), the degree r or a sequence W of r integers for the column weights, and, optionally, an argument specifying the type of module monomial order.
The following functions create ambient embedded modules.
Given a ring R, create the ambient embedded module Rk with the default TOP module monomial order.
Given a ring R, create the ambient embedded module Rk with the module monomial order described by the given order order. See Section Monomial Orders for the valid values for order.
Given a ring R and a sequence W of k integers, create the ambient embedded module Rk with column weights given by W and with the TOPW module monomial order with weights W.
Given a ring R and a sequence W of k integers, create the ambient embedded module Rk with column weights given by W and with the module monomial order described by the given order order. See Section Monomial Orders for the valid values for order.
The following functions create reduced modules, which are always ambient.
Given a ring R, create the reduced module Rk with zero column weights.
Given a ring R and a sequence W of k integers, create the reduced module Rk with column weights given by W.
Given a ring R, create the reduced graded module Rk with zero column weights. The resulting module has type ModMPolGrd, so submodules and quotient modules of it may only be generated by homogeneous elements.Note also that in general it is preferable if possible that the base ring R has a degree ordering (such as the grevlex or grevlexw orders) so that associated Gröbner bases of derived modules will be easier to compute.
Given a ring R and a sequence W of k integers, create the reduced graded module Rk with column weights given by W. The resulting module has type ModMPolGrd, so submodules and quotient modules of it may only be generated by homogeneous elements.
Given an R-module M, where R=K[x1, ..., xn] for a field K, return the corresponding S-module M< x1, ..., xn >, where S=K[x1, ..., xn]< x1, ..., xn > is the localization of R. See Chapter LOCAL POLYNOMIAL RINGS for more information.
The following functions access simple defining invariants of a module M.
Given a module M, return the ambient (or generic) module A in which M is embedded. The only case in which A differs from M is when M is a proper submodule of an ambient embedded module. So if M is reduced, A will always equal M.
Given a module M, return whether M is ambient.
Given a module M, return whether M is embedded.
Given a module M, return whether M is reduced.
Given a module M, return whether M is a root (an independent module, not derived via sub- or quotient constructions from another module).
Given an R-module M, return the base ring R over which M is defined. Note that one can then call BaseRing(R) to obtain the underlying ring S in which the base coefficients of elements R lie.
Given an R-module M, return the degree of M, which is the k such that the ambient module of M equals Rk/< relations >. Note that if M is free and ambient, then the degree of M equals the rank of M, but otherwise in general the rank of M may be less than the degree of M (see the function Rank below).
Given a module M of degree k, return the grading of M, which is a sequence of k integers giving the grading on the columns of M.
Given an R-module M of degree k, return the submodule of the embedded module Rk which is generated by the defining relations of M.
Given an R-module M of degree k, return the defining relations of M as a sorted sequence of elements of the embedded module Rk.
Given a module M, return the relation matrix of M, which is the matrix whose rows are the defining relations of M.
Given an R-module M, return the presentation module P of M. This is a reduced module isomorphic to M (and such that automatic coercion between M and P is allowed). If M is reduced, then P is identical to M.
Given a module M, return whether M is graded (or equivalently, homogeneous), w.r.t. the grading of M (given by the weights on the columns of M and the variables of the base ring of M). This is true iff the Gröbner basis of M consists of homogeneous elements only (always true if M is reduced) and the Gröbner basis of the relation module of M consists of homogeneous elements alone. Note that a module of type ModMPolGrd is always graded.
Module elements (internally, multivariate polynomials with columns attached to the monomials) are constructed in general by giving a sequence or vector of elements from the coefficient ring R.
Suppose M is an R-module of degree r. Given a sequence Q = [a1, ..., ar] of ring elements such that the ai are coercible into R, construct the element of M corresponding to Q.
Suppose M is an R-module of degree r. Given a vector v from the R-space Rr, construct the element of M corresponding to v.
Create the zero element of the module M.
Suppose M is an R-module of degree r. Given an integer i in the range [1 .. r], construct the i-th unit vector of M (the vector with 1 in the i-th column and 0 elsewhere) whose parent is the ambient module of M (since it may not lie in M itself). Note that this not the same as the function BasisElement (below) which depends on the current basis of M.
The following functions allow simple access and operations on module elements. Some of them use the module structure and refer to the column structure of an element; others use the polynomial structure and ignore the column structure.
Given an element f of the R-module of degree r, return the sequence [f1, ..., fr] of r elements from R corresponding to f.
Given an element f of the module M over R and of degree r, return the element of the R-space of degree r over R corresponding to f.
Given an element f of the R-module of degree r, together with an integer i in the range [1 .. r], return the i-th component of f as an element of R.
The following functions act on elements of R-modules. The operations are similar to those for multivariate polynomials or vectors, whenever meaningful. For the binary operations, the elements must be compatible; that is, their parents must have the same ambient module. Note that if quotient relations for M are present, then the result is reduced to the unique normal form modulo the quotient relations, but if the determination of the relations is delayed, then an element may have a non-unique representation, but all the predicates on elements below do not depend on the representation.
Basic arithmetic operations. The element r lies in the base ring R.
Given a scalar ring element s and an element f of the module M, such that s is coercible into R s divides all components of f, return the quotient of f by s.
Given elements f and g of the module M such that the leading module monomials of f and g have the same column, return the S-polynomial of f and g. Note that the result is always reduced to the unique normal form modulo the quotient relations of M.
Given an element f of the module M, return the normalized form of f (so that the leading module monomial of f is normalized).
Given an element f of the module M, together with a compatible module S, return the normal form of f with respect to S. This is unique if the base ring R is not local. In general, S will be a non-ambient embedded module for this to be useful (otherwise any f would already be in S so the result would always be zero).
Given an element f of the R-module S, together with a compatible R-module M such that f is in M, return the coordinates of f with respect to the basis of M (whose components lie in R).
The following functions access simple properties of module elements which are to do with the underlying representation.
These functions are equivalent to the access functions for multivariate polynomials and access the underlying distributed polynomial representation (with columns added to the monomials); see Section Coefficients, Monomials and Terms for details.
Given a single-term element f of a module M, return the column c of the single monomial-column pair (module monomial) s[c] which f has.
Given an element f of a module M, return the weighted degree (abbreviated to `degree' in this chapter) of f, which is the maximum of the weighted degrees of the monomial-column pairs of f. The weighted degree of a monomial-column s[c] is the weighted degree of s (in the base ring R) plus the degree of column c in the grading of M.
Given an element f of a module M, return whether f is homogeneous; that is, whether the weighted degrees of all the monomial-columns of f are equal. (Note that the grading of M is thus significant.)
Given an element f of the module M, return whether f is the zero element of M. Note that if the relations of M are non-zero this operation may be non-trivial (especially if the relations are not yet computed, but they will be automatically computed if needed).
Given elements f and g of the module M, return whether f and g are equal. Note that this may be non-trivial (see the remarks above).
Given elements f and g of the module M, return whether f < g w.r.t. the underlying module monomial order. The operators le, gt, ge are similarly defined.
Given an element f of a module S together with a compatible module M, return whether f is in M.
> R<x,y,z> := PolynomialRing(RationalField(), 3, "grevlex"); > M := EModule(R, 3); > M; Free Embedded Module R^3 Order: Module TOP: Graded Reverse Lexicographical > f := M![x, y, z^2]; > g := M![z, y^3, x + 1]; > f; [x, y, z^2] > g; [z, y^3, x + 1] > f + g; [x + z, y^3 + y, z^2 + x + 1] > Terms(f); [ [0, 0, z^2], [x, 0, 0], [0, y, 0] ] > Degree(f); 2 > [Degree(m): m in Monomials(f)]; [ 2, 1, 1 ] > LeadingMonomial(f); [0, 0, z^2] > M2 := EModule(R, [10, 5, 1]); Free Embedded Module R^3 with grading [10, 5, 1] Order: Module TOP with column weights [10, 5, 1]: Graded Reverse Lexicographical > f := M2![x, y, z^2]; > f; [x, y, z^2] > Terms(f); [ [x, 0, 0], [0, y, 0], [0, 0, z^2] ] > Degree(f); 11 > [Degree(m): m in Monomials(f)]; [ 11, 6, 3 ]Similar operations can be done with reduced modules. There is no difference for the elements.
> M := RModule(R, 3); > M; Free RModule R^3 > M := GradedModule(R, [10, 5, 1]); > M; Free Graded Module R^3 with grading [10, 5, 1] > Grading(M); [ 10, 5, 1 ] > f := M![x, y^6, z^10]; > f; [x, y^6, z^10] > IsHomogeneous(f); true