Re: Non-commutative algebra
- To: mathgroup at smc.vnet.net
- Subject: [mg13110] Re: [mg13053] Non-commutative algebra
- From: David Withoff <withoff>
- Date: Tue, 7 Jul 1998 03:44:13 -0400
- Sender: owner-wri-mathgroup at wolfram.com
> Recently I was showing some computations in non-commutative algebra to > my students. This is very easy to do in Mathematica 3.0. Basically all > you need to do is to Clear the attribute Orderless in Times and use > Mathematica as usual. However, my university (for various reasons) > still has Mmma 2.2 installed on all the computers in the class where I > teach, so after making my notebook using 3.0 I tried the same > computations in 2.2. To my surprise the answers came out wrong! I soon > realized that Expand in Mathematica 2.2 has commutativity "built in" > quite independently from the Orderless attribute of Times. To see this > all you need to do is to evaluate: I always cringe when I hear of modifying important characteristics of basic functions. This rarely has the desired effect. Most functions like Expand make basic assumptions about operations such as multiplication and addition, in all versions of Mathematica. This is a reflection of the fact that most of the underlying algorithms rely on those assumptions. If you consider algorithms that are designed for use with conventional multiplication and addition, it is rarely the case that the same algorithms will continue to work even if the meaning of multiplication is changed, and sometimes the algorithms won't even be mathematically meaningful. Also, in the cases where an algorithm can be constructed that will work for arbitrary properties of multiplication and addition, it is rare that such an algorithm will be as efficient as an algorithm that has been optimized for use with a particular algebra. A separate question is whether or not functions such as Expand could or should somehow be modified, probably by invoking separate algorithms, to handle operations in other algebras. That is an interesting question, and one that many people have considered. In current versions of Mathematica, however, the best way to do this sort of thing is to program it yourself using other functions. The approach you mentioned in > (Fortunately by using Distribute I was able to define my own Expand in > 2.2 which does not assume commutativity, so this problem no longer has > a practical significance for me, it's just a matter of wanting to > understand what happened). is one way to do that. There are quite a few other ways, and there are also several packages on MathSource that provide for operations over non-commuting algebras. Dave Withoff Wolfram Research