CurrentModule = AbstractAlgebra
DocTestSetup = quote
using AbstractAlgebra
end
AbstractAlgebra allows the construction of quotient modules/spaces of AbstractAlgebra modules over euclidean domains. These are given as the quotient of a module by a submodule of that module.
We define two quotient modules to be equal if they are quotients of the
same module
AbstractAlgebra implements the generic quotient module type
Generic.QuotientModule{T}
where T
is the element type of the base ring,
in src/generic/QuotientModule.jl
.
Elements of generic quotient modules have type Generic.QuotientModuleElem{T}
.
Quotient module types belong to the FPModule{T}
abstract type and their
elements to FPModuleElem{T}
.
quo(M::FPModule{T}, v::Generic.Submodule{T}) where T <: RingElement
Note that a preimage of the canonical projection can be obtained using the preimage function described in the section on module homomorphisms. Note that a preimage element of the canonical projection is not unique and has no special properties.
Examples
julia> M = free_module(ZZ, 2)
Free module of rank 2 over integers
julia> m = M([ZZ(1), ZZ(2)])
(1, 2)
julia> N, f = sub(M, [m])
(Submodule over integers with 1 generator and no relations, Hom: submodule over integers with 1 generator and no relations -> free module of rank 2 over integers)
julia> Q, g = quo(M, N)
(Quotient module over integers with 1 generator and no relations, Hom: free module of rank 2 over integers -> quotient module over integers with 1 generator and no relations)
julia> p = M([ZZ(3), ZZ(1)])
(3, 1)
julia> v2 = g(p)
(-5)
julia> V = vector_space(QQ, 2)
Vector space of dimension 2 over rationals
julia> m = V([QQ(1), QQ(2)])
(1//1, 2//1)
julia> N, f = sub(V, [m])
(Subspace over rationals with 1 generator and no relations, Hom: subspace over rationals with 1 generator and no relations -> vector space of dimension 2 over rationals)
julia> Q, g = quo(V, N)
(Quotient space over rationals with 1 generator and no relations, Hom: vector space of dimension 2 over rationals -> quotient space over rationals with 1 generator and no relations)
In addition to the Module interface, AbstractAlgebra submodules implement the following functionality.
supermodule(M::Generic.QuotientModule{T}) where T <: RingElement
dim(N::Generic.QuotientModule{T}) where T <: FieldElement
Examples
julia> M = free_module(ZZ, 2)
Free module of rank 2 over integers
julia> m = M([ZZ(2), ZZ(3)])
(2, 3)
julia> N, g = sub(M, [m])
(Submodule over integers with 1 generator and no relations, Hom: submodule over integers with 1 generator and no relations -> free module of rank 2 over integers)
julia> Q, h = quo(M, N)
(Quotient module over integers with 2 generators and relations:
[2 3], Hom: free module of rank 2 over integers -> quotient module over integers with 2 generators and relations:
[2 3])
julia> supermodule(Q) == M
true
julia> V = vector_space(QQ, 2)
Vector space of dimension 2 over rationals
julia> m = V([QQ(1), QQ(2)])
(1//1, 2//1)
julia> N, f = sub(V, [m])
(Subspace over rationals with 1 generator and no relations, Hom: subspace over rationals with 1 generator and no relations -> vector space of dimension 2 over rationals)
julia> Q, g = quo(V, N)
(Quotient space over rationals with 1 generator and no relations, Hom: vector space of dimension 2 over rationals -> quotient space over rationals with 1 generator and no relations)
julia> dim(V)
2
julia> dim(Q)
1