On Nov 14, 9:26 am, Jason Grout <[EMAIL PROTECTED]> wrote: > > sage: sum(2^i for i in range(n+1))
> sum(i for i in (1..oo)) They look nice, but i doubt if they could work. e.g. think of more than one variable and relationships between them (e.g. for all i,j in N where i>j and i mod 7 == 0 and so on) Therefore, I think a new kind of object to represent the set over which the sum is made must be created. This set could be created by various constructors and returns "information" about itself (not a black box). A = sumset(vars=[i,j], start=[0,0], constraint={ i>j , mod(i,7)==0}, intersect=sumset_B, union=sumset_C) and then things like: values = A.getGenerator() ; A.isInfinite(i) -> true ; j_vals_sumset = A.getSet(i=fixed_value) But that's just a small idea, i don't know how a good interface would look like and how it is done anywhere else (I assume all other implmenetations directly connect the input of a sum-function with the code to do the summation and don't use any interfaces at all) Also, the expression in the sum needs to be transformed into certain standard forms if possible. h --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---