AFTD Auto-Formalizing Theoretical Domains

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.
Verified
07 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 5
Used by 2

Lean source view module on GitHub

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]
See it in the graphDiscuss this resultChallenge it