[sage-support] Re: Higher-level symbolic manipulations

2010-06-30 Thread pang
On 30 jun, 22:45, Ryan Hinton wrote: > Thanks for the reply!  That's a perfect example of what I am doing > now.  Can I go one level higher and define my generating function as a > product of terms *while leaving the actual degrees, coefficients, and > even the number of dimensions symbolic*.   I

[sage-support] Re: Higher-level symbolic manipulations

2010-06-30 Thread Ryan Hinton
I may have the answer: no, not directly. Sage includes Pynac, which wraps GiNaC. GiNaC has indexed expressions, which just might do exactly what I want. (I don't have ginsh running to test differentiation.) But it looks like indexed expressions are not hooked up for use in Sage. I am posting t

[sage-support] Re: Higher-level symbolic manipulations

2010-06-30 Thread Ryan Hinton
Thanks for the reply! That's a perfect example of what I am doing now. Can I go one level higher and define my generating function as a product of terms *while leaving the actual degrees, coefficients, and even the number of dimensions symbolic*. So instead of getting something like (5*x0*x1 +

[sage-support] Re: Higher-level symbolic manipulations

2010-06-30 Thread pang
> Can I do this in Sage? Sure. Here you have some tips: {{{id=1| #Create n variables with names x1, x2 ... xn #and store them in a list vs n = 5 vs = var(' '.join('x%d'%j for j in range(5))) vs /// (x0, x1, x2, x3, x4) }}} {{{id=6| def pot(vs,ds): return prod(v^d for v,d in zip(vs,ds)) pot(