MathGroup Archive 2005

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

Search the Archive

Simplify Expressions with Non commutative multiplication


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


  • Prev by Date: Re: rootsearch in a piecewise function
  • Next by Date: PolynomialGCD
  • Previous by thread: Re: Re: rootsearch in a piecewise function
  • Next by thread: Re: Simplify Expressions with Non commutative multiplication