Re: Summation convention
- To: mathgroup at christensen.cybernetics.net
- Subject: [mg222] Re: [mg204] Summation convention
- From: Richard Mercer <richard at rmercer.wright.edu>
- Date: Wed, 23 Nov 1994 12:34:10 -0500
> Dear Mathgroupers, > > I wonder if you could help me, > > I need to set up a rule of the following form, > > rule = {b[a[x_]] -> d[a[y],a[x]] c[a[y]]}, > > where a[y] must differ from all other indices a[k] used > so far. My application involves expressions involving > use of the summation convention which I would like to > manipulate using Mma. Thus, in "rule" given above, the > RHS is interpreted as being summed over the index a[y]. > I need to ensure that, in any given complicated > expression, that if > > e = b[a[1]] b[a[2]] > > and each b[a[j]] (j=1,2) is to be replaced by a term > involving summation using the above "rule", that the > indices using in each summation are different. One thing > I thought of involved incrementing the summation index > y in "rule" each time I used it, but this would not work > as if I write > > f = e /. rule > > "rule" is applied twice before I have a chance to > increment y. > > Any suggestions? (I am actually away for the next week, > but I look forward to reading email on my return!), > > Thanks, Stephen > If I understand your question correctly, you will find the Unique command useful, e.g. Unique["y"] will generate a variable of the form yn where n is an integer, and yn has not been used IN THIS SESSION. ********************************************************************* Richard Mercer 513-873-2191 office Department of Mathematics and Statistics 513-873-2785 message Wright State University 513-429-2179 fax Dayton, OH 45435 NeXTmail welcome! richard at rmercer.wright.edu or rmercer at desire.wright.edu *********************************************************************