Expanding and differentiating subscripts



Maxima doesn't really expect to perform math on expressions like
(a*b)[1].  This could of course be fixed.  First thing to do would be
to make sure we have a consistent mathematical definition so that
"correctly" is well-defined.

Recall, for example, that Maxima allows mixing scalar and non-scalars
without declaration, e.g.

       1+[2.3] => [3,4]

so it is not true in general that (a+b)[1] == a[1]+b[1].

It may well be true that it is very simple to get all this right and
consistent, but I haven't looked at it in detail.  And as I say,
Maxima simply hasn't been written with this sort of case in mind, so
there are probably gotcha's all over the place.  See for example bug
reports # 792514, 886392, 705734, 884947, 866706 for various issues
related to literal lists [...] and subscripting.

               -s