On Fri, Sep 05, 2014 at 07:58:30AM -0700, Dima Pasechnik wrote:
> I just had a quick look at it, and the following looks downright scary:
> + For backward compatibility, if a permutation group element
> + acts on the integers `\{1,\ldots,n\}` or a subset thereof,
> + the columns are considered as being numbered from `1`::
> +
> + sage: G = PermutationGroup(['(1,2,3)(4,5)',
> '(1,2,3,4,5)'])
> + sage: sigma, tau = G.gens()
> + sage: sigma
> + (1,2,3)(4,5)
> + sage: M = copy(N)
> + sage: M.permute_columns(sigma)
> + sage: M
> + [1 0 1 0 0]
> + [2 2 0 0 0]
> + [0 3 0 0 3]
> + [0 0 0 4 4]
> + [0 0 0 5 0]
> note that there is an unpleasant ambiguity here:
> namely, if, say in this example you take
> G = PermutationGroup(['(1,2,3)'])
> how one could tell whether it is meant to permute stuff in [0..2], or
> in [1..3] ?
> Do you mean that one must write G = PermutationGroup(['(0),(1,2,3)'])
> for the latter?
I agree it's not great. But do you have a better proposal?
The current situation is a painful source of confusion, and is
actually already ambiguous if one is not reading the specifications
carefully: in your above example, the unwary user may well expect that
he will permute stuff in [1..3].
The ticket only adds a new feature allowing for the natural 0-based
permutations. Otherwise it does not change the current behavior.
Cheers,
Nicolas
--
Nicolas M. ThiƩry "Isil" <[email protected]>
http://Nicolas.Thiery.name/
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.