Pairwise AND parity has a flat Walsh spectrum
ProvedPvsNP.pair_parity_walsh_abscombinatoricscomplexity-theory
For any finite index set of bit pairs and any Boolean Walsh mode, the absolute unnormalized Walsh coefficient of the parity of their ANDs equals two to the number of pairs.
Preamble
import Mathlib.Algebra.BigOperators.Ring.Finset import Mathlib.Algebra.Order.BigOperators.Ring.Finset import Mathlib.Data.Fintype.BigOperators import Mathlib.Data.Int.Basic import Mathlib.Tactic.NormNum set_option autoImplicit false
Formal statement
theorem PvsNP.pair_parity_walsh_abs {Pair : Type} [Fintype Pair] [DecidableEq Pair]
(mode : Pair → Bool × Bool) :
|∑ word : Pair → Bool × Bool,
∏ i, (if xor (xor ((word i).1 && (word i).2) ((mode i).1 && (word i).1))
((mode i).2 && (word i).2) then -1 else (1 : ℤ))| =
2 ^ Fintype.card Pair := by sorrySource
Exact Fourier calculation for a constant-state scanner.