I would like to treat sums in very generic manners, but it looks like mathematica is very bad at that. For example, it cannot simplify to zero such expressions :
Sum[y[i], {i, 1, dim}] - Sum[y[j], {j, 1, dim}] // Simplify
Sum[a y[i], {i, 1, dim}] - a Sum[y[i], {i, 1, dim}] // Simplify
Is there a package which implements at least the three properties below for the sum ? $$ \mathrm{Independent \ of \ indices \ : \ } \sum_i x_i = \sum_j x_j $$ $$ \mathrm{Linear : \ } \sum_i \lambda x_i = \lambda \sum_i x_i $$ $$ \mathrm{Simplifying \ Kroenecker \ deltas : \ } \sum_{i,j} \delta_{i,j} x_i x_j = \sum_i x_i^2 $$