BoolBLR.BLR_soundness_via_fourier_aux_hparseval
theoremverifiedimported Lean
Parseval identity for the sign lift of a Boolean function. Let $f : \{0,1\}^n \to \{0,1\}$ be a Boolean-valued function, and let $g : \{0,1\}^n \to \bbr$ be its $\pm 1$ lift, given by $g(x) = (-1)^{f(x)}$. Then the Fourier coefficients $\hat g(S) = \langle g, \chi_S\rangle$, taken over all subsets $S \subseteq [n]$, satisfy \[ \sum_{S \subseteq [n]} \hat g(S)^2 \;=\; 1. \]
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in open Finset BoolFourier in lemma BoolBLR.BLR_soundness_via_fourier_aux_hparseval {n : ℕ} (f : BoolFourier.hypercube n → Bool) : ∑ S, BoolFourier.fourier_coeff (lift_pm1 f) S ^ 2 = 1
- Source
- TCSlib, `BoolBLR.BLR_soundness_via_fourier_aux_hparseval`
- 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.BoolBLR.BLR_soundness_via_fourier_aux_hparseval← BoolBLR.BLR_soundness_via_fourier_aux_hparseval (TCSlib/BooleanAnalysis/BLR/BoolBLR.lean:320): verbatim
- Verified
- 07 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 7
- BoolFourier.BoolToPM1_sqSquare of the Bool-to-$\pm 1$ embedding. For every Boolean value $b$, the image $\mathrm{BoolToPM1}(b)$ under the map sending…
- BoolFourier.expectationFor $f : \{0,1\}^n \to \mathbb{R}$, the uniform expectation is \[ \mathbb{E}[f] = \frac{1}{2^n} \sum_{x \in \{0,1\}^n} f(x). \]
- 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.hypercubeThe Boolean hypercube of dimension $n$ is the type $\{0,1\}^n$, defined as an abbreviation for
BooleanAnalysis.BoolCube$n$. - 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. \]
- BoolBLR.lift_pm1Given $f : \{0,1\}^n \to \{0,1\}$, its $\pm 1$ lift $\texttt{BoolBLR.lift\_pm1}\,f : \{0,1\}^n \to \mathbb{R}$ is defined by…
- BoolFourier.parseval_identityParseval's identity for the Walsh–Fourier expansion. Let $f : \{0,1\}^n \to \bbr$ be a real-valued function on the Boolean hypercube, and…
- Used by 1
- BoolBLR.BLR_soundness_via_fourierSum of cubed Fourier coefficients bounds distance to linearity. Let $f : \{0,1\}^n \to \{0,1\}$ be a Boolean function and let…
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 inopen Finset BoolFourier inlemma BoolBLR.BLR_soundness_via_fourier_aux_hparseval {n : ℕ} (f : BoolFourier.hypercube n → Bool) : ∑ S, BoolFourier.fourier_coeff (lift_pm1 f) S ^ 2 = 1 := by convert parseval_identity ( lift_pm1 f ) using 1; unfold L2_norm_sq lift_pm1; unfold expectation; norm_num [ BoolToPM1_sq ] ;