sympy/sympy — pull request #2081 by thilinarmtb (2013-05-07 07:48:19+00:00)
Title: 3128: Sum/Product Simplification.

Addressing issue 3128, I overloaded + for Sum class and * for Product class
so that following simplifications are done.

Sum(f, limits) + Sum(g, limits) = Sum(f+g, limits) (limits is same everywhere)
Sum(g, (t, a, b)) + Sum(g, (t, b+1, c)) = Sum(g, (t, a, c))

Similarly for Product class,

Product(f, limits) * Prodcut(g, limits) = Product(f*g, limits) (limits is same everywhere)
Product(g, (t, a, b)) * Product(g, (t, b+1, c)) = Product(g, (t, a, c)).