AFTD Auto-Formalizing Theoretical Domains

fourier_variance

def

The Fourier variance $\mathrm{Var}(f)$ of a function $f : \{0,1\}^n \to \mathbb{R}$ is the sum of the squares of its non-empty Fourier--Walsh coefficients: $\mathrm{Var}(f) = \sum_{S \subseteq [n], S \neq \emptyset} \hat{f}(S)^2$.

Statement

noncomputable def fourier_variance {n : ℕ} (f : BooleanAnalysis.BooleanFunc n) : ℝ
Defined in
arXiv:2611.08289 Section 2.1 (line 360)
Verified
06 Nov 2026
Axioms
none listed
Built on 2
Used by 3

Read back from the Lean

Given a natural number $n$ and a Boolean function $f : \mathrm{BooleanAnalysis.BooleanFunc}\ n$, fourier_variance f is defined as the real number equal to the sum over all non-empty subsets $S \subseteq \mathrm{Fin}\ n$ of the squared Fourier coefficient $(\mathrm{BooleanAnalysis.fourierCoeff}\ f\ S)^2$.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

/-- The Fourier variance Var(f) = ∑_{S ≠ ∅} f̂(S)^2 of a Boolean function. -/
noncomputable def fourier_variance {n : ℕ} (f : BooleanAnalysis.BooleanFunc n) : ℝ := ∑ S ∈ (Finset.univ : Finset (Finset (Fin n))).filter Finset.Nonempty,
    BooleanAnalysis.fourierCoeff f S ^ 2
See it in the graphDiscuss this resultChallenge it