Opened 5 years ago

Last modified 5 years ago

#22765 closed defect

Fix cycle_index for permutation groups on non trivial domains — at Initial Version

Reported by: Nicolas M. Thiéry Owned by:
Priority: major Milestone: sage-8.0
Component: group theory Keywords: gap, permutation group, Pólya enumeration
Cc: nborie, Dima Pasechnik Merged in:
Authors: Nicolas M. Thiéry Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


The code for cycle_index predates permutation groups with arbitrary domain, as well as their cycle_type methods. Instead it goes through plain Permutation's, which only works if the domain is 1,...n::

sage: G = PermutationGroup([['b','c','a']], domain=['a','b','c'])
sage: G.cycle_index()
ValueError                                Traceback (most recent call last)
/opt/sage-git2/local/lib/python2.7/site-packages/sage/combinat/permutation.pyc in __init__(self, parent, l, check_input)
    519             for i in lst:
    520                 try:
--> 521                     i = int(i)
    522                 except TypeError:
    523                     raise ValueError("the elements must be integer variables")

ValueError: invalid literal for int() with base 10: 'a'

This ticket fixes that, and uses the occasion to clean a bit the code, using in particular the conjugacy_classes method to avoid a direct access to GAP.

Change History (0)

Note: See TracTickets for help on using tickets.