Documentation

CslibFrontier.Foundations.Data.BitString.Sum

Finset sums of bit strings #

Elementary cancellation properties of Finset.sum in Cslib.BitString b (where every element has additive order dividing 2).

Main results #

theorem Cslib.BitString.sum_bitString_eq_iff_sum_symmDiff_eq_zero {ι : Type u_1} [DecidableEq ι] {b : ℕ} (S₁ S₂ : Finset ι) (g : ι → BitString b) :
∑ α ∈ S₁, g α = ∑ α ∈ S₂, g α ↔ ∑ α ∈ symmDiff S₁ S₂, g α = 0

In BitString b (where every element has additive order dividing 2), two finset sums are equal if and only if the sum over their symmetric difference is 0.