AUTHORS:
A set-theoretic map between matrix groups.
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])
Some python code for wrapping GAP’s Images function for a matrix group G. Returns an error if g is not in G.
EXAMPLES:
sage: F = GF(5); MS = MatrixSpace(F,2,2)
sage: g = MS([1,1,0,1])
sage: G = MatrixGroup([g])
sage: phi = G.hom(G.gens())
sage: phi(G.0)
[1 1]
[0 1]
sage: phi(G(g^2))
[1 2]
[0 1]
sage: F = GF(5); MS = MatrixSpace(F,2,2)
sage: gens = [MS([1,2, -1,1]),MS([1,1, 0,1])]
sage: G = MatrixGroup(gens)
sage: phi = G.hom(G.gens())
sage: phi(G.0)
[1 2]
[4 1]
sage: phi(G.1)
[1 1]
[0 1]
EXAMPLES:
sage: F = GF(5); MS = MatrixSpace(F,2,2)
sage: G = MatrixGroup([MS([1,1,0,1])])
sage: phi = G.hom(G.gens())
sage: print latex(phi)
\left\langle \left(\begin{array}{rr}
1 & 1 \\
0 & 1
\end{array}\right) \right\rangle \rightarrow{} \left\langle \left(\begin{array}{rr}
1 & 1 \\
0 & 1
\end{array}\right) \right\rangle
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]
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 ] ]'