lsum?



On 5/2/10, Raymond Toy <toy.raymond at gmail.com> wrote:

> This seems like a bug in lsum:
>
> gg : x^3+t*x^2-3*x-2*t$
> lsum(gg*t,t,rootsof(t^2+1));
> ->
> ?%lsum(gg*t,t,rootsof(t^2+1))$
>
> Shouldn't gg be substituted?  How can I do this?

Well, lsum quotes its arguments; I guess the intent is to
evaluate t only when the list values are known. Seems reasonable.
A side effect is that nothing else in the first argument gets
evaluated either. When the list values are unknown,
should lsum do something like (let (($t '$t)) (meval expr)) ??
I guess I'm against it -- clever evaluation seems to cause more
trouble than it's worth; sum being the major example.

Maybe apply(lsum, [gg*t, t, whatever]) has the effect you want.

> (The 1D display of lsum needs work too.)

I guess this is missing:

(setf (get '%lsum 'noun) '$lsum)

and for good measure we can include

(setf (get '$lsum 'verb) '%lsum)

FWIW

Robert Dodier