Thank you for advices,
I need time (I am not fluent in maxima) to translate your (Barton)
procedure for my particular case which is (I introduce it, maybe it
allows to simplify things):
1. I have to declare a noncommutative operation A on pair of list
'seque' (which in fact are noncommutative spin operators in 3d space):
seque(s1i,s2j,s3k):=[s1i,s2j,s3k]$
The A acts n-times (let set it n=3) which gives:
expres:maplist(A,map(A,seque(x(a),y(a),1),seque(y(a),%i*x(a),1)),seque(y(a),z(a),1));
which gives:
[A(A(x(a),y(a)),y(a)),A(A(y(a),%i*x(a)),z(a)),A(A(1,1),1)]
2. then I declare the properties of A:
declare(A,outative)$
3. I need to force some rules to be obeyed, e.g.:
defrule(r1, A(x(a),y(a)),%i*z(a));
defrule(r2, A(z(a),y(a)),%i*x(a));
apply1(apply1(expres,r1),r2);
but the last line gives:
(%o) [-x(a),A(A(y(a),%i*x(a)),z(a)),A(A(1,1),1)], i.e.:
if any constant (here %i) is in the firs argument of A, the rules are
applied, if in the second one [here A(y(a),%i*x(a))] they unfortunately
do not work because impossibility of pulling out that %i.
More generally, my problems arised because I try to calculate some
product of operators which have their part for the particle 1, 2, ....
The general expression is:
(A_1 B_2 C_3+ D_1 E_2 F_3).(G_1 H_2 I_3+ J_1 K_2 L_3).(...), where
S_i is the operator S for i-th particle.
Maybe this kind of calculation (which is basal for quantum mechanics) is
elaborated in maxima from general point of view and the solution of my
particular problem is incorporated to general procedure. Do you know
about the existence of such package?
Marek.