Generic LibGAP-based Group - Groups

Skip to content
Back to top
View this page
Edit this page

# Generic LibGAP-based Group

This is useful if you need to use a GAP group implementation in Sage that does not have a dedicated Sage interface.

If you want to implement your own group class, you should not derive from this but directly from `ParentLibGAP`.

EXAMPLES:

Sage

    sage: F.<a,b> = FreeGroup()
    sage: G_gap = libgap.Group([ (a*b^2).gap() ])
    sage: from sage.groups.libgap_group import GroupLibGAP
    sage: G = GroupLibGAP(G_gap);  G
    Group([ a*b^2 ])
    sage: type(G)
    <class 'sage.groups.libgap_group.GroupLibGAP_with_category'>
    sage: G.gens()
    (a*b^2,)

Python

    >>> from sage.all import *
    >>> F = FreeGroup(names=('a', 'b',)); (a, b,) = F._first_ngens(2)
    >>> G_gap = libgap.Group([ (a*b**Integer(2)).gap() ])
    >>> from sage.groups.libgap_group import GroupLibGAP
    >>> G = GroupLibGAP(G_gap);  G
    Group([ a*b^2 ])
    >>> type(G)
    <class 'sage.groups.libgap_group.GroupLibGAP_with_category'>
    >>> G.gens()
    (a*b^2,)

class sage.groups.libgap_group.GroupLibGAP(*args, **kwds)

  Bases: `GroupMixinLibGAP`, `Group`, `ParentLibGAP`

  Group interface for LibGAP-based groups.

  INPUT:

  Same as `ParentLibGAP`.

  Element

    alias of `ElementLibGAP`