[sage-devel] Re: Products of permutations use nonstandard order of operation

2013-10-03 Thread Johannes Huisman
Hi there, I'm new to sage-devel. So I apologize in advance if I say things that make no sense. The order of the product of two permutations in sage struck me as well, as many others, no doubt. As has been said, it does not really matter which order has been chosen, as soon as the other order

[sage-devel] Re: Products of permutations use nonstandard order of operation

2013-09-07 Thread Darij Grinberg
Hi everyone, Two updates on the topic of the multiplication order for permutations: 1) In trac #15174, I have implemented global-option-independent multiplication methods for elements of symmetric group algebras. (Such methods already existed for permutations -- I have now exposed them and add

Re: [sage-devel] Re: Products of permutations use nonstandard order of operation

2013-07-18 Thread David Roe
On Tue, Jul 16, 2013 at 2:07 PM, Simon King wrote: > Hi David, > > On 2013-07-16, David Kohel wrote: > > Defining the (left or right) action by * would probably be a > > nightmare with the coercion model, since it is handled as > > a symmetric operator. > > Is this really so? > > There is stuff

[sage-devel] Re: Products of permutations use nonstandard order of operation

2013-07-16 Thread Simon King
Hi David, On 2013-07-16, David Kohel wrote: > Defining the (left or right) action by * would probably be a > nightmare with the coercion model, since it is handled as > a symmetric operator. Is this really so? There is stuff in sage.structure.coerce, for example methods R.get_action(S,opera

Re: [sage-devel] Re: Products of permutations use nonstandard order of operation

2013-07-16 Thread David Kohel
Hi, I also strongly support both left and right actions, with the syntax Left action: s1(s2(x)) == (s1*s2)(x) Right action: (x^s1)^s2 == x^(s1*s2) Currently the left (functional) notation is implemented in Sage with the right order of application: s1(s2(x)) == (s2*s1)(x) is True. This need

Re: [sage-devel] Re: Products of permutations use nonstandard order of operation

2013-07-15 Thread Marco Streng
2013/7/15 Peter Bruin : > Hi Marco and all, > >> I had Darij's problem as well, and many others probably did as well. >> In a right action, I would prefer p(1) to give a warning. In a right >> action, I would want some notation where p is on the right, preferably >> 1^p (1 hat p). > > > That would

Re: [sage-devel] Re: Products of permutations use nonstandard order of operation

2013-07-15 Thread William Stein
On Mon, Jul 15, 2013 at 10:34 AM, Peter Bruin wrote: > Hi Marco and all, > >> I had Darij's problem as well, and many others probably did as well. >> In a right action, I would prefer p(1) to give a warning. In a right >> action, I would want some notation where p is on the right, preferably >> 1^

Re: [sage-devel] Re: Products of permutations use nonstandard order of operation

2013-07-15 Thread Peter Bruin
Hi Marco and all, I had Darij's problem as well, and many others probably did as well. > In a right action, I would prefer p(1) to give a warning. In a right > action, I would want some notation where p is on the right, preferably > 1^p (1 hat p). > That would make sense (except that I don't

Re: [sage-devel] Re: Products of permutations use nonstandard order of operation

2013-07-15 Thread Marco Streng
2013/7/13 Volker Braun : > But the question is, how is this right action that you speak of implemented > in Sage? +1 to this comment of Volker. And the notation should be "^" (hat) I had Darij's problem as well, and many others probably did as well. In a right action, I would prefer p(1) to give

Re: [sage-devel] Re: Products of permutations use nonstandard order of operation

2013-07-14 Thread Nicolas M. Thiery
Hi Darij, On Sat, Jul 13, 2013 at 08:39:02PM +0200, Darij Grinberg wrote: > 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 > realizati

[sage-devel] Re: Products of permutations use nonstandard order of operation

2013-07-14 Thread Volker Braun
On Sunday, July 14, 2013 4:49:36 AM UTC-4, vdelecroix wrote: > As Volker Braun mentioned, the main problem is that it is possible to > write p(i) in Sage! I suggest that we remove the __call__ attribute of > permutations (it does not exists in GAP but I do not know for other > softwares). If we

Re: [sage-devel] Re: Products of permutations use nonstandard order of operation

2013-07-14 Thread Darij Grinberg
Hi all, On Sun, Jul 14, 2013 at 5:54 AM, Travis Scrimshaw wrote: > Hey everyone who's following #14772, >I don't want to change the patch, which has the multiplication in a > GlobalOptions class, since it's just lifts the previous options up (a > standard dict). Thus any change should depend

[sage-devel] Re: Products of permutations use nonstandard order of operation

2013-07-14 Thread vdelecroix
Here is a Sage argument in favor of right action: vectors are row vectors in Sage (on which matrices act on right). There has been a choice to silently ignore transposition and we can write vA or Av in Sage... but still the natural way to do it is through right action (if we do it the other way

[sage-devel] Re: Products of permutations use nonstandard order of operation

2013-07-14 Thread Dima Pasechnik
On 2013-07-13, Darij Grinberg wrote: > Hi Dima, > > On Sat, Jul 13, 2013 at 1:26 PM, Dima Pasechnik wrote: >> IMHO it's a not as obsolete convention as you seem to imply; isn't e.g. Magma >> using the same convention as GAP? >> Not mentioning a lot of group theory literature... > > I don't know a

[sage-devel] Re: Products of permutations use nonstandard order of operation

2013-07-13 Thread Rob Beezer
On Saturday, July 13, 2013 2:22:41 AM UTC-7, Darij Grinberg wrote: > But if Judson's book uses right-to-left and Sage uses left-to-right, > shouldn't your materials actually become easier to use once the dust has > settled? > Yes, of course. It is me who will have trouble adjusting to the new

Re: [sage-devel] Re: Products of permutations use nonstandard order of operation

2013-07-13 Thread Travis Scrimshaw
Hey everyone who's following #14772, I don't want to change the patch, which has the multiplication in a GlobalOptions class, since it's just lifts the previous options up (a standard dict). Thus any change should depend on #14772 IMO. I'm not attached to having multiplication be a global opt

Re: [sage-devel] Re: Products of permutations use nonstandard order of operation

2013-07-13 Thread Darij Grinberg
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 a

Re: [sage-devel] Re: Products of permutations use nonstandard order of operation

2013-07-13 Thread William Stein
On Sat, Jul 13, 2013 at 5:50 AM, Nicolas M. Thiery wrote: > Hi all, > > Thanks Darij for bringing up the issue, and everyone for your > feedback! Here is my (strong for once) opinion on this issue. +1 to everything in your strong opinion. > Sorry I > am taking off right now for vacation

Re: [sage-devel] Re: Products of permutations use nonstandard order of operation

2013-07-13 Thread Nicolas M. Thiery
Hi all, Thanks Darij for bringing up the issue, and everyone for your feedback! Here is my (strong for once) opinion on this issue. Sorry I am taking off right now for vacations, so it's stated in a rush. - I for myself usually prefer left composition for permutations (like most combina

Re: [sage-devel] Re: Products of permutations use nonstandard order of operation

2013-07-13 Thread Darij Grinberg
TypeError: unsupported operand parent(s) for '-': 'Symmetric group algebra of order 5 over Rational Field' and 'Symmetric group algebra of order 5 over Integer Ring' I am disappoint... -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscrib

Re: [sage-devel] Re: Products of permutations use nonstandard order of operation

2013-07-13 Thread Darij Grinberg
Hi Dima, On Sat, Jul 13, 2013 at 1:26 PM, Dima Pasechnik wrote: > IMHO it's a not as obsolete convention as you seem to imply; isn't e.g. Magma > using the same convention as GAP? > Not mentioning a lot of group theory literature... I don't know anything about Magma, but what group theory litera

[sage-devel] Re: Products of permutations use nonstandard order of operation

2013-07-13 Thread Dima Pasechnik
On 2013-07-12, darijgrinberg wrote: > --=_Part_13473_7743396.1373672589533 > Content-Type: text/plain; charset=ISO-8859-1 > > Hello! > > While trying to do computations in symmetric group algebras today, I was > shocked by the fact that Sage uses the convention that a product \pi \psi > of t

Re: [sage-devel] Re: Products of permutations use nonstandard order of operation

2013-07-13 Thread John Cremona
I think this point (Volker's) is a very good one: if the action is to be a right action then it should be implemented as such, just as many group theorists write "i\sigma" for the image of i under \sigma with a right action. Persumably such right actions can be implemented in Sage so one would w

[sage-devel] Re: Products of permutations use nonstandard order of operation

2013-07-13 Thread Darij Grinberg
Hello again, thanks for the reactions! Good to see that I'm not the only one who is having headaches with the current system. On Saturday, 13 July 2013 05:21:58 UTC+2, Rob Beezer wrote: >Breaking doctests is one thing, breaking user code is another. >I've written some rather extensi

[sage-devel] Re: Products of permutations use nonstandard order of operation

2013-07-13 Thread Nils Bruin
On Saturday, July 13, 2013 1:43:09 AM UTC+2, darijgrinberg wrote: > There is a further issue lurking in the background here. It *is* possible > to make Sage use the standard convention (first \psi, then \pi), namely by > setting a global variable (see > http://trac.sagemath.org/sage_trac/ticket

Re: [sage-devel] Re: Products of permutations use nonstandard order of operation

2013-07-12 Thread Volker Braun
On Friday, July 12, 2013 11:58:13 PM UTC-4, David Joyner wrote: > It boils down to defining a permutation group via a left action or > a right action. Some people favor left-actions, some right-actions. But the question is, how is this right action that you speak of implemented in Sage? sa

Re: [sage-devel] Re: Products of permutations use nonstandard order of operation

2013-07-12 Thread Travis Scrimshaw
> I would not call this a bug either. > It boils down to defining a permutation group via a left action or > a right action. Some people favor left-actions, some right-actions. > IMHO, it has the correct default behavior, but if someone wants to > add methods to allow for an alternative defin

Re: [sage-devel] Re: Products of permutations use nonstandard order of operation

2013-07-12 Thread David Joyner
On Fri, Jul 12, 2013 at 11:21 PM, Rob Beezer wrote: > > On Friday, July 12, 2013 4:43:09 PM UTC-7, darijgrinberg wrote: >> >> Is this too barbarous a solution? Is the problem not much of a problem? > > > Thanks for bringing this off Trac and to the wider audience. Some thoughts. > > While less th

[sage-devel] Re: Products of permutations use nonstandard order of operation

2013-07-12 Thread Volker Braun
I would be in favor of having the "sensible" notation, that is, change what is currently in Sage. With Sage-6.0 coming up there would be a natural transition point. It is easy to have a warning shown the first time that you multiply two permutations and not show it in DOCTEST_MODE. We would the

[sage-devel] Re: Products of permutations use nonstandard order of operation

2013-07-12 Thread Rob Beezer
On Friday, July 12, 2013 4:43:09 PM UTC-7, darijgrinberg wrote: > > Is this too barbarous a solution? Is the problem not much of a problem? > Thanks for bringing this off Trac and to the wider audience. Some thoughts. While less than ideal, I would not go so far as to call it a bug. But then