# Re: My own sum

• To: mathgroup@smc.vnet.net
• Subject: [mg11101] Re: My own sum
• From: Daniel Lichtblau <danl@wolfram.com>
• Date: Sun, 22 Feb 1998 14:55:27 -0500
• Organization: Wolfram Research, Inc.
• References: <6cakf2\$fac@smc.vnet.net>

Thomas Lemm wrote:
>
> I want to implement another type of Sum to treat expressions in a
> "physical" manner. But I need to know how Mathematica tackles the
> Problem:
>
> Sum[F[x],{x,-a,a}]==Sum[F[y],{y,-a,a}]
>
> Help welcome
>
> Thomas Lemm
>
> Lemm@stud-mailer.uni-marburg.de

Not sure exactly what you have in mind, but if you want to just have
dummy summation variables replaced by a standard variable, call it
'local', you could do as below.

In[10]:= mySum[a_,{x_,y_,z_}] := Block[{local},
ReleaseHold[Hold[Sum[a, {local,y,z}]] /. x->local]]

In[11]:= mySum[F[x],{x,-a,a}]
Out[11]= Sum[F[local], {local, -a, a}]

In[12]:=  mySum[F[x],{x,-a,a}]==mySum[F[y],{y,-a,a}] Out[12]= True

If you do this it would be a good idea not to use the symbol 'local'