AFTD Auto-Formalizing Theoretical Domains

ArrowTheorem.corrFunc

defimported Lean

The Fourier correlation function of $f$ is \[ \mathrm{corr}(f) \;=\; \sum_{S\subseteq[n]} \hat f(S)^2\,(-1/3)^{|S|}. \] For odd $f$, only odd-level terms contribute.

Statement

set_option maxHeartbeats 800000 in
open scoped BigOperators in
open BooleanAnalysis in
variable {n : ℕ} in
noncomputable def ArrowTheorem.corrFunc (f : BooleanFunc n) : ℝ
Defined in
TCSlib, `ArrowTheorem.corrFunc`
Lean proof
By Mina, Allan Li, 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
none listed
Built on 2
Used by 7

Lean source view module on GitHub

set_option maxHeartbeats 800000 in
open scoped BigOperators in
open BooleanAnalysis in
variable {n : ℕ} in
/-- The pairwise correlation function: ∑_S f̂(S)² · (-1/3)^|S|. For odd f, only odd-level terms are nonzero. **Source:** [OD14, Ch. 2]. -/
noncomputable def ArrowTheorem.corrFunc (f : BooleanFunc n) : ℝ :=
  ∑ S : Finset (Fin n), fourierCoeff f S ^ 2 * (-1/3 : ℝ) ^ S.card
See it in the graphDiscuss this resultChallenge it