|
Times CircleTimes
Is it possible to have Mathematica interpret space not as multiplication but instead as noncommutative multiplication?
Ordinarily Mathematica interprets space as (commutative) multiplication.
It is possible to have the implied multiplication interpreted as noncommutative multiplication. One way to do this is to use $Pre to replace Times by any operator that is not, by default, commutative. For example, here the CircleTimes operator ( ) is used.
Note that we have to hold the argument (Hold[x]), and that the pure function needs to have the HoldAll attribute so that its argument is not evaluated.
Now is automatically parsed to .
Scalars appearing in expressions are not presently handled automatically.
Here we extend the definition of $Pre to handle scalars.
Specific properties of a particular noncommutative operator can be added as definitions to the (infix) CircleTimes operator. For example, after adding the commutation relation , where variables are sorted lexicographically, sums of noncommutative products are ordered and simplified.
It is easy to check that the sum of the noncommutative product of all the permutations of a set of symbols is zero for this commutation relation.
If we clear the values of $Pre and CircleTimes the interpretation of a space as ordinary multiplication is restored.
 Copyright © 2002 Wolfram Media, Inc. All
rights reserved. |