Description: Define the sum of a series with an index set of integers A . The
variable k is normally a free variable in B , i.e., B can be
thought of as B ( k ) . This definition is the result of a
collection of discussions over the most general definition for a sum
that does not need the index set to have a specified ordering. This
definition is in two parts, one for finite sums and one for subsets of
the upper integers. When summing over a subset of the upper integers,
we extend the index set to the upper integers by adding zero outside the
domain, and then sum the set in order, setting the result to the limit
of the partial sums, if it exists. This means that conditionally
convergent sums can be evaluated meaningfully. For finite sums, we are
explicitly order-independent, by picking any bijection to a 1-based
finite sequence and summing in the induced order. These two methods of
summation produce the same result on their common region of definition
(i.e., finite sets of integers) by summo . Examples:
sum_ k e. { 1 , 2 , 4 } k means 1 + 2 + 4 = 7 , and
sum_ k e. NN ( 1 / ( 2 ^ k ) ) = 1 means 1/2 + 1/4 + 1/8 + ... = 1
( geoihalfsum ). (Contributed by NM, 11-Dec-2005)(Revised by Mario
Carneiro, 13-Jun-2019)