Opened 3 years ago

# group orbits don't have full GAP functionality

Reported by: Karl-Dieter Crisman minor group theory N/A

### 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.

### 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.1 → sage-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.2 → sage-9.3

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

Milestone: sage-9.3 → sage-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.4 → sage-9.5

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

Milestone: sage-9.5 → sage-9.6

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

Milestone: sage-9.6 → sage-9.7

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

Milestone: sage-9.7 → sage-9.8

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

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