Hi,
in my application I do a substitution .j by .i in the expression -2*P.j.i*P.n.m*delta.m.i*delta.n.i. With Ginac 1.6.0 the result is -2*P.n.m*P.symbol15.symbol15*delta.m.i*delta.n.i instead of -2*P.n.m*P.i.i*delta.m.i*delta.n.i. Using the subs option "subs_options::no_index_renaming" does not change the behaviour.
The reason is that in the function "ex expairseq::subs(const exmap & m, unsigned options) const" the third argument "do_index_renaming" is always true
return ex_to<basic>(thisexpairseq(vp, overall_coeff, true);
Changing this line to
return ex_to<basic>(thisexpairseq(vp, overall_coeff, (options & subs_options::no_index_renaming) == 0));
fixes the problem in my application, but I am not absolutely sure that this does not have any side effects. What do you think?
with best regards
Gerhard Hejc