A sum of one constant on a set and another outside #
Finset.sum_ite_const_zero computes the sum of a constant on the indices satisfying a predicate.
Fintype.sum_ite_mem_const: over a finite type, the sum of y on a set A and of z outside
is |A| * y + (card - |A|) * z.
theorem Finset.sum_ite_const_zero {ι : Type u_1} {M : Type u_2} [AddCommMonoid M] (s : Finset ι) (p : ι → Prop) [DecidablePred p] (a : M) :
A constant supported on the indices satisfying p sums to the size of that support
times the constant.