I d not understand what is possible and not possible about sums with Sage
(and its minions).
I am interested in the symbolic manipulation of a sum of (unspecified) data
series X. Since Sage does nott (yet) admits indiced symbolic variable, it
is reprsented by a function of an integer argument.
Sage seems unable to show that
$\sum_{i=1}^{p+1}X_i-\sum_{i=1}^pX_i==X_{p+1}$ :
sage: var("p,j", domain="integer")
....: assume(p,"integer",j,"integer",p>0)
....: X=function("X")(j)
....: foo(p)=sum(X(j),j,1,p)
....: print foo
....: bool(foo(p+1)-foo(p)==X(p+1))
....:
(p, j)
/usr/local/sage-7/local/lib/python2.7/site-packages/IPython/core/interactiveshell.py:2881:
DeprecationWarning: Substitution using function-call syntax and unnamed
arguments is deprecated and will be removed from a future release of Sage;
you can use named arguments instead, like EXPR(x=..., y=...)
See http://trac.sagemath.org/5930 for details.
exec(code_obj, self.user_global_ns, self.user_ns)
p |--> sum(X(j), j, 1, p)
False
I understand the warning, and think it's irrelevant. But I do not
understand why the "obvious" expansion is not used. Similarly :
sage: (foo(p+1)-foo(p)).maxima_methods().sumcontract()
sum(X(j), j, 1, p + 1) - sum(X(j), j, 1, p)
Am I missing something ?
--
Emmanuel Charpentier
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.