The following code is relying on the commutativity of A and B:
NFunction A,B,C;
Symbol w,x;
commuteinset {A,B};
Local test = A(1)*B(2)*C(3);
*** Shouldn't this trigger due to commutativity of A,B? ***
id A(w?)*C(x?) = w*x;
.sort
Print +s;
.end
I would expect the answer to be 3*B(2) but instead I get the initial A(1)*B(2)*C(3). I suspect commuteinset is not taken into account during pattern matching? If this is the "intended" behaviour it should probably be added to the manual in id[entify] and commuteinset. Otherwise this is a bug.
The following code is relying on the commutativity of
AandB:I would expect the answer to be
3*B(2)but instead I get the initialA(1)*B(2)*C(3). I suspectcommuteinsetis not taken into account during pattern matching? If this is the "intended" behaviour it should probably be added to the manual inid[entify]andcommuteinset. Otherwise this is a bug.