The entire computation in PermutationGroup.molien_series() all appears to be done in libgap. Sage's wrapper around characters is never really invoked at all AFAICS. Here is a curious data point:
sage: PG = PermutationGroup(["(1,2,3,4,5,6,7)","(5,6,7)"]) sage: g = PG._libgap_() sage: pi = g.NaturalCharacter() sage: pi += g.TrivialCharacter() * len(PG.fixed_points()) sage: pi2 = libgap.VirtualCharacter(g.CharacterTable(), pi) sage: pi2.MolienSeries() ( 1-z^3+z^6-z^9+z^12-z^15+z^18 ) / ( (1-z^7)*(1-z^5)*(1-z^4)*(1-z^3)^2*(1-z^2)*(1-z) ) sage: PG.molien_series() (-x^18 + x^15 - x^12 + x^9 - x^6 + x^3 - 1)/(x^25 - x^24 - x^23 - x^22 + x^21 + 2*x^20 + x^19 - x^17 - x^16 - x^15 - x^13 + x^12 + x^10 + x^9 + x^8 - x^6 - 2*x^5 - x^4 + x^3 + x^2 + x - 1) I just ran the code in PG.molien_series() directly first, and then calling it now works. Best, Travis On Friday, December 9, 2022 at 8:49:55 PM UTC+9 dim...@gmail.com wrote: > On Fri, Dec 9, 2022 at 2:55 AM 'Travis Scrimshaw' via sage-devel > <sage-...@googlegroups.com> wrote: > > > > By running the code in molien_series() directly in Sage, I can do the > computation, but not by calling the method. So it seems to be something > within Sage with the interface with libgap. > > not really, it's just the character tables in Sage that need work, for > a proper conversion to use libgap - they cause the issue with > moilen_series. > The following (avoiding Sage's characters all together) works just fine: > > sage: p=PermutationGroup(["(1,2,3,4,5,6,7)","(5,6,7)"]) > sage: > ms=libgap(p).PermutationCharacter([1..7],libgap.OnPoints).MolienSeries(); > ms > ( 1-z^3+z^6-z^9+z^12-z^15+z^18 ) / ( > (1-z^7)*(1-z^5)*(1-z^4)*(1-z^3)^2*(1-z^2)*(1-z) ) > sage: type(ms) > <class 'sage.libs.gap.element.GapElement'> > sage: ms.sage() > (x_1^18 - x_1^15 + x_1^12 - x_1^9 + x_1^6 - x_1^3 + 1)/(-x_1^25 + > x_1^24 + x_1^23 + x_1^22 - x_1^21 - 2*x_1^20 - x_1^19 + x_1^17 + > x_1^16 + x_1^15 + x_1^13 - x_1^12 - x_1^10 - x_1^9 - x_1^8 + x_1^6 + > 2*x_1^5 + x_1^4 - x_1^3 - x_1^2 - x_1 + 1) > sage: type(ms.sage()) > <class 'sage.rings.fraction_field_element.FractionFieldElement'> > > I'm working on https://trac.sagemath.org/ticket/26902 (fixing > character tables would be a part of it) - and it needs more hands. > Dima > > > > Best, > > Travis > > > > > > On Friday, December 9, 2022 at 8:55:15 AM UTC+9 guru....@gmail.com > wrote: > >> > >> Hi, > >> i ran into a bug while trying to compute the molien series of a > permutation group. > >> > >> SageMath version 9.3, Release Date: 2021-05-09, Using Python 3.7.10. > >> Operating system: Windows 11, 64-bit > >> > >> It works fine for most permutation groups but calling: > >> > >> PermutationGroup(["(1,2,3,4,5,6,7)","(5,6,7)"]).molien_series() > >> > >> gives an GAP Error which doesn't make sense to me in the given context. > >> > >> GAPError: Error, ^ cannot be used here to compute roots (use `RootInt' > instead?) > >> > >> Similar examples which also produce the same bug are: > >> > >> PermutationGroup(["(1,2,3,4,5,7)","(5,6,7)"]).molien_series() > >> PermutationGroup(["(1,2,3,4,7)","(5,6,7)"]).molien_series() > >> PermutationGroup(["(1,2,3,4,7)","(5,7,8)"]).molien_series() > >> > >> Thanks for looking into it. > >> Kind regards, > >> Jonas > >> > >> > > -- > > You received this message because you are subscribed to the Google > Groups "sage-devel" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to sage-devel+...@googlegroups.com. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/sage-devel/2c1fcce4-946f-43cd-9ae4-a04c73434192n%40googlegroups.com > . > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/42c6be87-614e-4a21-9273-91948f0c6216n%40googlegroups.com.