Truncation, telescoping and summation by parts for finite sums #
A finite-vector sum agrees with a shorter range sum when all omitted summands vanish.
Finset.sum_range_mul_blocks splits a range into consecutive blocks, and
Finset.sum_range_mul_div sums a function that is constant on each block.
Finset.two_mul_sum_range_natCast_succ computes the sum of the first positive integers
without division.
sum_univ_adjacent_differences telescopes differences along a sequence of indexed pairs.
sum_univ_smul_by_parts_prefix and sum_univ_smul_by_parts_tail express summation by parts
using cumulative sums from the left or from the right.
A sum over Fin n of a function vanishing from k on is a sum over range k.
The differences within indexed pairs and across consecutive pairs telescope to the difference from the first entry to the last exit.
A weighted sum of within-round potential drops from a to b is bounded by the
endpoint difference in weighted slack plus the inter-round drift. The hslack condition
compares weights at the same potential and holds automatically for constant weights.