sign of permutations

60 views
Skip to first unread message

John Cremona

unread,
Sep 4, 2012, 9:21:07 AM9/4/12
to SAGE devel
If pi is a permutation, e.g. defined by pi=permutations(4)[3], then
pi.signature() returns what I have always called the "sign" of pi, and
none of pi.sign(), pi.sgn(), sign(pi), sgn(pi) work.

Is there a good reason for not having, at least, the alias pi.sign =
pi.signature?

I cannot remember often having heard people talk of a permutations's
signature (let alone its parity, pace wikipedia) but I am prepared to
be over-ruled by an expert in combinatorics. However I still think
that the abbreviation "sign" would be reasonable to have too.

Perhaps number-theorists are just lazy:

sage: a = QuadraticField(101).gen()
sage: a.minimal_polynomial() # fails
sage: a.minimum_polynomial() # fails
sage: a.minpoly()
x^2 - 101

John

Volker Braun

unread,
Sep 4, 2012, 9:52:49 AM9/4/12
to sage-...@googlegroups.com

Simon King

unread,
Sep 4, 2012, 10:17:30 AM9/4/12
to sage-...@googlegroups.com
On 2012-09-04, Volker Braun <vbrau...@gmail.com> wrote:
> ------=_Part_113_29781094.1346766769517
> Content-Type: text/plain; charset=ISO-8859-1
Outch:
http://googlefight.com/index.php?lang=en_GB&word1=sage+maths&word2=sage+accountance

But I guess that's for sage-marketing.

Rob Beezer

unread,
Sep 4, 2012, 10:36:51 AM9/4/12
to sage-...@googlegroups.com
On Tuesday, September 4, 2012 6:21:11 AM UTC-7, John Cremona wrote:
If pi is a permutation, e.g. defined by pi=permutations(4)[3], then
pi.signature() returns what I have always called the "sign" of pi, and
none of pi.sign(), pi.sgn(), sign(pi), sgn(pi) work.

But:

sage: G = SymmetricGroup(2)
sage: a = G("(1,2)")
sage: a.sign()
-1

So I'd say +1 to greater coordination between group element permutations and purely combinatorial permutations overall, and in particular having  .sign()  as John suggests for the "other" permutations.

Rob
 

Kwankyu Lee

unread,
Sep 4, 2012, 10:10:39 PM9/4/12
to sage-...@googlegroups.com
Signature means to me a hand-written name.

So ++1 to .sign()

Nicolas M. Thiery

unread,
Sep 5, 2012, 3:24:38 AM9/5/12
to sage-...@googlegroups.com
Hi Rob!

(CC to sage-combinat; this is thread [1] on sage-devel)
+1! This miscoordination has been an itch for us for quite a while.
In general, Permutations need some heavy refactoring which will be
best done all at once; but a simple change like this can be done right
away.

Cheers,
Nicolas

PS: https://groups.google.com/forum/?hl=fr&fromgroups=#!topic/sage-devel/DYVbTWWOMtE)
--
Nicolas M. Thi�ry "Isil" <nth...@users.sf.net>
http://Nicolas.Thiery.name/

John Cremona

unread,
Sep 5, 2012, 4:30:50 AM9/5/12
to sage-...@googlegroups.com, Nicolas M. Thiery
Thanks for all the replies.  There is now a palindromic ticket for this at #13431.

John
Nicolas M. Thi�ry "Isil" <nth...@users.sf.net>
http://Nicolas.Thiery.name/

Julien Puydt

unread,
Sep 5, 2012, 5:12:46 AM9/5/12
to sage-...@googlegroups.com
Le 05/09/2012 04:10, Kwankyu Lee a �crit :
> Signature means to me a hand-written name.

There's the signature of a quadratic form though.

Snark on #sagemath

Keshav Kini

unread,
Sep 5, 2012, 5:13:28 AM9/5/12
to sage-...@googlegroups.com
Kwankyu Lee <ekwa...@gmail.com> writes:
> Signature means to me a hand-written name.

Well, there are other valid mathematical or CS meanings to "signature".
I agree that this one should be "sign", though.

-Keshav

----
Join us in #sagemath on irc.freenode.net !

Reply all
Reply to author
Forward
0 new messages