Ask Your Question

Revision history [back]

Hello,

Most of the operations on permutations group are answered by the software GAP. So if you find something interesting in GAP it can be used for permutation groups! Some of it are already interfaced directly in Sage, but some not. For your problem, it seems that in GAP one can use ClosureGroupAddElm (for question 1) and ClosureGroup (for question 2). You can have a look at this page for more informations on these two functions. To use it from Sage just do

sage: G = SymmetricGroup(5)
sage: P1 = PermutationGroup([G('(1,2,3,4,5)')])
sage: P2 = PermutationGroup([G('(1,2)')])
sage: P_gap = gap.ClosureGroup(P1, P2)         # creates a GAP object
sage: P = PermutationGroup(gap_group=P_gap)    # converts it to a Sage object
sage: P
Permutation Group with generators [(1,2), (1,2,3,4,5)]

Though I am not sure it will be more efficient than what you suggest (and I am very curious about it!). It is quite possible that GAP has some optimization when doing this.

Vincent