Opened 5 years ago

Last modified 5 years ago

#22765 closed defect

Fix cycle_index for permutation groups on an arbitrary domain + cleanup — at Version 4

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: u/nthiery/fix_cycle_index_for_permutation_groups_on_non_trivial_domains (Commits, GitHub, GitLab) Commit: c1cdcb1c8ee9aab4b7c8003933e1fe93a09fe34f
Dependencies: Stopgaps:

Status badges

Description (last modified by Nicolas M. Thiéry)

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, and the docstring.

This bug was discovered while updating the book "Calcul Mathématique avec Sage".

Change History (4)

comment:1 Changed 5 years ago by Nicolas M. Thiéry

Branch: u/nthiery/fix_cycle_index_for_permutation_groups_on_non_trivial_domains

comment:2 Changed 5 years ago by Nicolas M. Thiéry

Branch: u/nthiery/fix_cycle_index_for_permutation_groups_on_non_trivial_domains
Status: newneeds_review
Summary: Fix cycle_index for permutation groups on non trivial domainsFix cycle_index for permutation groups on an arbitrary domain + cleanup

comment:3 Changed 5 years ago by Nicolas M. Thiéry

Branch: u/nthiery/fix_cycle_index_for_permutation_groups_on_non_trivial_domains

comment:4 Changed 5 years ago by Nicolas M. Thiéry

Commit: c1cdcb1c8ee9aab4b7c8003933e1fe93a09fe34f
Description: modified (diff)

New commits:

c1cdcb1#22765: fix cycle_index for permutation groups over an arbitrary domain + cleanup
Note: See TracTickets for help on using tickets.