MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Canonical order...

  • To: mathgroup at
  • Subject: [mg54989] Canonical order...
  • From: Josef Karthauser <joe at>
  • Date: Wed, 9 Mar 2005 06:34:16 -0500 (EST)
  • Sender: owner-wri-mathgroup at

I'm trying to adjust what Mathematica thinks is canonical order for
a particular function F[], so that orderless functions such as
Times[F[c], F[a], F[b]] automatically gets ordered according to my
specified sort ordering function on F.

I thought that I could do it by tweaking with Order, i.e.

    Order[F[a_], F[b_]] := -Order[a,b]

for instance.

I was hoping then that,


would then become the canonical,


but this doesn't happen:

    : Order[F[a], F[b]]
    = -1

    : Times[F[b], F[a]]
    = F[a] F[b]

    : % // FullForm
    = Times[F[a], F[b]]

Ok, so it looks like Sort, isn't paying attention to Order[].  Should
it? How do I go about changing the default sort order for a particular

    : Sort[{F[a], F[b]}]
    = {F[a], F[b]}


p.s. I've asked for a lot of help recently, but not given much in
return.  Many thanks to all of you who are helping me out with this
learning curve! :)  You're all stars!
Josef Karthauser (joe at
FreeBSD (cvs meister, admin and hacker)
Physics Particle Theory (student)
================ An eclectic mix of fact and theory. =================

  • Prev by Date: Re: BS PDE
  • Next by Date: Re: BS PDE
  • Previous by thread: Re: findfit or solve?
  • Next by thread: Re: Canonical order...