Given a module M with base module S^((n)), and elements a_1, ..., a_n belonging to S, construct the element m = (a_1, ..., a_n) of M. Note that if m is not an element of M, an error will result.
Given the module M with base module S^((n)), and elements a_1, ..., a_n belonging to S, construct the element m = (a_1, ..., a_n) of M. Note that if m is not an element of M, an error will result.
Given a submodule M of the module R^((n)) together with a set S of integers lying in the interval [1, n], return the characteristic number of S as a vector of R.
The zero element for the R-module M.
Given a module M defined over a finite ring or field, return a random vector.
> P<x> := PolynomialRing(IntegerRing()); > M := RModule(P, 4); > a := elt< M | 1+x, -x, 2+x, 0 >; > a; (x + 1 -x x + 2 0) > b := M ! [ 1+x+x^2, 0, 1-x^7, 2*x ]; > b; (x^2 + x + 1 0 -x^7 + 1 2*x) > zero := M ! 0; > zero; (0 0 0 0)
Given an element u belonging to the R-module M, return u in the form of a sequence Q of elements of R. Thus, if u is an element of R^((n)), then Q[i] = u[i], 1 <= i <= n, while if u is an element of R^((m x n)), then Q[(i - 1)n + j] = u[i, j], 1 <= i <= m, 1 <= j <= n.
Sum of the elements u and v, where u and v lie in the same R-module M.
Additive inverse of the element u.
Difference of the elements u and v, where u and v lie in the same R-module M.
Given an element x belonging to a ring R, and an element u belonging to the left R-module M, return the (left) scalar product x * u as an element of M.
Given an element x belonging to a ring R, and an element u belonging to the right R-module M, return the (right) scalar product u * x as an element of M.
Given a non-zero element x belonging to a field K, and an element u belonging to the right K-module M, return the scalar product u * (1/x) as an element of M.
Given a vector u belonging to an R[G]-module M, and an element g belonging to the group G, return the product of u by the representation of g in the action of the module M.
Given an element u belonging to a submodule M of the R-module R^((n)) and a positive integer i, 1 <= i <= n, return the i-th component of u (as an element of the ring R).
Given an element u belonging to a submodule M of the R-module T = R^((n)), a positive integer i, 1 <= i <= n, and an element x of the ring R, redefine the i-th component of u to be x. The parent of u is changed to T (since the modified element u need not lie in M).
The number of columns in the vector v.
The index of the first non-zero entry of the vector v (0 if none such).
(Function.) Given a vector v from a tuple module V and a submodule W of V, return the reduction of v with respect to W (that is, the canonical representative of the coset v + W).
(Procedure.) Given a vector v from a tuple module V and a submodule W of V, replace v with its reduction of with respect to W (that is, the canonical representative of the coset v + W).
Given a vector v from a tuple module V and a submodule U of V, return the unique u in U and w in the complement to U in U + <v> such that v = u + w.
The number of rows in the vector v (1 of course; included for completeness).
A set of integers giving the positions of the non-zero components of the vector u.
The number of non-zero components of the vector u.
True if the element u of the R-module M is the zero element.
The element u must belong to an R-module, where R is either a field, the ring of integers or a univariate polynomial ring over a field. Assume that the vector u is non-zero. If R is a field then Normalize returns (1/a) * u, where a is the first non-zero component of u. If R is the ring of integers, Normalize returns epsilon * u, where epsilon is +1 if the first non-zero component of u is positive, and -1 otherwise. If R is the polynomial ring K[x], K a field, then Normalize returns (1/a) * u, where a is the leading coefficient of the first non-zero (polynomial) component of u. If u is the zero vector, it is returned as the value of this function.
Given a vector u, return the vector obtained from u by rotating by k coordinate positions.
Given a vector u, destructively rotate u by k coordinate positions.
> P<x> := PolynomialRing(IntegerRing()); > M := RModule(P, 4); > a := M ! [ 1+x, -x, 2+x, 0 ]; > b := M ! [ 1+x+x^2, 0, 1-x^7, 2*x ]; > a + b; (x^2 + 2*x + 2 -x -x^7 + x + 3 2*x) > -a; (-x - 1 x -x - 2 0) > a - b; ( -x^2 -x x^7 + x + 1 -2*x) > (1-x + x^2)*a; (x^3 + 1 -x^3 + x^2 - x x^3 + x^2 - x + 2 0) > a*(1-x); ( -x^2 + 1 x^2 - x -x^2 - x + 2 0) > a[3]; x + 2 > a[3] := x - 2; > a; (x + 1 -x x - 2 0) > ElementToSequence(a - b); [ -x^2, -x, x^7 + x - 3, -2*x ] > Support(a); { 1, 2, 3 }