Re: [sympy] Re: Elements of a permutation group in fixed order

2020-05-14 Thread Rafael Villarroel
Most of the time I need to work with a fixed order of the elements of the group. I am working on representation theory, and when defining the regular representation, the elements of the group are used as an ordered basis of a vector space, so I need a fixed order of the elements, associated with th

Re: [sympy] Re: Elements of a permutation group in fixed order

2020-05-14 Thread Aaron Meurer
If you are using list() to get all the elements, it seems prudent to just sort them. But it also seems like it would be useful to have an iterator that always gives the same order, for cases where you don't want to list all the elements. Aaron Meurer On Thu, May 14, 2020 at 3:32 AM S.Y. Lee wrot

[sympy] Re: Elements of a permutation group in fixed order

2020-05-14 Thread S.Y. Lee
You should sort the arguments before passing to PermutationGroup. On Thursday, May 14, 2020 at 5:07:10 PM UTC+9, Rafael wrote: > > > If G is a permutation group, then since G.elements is a set, I cannot > expect that list(G.elements) always lists the elements in the same > order. Can I expect th