FunctionSpaceSum(R, F)

combfunc.spad line 2739 [edit on github]

computes sums of top-level expressions.

sum: (F, SegmentBinding F) -> F

sum(f(n), n = a..b) returns f(a) + f(a+1) + … + f(b).

sum: (F, Symbol) -> F

sum(a(n), n) returns A(n) such that A(n+1) - A(n) = a(n).