itensor is broken, partly



Valery, you wrote:

> is this magic concerned about index "i" only?

No, the problem is not the name i, but the policy for
evaluation of the summand. 5.9.3 code ensures that summation
index cannot appear in a finite sum result; previously it was
possible for the summation index to appear in a result.

itest.mac is assuming that i can appear in the lc2kdt
result. That is OK if i in the result is not intended to be the
same i which is the summation index. If there is interest,
we might consider creating another summation function
which treats the index as a different symbol (by introducing
a gensym or something like that).

One of several bug reports which led to the summation code
changes is SF bug report # 1192935,
http://sourceforge.net/tracker/index.php?func=detail&aid=1192935&group_id=4933&atid=104933
which also has commentary on this topic.

> I'm asking because ctensor is heavily relied to sum code.
> So should we change expressions like sum(  exp[ii,kk],ii,1,dim) ->
> sum(  exp[ii%,kk],ii%,1,dim)

Well, the name of the summation index causes a problem
only if it is expected that the result might contain the index symbol.
I don't know if that's the case in the ctensor code.

Robert