An R-module is ordinarily defined by creating the S-tuple module T = S^((n)), and prescribing the action of R on T. At present all modules are assumed to be right modules, but this restriction will eventually be removed. Three kinds of actions may be prescribed:
Given a ring or algebra R and a positive integer n, create the free right R-module R^((n)), consisting of all n-tuples over R. The module is created with the standard basis, e_1, ..., e_n, where e_i (i = 1, ..., n) is the vector containing a 1 in the i-th position and zeros elsewhere.The function RModule creates a module in reduced mode while RSpace creates a module in embedded mode.
Let T be the module S^((n)), where S is a commutative ring. Given a subalgebra R of M_n(S), create the right R-module M = S^((n)), where the action of r in R is given by m * r, m in M.The function RModule creates a module in reduced mode while RSpace creates a module in embedded mode.
Let T be the module S^((n)), where S is a commutative ring. Given a subalgebra R of M_n(S) generated by the terms of the sequence Q, create the right R-module M = S^((n)), where the action of r in R is given by m * r, m in M.The function RModule creates a module in reduced mode while RSpace creates a module in embedded mode.
> Z := IntegerRing(); > M := RModule(Z, 6); > M; RModule M of dimension 6 with base ring Integer Ring
[0 1 1 0 1 0] [0 0 1 1 1 1] [1 0 0 1 0 1] [0 0 0 1 0 0] [0 0 0 0 1 0] [0 0 0 0 0 1],[1 0 0 1 0 1] [0 1 0 0 1 1] [0 1 1 1 1 0] [0 0 0 1 1 0] [0 0 0 1 0 1] [0 1 0 1 0 0]
> F2 := FiniteField(2); > T := RModule(F2, 6); > F := MatrixAlgebra(F2, 6); > A := sub< F | > [ 1,0,0,1,0,1, > 0,1,0,0,1,1, > 0,1,1,1,1,0, > 0,0,0,1,1,0, > 0,0,0,1,0,1, > 0,1,0,1,0,0 ], > [ 0,1,1,0,1,0, > 0,0,1,1,1,1, > 1,0,0,1,0,1, > 0,0,0,1,0,0, > 0,0,0,0,1,0, > 0,0,0,0,0,1 ] >; > M := RModule(T, A); > T; KModule T of dimension 6 with base ring GF(2)