I have tried to have mathematica replace the kronecker delta in the summation, but I have not obtained result, the index remain the same.
First i define the derivative the z-function in function of index.
z /: D[z[i_, j_], z[m_, n_], NonConstants -> {z}] := KroneckerDelta[i, m]*KroneckerDelta[j, n];
zz /: D[zz[i_, j_], zz[m_, n_], NonConstants -> {zz}] := KroneckerDelta[i, m]*KroneckerDelta[j, n] ;
For example if take
A=Sum[z[m, n]*zz[m, n], m, n], m, n];
And then take the derivative with repect to z, I obtain
D[A,z[1,1],NonConstants -> {z}]= Sum[KroneckerDelta[1, m] KroneckerDelta[1, n] zz[m, n],m,n]
How can I make mathematica evaluate the kronecker delta and eliminate sumations?.
Thank you very much