We also recently had a ticket about correcting the permutation action on a 
matrix, so we also need that to also be consistent.

Best,
Travis


On Tuesday, June 16, 2020 at 4:02:11 AM UTC+10, Nils Bruin wrote:
>
> On Monday, June 15, 2020 at 10:43:51 AM UTC-7, Nils Bruin wrote:
>>
>> There's obviously the choice for letting permutations/matrices on the 
>> left/right, but I think there's a definite preferred choice for how to 
>> convert to a permutation matrix: the one that makes it a homomorphism. And 
>> for that, "Permutation" fails presently:
>>
>> sage: matrix(Permutation('(1,2,3)')*Permutation('(1,3)')) == 
>> matrix(Permutation('(1,2,3)'))*matrix(Permutation('(1,3)')) 
>> False 
>>
>> To make things worse, there is actually an option to fix this:
>
> sage: sage.combinat.permutation.Permutations.options(mult="r2l") 
> sage: matrix(Permutation('(1,2,3)')*Permutation('(1,3)')) == 
> matrix(Permutation('(1,2,3)'))*matrix(Permutatio 
> ....: n('(1,3)')) 
>
> Quoting from the documentation:
>
>      It is best  for code not to rely on this setting being set to a 
> particular 
>      standard, but rather use the methods "left_action_product()" and 
>      "right_action_product()" for multiplying permutations (these 
>      methods don't depend on the setting). See 
>      https://trac.sagemath.org/14885 for more details. 
>
> so, "Permutation" objects aren't really meant to be a group: they are just 
> objects on which two different groups can be overlaid (the opposites). So 
> that means "matrix" can't possibly get it right in all cases. There should 
> be a left_action_permutation_matrix and right_action_permutation_matrix on 
> Permutation objects.
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/a87dc54a-146d-43bc-af39-9076bd333ee2o%40googlegroups.com.

Reply via email to