Submodules

Submodules

AbstractAlgebra allows the construction of submodules/subvector spaces of AbstractAlgebra modules. These are given as the submodule generated by a finite list of elements in the original module.

As well as implementing the entire Module interface, AbstractAlgebra submodules also provide the following interface.

Constructors

Submodule(m::Module{T}, gens::Vector{ModuleElem{T}}) where T <: RingElement

Return the submodule S of the module m generated by the given generators, given as elements of m, and a map which is the canonical injection from S to m.

Subspace(m::Module{T}, gens::Vector{ModuleElem{T}}) where T <: FieldElement

Return the subspace of the vector space m generated by the given generators, given as elements of m, and a map which is the canonical injection from S to m.

Examples

M = FreeModule(ZZ, 2)

m = M([ZZ(1), ZZ(2)])
n = M([ZZ(2), ZZ(-1)])

N, f = Submodule(M, [m, n])

v = N([ZZ(3), ZZ(4)])
v2 = f(v)

V = VectorSpace(QQ, 2)

m = V([QQ(1), QQ(2)])
n = V([QQ(2), QQ(-1)])

N, f = Subspace(V, [m, n])

Functionality for submodules

In addition to the Module interface, AbstractAlgebra submodules implement the following functionality.

Basic manipulation

supermodule(M::Submodule{T}) where T <: RingElement

Return the module that this module is a submodule of.

Examples

M = FreeModule(ZZ, 2)
m = M([ZZ(2), ZZ(3)])
n = M([ZZ(1), ZZ(4)])
N = Submodule(M, [m, n])

supermodule(N) == M