AUTHORS:
Bases: sage.categories.morphism.Morphism
A set-theoretic map between matrix groups.
Bases: sage.groups.matrix_gps.matrix_group_morphism.MatrixGroupMorphism
Some python code for wrapping GAP’s GroupHomomorphismByImages function but only for matrix groups. Can be expensive if G is large. Returns “fail” if gens does not generate self or if the map does not extend to a group homomorphism, self - other.
TODO: what does it mean to return fail? It’s a constructor for a class.
EXAMPLES:
sage: F = GF(5); MS = MatrixSpace(F,2,2)
sage: G = MatrixGroup([MS([1,1,0,1])])
sage: H = MatrixGroup([MS([1,0,1,1])])
sage: phi = G.hom(H.gens())
sage: phi
Homomorphism : Matrix group over Finite Field of size 5 with 1 generators:
[[[1, 1], [0, 1]]] --> Matrix group over Finite Field of size 5 with 1 generators:
[[[1, 0], [1, 1]]]
sage: phi(MS([1,1,0,1]))
[1 0]
[1 1]
sage: F = GF(7); MS = MatrixSpace(F,2,2)
sage: F.multiplicative_generator()
3
sage: G = MatrixGroup([MS([3,0,0,1])])
sage: a = G.gens()[0]^2
sage: phi = G.hom([a])
J must be a subgroup of G. Computes the subgroup of H which is the image of J.
EXAMPLES:
sage: F = GF(7); MS = MatrixSpace(F,2,2)
sage: F.multiplicative_generator()
3
sage: G = MatrixGroup([MS([3,0,0,1])])
sage: a = G.gens()[0]^2
sage: phi = G.hom([a])
sage: phi.image(G.gens()[0])
'[ [ Z(7)^2, 0*Z(7) ], [ 0*Z(7), Z(7)^0 ] ]'
sage: H = MatrixGroup([MS(a.list())])
sage: H
Matrix group over Finite Field of size 7 with 1 generators:
[[[2, 0], [0, 1]]]
sage: phi.image(H)
'Group([ [ [ Z(7)^4, 0*Z(7) ], [ 0*Z(7), Z(7)^0 ] ] ])'
EXAMPLES:
sage: F = GF(7); MS = MatrixSpace(F,2,2)
sage: F.multiplicative_generator()
3
sage: G = MatrixGroup([MS([3,0,0,1])])
sage: a = G.gens()[0]^2
sage: phi = G.hom([a])
sage: phi.kernel()
'Group([ [ [ Z(7)^3, 0*Z(7) ], [ 0*Z(7), Z(7)^0 ] ] ])'
sage: phi.image(G.gens()[0])
'[ [ Z(7)^2, 0*Z(7) ], [ 0*Z(7), Z(7)^0 ] ]'