Hi Nicolas, and hi all,

> - +1 on a parent option:
>
>         sage: PermutationGroup(..., action='left')
>
>   Note that this is consistent with what we do for finite set maps:
>
>         sage: M = FiniteSetMaps([1, 2, 3], action = 'right')
>
>   Maybe PermutationGroupElement will need to take an option too, and a
>   decision will need to be taken for mixed products.

I like this idea a lot, provided we can pull this off.

One way to do it, of course, is by making the symmetric group algebra
an AlgebraWithRealizations (like most combinatorial Hopf algebras),
and implement the two different conventions as two different
realizations of it, with the antipode map (g |-> g^{-1} for g in the
group) serving as the coercion in both directions. This will lead to
things working exactly as they should, *but* the coercion map involves
inverting permutations and that might slow things down. Ideally, I'd
want two distinct PermutationGroup classes differing only in their
__mul__'s, without having the need to duplicate code or split into
cases depending on left/rightness. Something like: if I put a method
in the left version of the PermutationGroup class, then it
automatically also works for the right version, but if the method
internally depends on __mul__, I want it to be using the same __mul__
in both classes, so when I call the method from the right class, it
first converts into the left version, then applies the method written
there, and then converts back into the right version. But, of course,
I only want this for methods which *internally* depend on
multiplication rather than for methods like "product" which *should*
work differently on both sides. Do we have the right framework to
formalize this and make this work? Or is what I'm describing misguided
or self-contradictory?

  Best regards,
  Darij

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to