[Maxima] proposal: subscripted local variables
fateman at cs.berkeley.edu
Sun Mar 11 08:53:12 CDT 2007
> -----Original Message-----
> From: maxima-bounces at math.utexas.edu
> [mailto:maxima-bounces at math.utexas.edu] On Behalf Of Robert Dodier
> Sent: Monday, March 05, 2007 8:28 PM
> To: Stavros Macrakis
> Cc: Maxima List
> Subject: Re: [Maxima] proposal: subscripted local variables
> On 3/5/07, Stavros Macrakis <macrakis at alum.mit.edu> wrote:
> > What's the motivation for allowing subscripted variables in
> > local variable lists?
> Maxima treats subscripted variables the same as symbols in
> some contexts.
> Stuff like diff(x^2, x) and integrate(x^2, x) is OK.
> But, as is too often the case, Maxima isn't consistent about that.
> Why not f(x) := x^2 ? Or sum(g(k), k, 1, n) for
> that matter.
> When people write math on a piece of paper, a subscript is often just
> a means of distinguishing similar symbols, and indeed Maxima
> sometimes treats subscripts in just that way (as in the diff
> and integrate
> examples above). I just want to make Maxima consistent in
> that respect.
When people write math on a piece of paper, they have an infinite number of
symbols. The convention in programming is that some mapping is done to the
keyboard. Thus we type epsilon or eps when we would not handwrite either of
these in math.
The SAC1 system of Collins had some conventions about representing "any"
math in ASCII, assuming that a human mathematician would never use more than
a single "letter" but would decorate it with tilde, prime, hat, underline,
super/sub scripts etc. This was only one of the contributing factors to
making the programs in the SAC1 package unreadable. Another was to ignore
But notationally, I have occasionally used x1 instead of x simply to make
the display more compact.
I think that using x as a formal parameter, as in f(x):= ... is just
a bad idea. Unnecessary and likely to lead to bugs. What about f(x,x):=
More information about the Maxima