Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions src/sage/groups/perm_gps/permgroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,12 +641,11 @@ def _gap_init_(self) -> str:
"""
return 'Group([%s])' % (', '.join(g._gap_init_() for g in self.gens()))

@cached_method
def gap(self):
r"""
This method from :class:`sage.groups.libgap_wrapper.ParentLibGAP` is added in order to achieve
compatibility and have :class:`sage.groups.libgap_morphism.GroupHomset_libgap` work for permutation
groups, as well
groups, as well.

OUTPUT: an instance of :class:`sage.libs.gap.element.GapElement`
representing this group
Expand Down Expand Up @@ -695,9 +694,10 @@ def gap(self):
sage: g1.IsIdenticalObj(S._libgap_())
true
"""
if self._libgap is not None:
return self._libgap
self._libgap = super()._libgap_()
if self._libgap is None:
# why is self._libgap = libgap.Group(self._gens) and
# adding methods to permgroup_named slower?
self._libgap = super()._libgap_()
return self._libgap

# Override the default _libgap_ to use the caching as self._libgap
Expand Down Expand Up @@ -1626,11 +1626,10 @@ def disjoint_direct_product_decomposition(self):
else:
libgap.Add(Xp, x)
X = Xp
return SetPartition([
[self._domain_from_gap[Integer(x)]
for i in part
for x in O[i]] for part in P] +
[[x] for x in self.fixed_points()])
return SetPartition([[self._domain_from_gap[Integer(x)]
for i in part
for x in O[i]] for part in P] +
[[x] for x in self.fixed_points()])

def representative_action(self, x, y):
r"""
Expand Down
Loading