[Date Index] [Thread Index] [Author Index]
Grouping similar indices together in an expression
Hi, I am a newbie in Mathematica, and am trying to do the following. I have terms which look like a[i] a[j] b[i] b[j] I need to apply a function F, for which I need to group the different indices (by which I mean i, j) together as follows: F(a[i] a[j] b[i] b[j]) = F(a[i] b[i]) F(a[j] b[j]) I do not in general know how many different indices there might be in a term. E.g. I might have a[i] a[j] a[k] b[j] Could somebody please give me a hint as to how to do this? Thanks, David.