AFTD Auto-Formalizing Theoretical Domains

BoolFourier.fourier_coeff

defimported Lean

The Fourier coefficient of $f : \{0,1\}^n \to \mathbb{R}$ at $S \subseteq [n]$ is \[ \hat f(S) = \langle f, \chi_S \rangle. \]

Statement

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
open Finset BooleanAnalysis in
noncomputable def BoolFourier.fourier_coeff {n : ℕ} (f : BoolFun n) (S : Finset (Fin n)) : ℝ
Defined in
TCSlib, `BoolFourier.fourier_coeff`
Lean proof
By Prastik Mohanraj, from github.com/Shilun-Allan-Li/tcslib at c8a02591b1e5 (Copyright (c) 2026 Prastik Mohanraj. All rights reserved, 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 3
  • BoolFourier.char_SFor a set $S \subseteq [n]$, the Walsh character $\chi_S : \{0,1\}^n \to \mathbb{R}$ is \[ \chi_S(x) = \prod_{i \in S} (-1)^{x_i}, \]…
  • BoolFourier.inner_productThe inner product of $f, g : \{0,1\}^n \to \mathbb{R}$ is…
  • BoolFourier.BoolFunA Boolean function of arity $n$ is an element of type $\{0,1\}^n \to \mathbb{R}$, defined as an abbreviation for…
Used by 13

Lean source view module on GitHub

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
open Finset BooleanAnalysis in
/-- Defines the Fourier coefficient of a Boolean-cube function at a character. **Source:** [OD14, §1.3]. -/
noncomputable def BoolFourier.fourier_coeff {n : ℕ} (f : BoolFun n) (S : Finset (Fin n)) : ℝ :=
  inner_product f (char_S S)
See it in the graphDiscuss this resultChallenge it