Hi FORM team,
we came across some unexpected behaviour when bracketing a function with dummy indices. A minimal example is this:
#-
Off statistics;
index uu1;
cf fun;
l expr = fun(N1_?,N2_?)*fun(N3_?,N4_?)*e_(N1_?,N2_?,N3_?,N4_?);
b fun,e_;
.sort
Keep Brackets;
sum uu1;
print;
.end
#+
which for us gives the result
expr =
fun(N1_?,N2_?)*fun(N3_?,N4_?)*e_(N1_?,N2_?,N3_?,N5_?);
meaning the last dummy index N4_? is being renamed N5_? in error. This snippet also fails if sum uu1; is replaced by renumber;. On the other hand, the results are correct if either fun is defined as tensor, or Keep Brackets; is removed.
Is this a bug or are there restrictions regarding dummy indices on non-tensor objects that we are not aware of?
cheers,
Tom