Weighted subset transform as a sum of factored input contributions
ProvedPvsNP.SparseSyndromeWeights.weighted_subset_sumalgebracombinatoricsformal-verification
For a finite ground set, form a Boolean subset transform by summing input values over all subsets of each term. The weighted total over terms containing a required set equals the sum of one factored contribution per input value. Its forced coordinates are the union of the input support and the required set. Each other coordinate contributes a factor one plus its weight. The identity holds in every commutative semiring.
Preamble
import Mathlib
Formal statement
theorem PvsNP.SparseSyndromeWeights.weighted_subset_sum {Index Scalar : Type*} [DecidableEq Index] [CommSemiring Scalar] (values : Finset Index → Scalar) (weight : Index → Scalar)
{required upper : Finset Index} (valid : required ⊆ upper) :
(∑ term ∈ Finset.Icc required upper,
(∑ point ∈ term.powerset, values point) * ∏ i ∈ term, weight i) =
∑ point ∈ upper.powerset,
values point * (∏ i ∈ point ∪ required, weight i) *
∏ i ∈ upper \ (point ∪ required), (1 + weight i) := by sorrySource
Factorization of streaming finite-field syndromes for sparse algebraic normal forms.