Opened 3 years ago

Last modified 6 hours ago

#29151 new defect

group orbits don't have full GAP functionality

Reported by: Karl-Dieter Crisman Owned by:
Priority: minor Milestone:
Component: group theory Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

In the code for sage/groups/perm_gps/permgroup.py, we have the following in the orbit cached method.

        actions = {
            "OnPoints"           : [],
            "OnSets"             : [Set],
            "OnPairs"            : [tuple],
            "OnTuples"           : [tuple],
            "OnSetsSets"         : [Set, Set],
            "OnSetsDisjointSets" : [Set, Set],
            "OnSetsTuples"       : [Set, tuple],
            "OnTuplesSets"       : [tuple, Set],
            "OnTuplesTuples"     : [tuple, tuple],
            }

and

        def input_for_gap(x, depth, container):
            if depth == len(container):
                try:
                    return self._domain_to_gap[x]
                except KeyError:
                    raise ValueError('{0} is not part of the domain'.format(x))
            x = [input_for_gap(xx, depth+1, container) for xx in x]
            if container[depth] is Set:
                x.sort()
            return x

This is supposed to recursively turn things into GAP-friendly objects. However, at least for the following example it fails (badly):

grp = PermutationGroup([ '(1,2,3,4,5)', '(1,2,4,3)' ])
els = list(grp)
grp.orbit(tuple(els[:4]), action = "OnSets")

However, it works very nicely in GAP itself. So we need to be able to mimic that - probably for a lot of these we are allowed to have sets with more than one element.

See this Stackoverflow question where there is more detail.

Change History (9)

comment:1 Changed 3 years ago by Karl-Dieter Crisman

See also this answer where the original user found a Sage-native way to do it, though presumably implementing correctly would be better.

comment:2 Changed 3 years ago by Matthias Köppe

Milestone: sage-9.1sage-9.2

Batch modifying tickets that will likely not be ready for 9.1, based on a review of the ticket title, branch/review status, and last modification date.

comment:3 Changed 2 years ago by Matthias Köppe

Milestone: sage-9.2sage-9.3

comment:4 Changed 2 years ago by Matthias Köppe

Milestone: sage-9.3sage-9.4

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.

comment:5 Changed 19 months ago by Matthias Köppe

Milestone: sage-9.4sage-9.5

comment:6 Changed 14 months ago by Matthias Köppe

Milestone: sage-9.5sage-9.6

comment:7 Changed 10 months ago by Matthias Köppe

Milestone: sage-9.6sage-9.7

comment:8 Changed 5 months ago by Matthias Köppe

Milestone: sage-9.7sage-9.8

comment:9 Changed 6 hours ago by Matthias Köppe

Milestone: sage-9.8
Note: See TracTickets for help on using tickets.