Richard,
> If you mean "oh, I don't want to have specific values like n=5",
> then you can write this:
>
> KostasSum(exp, [i,i1,i2], [j,j1,j2], ....).
Yes, that's basically what I want, which is what Mathematica does.
The reason I want that, as opposed to doing the nesting myself, is
convenience. I had a long expression involving 4 double sums and one
triple sum. Transforming that into nested sums is inconvenient,
difficult to read and understand, and error-prone. So it would be great
if I could write multiple sums directly.
Are you saying that implementing this in Maxima is completely trivial?
(Leaving simplification aside for the moment).
I took a look at the sets document, but right now I'm much more
interested in the simple "explicit" multiple sum.
> If you want to do operations on sets, you could look at
> http://www.cs.berkeley.edu/~fateman/papers/sets.pdf
> If all you want to do is transform
> KostasSum(.....) into sum(sum(...)..), then this is trivial but
> probably pointless unless you
> expect that the inner sum will be simplified.
One of the sums I had was
Sum_{1 <= i < j < k <= n} (a_i a_j a_k).
It doesn't simplify, but it's a pain to write it as nested sums.
Kostas