AFTD Auto-Formalizing Theoretical Domains

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.
Verified
07 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 6

Lean source view module on GitHub

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