Simplify Expressions with Non commutative multiplication

*To*: mathgroup at smc.vnet.net*Subject*: [mg60266] Simplify Expressions with Non commutative multiplication*From*: Robert Schoefbeck <schoefbeck at hep.itp.tuwien.ac.at>*Date*: Fri, 9 Sep 2005 04:07:05 -0400 (EDT)*Sender*: owner-wri-mathgroup at wolfram.com

I have a rather lengthy expression of abstract products of matrices of the form myDot[M1,M2,...] If Inv[M] denotes the inverse matrix i have told mathematica that myDot[P1___,P2_,Inv[P2_],P3___]:=myDot[P1,P3]; myDot[P1___,Inv[P2_],P2_,P3___]:=myDot[P1,P3]; myDot[]=Unity; and that myDot[P1___,P2_+P3_,P4___]:=myDot[P1,P2,P4]+myDot[P1,P3,P4]; and a lot more things. My Problem is: In big expressions i have huge cancellations of the form myDot[M1,Inv[M1+M2+M3+....]] + myDot[M2,Inv[M1+M2+M3+....]] + myDot[M3 ,Inv[M1+M2+M3+....]]+... such that the summands M1,M2.... should be summed and then cancel against the Inv[...] part. I have a very slow workaround, myDotSimp[HoldPattern[Plus[P6___, myDot[P5___, P1_, P3___], myDot[P5___,P2_, P3___]]]] := P6 + myDot[P5, P1 + P2, P3]; SetOptions[Simplify, TransformationFunctions -> {Automatic,myDotSimp}]; this thing, however, is immensly time consuming. On the other hand, cancellations of the type Simplify[b/(b+c)+c/(b+c)] are extremly fast. Is there a way to combine the power of Simplify on Rational functions with a noncommutative multiplication? kind regards robert schoefbeck