[sage-support] Re: Creating a polynomial with symbolic coefficients

2009-06-03 Thread Robert Dodier
William Stein wrote: > On Wed, Jun 3, 2009 at 11:45 AM, Robert Bradshaw > wrote: > > > > Currently symbolic variables are un-indexable. What would people > > think of having indexing create new subscripted variables? > That's a pretty wild and crazy idea. Cool. Does any other math > software

[sage-support] Re: Creating a polynomial with symbolic coefficients

2009-06-03 Thread William Stein
On Wed, Jun 3, 2009 at 7:03 PM, David Joyner wrote: > > On Wed, Jun 3, 2009 at 9:20 PM, James Parson wrote: >> >>> > Here is a variant on the original question: suppose I wanted to write >>> > a line that creates a polynomial ring whose variables are a_{ij} for i >>> > +j<=d. How should I do it?

[sage-support] Re: Creating a polynomial with symbolic coefficients

2009-06-03 Thread David Joyner
On Wed, Jun 3, 2009 at 9:20 PM, James Parson wrote: > >> > Here is a variant on the original question: suppose I wanted to write >> > a line that creates a polynomial ring whose variables are a_{ij} for i >> > +j<=d. How should I do it? I might want to set this up, for example, >> >> sage: Inds =

[sage-support] Re: Creating a polynomial with symbolic coefficients

2009-06-03 Thread James Parson
> > Here is a variant on the original question: suppose I wanted to write > > a line that creates a polynomial ring whose variables are a_{ij} for i > > +j<=d. How should I do it? I might want to set this up, for example, > > sage: Inds = CartesianProduct(range(5), range(5)) > sage: vars = ["a"+st

[sage-support] Re: Creating a polynomial with symbolic coefficients

2009-06-03 Thread Bill Page
On Wed, Jun 3, 2009 at 5:54 PM, James Parson wrote: > > Thanks to David Joyner for his response to my original question. His > method worked nicely. Incidentally, here is the original Maple code > from the lecture of Doron Zeilberger that I was trying to translate > into Sage: > > with(combinat):

[sage-support] Re: Creating a polynomial with symbolic coefficients

2009-06-03 Thread kcrisman
> > > Here is a variant on the original question: suppose I wanted to write > > a line that creates a polynomial ring whose variables are a_{ij} for i > > +j<=d. How should I do it? I might want to set this up, for example, > > sage: Inds = CartesianProduct(range(5), range(5)) > sage: vars = ["a"+

[sage-support] Re: Creating a polynomial with symbolic coefficients

2009-06-03 Thread David Joyner
On Wed, Jun 3, 2009 at 5:54 PM, James Parson wrote: > > Thanks to David Joyner for his response to my original question. His > method worked nicely. Incidentally, here is the original Maple code > from the lecture of Doron Zeilberger that I was trying to translate > into Sage: BTW I think the m

[sage-support] Re: Creating a polynomial with symbolic coefficients

2009-06-03 Thread James Parson
Thanks to David Joyner for his response to my original question. His method worked nicely. Incidentally, here is the original Maple code from the lecture of Doron Zeilberger that I was trying to translate into Sage: with(combinat): P:=(d,x,y)->add(add(a[i,j]*x**i*y**j,i=0..d- j),j=0..d); V:=d->fs

[sage-support] Re: Creating a polynomial with symbolic coefficients

2009-06-03 Thread David Joyner
On Wed, Jun 3, 2009 at 4:38 PM, John H Palmieri wrote: > > On Jun 3, 12:16 pm, Jason Grout wrote: >> What about having a "experiment mode" in Sage that turns on things like >> this?  Some variable in some module somewhere that people can set to >> switch on some experimental behavior so they can

[sage-support] Re: Creating a polynomial with symbolic coefficients

2009-06-03 Thread John H Palmieri
On Jun 3, 12:16 pm, Jason Grout wrote: > What about having a "experiment mode" in Sage that turns on things like > this?  Some variable in some module somewhere that people can set to > switch on some experimental behavior so they can test it out and give > feedback.  In other words, setting sage

[sage-support] Re: Creating a polynomial with symbolic coefficients

2009-06-03 Thread Robert Bradshaw
On Jun 3, 2009, at 12:11 PM, Jason Grout wrote: > William Stein wrote: >> On Wed, Jun 3, 2009 at 11:45 AM, Robert Bradshaw >> wrote: >>> Currently symbolic variables are un-indexable. What would people >>> think of having indexing create new subscripted variables? >>> >>> sage: a = var('a') >>>

[sage-support] Re: Creating a polynomial with symbolic coefficients

2009-06-03 Thread Jason Grout
Harald Schilly wrote: > On Jun 3, 8:45 pm, Robert Bradshaw > wrote: >> Currently symbolic variables are un-indexable. What would people >> think of having indexing create new subscripted variables? >> >> sage: a = var('a') >> sage: a[0] >> a_0 >> sage: latex(a[1,2]) >> a_{1,2} >> > > I like it

[sage-support] Re: Creating a polynomial with symbolic coefficients

2009-06-03 Thread Jason Grout
William Stein wrote: > On Wed, Jun 3, 2009 at 11:45 AM, Robert Bradshaw > wrote: >> Currently symbolic variables are un-indexable. What would people >> think of having indexing create new subscripted variables? >> >> sage: a = var('a') >> sage: a[0] >> a_0 >> sage: latex(a[1,2]) >> a_{1,2} > > T

[sage-support] Re: Creating a polynomial with symbolic coefficients

2009-06-03 Thread Harald Schilly
On Jun 3, 8:45 pm, Robert Bradshaw wrote: > Currently symbolic variables are un-indexable. What would people   > think of having indexing create new subscripted variables? > > sage: a = var('a') > sage: a[0] > a_0 > sage: latex(a[1,2]) > a_{1,2} > I like it, this idea could also be expanded to v

[sage-support] Re: Creating a polynomial with symbolic coefficients

2009-06-03 Thread Mike Hansen
On Wed, Jun 3, 2009 at 11:53 AM, William Stein wrote: >> Currently symbolic variables are un-indexable. What would people >> think of having indexing create new subscripted variables? >> >> sage: a = var('a') >> sage: a[0] >> a_0 >> sage: latex(a[1,2]) >> a_{1,2} > > That's a pretty wild and craz

[sage-support] Re: Creating a polynomial with symbolic coefficients

2009-06-03 Thread William Stein
On Wed, Jun 3, 2009 at 11:45 AM, Robert Bradshaw wrote: > > Currently symbolic variables are un-indexable. What would people > think of having indexing create new subscripted variables? > > sage: a = var('a') > sage: a[0] > a_0 > sage: latex(a[1,2]) > a_{1,2} That's a pretty wild and crazy idea.

[sage-support] Re: Creating a polynomial with symbolic coefficients

2009-06-03 Thread Robert Bradshaw
Currently symbolic variables are un-indexable. What would people think of having indexing create new subscripted variables? sage: a = var('a') sage: a[0] a_0 sage: latex(a[1,2]) a_{1,2} - Robert On Jun 3, 2009, at 10:32 AM, David Joyner wrote: > > I'm not sure if this helps, but you can cre

[sage-support] Re: Creating a polynomial with symbolic coefficients

2009-06-03 Thread David Joyner
I'm not sure if this helps, but you can create a polynomial of the type you want a bit simpler: sage: var("x,y") (x, y) sage: Inds = CartesianProduct(range(5), range(4)) sage: sum([var("a"+str(i)+str(j))*x^i*y^j for i,j in Inds]) a43*x^4*y^3 + a33*x^3*y^3 + a42*x^4*y^2 + a23*x^2*y^3 + a32*x^3*y^2