Stavros Macrakis <macrakis at alum.mit.edu> writes:
> ratsubst depends on the CRE representation, which represents everything as
> a (commutative) rational function, e.g.
>
> exp(2*x)+exp(-x)+x^3/3
>
> is treated as
>
> (3*Y^3+(1*X^3)*Y^1+3*Y^0) / (3*Y) where Y=%e^x and X=x
Sorry I wasn't clear. The reason I mentioned ratsubst is that sometimes
I'll have an expression which *isn't* in CRE form. I want to make a
substitution into it, but if I use ratsubst then the expression will be
put into CRE form, messing up the structure that I was looking at.
Suppose I want to replace x*y with z. If I'm lucky, replacing x with z/y
using subst will result in an expression that the general simplifier
will convert to what I'm after (maybe aided with judicious use of factor
etc.)
I definitely wasn't claiming this was a general approach to
substitutions in non-commutative products. Indeed, I don't think it's
possible to come up with one without a sort of ad-hoc Knuth-Bendix-like
procedure. (With the accompanying halting problem) After all, the
example you gave:
> ncsubst( q , b . a , a^^-1 . b^^3 . a )
>
> => a^^-1 . b^^2 . q
>
> => ( a^^-1 . q ) ^^3
>
is non-trivial because it's simplifying a word in a,b,q subject to some
given relations. That's exactly what a rewriting system has to solve!
Rupert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 315 bytes
Desc: not available
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20121009/ba69f5dc/attachment.pgp>