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

Commit

Permalink
Use libgap for PermutationGroup_generic.molien_series
Browse files Browse the repository at this point in the history
This was slightly tricky in a way that points toward a shortcoming
in the libgap interface.
  • Loading branch information
embray committed Aug 14, 2019
1 parent 4fe1132 commit 3ef4b4b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/sage/groups/perm_gps/permgroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4503,9 +4503,15 @@ def molien_series(self):
sage: G.molien_series()
1/(x^2 - 2*x + 1)
"""
pi = self._gap_().NaturalCharacter()
pi = self._libgap_().NaturalCharacter()
# because NaturalCharacter forgets about fixed points :
pi += self._gap_().TrivialCharacter() * len(self.fixed_points())
pi += self._libgap_().TrivialCharacter() * len(self.fixed_points())

# TODO: pi is a Character from a CharacterTable on self, however libgap
# does not know about this type and when adding two Characters just
# returns a plain List; this needs to be fixed on the libgap side but
# in the meantime we can fix by converting pi back to the right type
pi = libgap.VirtualCharacter(self._libgap_().CharacterTable(), pi)

M = pi.MolienSeries()

Expand Down

0 comments on commit 3ef4b4b

Please sign in to comment.