BooleanAnalysis.totalInfluence_eq_sum_sq_deg
theoremverifiedformalizationimported Lean
Total influence via Fourier coefficients. For every Boolean function $f\colon\{0,1\}^n\to\bbr$, the total influence of $f$ is recovered from its Fourier--Walsh spectrum by \[ I[f] \;=\; \sum_{S\subseteq[n]} \abs{S}\,\hat f(S)^2, \] where the sum ranges over all subsets $S$ of $[n]=\{1,\dots,n\}$, $\abs{S}$ is the cardinality of $S$, and $\hat f(S)$ is the Fourier--Walsh coefficient of $f$ at frequency $S$.
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in set_option maxHeartbeats 400000 in open scoped BigOperators in variable {n : ℕ} in theorem BooleanAnalysis.totalInfluence_eq_sum_sq_deg (f : BooleanFunc n) : totalInfluence f = ∑ S : Finset (Fin n), S.card * fourierCoeff f S ^ 2
- Formalizes
- Total influence via Fourier coefficients, as formalized in TCSlib (`BooleanAnalysis.totalInfluence_eq_sum_sq_deg`)
- 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.totalInfluence_eq_sum_sq_deg← BooleanAnalysis.totalInfluence_eq_sum_sq_deg (TCSlib/BooleanAnalysis/Basic.lean:680): verbatim
- Verified
- 07 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 4
- BooleanAnalysis.fourierCoeffThe Fourier--Walsh coefficient of $f$ at frequency $S$ is…
- BooleanAnalysis.influence_eq_sum_fourierInfluence via Fourier coefficients. Let $f:\{0,1\}^n\to\bbr$ be a Boolean function and fix a coordinate $i\in[n]$. Then the influence of…
- BooleanAnalysis.totalInfluence$I[f] = \sum_{i=1}^n \mathrm{Inf}_i[f]$.
- BooleanAnalysis.BooleanFuncA Boolean function of arity $n$ is a function $f : \{0,1\}^n \to \bbr$.
- Used by 2
- KKL.friedgut_juntaFriedgut's junta theorem. Let $f : \{0,1\}^n \to \{-1,1\}$ be a $\pm 1$-valued Boolean function with total influence $I[f]$, and let…
- KKL.tail_fourier_weight_boundFourier tail weight bound above level $k$. Let $f : \{0,1\}^n \to \bbr$ be a Boolean function, and let $k$ be a positive integer. Then the…
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/-- **Total Influence via Fourier**: `I[f] = ∑_S |S| · f̂(S)²`. **Source:** [OD14, §2.2]. -/theorem BooleanAnalysis.totalInfluence_eq_sum_sq_deg (f : BooleanFunc n) : totalInfluence f = ∑ S : Finset (Fin n), S.card * fourierCoeff f S ^ 2 := by simp only [totalInfluence, influence_eq_sum_fourier] rw [Finset.sum_comm] congr 1; ext S simp [Finset.sum_ite_mem, Finset.sum_const, nsmul_eq_mul]