On Wed, Jun 3, 2009 at 11:53 AM, William Stein <[email protected]> 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. Cool. Does any other math > software do that? > Are there any obvious gotcha's?
I think any system where things are left unevaluated can do something like this. For example, I know people who use this in Maple to have polynomials infinitely many variables. We have something like this in Sage now: sage: R.<x> = InfinitePolynomialRing(QQ) sage: x[0] + x[100] x100 + x0 I would still like to use __getitem__ to return the operands of a symbolic expression. Since symbols have no operands, these two things aren't totally incompatible. --Mike --~--~---------~--~----~------------~-------~--~----~ 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/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
