using tellsimp for sorting




-------- Original Message --------
Subject: 	Re: [Maxima] using tellsimp for sorting
Date: 	Thu, 26 Aug 2010 14:20:14 -0700
From: 	Richard Fateman <fateman at cs.berkeley.edu>
To: 	Piotr S?omski <pslomski at tlen.pl>



Basically, the dot  (.)  operator in Maxima is going to be difficult to use.
You want an operator that takes 2 operands.
call it pmp  for Pauli Matrix Product.

It may be better to define rules (using defrule, rather than tellsimp,
so you can selectively apply them)

like defrule(r1, pmp(s[1,k],s[2,k]),  %i*s[3,k]) .

now pmp always has 2 arguments.  The rules are simple.

If you insist on using ".", you can replace it with pmp. and
If you want to, later, you can replace pmp with "."



>  forces Maxima to work for three rightmost term in the product.
>  I'd be happy to construct a rule that work for 4 terms also.

you don't have to if you follow my suggestions.
RJF