Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Abelian groups with gap are not independent beings of the sage abelia…
Browse files Browse the repository at this point in the history
…n groups
  • Loading branch information
Simon Brandhorst committed Jan 16, 2018
1 parent 74234d4 commit 7ad95ea
Show file tree
Hide file tree
Showing 3 changed files with 278 additions and 186 deletions.
21 changes: 0 additions & 21 deletions src/sage/groups/abelian_gps/abelian_group.py
Expand Up @@ -902,27 +902,6 @@ def _gap_init_(self):
return 'AbelianPcpGroup(%s)'%list(self.gens_orders())
raise PackageNotFoundError("gap_packages")

@cached_method
def gap(self):
r"""
Return this abelian group as a libgap group
EXAMPLES::
sage: A = AbelianGroup([2,3,6])
sage: A.gap()
Multiplicative Abelian group isomorphic to C2 x C3 x C6 with gap
If the gap package "Polycyclic" is installed, it can handle
infinite cyclic groups as well::
sage: A = AbelianGroup([2,0,6]) # optional - gap_packages
sage: A.gap()
Multiplicative Abelian group isomorphic to C2 x Z x C6 with gap
"""
from sage.groups.abelian_gps.abelian_group_gap import AbelianGroup_gap
return AbelianGroup_gap(self)

def gen(self, i=0):
"""
The `i`-th generator of the abelian group.
Expand Down
19 changes: 1 addition & 18 deletions src/sage/groups/abelian_gps/abelian_group_element.py
Expand Up @@ -163,21 +163,4 @@ def word_problem(self, words):
True
"""
from sage.groups.abelian_gps.abelian_group import AbelianGroup, word_problem
return word_problem(words,self)

def gap(self):
r"""
Push this element to the corresponding gap based group.
Note that the notation of elements might change.
EXAMPLES::
sage: A = AbelianGroup([2,5])
sage: a = A.an_element()
sage: a.gap()
g1*g2
sage: a == a.gap().sage()
True
"""
return self.parent().gap()(self)
return word_problem(words,self)

0 comments on commit 7ad95ea

Please sign in to comment.