Several parities can share one XOR per coefficient pattern
ProvedPvsNP.share_parities_by_coefficient_columnscomplexity-theoryformal-verification
For a finite family of Boolean parities, group input coordinates by their common coefficient column. Each output parity is the XOR of the grouped inputs from the columns that have a one in that row.
Preamble
import Mathlib.Algebra.BigOperators.Group.Finset.Basic import Mathlib.Data.Fintype.Pi import Mathlib.Data.ZMod.Basic set_option autoImplicit false
Formal statement
theorem PvsNP.share_parities_by_coefficient_columns {Row Col : Type}
[Fintype Row] [DecidableEq Row] [Fintype Col] [DecidableEq Col]
(coefficient : Row → Col → Bool) (bit : Col → ZMod 2) (row : Row) :
(∑ col, if coefficient row col then bit col else 0) =
∑ pattern : Row → Bool, if pattern row then
∑ col ∈ Finset.univ.filter (fun col => (fun r => coefficient r col) = pattern), bit col
else 0 := by sorrySource
Shared linear preprocessing for tail approximation by a family of affine parities.