Products and sums over an updated function #
Changing one argument of a function changes only the matching factor of a product (or summand of
a sum) whose factors depend on the arguments one at a time
(Finset.prod_apply_update_of_mem). Unlike Mathlib's Finset.prod_update_of_mem, the factors may
apply a different map g j to each argument and the arguments may have dependent types, and the
untouched factors are collected over s.erase i, the form produced by Finset.mul_prod_erase.
Main results #
Finset.prod_apply_update_of_mem,Finset.sum_apply_update_of_mem: fori ∈ s,∏ j ∈ s, g j (Function.update f i b j) = g i b * ∏ j ∈ s.erase i, g j (f j).Finset.prod_apply_update_of_notMem,Finset.sum_apply_update_of_notMem: fori ∉ s, the product or sum is unchanged.Fintype.sum_update_sub_add_eq: subtracting and adding the same amount at distinct coordinates preserves the total sum.
Changing the argument at i ∈ s changes only the i-th factor of a product whose j-th
factor depends only on the j-th argument.
Changing the argument at i ∈ s changes only the i-th summand of a sum whose
j-th summand depends only on the j-th argument.
Updating a coordinate outside the index set leaves the product of coordinate maps unchanged.
Updating a coordinate outside the index set leaves the sum of coordinate maps unchanged.
Transferring a from coordinate i to a distinct coordinate j preserves the total sum.