BooleanAnalysis.parseval_pm_one
theoremverifiedimported Lean
Parseval's identity for $\pm 1$-valued functions. Let $f \colon \{0,1\}^n \to \bbr$ be a Boolean function that is $\pm 1$-valued, meaning $f(x) \in \{-1,1\}$ for every $x \in \{0,1\}^n$. Then its Fourier--Walsh coefficients satisfy \[ \sum_{S \subseteq [n]} \hat f(S)^2 \;=\; 1, \] the sum ranging over all subsets $S$ of $[n]$.
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in set_option maxHeartbeats 400000 in open scoped BigOperators in variable {n : ℕ} in lemma BooleanAnalysis.parseval_pm_one (f : BooleanFunc n) (hf : isPmOne f) : ∑ S : Finset (Fin n), fourierCoeff f S ^ 2 = 1
- Source
- TCSlib, `BooleanAnalysis.parseval_pm_one`
- Lean proof
- By Jingzhen Sha, Allan Li, Hydroxyi, Mina, Owen McGinty (from the file's git history), from github.com/Shilun-Allan-Li/tcslib at
c8a02591b1e5(Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.25.0.BooleanAnalysis.parseval_pm_one← BooleanAnalysis.parseval_pm_one (TCSlib/BooleanAnalysis/Basic.lean:1091): verbatim
- Verified
- 07 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 5
- BooleanAnalysis.fourierCoeffThe Fourier--Walsh coefficient of $f$ at frequency $S$ is…
- BooleanAnalysis.isPmOne$f$ is $\pm 1$-valued if $f(x)\in\{-1,1\}$ for all $x$.
- BooleanAnalysis.BooleanFuncA Boolean function of arity $n$ is a function $f : \{0,1\}^n \to \bbr$.
- BooleanAnalysis.parsevalParseval's identity for Boolean functions. Let $f : \{0,1\}^n \to \bbr$ be a Boolean function, and equip $\{0,1\}^n$ with the uniform…
- BooleanAnalysis.innerProduct_self_pm_oneSelf-inner product of a sign function. Let $f : \{0,1\}^n \to \bbr$ be a $\pm 1$-valued Boolean function, so that $f(x) \in \{-1, 1\}$ for…
- Used by 2
- ArrowTheorem.degree_one_implies_dictatorDegree-one unanimous voting rules are dictatorships. Let $f:\{0,1\}^n\to\bbr$ be a Boolean function that is odd, is $\pm 1$-valued, and is…
- ArrowTheorem.corrFunc_eq_neg_third_of_weight_oneExtremal correlation concentrates weight on level one. Let $f:\{0,1\}^n\to\bbr$ be a $\pm 1$-valued Boolean function that is odd, meaning…
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
set_option autoImplicit true inset_option relaxedAutoImplicit true inset_option maxHeartbeats 400000 inopen scoped BigOperators invariable {n : ℕ} in/-- **Parseval for `±1`-valued functions**: `∑_S f̂(S)² = 1`. -/lemma BooleanAnalysis.parseval_pm_one (f : BooleanFunc n) (hf : isPmOne f) : ∑ S : Finset (Fin n), fourierCoeff f S ^ 2 = 1 := by rw [← parseval, innerProduct_self_pm_one f hf]