Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

A symbolic form of sums and products can be obtained by keeping L in their expressions ; for example :

sum(c[L[i]], i, 0, len(L)-1)

Is mathematically equivalent to iLci, although the notation is len(L)i=1cLi which is different...

(And differs also by the fact that Python list indexing is zero-based, wheras mathematical notation indexing is one-based, but this is another story...).

A similar trick may be applied for other cases ; the general principle is to add an indirection through the list of elements of nteres (or possibly through a dictionary or a set).