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
AbstractAlgebra.Submodule
— Method.Submodule(m::Module{T}, gens::Vector{ModuleElem{T}}) where T <: RingElement
Return the submodule
S
of the modulem
generated by the given generators, given as elements ofm
, and a map which is the canonical injection fromS
tom
.
AbstractAlgebra.Subspace
— Method.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 ofm
, and a map which is the canonical injection fromS
tom
.
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
AbstractAlgebra.Generic.supermodule
— Method.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