Replacement rules in NonCommutative Algebra Package
- To: mathgroup at smc.vnet.net
- Subject: [mg13748] Replacement rules in NonCommutative Algebra Package
- From: Nam-Anh Nguyen <anh at chm.ulaval.ca>
- Date: Wed, 19 Aug 1998 01:38:35 -0400
- Sender: owner-wri-mathgroup at wolfram.com
Hi experts, I've been using NonCommutative Algebra package for alsmost one year and well aware of the fact that the Mathematica replacement operator /. -> does not work appropriately within this package. Instead I must use the Substitute command of this NCAlgebra package. However I've impression that this command does not allow one to work with replacement rules that contain conditions For instance, after loading the package I enter Substitute[x**a**b,a**b->c] and the result is x**c which is correct Next: CommutativeQ[a] False but Substitute[x**a**b,a**b->c/;CommutativeQ[a]] gives x**(c/;CommutativeQ[a]) which is not correct. (It should give the original expression, i.e. x**a**b, as the condition fails) Is that a bug?? Any suggetion?? Thank you for your help Nam-Anh