Hello, In GAP everything is coherent: permutations are based on 1..n and arrays start at 1. Note that, in the background, permutations are stored as a C array of ints on 0..n-1. But the C code is inaccesible from the console and everything is nice from both the programmer and user point of views.
If we start having Permutations0 and Permutations1 why not list0, list1, tuple0, tuple1, etc? For me it does not looks like a solution. As Sage is built on Python the only coherent way to define permutations is on 0..n-1. Nevertheless, it is nice and useful to have permutations on other domains like 1..n or {a,b,c}. What do you think about the following for action on matrices/vectors/etc class Matrix: def permutation_action_on_rows(self, s): D = s.parent().domain().cardinality() if not D.cardinality() == self.nrows(): raise ValueError s0 = s.as_perm_on_0_n() # might raise an Error if # D is not totally ordered self._permutation0_action_on_rows(s0) Vincent -- 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/d/optout.