Re: Replacements in NonCommutativeMultiply
- To: mathgroup at smc.vnet.net
- Subject: [mg72560] Re: [mg72558] Replacements in NonCommutativeMultiply
- From: "Chris Chiasson" <chris at chiasson.name>
- Date: Tue, 9 Jan 2007 07:17:21 -0500 (EST)
- References: <200701081000.FAA14451@smc.vnet.net>
It appears to be due to the Flat attribute of NonCommutativeMultiply. You can always use Verbatim[NonCommutativeMultiply[]] -> 1 On 1/8/07, David Park <djmp at earthlink.net> wrote: > 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/ > > > -- http://chris.chiasson.name/
- References:
- Replacements in NonCommutativeMultiply
- From: "David Park" <djmp@earthlink.net>
- Replacements in NonCommutativeMultiply