AFTD Auto-Formalizing Theoretical Domains

BoolFourier.parseval_identity

theoremverifiedimported Lean

Parseval's identity for the Walsh–Fourier expansion. Let $f : \{0,1\}^n \to \bbr$ be a real-valued function on the Boolean hypercube, and for each subset $S \subseteq [n]$ let $\hat f(S) = \langle f, \chi_S\rangle$ be its Fourier coefficient, where the inner product and expectation are taken with respect to the uniform measure. Then the sum of the squared Fourier coefficients equals the squared $L^2$ norm of $f$: \[ \sum_{S \subseteq [n]} \hat f(S)^2 \;=\; \|f\|_2^2 \;=\; \E\bigl[f^2\bigr]. \]

Statement

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
open Finset BooleanAnalysis in
lemma BoolFourier.parseval_identity {n : ℕ} (f : BoolFun n) :
    ∑ S : Finset (Fin n), (fourier_coeff f S) ^ 2 = L2_norm_sq f
Source
TCSlib, `BoolFourier.parseval_identity`
Lean proof
By Prastik Mohanraj, from github.com/Shilun-Allan-Li/tcslib at c8a02591b1e5 (Copyright (c) 2026 Prastik Mohanraj. All rights reserved, 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 8
  • BoolFourier.parseval_identity_aux_hL2$L^2$ norm squared as a self inner product. Let $f : \{0,1\}^n \to \bbr$ be a real-valued function on the Boolean hypercube, and equip…
  • BoolFourier.fourier_coeff_eqAgreement of two Fourier coefficient definitions. Let $f : \{0,1\}^n \to \bbr$ be a Boolean function of arity $n$, and let…
  • BoolFourier.L2_norm_sqThe squared $L^2$ norm of $f : \{0,1\}^n \to \mathbb{R}$ is \[ \|f\|_2^2 = \mathbb{E}[f^2] = \frac{1}{2^n}\sum_{x} f(x)^2. \]
  • BoolFourier.fourier_coeffThe Fourier coefficient of $f : \{0,1\}^n \to \mathbb{R}$ at $S \subseteq [n]$ is \[ \hat f(S) = \langle f, \chi_S \rangle. \]
  • BoolFourier.BoolFunA Boolean function of arity $n$ is an element of type $\{0,1\}^n \to \mathbb{R}$, defined as an abbreviation for…
  • 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.fourierCoeffThe Fourier--Walsh coefficient of $f$ at frequency $S$ is…
  • BooleanAnalysis.innerProductThe $L^2$ inner product of two Boolean functions with respect to the uniform measure:…
Used by 1

Lean source view module on GitHub

set_option relaxedAutoImplicit false inset_option autoImplicit false inopen Finset BooleanAnalysis in/-- States Parseval's identity for Boolean-cube Fourier coefficients. **Source:** [OD14, §1.4]. -/lemma BoolFourier.parseval_identity {n : ℕ} (f : BoolFun n) :    ∑ S : Finset (Fin n), (fourier_coeff f S) ^ 2 = L2_norm_sq f := by  simp_rw [fourier_coeff_eq]  rw [(parseval_identity_aux_hL2 f), ← parseval]-- (f * g)̂(S) = f̂(S) · ĝ(S)
See it in the graphDiscuss this resultChallenge it