On Sat, Jun 23, 2012 at 1:20 PM, Aleksandar Makelov <[email protected]> wrote: > >
... > > Yes, cyclic notation is available, but at present you have to list all the > fixed points as well, which is sort of ugly. Using the occasion to talk > about it, > I intend to do the following to deal with it: > - when a permutation is entered in cyclic form, find the maximum of the > numbers present and set the degree of the permutation to be this maximum + 1 > - supply an additional argument to the constructor so that the degree can be > set manually (for example, Perm([[0,1]], 1000) ) This seems like a good solution. This would imply, if I understand your idea, SymmetricGroup(100).has_element(Perm([[0,1]], 1000)) is True SymmetricGroup(100).has_element(Perm([[0,1]])) is False. Right? > This is going to lead to some complications, for example when multiplying > two permutations with different degrees, and so on and so on... but still > seems reasonable. > What do you guys think about this idea, and do you have any other > suggestions for a possible way to exclude the singleton cycles from the > cyclic form? The way I dealt with it in sage was to assume everything is in disjoint cycle notation (dcn), by default, and to write converter functions when the array or list notation was more useful. For example, the list notation is useful if you want to compute the permutation matrix. I guess you could just as easily assume everything is in list notation by default. I don't see an "action" method in permutations.py, where p.action(i) returns j, where p is a permutation and i, are elements from 0 to degree(p)-1 and p sends i to j when i is fed into p from the left. I am probably missing it. Anyway, once you have that method, it is easy to write a dsn to list notation converter. You can test the input syntax (see if integers are missing or if the structure of the permutation is a list of lists), and convert to list notation if needed. >> >> >> >> >> >> >> I would also recommend splitting off permutation group homomorphisms, >> >> once you write them, into another module. >> >> ... >> >> > >> > -- >> > You received this message because you are subscribed to the Google >> > Groups >> > "sympy" group. >> > To view this discussion on the web visit >> > https://groups.google.com/d/msg/sympy/-/km-fcZm_MskJ. >> > >> > To post to this group, send email to [email protected]. >> > To unsubscribe from this group, send email to >> > [email protected]. >> > For more options, visit this group at >> > http://groups.google.com/group/sympy?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/sympy/-/2YWTz4zi7WEJ. > > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/sympy?hl=en. -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
