Matrix group over a ring that GAP understands#

class sage.groups.matrix_gps.matrix_group_gap.MatrixGroup_gap(degree, base_ring, libgap_group, ambient=None, category=None)[source]#

Bases: GroupMixinLibGAP, MatrixGroup_generic, ParentLibGAP

Base class for matrix groups that implements GAP interface.

INPUT:

  • degree – integer; the degree (matrix size) of the matrix group

  • base_ring – ring; the base ring of the matrices

  • libgap_group – the defining libgap group

  • ambient – a derived class of ParentLibGAP or None (default); the ambient class if libgap_group has been defined as a subgroup

Element[source]#

alias of MatrixGroupElement_gap

structure_description(G, latex=False)[source]#

Return a string that tries to describe the structure of G.

This methods wraps GAP’s StructureDescription method.

For full details, including the form of the returned string and the algorithm to build it, see GAP’s documentation.

INPUT:

  • latex – a boolean (default: False); if True, return a LaTeX formatted string

OUTPUT: string

Warning

From GAP’s documentation: The string returned by StructureDescription is not an isomorphism invariant: non-isomorphic groups can have the same string value, and two isomorphic groups in different representations can produce different strings.

EXAMPLES:

sage: # needs sage.groups
sage: G = CyclicPermutationGroup(6)
sage: G.structure_description()
'C6'
sage: G.structure_description(latex=True)
'C_{6}'
sage: G2 = G.direct_product(G, maps=False)
sage: LatexExpr(G2.structure_description(latex=True))
C_{6} \times C_{6}
>>> from sage.all import *
>>> # needs sage.groups
>>> G = CyclicPermutationGroup(Integer(6))
>>> G.structure_description()
'C6'
>>> G.structure_description(latex=True)
'C_{6}'
>>> G2 = G.direct_product(G, maps=False)
>>> LatexExpr(G2.structure_description(latex=True))
C_{6} \times C_{6}

This method is mainly intended for small groups or groups with few normal subgroups. Even then there are some surprises:

sage: D3 = DihedralGroup(3)                                                     # needs sage.groups
sage: D3.structure_description()                                                # needs sage.groups
'S3'
>>> from sage.all import *
>>> D3 = DihedralGroup(Integer(3))                                                     # needs sage.groups
>>> D3.structure_description()                                                # needs sage.groups
'S3'

We use the Sage notation for the degree of dihedral groups:

sage: D4 = DihedralGroup(4)                                                     # needs sage.groups
sage: D4.structure_description()                                                # needs sage.groups
'D4'
>>> from sage.all import *
>>> D4 = DihedralGroup(Integer(4))                                                     # needs sage.groups
>>> D4.structure_description()                                                # needs sage.groups
'D4'

Works for finitely presented groups (Issue #17573):

sage: F.<x, y> = FreeGroup()                                                    # needs sage.groups
sage: G = F / [x^2*y^-1, x^3*y^2, x*y*x^-1*y^-1]                                # needs sage.groups
sage: G.structure_description()                                                 # needs sage.groups
'C7'
>>> from sage.all import *
>>> F = FreeGroup(names=('x', 'y',)); (x, y,) = F._first_ngens(2)# needs sage.groups
>>> G = F / [x**Integer(2)*y**-Integer(1), x**Integer(3)*y**Integer(2), x*y*x**-Integer(1)*y**-Integer(1)]                                # needs sage.groups
>>> G.structure_description()                                                 # needs sage.groups
'C7'

And matrix groups (Issue #17573):

sage: groups.matrix.GL(4,2).structure_description()                             # needs sage.libs.gap sage.modules
'A8'
>>> from sage.all import *
>>> groups.matrix.GL(Integer(4),Integer(2)).structure_description()                             # needs sage.libs.gap sage.modules
'A8'
subgroup(generators, check=True)[source]#

Return the subgroup generated by the given generators.

INPUT:

  • generators – a list/tuple/iterable of group elements of self

  • check – boolean (default: True). Whether to check that each matrix is invertible

OUTPUT: The subgroup generated by generators as an instance of FinitelyGeneratedMatrixGroup_gap

EXAMPLES:

sage: # needs sage.rings.number_field
sage: UCF = UniversalCyclotomicField()
sage: G  = GL(3, UCF)
sage: e3 = UCF.gen(3); e5 = UCF.gen(5)
sage: m = matrix(UCF, 3,3, [[e3, 1, 0], [0, e5, 7],[4, 3, 2]])
sage: S = G.subgroup([m]); S
Subgroup with 1 generators (
[E(3)    1    0]
[   0 E(5)    7]
[   4    3    2]
) of General Linear Group of degree 3 over Universal Cyclotomic Field

sage: # needs sage.rings.number_field
sage: CF3 = CyclotomicField(3)
sage: G  = GL(3, CF3)
sage: e3 = CF3.gen()
sage: m = matrix(CF3, 3,3, [[e3, 1, 0], [0, ~e3, 7],[4, 3, 2]])
sage: S = G.subgroup([m]); S
Subgroup with 1 generators (
[     zeta3          1          0]
[         0 -zeta3 - 1          7]
[         4          3          2]
) of General Linear Group of degree 3 over Cyclotomic Field of order 3 and degree 2
>>> from sage.all import *
>>> # needs sage.rings.number_field
>>> UCF = UniversalCyclotomicField()
>>> G  = GL(Integer(3), UCF)
>>> e3 = UCF.gen(Integer(3)); e5 = UCF.gen(Integer(5))
>>> m = matrix(UCF, Integer(3),Integer(3), [[e3, Integer(1), Integer(0)], [Integer(0), e5, Integer(7)],[Integer(4), Integer(3), Integer(2)]])
>>> S = G.subgroup([m]); S
Subgroup with 1 generators (
[E(3)    1    0]
[   0 E(5)    7]
[   4    3    2]
) of General Linear Group of degree 3 over Universal Cyclotomic Field

>>> # needs sage.rings.number_field
>>> CF3 = CyclotomicField(Integer(3))
>>> G  = GL(Integer(3), CF3)
>>> e3 = CF3.gen()
>>> m = matrix(CF3, Integer(3),Integer(3), [[e3, Integer(1), Integer(0)], [Integer(0), ~e3, Integer(7)],[Integer(4), Integer(3), Integer(2)]])
>>> S = G.subgroup([m]); S
Subgroup with 1 generators (
[     zeta3          1          0]
[         0 -zeta3 - 1          7]
[         4          3          2]
) of General Linear Group of degree 3 over Cyclotomic Field of order 3 and degree 2