Module Elements
Construction
- elt< M | a₁, ..., aₙ >: ModRng, List -> ModRngElt
Given a module \(M\) with underlying vector space \(K^{(n)}\), and elements \(a_1, \ldots, a_n\) belonging to \(K\), construct the element \(m = (a_1, \ldots, a_n)\) of \(M\). Note that if \(m\) is not an element of \(M\), an error will result.
- M ! Q: ModRng, [RngElt] -> ModRngElt
Given the module \(M\) with underlying vector space \(K^n\), and a sequence \(Q = [a_1, \ldots, a_n]\) with universe \(K\), construct the element \(m = (a_1, \ldots, a_n)\) of \(M\). Note that if \(m\) is not an element of \(M\), an error will result.
Deconstruction of Module Elements
Action of the Algebra on the Module
Arithmetic with Module Elements
- u + v: ModRngElt, ModRngElt -> ModRngElt
Sum of the elements \(u\) and \(v\), where \(u\) and \(v\) lie in the same \(A\)-module \(M\).
- u - v: ModRngElt, ModRngElt -> ModRngElt
Difference of the elements \(u\) and \(v\), where \(u\) and \(v\) lie in the same \(A\)-module \(M\).
- k * u: RngElt, ModRngElt -> ModRngElt
Given an element \(u\) in an \(A\)-module \(M\), where \(A\) is a \(K\)-algebra and an element \(k \in K\), return the scalar product \(k * u\) as an element of \(M\).
Indexing
- u[i]: ModRngElt, RngIntElt -> RngElt
Given an element \(u\) belonging to a submodule \(M\) of the \(R\)-module \(R^{(n)}\) and a positive integer \(i\), \(1 \leq i\leq n\), return the \(i\)-th component of \(u\) (as an element of the ring \(R\)).
- u[i] := x: ModRngElt, RngIntElt, RngElt -> ModRngElt
Given an element \(u\) belonging to a submodule \(M\) of the \(R\)-module \(T = R^{(n)}\), a positive integer \(i\), \(1 \leq i\leq 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\)).