BooleanAnalysis.fourierCoeff_empty
theoremverifiedimported Lean
Empty-set Fourier coefficient is the mean. Let $f\colon\{0,1\}^n\to\bbr$ be a Boolean function. Then its Fourier–Walsh coefficient at the empty frequency equals its expectation under the uniform measure: \[ \hat f(\varnothing) \;=\; \E[f]. \]
Statement
set_option maxHeartbeats 400000 in open scoped BigOperators in variable {n : ℕ} in lemma BooleanAnalysis.fourierCoeff_empty (f : BooleanFunc n) : fourierCoeff f ∅ = expect f
- Source
- TCSlib, `BooleanAnalysis.fourierCoeff_empty`
- 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.fourierCoeff_empty← BooleanAnalysis.fourierCoeff_empty (TCSlib/BooleanAnalysis/Basic.lean:239): verbatim
- Verified
- 07 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 6
- BooleanAnalysis.uniformWeightThe uniform probability measure on $\{0,1\}^n$ assigns weight $2^{-n}$ to each point.
- BooleanAnalysis.expectThe expectation of $f$ under the uniform measure: \[ \E[f] \;=\; 2^{-n}\sum_{x\in\{0,1\}^n} f(x). \]
- BooleanAnalysis.fourierCoeffThe Fourier--Walsh coefficient of $f$ at frequency $S$ is…
- BooleanAnalysis.chiSThe Walsh--Fourier character associated to $S\subseteq[n]$ is…
- BooleanAnalysis.BooleanFuncA Boolean function of arity $n$ is a function $f : \{0,1\}^n \to \bbr$.
- BooleanAnalysis.BoolCubeThe Boolean hypercube of dimension $n$ is $\{0,1\}^n$, represented as the function type $\mathrm{Fin}\,n \to \mathrm{Bool}$.
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 maxHeartbeats 400000 inopen scoped BigOperators invariable {n : ℕ} in/-- The Fourier coefficient at `∅` equals the expectation of `f`. -/lemma BooleanAnalysis.fourierCoeff_empty (f : BooleanFunc n) : fourierCoeff f ∅ = expect f := by simp [fourierCoeff, innerProduct, chiS, expect, uniformWeight]