yes, this works for numerical lists, but not for e.g. [[1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, -1, -1, -1], [2, -1, 2, -1, 2, 0, 0, 0], [2, 1, -2, -1, 0, -zeta8^3 - zeta8, zeta8^3 + zeta8, 0], [2, 1, -2, -1, 0, zeta8^3 + zeta8, -zeta8^3 - zeta8, 0], [3, 0, 3, 0, -1, 1, 1, -1], [3, 0, 3, 0, -1, -1, -1, 1], [4, -1, -4, 1, 0, 0, 0, 0]]
(sorted does not like mixing zeta (string(?)) with numbers, apparently) On Jan 26, 5:29 pm, Minh Nguyen <nguyenmi...@gmail.com> wrote: > Hi, > > On Tue, Jan 26, 2010 at 8:23 PM, Dima Pasechnik <dimp...@gmail.com> wrote: > > <SNIP> > > > (e.g. just sort([x.degree() for x in irr])) before comparing it with > > [1, 1, 4, 4, 5, 5, 6] > > > (I do not know how to write such a test in Sage, though...) > > Does the following help? > > [mv...@sage ~]$ sage > ---------------------------------------------------------------------- > | Sage Version 4.3.1, Release Date: 2010-01-20 | > | Type notebook() for the GUI, and license() for information. | > ---------------------------------------------------------------------- > sage: S5 = SymmetricGroup(5) > sage: irr = S5.irreducible_characters() > sage: sorted([x.degree() for x in irr]) > [1, 1, 4, 4, 5, 5, 6] > > -- > Regards > Minh Van Nguyen -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org