Here is one more example which do not work in todays's version of sympy: (Example from the book A=B)In [42]: summation( (-1)**(n+r+s)*binomial(n,r)*binomial(n,s)*binomial(n+r,r)*binomial(n+s,s)*binomial(2*n-r-s,n),(r,0,n),(s,0,n)) Out[42]: n n ____ ____ ╲ ╲ ╲ ╲ n + r + s ⎛n⎞ ⎛n⎞ ⎛n + r⎞ ⎛n + s⎞ ⎛2⋅n - r - s⎞ ╲ ╲ (-1) ⋅⎜ ⎟⋅⎜ ⎟⋅⎜ ⎟⋅⎜ ⎟⋅⎜ ⎟ ╱ ╱ ⎝r⎠ ⎝s⎠ ⎝ r ⎠ ⎝ s ⎠ ⎝ n ⎠ ╱ ╱ ╱ ╱ ‾‾‾‾ ‾‾‾‾ s = 0 r = 0 According to A=B this should have the same value as the following: In [43]: summation( binomial(n,k)**4, (k,0,n)) Out[43]: ┌─ ⎛-n, -n, -n, -n │ ⎞ ├─ ⎜ │ 1⎟ 4╵ 3 ⎝ 1, 1, 1 │ ⎠
Yes. There is no hope that this method can solve double sums in this way (unless it can turn the inner sum into a purely algebraic expression). We will need a "real" algorithm for this.
-- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
