Replacements in NonCommutativeMultiply

*To*: mathgroup at smc.vnet.net*Subject*: [mg72558] Replacements in NonCommutativeMultiply*From*: "David Park" <djmp at earthlink.net>*Date*: Mon, 8 Jan 2007 05:00:36 -0500 (EST)

Can anyone explain the following result? Times[a, NonCommutativeMultiply[], NonCommutativeMultiply[i, c]]; % /. NonCommutativeMultiply[] -> 1 // FullForm giving Times[a, NonCommutativeMultiply[1, i, c]] I believe the result should be Times[a, NonCommutativeMultiply[i, c]] The reason I get an empty argument sequence is that the factors contain 'scalars' and 'vectors' and the scalars get factored out. Only the vector part is noncommutative. The result Mathematica gives is definitely a problem because when the 1 is factored out again to simplify we arrive back at the starting point. A similar replacement is done with CircleDot works properly. Times[a, CircleDot[], CircleDot[i, c]]; % /. CircleDot[] -> 1 // FullForm Times[a, CircleDot[i, c]] David Park djmp at earthlink.net http://home.earthlink.net/~djmp/

**Follow-Ups**:**Re: Replacements in NonCommutativeMultiply***From:*Andrzej Kozlowski <akoz@mimuw.edu.pl>

**Re: Replacements in NonCommutativeMultiply***From:*"Chris Chiasson" <chris@chiasson.name>