[sage-support] Lexicographic ordering in Sage

2011-06-30 Thread Santanu Sarkar
I have a set S of monomials in x1, x2, x3, x4 like S=[x3x4,x2x3,x1x4,x4,x3,x1x2,x1,x2,1]. I want to rearrange S in Lexicographic ordering like S=[1,x1,x2,x1x2,x3,x2x3,x4,x1x4, x3x4]. -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send

Re: [sage-support] Lexicographic ordering in Sage

2011-06-30 Thread amaseam
On 2011-06-30, Santanu Sarkar wrote: I have a set S of monomials in x1, x2, x3, x4 like S=[x3x4,x2x3,x1x4,x4,x3,x1x2,x1,x2,1]. I want to rearrange S in Lexicographic ordering like S=[1,x1,x2,x1x2,x3,x2x3,x4,x1x4, x3x4]. You can sort a list and specify the comparison function. See the help