Hi all,

can't we just make one or the other way of multiplication (L to R or R to
L) canonical for the combinatorics module, regardless of whether the
permutation is an array form or a cyclic form? After all, it's the same
mathematical object with a different representation. Moreover, it's
legitimate (and I think that this is a nice feature since it adds more
flexibility for handling permutations) to do something like this:
>>> Permutation([[0, 1],[2, 3]])*Permutation([0, 2, 1, 3]) (sorry if they
commute... imagine they don't :) )
Is it going to multiply from left to right or from right to left?

I guess it'd be better to make g*h mean "first apply g, then h", since
that's how other CAS that handle permutations do it. Currently, the *
method converts both permutations to array form and interprets g*h as
"first apply h, then g". It'll take a lot of switching all around the
combinatorics module, but seems doable.

Cheers,

Alex

On Sun, Aug 26, 2012 at 5:05 PM, David Joyner <[email protected]> wrote:

> On Sun, Aug 26, 2012 at 9:39 AM, Chris Smith <[email protected]> wrote:
> > Here's another idea: create a DisjointCycle object for which
> > multiplication is R to L. In use it would look like this:
> >
> >>>> C = DisjointCycle
> >>>> C(1, 2)*C(2, 3)
> > (1, 3, 2)
> >>>> Permutation(_).array_form(0)
> > [0, 3, 1, 2]
> >
>
> How would these be used to construct  permutation group?
> If you used elements of this class then the elements of a
> perm group would not be Perms but DisjointCycles?
>
> > /c
> >
> > --
> > 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.
> >
>
> --
> 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.
>
>

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

Reply via email to