Module Homomorphisms
Abstract Algebra provides homomorphisms of finitely presented modules.
Generic module homomorphism types
AbstractAlgebra defines two module homomorphism types, namely Generic.ModuleHomomorphism
and Generic.ModuleIsomorphism
. Functionality for these is implemented in src/generic/ModuleHomomorphism.jl
.
Abstract types
The Generic.ModuleHomomorphism
and Generic.ModuleIsomorphism
types inherit from Map(FPModuleHomomorphism)
.
Generic functionality
The following generic functionality is provided for module homomorphisms.
Constructors
Homomorphisms of AbstractAlgebra modules, , can be represented by matrices over .
ModuleHomomorphism
— MethodModuleHomomorphism(M1::FPModule{T},
M2::FPModule{T}, m::MatElem{T}) where T <: RingElement
Create the homomorphism represented by the matrix .
ModuleIsomorphism
— MethodModuleIsomorphism(M1::FPModule{T}, M2::FPModule{T}, M::MatElem{T},
minv::MatElem{T}) where T <: RingElement
Create the isomorphism represented by the matrix . The inverse morphism is automatically computed.
Examples
julia> M = free_module(ZZ, 2)
Free module of rank 2 over integers
julia> f = ModuleHomomorphism(M, M, matrix(ZZ, 2, 2, [1, 2, 3, 4]))
Module homomorphism
from free module of rank 2 over integers
to free module of rank 2 over integers
julia> m = M([ZZ(1), ZZ(2)])
(1, 2)
julia> f(m)
(7, 10)
They can also be created by giving images (in the codomain) of the generators of the domain:
ModuleHomomorphism(M1::FPModule{T}, M2::FPModule{T}, v::Vector{<:FPModuleElem{T}}) where T <: RingElement
Kernels
kernel
— Methodkernel(f::ModuleHomomorphism{T}) where T <: RingElement
Return a pair K, g
consisting of the kernel object of the given module homomorphism (as a submodule of its domain) and the canonical injection from the kernel into the domain of .
Examples
julia> M = free_module(ZZ, 3)
Free module of rank 3 over integers
julia> m = M([ZZ(1), ZZ(2), ZZ(3)])
(1, 2, 3)
julia> S, f = sub(M, [m])
(Submodule over integers with 1 generator and no relations, Hom: S -> M)
julia> Q, g = quo(M, S)
(Quotient module over integers with 2 generators and no relations, Hom: M -> Q)
julia> kernel(g)
(Submodule over integers with 1 generator and no relations, Hom: submodule over integers with 1 generator and no relations -> M)
Images
image
— Methodimage(f::Map(FPModuleHomomorphism))
Return a pair I, g
consisting of the image object of the given module homomorphism (as a submodule of its codomain) and the canonical injection from the image into the codomain of
M = free_module(ZZ, 3)
m = M([ZZ(1), ZZ(2), ZZ(3)])
S, f = sub(M, [m])
Q, g = quo(M, S)
K, k = kernel(g)
image(compose(k, g))
Preimages
preimage
— Methodpreimage(f::Map(FPModuleHomomorphism),
v::FPModuleElem{T}) where T <: RingElement
Return a preimage of under the homomorphism , i.e. an element of the domain of that maps to under . Note that this has no special mathematical properties. It is an element of the set theoretical preimage of the map as a map of sets, if one exists. The preimage is neither unique nor chosen in a canonical way in general. When no such element exists, an exception is raised.
M = free_module(ZZ, 3)
m = M([ZZ(1), ZZ(2), ZZ(3)])
S, f = sub(M, [m])
Q, g = quo(M, S)
m = rand(M, -10:10)
n = g(m)
p = preimage(g, n)
Inverses
Module isomorphisms can be cheaply inverted.
inv
— MethodBase.inv(f::Map(ModuleIsomorphism))
Return the inverse map of the given module isomorphism. This is computed cheaply.
M = free_module(ZZ, 2)
N = matrix(ZZ, 2, 2, BigInt[1, 0, 0, 1])
f = ModuleIsomorphism(M, M, N)
g = inv(f)