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 module M over P and of degree r, return the sequence [f_1, ..., f_r] of r elements from P corresponding to f.
Given an element f of the module M over P and of degree r, together with an integer i in the range [1 .. r], return the i-th component of f as an element of P.
Given elements f and g of the module M, return the sum f + g of f and g. Note that the result is always reduced to the unique normal form modulo the quotient relations of M.
Given elements f and g of the module M, return the difference f - g 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 negation -f of f.
Given a scalar ring element s and an element f of the module M, such that s is coercible into the coefficient ring of M, return the element sf.
Given a scalar ring element s and an element f of the module M, such that s is coercible into the coefficient ring of M, return the element fs.
Given a scalar ring element s and an element f of the module M, such that s is coercible into the coefficient ring of M and s divides all components of f, return the quotient of f by s.
(Procedure.) Given a scalar ring element s and an element f of the module M, such that s is coercible into the coefficient ring of M and s divides all components of f, replace f by the quotient of f by s.
Given elements f and g of the module M such that the leading 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 whether f is the zero element of M.
Given elements f and g of the module M, return whether f and g are equal.
Given an element f of a module S together with a compatible module M, return whether f is in M.
Given an element f of the module M, return the normalized form of f (so that the leading monomial of f is monic).
Given an element f of the module S, together with a compatible module M, return the normal form of f with respect to M.
Given an element f of the module S, together with a compatible module M such that f is in M, return the coordinates of f with respect to the basis of M (whose components lie in the coefficient ring of M).
> P<x, y, z> := PolynomialRing(RationalField(), 3); > M := Module(P, 3); > a := M ! [1, x, y]; > b := M ! [x, y, z]; > a; (1 x y) > b; (x y z) > a + b; (x + 1 x + y y + z) > z*a; ( z x*z y*z) > Eltseq(z * a + b); [ x + z, x*z + y, y*z + z ]