BoolFourier.fourier_coeff_convolution
theoremverifiedimported Lean
Convolution theorem on the Boolean cube. Let $n$ be a natural number, and let $f, g : \{0,1\}^n \to \bbr$ be Boolean functions. Then for every subset $S \subseteq [n]$, the Fourier coefficient of the convolution $f * g$ at $S$ equals the product of the Fourier coefficients of $f$ and $g$ at $S$: \[ \widehat{f * g}(S) = \hat f(S)\,\hat g(S). \]
Statement
set_option relaxedAutoImplicit false in set_option autoImplicit false in open Finset BooleanAnalysis in lemma BoolFourier.fourier_coeff_convolution {n : ℕ} (f g : BoolFun n) (S : Finset (Fin n)) : fourier_coeff (convolution f g) S = fourier_coeff f S * fourier_coeff g S
- Source
- TCSlib, `BoolFourier.fourier_coeff_convolution`
- 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.BoolFourier.fourier_coeff_convolution← BoolFourier.fourier_coeff_convolution (TCSlib/BooleanAnalysis/BLR/BoolFourier.lean:378): verbatim
- Verified
- 07 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 10
- BoolFourier.expectationFor $f : \{0,1\}^n \to \mathbb{R}$, the uniform expectation is \[ \mathbb{E}[f] = \frac{1}{2^n} \sum_{x \in \{0,1\}^n} f(x). \]
- 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.convolutionThe convolution of $f, g : \{0,1\}^n \to \mathbb{R}$ is the function \[ (f * g)(x) = \mathbb{E}_{y}\bigl[f(y)\,g(x \oplus y)\bigr]. \]
- BoolFourier.xor_vecFor $x, y \in \{0,1\}^n$, the vector $\mathrm{xor\_vec}(x,y)_i = x_i \oplus y_i$ is the componentwise XOR, giving the group operation on…
- BoolFourier.hypercubeThe Boolean hypercube of dimension $n$ is the type $\{0,1\}^n$, defined as an abbreviation for
BooleanAnalysis.BoolCube$n$. - BoolFourier.fourier_coeff_convolution_aux_h_fubiniInterchange of summation in the convolution coefficient. Let $n$ be a natural number, let $f, g : \{0,1\}^n \to \bbr$ be Boolean…
- BoolFourier.fourier_coeffThe Fourier coefficient of $f : \{0,1\}^n \to \mathbb{R}$ at $S \subseteq [n]$ is \[ \hat f(S) = \langle f, \chi_S \rangle. \]
- BoolFourier.fourier_coeff_convolution_aux_h_charShift rule for character-weighted sums. Let $f, g : \{0,1\}^n \to \bbr$ be Boolean functions, let $S \subseteq [n]$, and write…
- 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 6
- LinearPMap.inner_map_polarization'The analogue of
inner_map_polarization'for LinearPMap. - PMNSDiracEquivalence_symmThe relation
PMNSDiracEquivalenceis symmetric. - LinearPMap.inner_map_polarizationThe analogue of
inner_map_polarizationfor LinearPMap. - PMNSDiracEquivalence_transThe relation
PMNSDiracEquivalenceis transitive. - BoolBLR.triple_expectation_eq_cube_fourier_aux_h_convolutionFourier expansion of the self-convolution. Let $f : \{0,1\}^n \to \{0,1\}$ be a Boolean-valued function, and let $g : \{0,1\}^n \to \bbr$…
- phaseShiftRelation_symmThe relation
PhaseShiftRelationis symmetric.
- LinearPMap.inner_map_polarization'The analogue of
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 relaxedAutoImplicit false inset_option autoImplicit false inopen Finset BooleanAnalysis in/-- States that the Fourier coefficient of a convolution is the product of coefficients. **Source:** [OD14, §1.5]. -/lemma BoolFourier.fourier_coeff_convolution {n : ℕ} (f g : BoolFun n) (S : Finset (Fin n)) : fourier_coeff (convolution f g) S = fourier_coeff f S * fourier_coeff g S := by classical let h_char : ∀ y : hypercube n, ∑ x : hypercube n, g (xor_vec x y) * char_S S x = char_S S y * ∑ x : hypercube n, g x * char_S S x := (fourier_coeff_convolution_aux_h_char f g S (fourier_coeff_convolution_aux_h_fubini f g S)) unfold convolution fourier_coeff inner_product expectation simp_all +decide [div_mul_eq_mul_div, ← Finset.sum_div, (fourier_coeff_convolution_aux_h_fubini f g S)] simp +decide only [← mul_assoc, ← Finset.sum_mul]; ring