I want Mathematica to understand this $$(\sum_{k=0}^n a_k)(\sum_{j=0}^n b_j) = (\sum_{k=0}^n \sum_{j=0}^n a_k b_j)$$ I have tried this
exprr1 = Sum[Subscript[a, k], {k, 0, n}] *
Sum[Subscript[b, j], {j, 0, n}]
rules = {Sum[Subscript[a, k], {k, 0, n}]*
Sum[Subscript[b, j], {j, 0, n}] :>
Sum[Subscript[a, k]*Subscript[b, j], {k, 0, n}, {j, 0, n}]}
exprr1 /. rules
Now this works. The problem is that when I try
rules = {Sum[Subscript[d, k], {k, 0, n}]*
Sum[Subscript[e, j], {j, 0, n}] :>
Sum[Subscript[d, k]*Subscript[e, j], {k, 0, n}, {j, 0, n}]}
This does not work.
I want Mathematica to understand that no matter what the variable in the summation, and no matter what the index variable, the simplification/rules should work.
How do I do this? Thanks in advance!