Ticket #13115: trac_13115-groups-object-v4.patch

File trac_13115-groups-object-v4.patch, 26.8 KB (added by Rob Beezer, 10 years ago)
  • doc/en/reference/groups.rst

    # HG changeset patch
    # User Rob Beezer <beezer@ups.edu>
    # Date 1343874646 18000
    # Node ID 53017b97aba5e6f9dfe7f7753ba2baf0fdf58f55
    # Parent  90cdc6a8ad4e4bed83142b4ca0e6c551acd73204
    13115: group catalog module to organize examples of groups
    
    diff --git a/doc/en/reference/groups.rst b/doc/en/reference/groups.rst
    a b  
    66.. toctree::
    77   :maxdepth: 2
    88
     9   sage/groups/groups_catalog
    910   sage/groups/group
    1011   sage/groups/generic
    1112   sage/groups/abelian_gps/abelian_group
     
    2930   sage/groups/matrix_gps/orthogonal
    3031   sage/groups/matrix_gps/symplectic
    3132   sage/groups/matrix_gps/unitary
     33   sage/groups/misc_gps/misc_groups
    3234
    3335
  • sage/groups/all.py

    diff --git a/sage/groups/all.py b/sage/groups/all.py
    a b  
    1212from class_function import ClassFunction
    1313
    1414from additive_abelian.all import *
     15
     16import groups_catalog as groups
  • new file sage/groups/groups_catalog.py

    diff --git a/sage/groups/groups_catalog.py b/sage/groups/groups_catalog.py
    new file mode 100644
    - +  
     1r"""
     2Examples of Groups
     3
     4The ``groups`` object may be used to access examples of various groups.
     5Using tab-completion on this object is an easy way to discover and quickly
     6create the groups that are available (as listed here).
     7
     8Let ``<tab>`` indicate pressing the tab key.  So begin by typing
     9``groups.<tab>`` to the see primary divisions, followed by (for example)
     10``groups.matrix.<tab>`` to access various groups implemented as sets of matrices.
     11
     12- Permutation Groups  (``groups.permutation.<tab>``)
     13    - :class:`groups.permutation.Symmetric <sage.groups.perm_gps.permgroup_named.SymmetricGroup>`
     14    - :class:`groups.permutation.Alternating <sage.groups.perm_gps.permgroup_named.AlternatingGroup>`
     15    - :class:`groups.permutation.KleinFour <sage.groups.perm_gps.permgroup_named.KleinFourGroup>`
     16    - :class:`groups.permutation.Quaternion <sage.groups.perm_gps.permgroup_named.QuaternionGroup>`
     17    - :class:`groups.permutation.Cyclic <sage.groups.perm_gps.permgroup_named.CyclicPermutationGroup>`
     18    - :class:`groups.permutation.Dihedral <sage.groups.perm_gps.permgroup_named.DihedralGroup>`
     19    - :class:`groups.permutation.DiCyclic <sage.groups.perm_gps.permgroup_named.DiCyclicGroup>`
     20    - :class:`groups.permutation.Mathieu <sage.groups.perm_gps.permgroup_named.MathieuGroup>`
     21    - :class:`groups.permutation.Suzuki <sage.groups.perm_gps.permgroup_named.SuzukiGroup>`
     22    - :class:`groups.permutation.PGL <sage.groups.perm_gps.permgroup_named.PGL>`
     23    - :class:`groups.permutation.PSL <sage.groups.perm_gps.permgroup_named.PSL>`
     24    - :class:`groups.permutation.PSp <sage.groups.perm_gps.permgroup_named.PSp>`
     25    - :class:`groups.permutation.PSU <sage.groups.perm_gps.permgroup_named.PSU>`
     26    - :class:`groups.permutation.PGU <sage.groups.perm_gps.permgroup_named.PGU>`
     27    - :class:`groups.permutation.Transitive <sage.groups.perm_gps.permgroup_named.TransitiveGroup>`
     28    - :class:`groups.permutation.RubiksCube <sage.groups.perm_gps.cubegroup.CubeGroup>`
     29
     30- Matrix Groups (``groups.matrix.<tab>``)
     31    - :func:`groups.matrix.QuaternionGF3 <sage.groups.misc_gps.misc_groups.QuaternionMatrixGroupGF3>`
     32    - :func:`groups.matrix.GL <sage.groups.matrix_gps.general_linear.GL>`
     33    - :func:`groups.matrix.SL <sage.groups.matrix_gps.special_linear.SL>`
     34    - :func:`groups.matrix.Sp <sage.groups.matrix_gps.symplectic.Sp>`
     35    - :func:`groups.matrix.GU <sage.groups.matrix_gps.unitary.GU>`
     36    - :func:`groups.matrix.SU <sage.groups.matrix_gps.unitary.SU>`
     37    - :func:`groups.matrix.GO <sage.groups.matrix_gps.orthogonal.GO>`
     38    - :func:`groups.matrix.SO <sage.groups.matrix_gps.orthogonal.SO>`
     39
     40- Miscellaneous Groups (``groups.misc.<tab>``)
     41"""
     42
     43# Implementation notes:
     44#
     45#   With this  groups_catalog.py  module imported as
     46#   "groups" in all.py then  groups.<tab>  is available
     47#
     48#   "catalog" modules are made available
     49#   as groups.matrix, etc by imports below
     50#
     51#   Do not use this file for code
     52#
     53#   Please keep this top-level clean, use
     54#   groups.misc for one-off examples
     55#
     56#   Candidates for new primary divisions:
     57#       groups.sporadic - 26 sporadic groups
     58#       groups.misc - one-off stuff (implemented, but empty)
     59#       groups.presentation - free groups with relations
     60#       groups.symmetries - permutation groups of regular solids, or similar
     61
     62from sage.groups.matrix_gps import matrix_groups_catalog as matrix
     63from sage.groups.perm_gps import permutation_groups_catalog as permutation
     64from sage.groups.misc_gps import misc_groups_catalog as misc
     65
  • sage/groups/matrix_gps/general_linear.py

    diff --git a/sage/groups/matrix_gps/general_linear.py b/sage/groups/matrix_gps/general_linear.py
    a b  
    5252    Return the general linear group of degree `n` over the ring
    5353    `R`.
    5454
     55    .. note::
     56        This group is also available via ``groups.matrix.GL()``.
     57
    5558    EXAMPLES::
    5659
    5760        sage: G = GL(6,GF(5))
     
    99102        [2 1]
    100103        [2 0]
    101104        ]
     105
     106    TESTS::
     107
     108        sage: groups.matrix.GL(2, 3)
     109        General Linear Group of degree 2 over Finite Field of size 3
    102110    """
    103111    if isinstance(R, (int, long, Integer)):
    104112        R = FiniteField(R, var)
  • new file sage/groups/matrix_gps/matrix_groups_catalog.py

    diff --git a/sage/groups/matrix_gps/matrix_groups_catalog.py b/sage/groups/matrix_gps/matrix_groups_catalog.py
    new file mode 100644
    - +  
     1r"""
     2Type ``groups.matrix.<tab>`` to access examples
     3of groups implemented as permutation groups.
     4"""
     5
     6# groups imported here will be available
     7# via  groups.matrix.<tab>
     8#
     9# Do not use this file for code
     10#
     11# If you import a new group, then add an
     12# entry to the list in the module-level
     13# docstring of groups/groups_catalog.py
     14
     15from general_linear import GL
     16from special_linear import SL
     17from symplectic import Sp
     18from unitary import SU, GU
     19from orthogonal import SO, GO
     20from sage.groups.misc_gps.misc_groups import QuaternionMatrixGroupGF3 as QuaternionGF3
     21
  • sage/groups/matrix_gps/orthogonal.py

    diff --git a/sage/groups/matrix_gps/orthogonal.py b/sage/groups/matrix_gps/orthogonal.py
    a b  
    6666       depending on the invariant form
    6767   
    6868   
     69    .. note::
     70        This group is also available via ``groups.matrix.SO()``.
     71
    6972    EXAMPLES::
    7073   
    7174        sage: G = SO(3,GF(5))
     
    8588        sage: G.as_matrix_group()
    8689        Matrix group over Finite Field of size 5 with 3 generators:
    8790        [[[2, 0, 0], [0, 3, 0], [0, 0, 1]], [[3, 2, 3], [0, 2, 0], [0, 3, 1]], [[1, 4, 4], [4, 0, 0], [2, 0, 4]]]
     91
     92    TESTS::
     93
     94        sage: groups.matrix.SO(2, 3, e=1)
     95        Special Orthogonal Group of degree 2, form parameter 1, over the Finite Field of size 3
    8896    """
    8997    if isinstance(R, (int, long, Integer)):
    9098        R = FiniteField(R, var)
     
    220228    """
    221229    Return the general orthogonal group.
    222230   
     231    .. note::
     232        This group is also available via ``groups.matrix.GO()``.
     233
    223234    EXAMPLES:
     235   
     236    TESTS::
     237
     238        sage: groups.matrix.GO(2, 3, e=-1)
     239        General Orthogonal Group of degree 2, form parameter -1, over the Finite Field of size 3
    224240    """
    225241    if n%2!=0 and e!=0:
    226242        raise ValueError, "if e = 0, then n must be even."
  • sage/groups/matrix_gps/special_linear.py

    diff --git a/sage/groups/matrix_gps/special_linear.py b/sage/groups/matrix_gps/special_linear.py
    a b  
    6969    Return the special linear group of degree `n` over the ring
    7070    `R`.
    7171   
     72    .. note::
     73        This group is also available via ``groups.matrix.SL()``.
     74
    7275    EXAMPLES::
    7376   
    7477        sage: SL(3,GF(2))
     
    111114        ]
    112115
    113116        sage: TestSuite(G).run()
     117       
     118    TESTS::
     119
     120        sage: groups.matrix.SL(2, 3)
     121        Special Linear Group of degree 2 over Finite Field of size 3
    114122    """
    115123    if isinstance(R, (int, long, Integer)):
    116124        R = FiniteField(R, var)
  • sage/groups/matrix_gps/symplectic.py

    diff --git a/sage/groups/matrix_gps/symplectic.py b/sage/groups/matrix_gps/symplectic.py
    a b  
    3636    """
    3737    Return the symplectic group of degree n over R.
    3838   
     39    .. note::
     40        This group is also available via ``groups.matrix.Sp()``.
     41
    3942    EXAMPLES::
    4043   
    4144        sage: Sp(4,5)
     
    4447        Traceback (most recent call last):
    4548        ...
    4649        ValueError: the degree n (=3) must be even
     50       
     51    TESTS::
     52
     53        sage: groups.matrix.Sp(2, 3)
     54        Symplectic Group of rank 1 over Finite Field of size 3
    4755    """
    4856    if n%2!=0:
    4957        raise ValueError, "the degree n (=%s) must be even"%n
  • sage/groups/matrix_gps/unitary.py

    diff --git a/sage/groups/matrix_gps/unitary.py b/sage/groups/matrix_gps/unitary.py
    a b  
    6363       quadratic extension of F, if needed.
    6464   
    6565   
     66    .. note::
     67        This group is also available via ``groups.matrix.GU()``.
     68
    6669    EXAMPLES::
    6770   
    6871        sage: G = GU(3,GF(7)); G
     
    9396        [     4      4      0]
    9497        [     1      0      0]
    9598        ]
     99
     100    TESTS::
     101
     102        sage: groups.matrix.GU(2, 3)
     103        General Unitary Group of degree 2 over Finite Field of size 3
    96104    """
    97105    if isinstance(F, (int, long, Integer)):
    98106        F = GF(F,var)
     
    176184    Return the special unitary group of degree `n` over
    177185    `F`.
    178186   
     187    .. note::
     188        This group is also available via ``groups.matrix.SU()``.
     189
    179190    EXAMPLES::
    180191   
    181192        sage: SU(3,5)
     
    184195        Traceback (most recent call last):
    185196        ...
    186197        NotImplementedError: special unitary group only implemented over finite fields
     198
     199    TESTS::
     200
     201        sage: groups.matrix.SU(2, 3)
     202        Special Unitary Group of degree 2 over Finite Field of size 3
    187203    """
    188204    if isinstance(F, (int, long, Integer)):
    189205        F = GF(F,var)
  • new file sage/groups/misc_gps/misc_groups.py

    diff --git a/sage/groups/misc_gps/__init__.py b/sage/groups/misc_gps/__init__.py
    new file mode 100644
    diff --git a/sage/groups/misc_gps/misc_groups.py b/sage/groups/misc_gps/misc_groups.py
    new file mode 100644
    - +  
     1r"""
     2Miscellaneous Groups
     3
     4This is a collection of groups that may not fit into some of the other infinite families described elsewhere.
     5"""
     6
     7# Implementation note:
     8#     When adding a group here make an entry
     9#     in the  misc_groups_catalog.py module
     10#     or a more closely-related catalog module
     11
     12def QuaternionMatrixGroupGF3():
     13    r"""
     14    The quaternion group as a set of `2\times 2` matrices over `GF(3)`.
     15
     16    OUTPUT:
     17
     18    A matrix group consisting of `2\times 2` matrices with
     19    elements from the finite field of order 3.  The group is
     20    the quaternion group, the nonabelian group of order 8 that
     21    is not isomorphic to the group of symmetries of a square
     22    (the dihedral group `D_4`).
     23
     24    .. note::
     25        This group is most easily available via ``groups.matrix.QuaternionGF3()``.
     26
     27    EXAMPLES:
     28
     29    The generators are the matrix representations of the
     30    elements commonly called `I` and `J`, while `K`
     31    is the product of `I` and `J`. ::
     32
     33        sage: from sage.groups.misc_gps.misc_groups import QuaternionMatrixGroupGF3
     34        sage: Q = QuaternionMatrixGroupGF3()
     35        sage: Q.order()
     36        8
     37        sage: aye = Q.gens()[0]; aye
     38        [1 1]
     39        [1 2]
     40        sage: jay = Q.gens()[1]; jay
     41        [2 1]
     42        [1 1]
     43        sage: kay = aye*jay; kay
     44        [0 2]
     45        [1 0]
     46
     47    TESTS::
     48
     49        sage: groups.matrix.QuaternionGF3()
     50        Matrix group over Finite Field of size 3 with 2 generators:
     51            [[[1, 1], [1, 2]], [[2, 1], [1, 1]]]
     52
     53        sage: Q = QuaternionMatrixGroupGF3()
     54        sage: QP = Q.as_permutation_group()
     55        sage: QP.is_isomorphic(QuaternionGroup())
     56        True
     57        sage: H = DihedralGroup(4)
     58        sage: H.order()
     59        8
     60        sage: QP.is_abelian(), H.is_abelian()
     61        (False, False)
     62        sage: QP.is_isomorphic(H)
     63        False
     64    """
     65    from sage.rings.finite_rings.constructor import FiniteField
     66    from sage.matrix.matrix_space import MatrixSpace
     67    from sage.groups.matrix_gps.matrix_group import MatrixGroup
     68    MS = MatrixSpace(FiniteField(3), 2)
     69    aye = MS([1,1,1,2])
     70    jay = MS([2,1,1,1])
     71    return MatrixGroup([aye, jay])
     72
  • new file sage/groups/misc_gps/misc_groups_catalog.py

    diff --git a/sage/groups/misc_gps/misc_groups_catalog.py b/sage/groups/misc_gps/misc_groups_catalog.py
    new file mode 100644
    - +  
     1r"""
     2Type ``groups.misc.<tab>`` to access examples
     3of various groups not listed elsewhere.
     4"""
     5
     6# groups imported here will be available
     7# via  groups.misc.<tab>
     8#
     9# Do not use this file for code
     10#
     11# If you import a new group, then add an
     12# entry to the list in the module-level
     13# docstring of groups/groups_catalog.py
  • sage/groups/perm_gps/cubegroup.py

    diff --git a/sage/groups/perm_gps/cubegroup.py b/sage/groups/perm_gps/cubegroup.py
    a b  
    419419    """
    420420    A python class to help compute Rubik's cube group actions.
    421421   
     422    .. note::
     423        This group is also available via ``groups.permutation.RubiksCube()``.
     424
    422425    EXAMPLES: If G denotes the cube group then it may be regarded as a
    423426    subgroup of SymmetricGroup(48), where the 48 facets are labeled as
    424427    follows.
     
    447450        The PermutationGroup of all legal moves of the Rubik's cube.
    448451        sage: print rubik
    449452        The Rubik's cube group with generators R,L,F,B,U,D in SymmetricGroup(48).
     453
     454        TESTS::
     455
     456            sage: groups.permutation.RubiksCube()
     457            The PermutationGroup of all legal moves of the Rubik's cube.
    450458    """
    451459    def __init__(self):
    452460        U = "( 1, 3, 8, 6)( 2, 5, 7, 4)( 9,33,25,17)(10,34,26,18)(11,35,27,19)" ## U = top
  • sage/groups/perm_gps/permgroup_named.py

    diff --git a/sage/groups/perm_gps/permgroup_named.py b/sage/groups/perm_gps/permgroup_named.py
    a b  
    192192
    193193         - ``n`` - a positive integer, or list or tuple thereof
    194194
     195        .. note::
     196          This group is also available via ``groups.permutation.Symmetric()``.
     197
    195198        EXAMPLES::
    196199
    197200            sage: G = SymmetricGroup(8)
     
    219222        TESTS::
    220223
    221224            sage: TestSuite(SymmetricGroup(0)).run()
     225
     226            sage: groups.permutation.Symmetric(4)
     227            Symmetric group of order 4! as a permutation group
    222228        """
    223229        from sage.categories.finite_weyl_groups import FiniteWeylGroups
    224230        from sage.categories.finite_permutation_groups import FinitePermutationGroups
     
    351357
    352358            ``n`` -- a positive integer, or list or tuple thereof
    353359
     360        .. note::
     361          This group is also available via ``groups.permutation.Alternating()``.
     362
    354363        EXAMPLES::
    355364
    356365            sage: G = AlternatingGroup(6)
     
    370379            sage: G.category()
    371380            Category of finite permutation groups
    372381            sage: TestSuite(G).run()
     382
     383        TESTS::
     384
     385            sage: groups.permutation.Alternating(6)
     386            Alternating group of order 6!/2 as a permutation group
    373387        """
    374388        PermutationGroup_symalt.__init__(self, gap_group='AlternatingGroup(%s)'%len(domain), domain=domain)
    375389
     
    404418        INPUT:
    405419            n -- a positive integer
    406420
     421        .. note::
     422          This group is also available via ``groups.permutation.Cyclic()``.
     423
    407424        EXAMPLES::
    408425
    409426            sage: G = CyclicPermutationGroup(8)
     
    420437            sage: C = CyclicPermutationGroup(10)
    421438            sage: C.as_AbelianGroup()
    422439            Multiplicative Abelian Group isomorphic to C2 x C5
     440
     441        TESTS::
     442
     443            sage: groups.permutation.Cyclic(6)
     444            Cyclic group of order 6 as a permutation group
    423445        """
    424446        n = Integer(n)
    425447        if n < 1:
     
    511533    `i+1` and code `a^{i}x` as the symbol `2n+i+1`.  The two generators
    512534    are then represented using a left regular representation.
    513535
     536    .. note::
     537        This group is also available via ``groups.permutation.DiCyclic()``.
     538
    514539    EXAMPLES:
    515540
    516541    A dicyclic group of order 384, with a large power of 2 as a divisor::
     
    572597        sage: G.is_isomorphic(H) or G.is_isomorphic(K)
    573598        False
    574599
     600    TESTS::
     601
     602        sage: groups.permutation.DiCyclic(6)
     603        Diyclic group of order 24 as a permutation group
     604
    575605    REFERENCES:
    576606
    577607        .. [CONRAD2009] `Groups of order 12
     
    665695        OUTPUT:
    666696            -- the Klein 4 group of order 4, as a permutation group of degree 4.
    667697
     698        .. note::
     699          This group is also available via ``groups.permutation.KleinFour()``.
     700
    668701        EXAMPLES:
    669702            sage: G = KleinFourGroup(); G
    670703            The Klein 4 group of order 4, as a permutation group
     
    677710            Category of finite permutation groups
    678711            sage: TestSuite(G).run()
    679712
     713            sage: groups.permutation.KleinFour()
     714            The Klein 4 group of order 4, as a permutation group
     715
    680716        AUTHOR:
    681717            -- Bobby Moretti (2006-10)
    682718        """
     
    700736        See the ``DiCyclicGroup`` class for a generalization of this
    701737        construction.
    702738
     739    .. note::
     740        This group is also available via ``groups.permutation.Quaternion()``.
     741
    703742    EXAMPLES:
    704743
    705744    The quaternion group is one of two non-abelian groups of order 8,
     
    729768        sage: neg_one in Q.center()
    730769        True
    731770
     771    TESTS::
     772
     773        sage: groups.permutation.Quaternion()
     774        Quaternion group of order 8 as a permutation group
     775   
    732776    AUTHOR:
    733777        -- Rob Beezer (2009-10-09)
    734778    """
     
    759803
    760804        OUTPUT:
    761805            -- the dihedral group of order 2*n, as a permutation group
    762 
     806           
     807        .. note::       
     808          This group is also available via ``groups.permutation.Dihedral()``.
     809       
    763810        EXAMPLES:
    764811            sage: DihedralGroup(1)
    765812            Dihedral group of order 2 as a permutation group
     
    796843            sage: G.category()
    797844            Category of finite permutation groups
    798845            sage: TestSuite(G).run()
     846
     847            sage: groups.permutation.Dihedral(6)
     848            Dihedral group of order 12 as a permutation group
    799849        """
    800850        n = Integer(n)
    801851        if n <= 0:
     
    838888        OUTPUT:
    839889            -- the Mathieu group of degree n, as a permutation group
    840890
     891        .. note::
     892          This group is also available via ``groups.permutation.Mathieu()``.
     893
    841894        EXAMPLES::
    842895
    843896            sage: G = MathieuGroup(12)
     
    850903            Category of finite permutation groups
    851904            sage: TestSuite(G).run(skip=["_test_enumerated_set_contains", "_test_enumerated_set_iter_list"])
    852905
     906            sage: groups.permutation.Mathieu(9)
     907            Mathieu group of degree 9 and order 72 as a permutation group
     908           
    853909        Note: this is a fairly big group, so we skip some tests that
    854910        currently require to list all the elements of the group,
    855911        because there is no proper iterator yet.
     
    881937        OUTPUT:
    882938            the n-th transitive group of degree d
    883939
     940        .. note::
     941          This group is also available via ``groups.permutation.Transitive()``.
     942
    884943        EXAMPLES::
    885944
    886945            sage: TransitiveGroup(0,1)
     
    914973
    915974        TESTS::
    916975
     976
     977            sage: groups.permutation.Transitive(1, 1)
     978            Transitive group number 1 of degree 1
     979           
    917980            sage: TestSuite(TransitiveGroup(0,1)).run()
    918981            sage: TestSuite(TransitiveGroup(1,1)).run()
    919982            sage: TestSuite(TransitiveGroup(5,2)).run()# requires optional database_gap
     
    12421305        OUTPUT:
    12431306            PGL(n,q)
    12441307
     1308        .. note::
     1309          This group is also available via ``groups.permutation.PGL()``.
     1310
    12451311        EXAMPLES:
    12461312            sage: G = PGL(2,3); G
    12471313            Permutation Group with generators [(3,4), (1,2,4)]
     
    12601326            sage: G.category()
    12611327            Category of finite permutation groups
    12621328            sage: TestSuite(G).run()
     1329
     1330        TESTS::
     1331
     1332            sage: groups.permutation.PGL(2, 3)
     1333            Permutation Group with generators [(3,4), (1,2,4)]
    12631334        """
    12641335        id = 'Group([()])' if n == 1 else 'PGL(%s,%s)'%(n,q)
    12651336        PermutationGroup_generic.__init__(self, gap_group=id)
     
    12901361        OUTPUT:
    12911362            PSL(n,q)
    12921363
     1364        .. note::
     1365          This group is also available via ``groups.permutation.PSL()``.
     1366
    12931367        EXAMPLES:
    12941368            sage: G = PSL(2,3); G
    12951369            Permutation Group with generators [(2,3,4), (1,2)(3,4)]
     
    13131387            sage: G.category()
    13141388            Category of finite permutation groups
    13151389            sage: TestSuite(G).run()
     1390
     1391        TESTS::
     1392
     1393            sage: groups.permutation.PSL(2, 3)
     1394            Permutation Group with generators [(2,3,4), (1,2)(3,4)]
    13161395        """
    13171396        if n == 1:
    13181397            id = 'Group([()])'
     
    14351514        OUTPUT:
    14361515            PSp(n,q)
    14371516
     1517        .. note::
     1518          This group is also available via ``groups.permutation.PSp()``.
     1519
    14381520        EXAMPLES:
    14391521            sage: G = PSp(2,3); G
    14401522            Permutation Group with generators [(2,3,4), (1,2)(3,4)]
     
    14531535            Permutation Group with generators [(3,8,6,4,9,7,5), (1,2,3)(4,7,5)(6,9,8)]
    14541536            sage: G.base_ring()
    14551537            Finite Field in alpha of size 2^3
     1538
     1539        TESTS::
     1540
     1541            sage: groups.permutation.PSp(2, 3)
     1542            Permutation Group with generators [(2,3,4), (1,2)(3,4)]
    14561543        """
    14571544        if n%2 == 1:
    14581545            raise TypeError, "The degree n must be even"
     
    14951582        OUTPUT:
    14961583            PSU(n,q)
    14971584
     1585        .. note::
     1586          This group is also available via ``groups.permutation.PSU()``.
     1587
    14981588        EXAMPLES:
    14991589            sage: PSU(2,3)
    15001590            The projective special unitary group of degree 2 over Finite Field of size 3
     
    15031593            The projective special unitary group of degree 2 over Finite Field in alpha of size 2^3
    15041594            sage: G.base_ring()
    15051595            Finite Field in alpha of size 2^3
     1596
     1597        TESTS::
     1598
     1599            sage: groups.permutation.PSU(2, 3)
     1600            The projective special unitary group of degree 2 over Finite Field of size 3
    15061601        """
    15071602        id = 'PSU(%s,%s)'%(n,q)
    15081603        PermutationGroup_generic.__init__(self, gap_group=id)
     
    15331628        OUTPUT:
    15341629            PGU(n,q)
    15351630
     1631        .. note::
     1632          This group is also available via ``groups.permutation.PGU()``.
     1633
    15361634        EXAMPLES:
    15371635            sage: PGU(2,3)
    15381636            The projective general unitary group of degree 2 over Finite Field of size 3
     
    15411639            The projective general unitary group of degree 2 over Finite Field in alpha of size 2^3
    15421640            sage: G.base_ring()
    15431641            Finite Field in alpha of size 2^3
     1642
     1643        TESTS::
     1644
     1645            sage: groups.permutation.PGU(2, 3)
     1646            The projective general unitary group of degree 2 over Finite Field of size 3
    15441647        """
    15451648        id = 'PGU(%s,%s)'%(n,q)
    15461649        PermutationGroup_generic.__init__(self, gap_group=id)
     
    15781681       
    15791682        - A Suzuki group.
    15801683
     1684        .. note::
     1685          This group is also available via ``groups.permutation.Suzuki()``.
     1686
    15811687        EXAMPLES::
    15821688       
    15831689            sage: SuzukiGroup(8)
    1584             Permutation Group with generators [(1,2)(3,10)(4,42)(5,18)(6,50)(7,26)(8,58)(9,34)(12,28)(13,45)(14,44)(15,23)(16,31)(17,21)(19,39)(20,38)(22,25)(24,61)(27,60)(29,65)(30,55)(32,33)(35,52)(36,49)(37,59)(40,54)(41,62)(43,53)(46,48)(47,56)(51,63)(57,64), (1,28,10,44)(3,50,11,42)(4,43,53,64)(5,9,39,52)(6,36,63,13)(7,51,60,57)(8,33,37,16)(12,24,55,29)(14,30,48,47)(15,19,61,54)(17,59,22,62)(18,23,34,31)(20,38,49,25)(21,26,45,58)(27,32,41,65)(35,46,40,56)]
     1690            Permutation Group with generators [(1,2)(3,10)(4,42)(5,18)(6,50)(7,26)(8,58)(9,34)(12,28)(13,45)(14,44)(15,23)(16,31)(17,21)(19,39)(20,38)(22,25)(24,61)(27,60)(29,65)(30,55)(32,33)(35,52)(36,49)(37,59)(40,54)(41,62)(43,53)(46,48)(47,56)(51,63)(57,64),
     1691            (1,28,10,44)(3,50,11,42)(4,43,53,64)(5,9,39,52)(6,36,63,13)(7,51,60,57)(8,33,37,16)(12,24,55,29)(14,30,48,47)(15,19,61,54)(17,59,22,62)(18,23,34,31)(20,38,49,25)(21,26,45,58)(27,32,41,65)(35,46,40,56)]
    15851692            sage: print SuzukiGroup(8)
    15861693            The Suzuki group over Finite Field in a of size 2^3
    15871694
     
    15931700            sage: G.base_ring()
    15941701            Finite Field in alpha of size 2^5
    15951702
     1703        TESTS::
     1704
     1705            sage: groups.permutation.Suzuki(8)
     1706            Permutation Group with generators [(1,2)(3,10)(4,42)(5,18)(6,50)(7,26)(8,58)(9,34)(12,28)(13,45)(14,44)(15,23)(16,31)(17,21)(19,39)(20,38)(22,25)(24,61)(27,60)(29,65)(30,55)(32,33)(35,52)(36,49)(37,59)(40,54)(41,62)(43,53)(46,48)(47,56)(51,63)(57,64),
     1707            (1,28,10,44)(3,50,11,42)(4,43,53,64)(5,9,39,52)(6,36,63,13)(7,51,60,57)(8,33,37,16)(12,24,55,29)(14,30,48,47)(15,19,61,54)(17,59,22,62)(18,23,34,31)(20,38,49,25)(21,26,45,58)(27,32,41,65)(35,46,40,56)]
     1708
    15961709        REFERENCES:
    15971710       
    15981711        -  http://en.wikipedia.org/wiki/Group_of_Lie_type\#Suzuki-Ree_groups
  • new file sage/groups/perm_gps/permutation_groups_catalog.py

    diff --git a/sage/groups/perm_gps/permutation_groups_catalog.py b/sage/groups/perm_gps/permutation_groups_catalog.py
    new file mode 100644
    - +  
     1r"""
     2Type ``groups.permutation.<tab>`` to access examples
     3of groups implemented as permutation groups.
     4"""
     5
     6# groups imported here will be available
     7# via  groups.permutation.<tab>
     8#
     9# Do not use this file for code
     10#
     11# If you import a new group, then add an
     12# entry to the list in the module-level
     13# docstring of groups/groups_catalog.py
     14
     15from permgroup_named import KleinFourGroup as KleinFour
     16from permgroup_named import QuaternionGroup as Quaternion
     17from permgroup_named import SymmetricGroup as Symmetric
     18from permgroup_named import AlternatingGroup as Alternating
     19from permgroup_named import CyclicPermutationGroup as Cyclic
     20from permgroup_named import DihedralGroup as Dihedral
     21from permgroup_named import DiCyclicGroup as DiCyclic
     22from permgroup_named import MathieuGroup as Mathieu
     23from permgroup_named import SuzukiGroup as Suzuki
     24from permgroup_named import (PGL, PSL, PSp,PSU,PGU,)
     25from permgroup_named import TransitiveGroup as Transitive
     26from cubegroup import CubeGroup as RubiksCube
  • setup.py

    diff --git a/setup.py b/setup.py
    a b  
    911911                     'sage.groups.abelian_gps',
    912912                     'sage.groups.additive_abelian',
    913913                     'sage.groups.matrix_gps',
     914                     'sage.groups.misc_gps',
    914915                     'sage.groups.perm_gps',
    915916                     'sage.groups.perm_gps.partn_ref',
    916917