MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Non-commutative algebra

  • To: mathgroup at smc.vnet.net
  • Subject: [mg13053] Non-commutative algebra
  • From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
  • Date: Sat, 4 Jul 1998 16:44:57 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

I have a question which (probably) can only be answered by a wri
insider. Since it concerns a "obsolete" version of Mathematica I
suppose it will not be seen as terribly important, but still I would be
very grateful if someone would satisfy my curiosity.

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:

In[2]:=
Unprotect[Times]
Out[2]=
{Times}
In[3]:=
ClearAttributes[Times,Orderless]
In[4]:=
Protect[Times]
Out[4]=
{Times}
In[5]:=
Expand[(a+b)^2]

In versions 3.0 and 2.2. In 3.0 you will correctly get:

b*a + a^2 + a*b + b^2

but in 2.2 you get

a^2+2a*b+b^2

I have looked through the documentation for Expand in both versions, and
through various accounts of the changes in Version 3.0 (e.g.
Mathematica Journal Vol. 6 Issue 4) but cannot find any mention of
commutativity. It seems to me very odd to deliberately "hard-wire"
commutativity in Expand. My question is: Why this behavious in version
2? Was it ever recognized as a bug  and fixed v. 3 or was the fix just
a side-effect of some other changes?


(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).

Andrzej Kozlowski

Dr. Andrzej Kozlowski
Professor of Mathematics
Toyama International University
Toyama, JAPAN
http://sigma.tuins.ac.jp/



  • Prev by Date: Printing symbols in Windows 98?
  • Next by Date: Getting a bitmap to display with the proper dimensions
  • Previous by thread: Printing symbols in Windows 98?
  • Next by thread: Re: Non-commutative algebra