# [Maxima] Multiplying out (noncommutative) exponentials

Stavros Macrakis macrakis at alum.mit.edu
Fri May 18 00:09:40 CDT 2012

```A simpler way to expand non-commutative powers and products if it's OK to
also expand commutative ones:

dot_expand(ex) := block([dotexptsimp:false],expand(ex))\$

I should have mentioned in the email below that Maxima does not understand
much about these non-unique non-commutative products, so it's often a good
idea to use dot_expand:

is( equal( a . (b . a)^^2 . b, (a.b)^^3 ) )   =>  unknown

but

is( equal( dot_expand( a . (b . a)^^2 . b) , dot_expand( (a.b)^^3 ) ) )
=>  true

On the other hand, I don't think Maxima has any built-in way of doing
(a.b)^^-1 => b^^-1 . a^^-1, so I think you'll need to write your own code
for, e.g. b.(a.b)^^-1 == a

-s

On Thu, May 17, 2012 at 3:31 PM, Stavros Macrakis <macrakis at alum.mit.edu>wrote:

> There is often more than one way to write a noncommutative product with
> exponents, e.g.
>
>         (a . b)^^3 == a . (b . a)^^2 . b
>         a . b . a . b . a == (a . b)^^2 . a == a . (b . a)^^2
>
> even more fun with inverses:
>
>         a . b . a == (a . b)^^2 . b^^-1
>         (a . b . a^^-1)^^2 == a . b^^2 . a
>
> I had started looking at this a long time ago... but I don't think I got
> very far.
>
>                -s
>
> On Thu, May 17, 2012 at 2:32 PM, Rupert Swarbrick <rswarbrick at gmail.com>wrote:
>
>> Stavros Macrakis <macrakis at alum.mit.edu> writes:
>> > You probably want to set dotexptsimp:false globally.
>> >
>> > Then %i55 will work as expected, without the second expand_ncexpt.
>> >
>> > Or locally do
>> >
>> >            expand(%), dotexptsimp:false
>>
>> Thank you both! That's made checking some of the group action code a lot
>> easier...
>>
>> Rupert
>>
>> _______________________________________________
>> Maxima mailing list
>> Maxima at math.utexas.edu
>> http://www.math.utexas.edu/mailman/listinfo/maxima
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20120518/44c19d51/attachment-0001.html>
```