Closed fetchinson closed 1 year ago
The id statement is not acting inside your function arguments. You can try, eg, multiply replace_(m2,m1);
.
Great, thank you!
FYI: if the indices are not within nested functions, multiplying d_
also works:
CFunction W;
Index m1,m2;
Local expr = W(m1,m2);
multiply d_(m2,m1);
Print;
.end
The result is
expr =
W(m1,m1);
though it is not so clear whether this should give W(m1,m1)
or W(m2,m2)
.
This will be a very simple question but somehow I couldn't find the answer in the documentation. Let's assume I have a complicated expression with 2 indices, m1, m2. The final result is given by FORM generally, so the answer contains both m1 and m2. Now I'd like to sum over this pair of indices so would like to substitute m2 = m1. For example, after a long computation FORM gives me W(m1,m2) which involves all sorts of objects, then I'm interested in W(m1,m1).
If I try the following it won't work:
This still gives me W(m1,m2). So how would I force m2=m1?
It looks like indices can't be used for the "id" statement and I can't find a workaround.