Hi Robert! On Nov 26, 8:43 am, Robert Bradshaw <rober...@math.washington.edu> wrote: > On Nov 26, 2009, at 12:35 AM, Florent Hivert wrote: [...] > I think this makes perfect sense...I'm actually surprised it's not > implemented that way already.
That's impossible. The whole point of InfinitePolynomialRing is that you do *not* know in advance how many variables you will eventually need. Its main purpose is to compute Groebner bases of so-called Symmetric Ideals, and during such computation it may very well be that the number of variables increases during computation. And then, as I mentioned in my previous post, there is the problem that in some cases you will use only very few variables, although the indices may be very large and, again, you don't know in advance *what* indices you will need. This is why there is a non-default sparse implementation. > > In the mean time. I have the following workaround: Just start by > > declaring your last variable: Or start summation with the highest index, which has the same effect. Or use *symbolic* variables right away, since this is what Nathann needed anyway. > If one knows how many variables one needs ahead of time, than what's > the advantage of using the InfinitePolynomialRing over a finite one of > the right size? Sure. *If* one knows it and *if* the number of variables does not increase during computation then a usual polynomial ring is better. Cheers, Simon -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org