Controlling simplification of type a*a^k -> a^(k+1)



This looks to me like a bad idea.  Isn't there another way of keeping the form you want in this particular example?

I don't see enough of the patch code to tell what is being changedl
RJF 

----- Original Message -----
From: Yasuaki Honda <yhonda at mac.com>
Date: Saturday, August 4, 2007 10:23 am
Subject: Controlling simplification of type a*a^k -> a^(k+1)

> Dear all,
> 
> I would like to introduce a flag to control the following  
> simplification:
> a*a^k -> a^(k+1).
> 
> In general this simplification is good (thanks to Raymond). However,
> when dealing with a series such as
>    sum(a[n]/b^n, n, 0, k)
> in which some a[n] happen to have value b, such
> terms are simplified to b^(1-n) while other terms remain a[n]/b^n.
> So, in such case, I would like to suppress the this simplification so
> that all the terms look similar.
> 
> For this purpose, I want to introduce a control variable $exposimp.
> If the value is nil the a*a^k->a^(k+1) will be suppressed.
> 
> The modification to simp.lisp is pretty simple:
> 
> diff -r1.41 simp.lisp
> 72a73,76
> > (defmvar $exposimp t
> >   "If t, a*a^k to be simplified to a^k+1, otherwise such
> >    simplification is suppressed. The default is t.")
> >
> 1781c1785
> <          ((setf expo (exponent-of (car fm) (car x)))
> ---
> >          ((and $exposimp (setf expo (exponent-of (car fm) (car 
> x))))
> If no one opposes, I would like to commit this.
> 
> Yasuaki Honda, Chiba, Japan
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>