Internal horizontal-section column-pairing combinatorics #
Internal partition of row-section active columns into consecutive pairs and odd leftover columns
(activeRows, pairedCols, oddCols, sectionPeers) shared by BlockCols, AdditiveBound,
StageParts, StageStep, and UpperBound; never re-exported through Zhegalkin.
Main definitions #
Cslib.Circuits.blockIndices,activeRows,pairedCols,oddCols,sectionPeers: horizontal-section blocks and column-pairing partition.
Main results #
Cslib.Circuits.sum_filter_hasCol_eq,two_mul_sum_card_pairedCols_le,sum_card_oddCols_le: monoid partition identity and double-counting bounds.
@[reducible, inline]
Horizontal section index and peer row pair (u, (r₁, r₂)).
@[reducible, inline]
Horizontal section index u of a section-peer tuple.
@[reducible, inline]
First row index r₁ of a section-peer tuple.
@[reducible, inline]
Second row index r₂ of a section-peer tuple.
theorem Cslib.Circuits.sum_filter_hasCol_eq {Col : Type u_1} [Fintype Col] {m : ℕ} {G : Type u_2} [AddCommMonoid G] (hasCol : Fin m → Col → Bool) (p : ℕ) (val : Col → G) (r : Fin m) :
∑ c : Col with hasCol r c = true, val c = ∑ r' ∈ sectionPeers p r, ∑ c ∈ pairedCols hasCol p (↑r / p) (min r r') (max r r'), val c + ∑ c ∈ oddCols hasCol p r, val c
Every row's active columns partition into its paired columns with peers in the same section and its odd-leftover columns. This holds in any additive commutative monoid, without cancellation.