BoolFourier.convolution
defimported Lean
The 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]. \]
Statement
set_option relaxedAutoImplicit false in set_option autoImplicit false in open Finset BooleanAnalysis in noncomputable def BoolFourier.convolution {n : ℕ} (f g : BoolFun n) : BoolFun n
- Defined in
- TCSlib, `BoolFourier.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.convolution← BoolFourier.convolution (TCSlib/BooleanAnalysis/BLR/BoolFourier.lean:161): verbatim
- Verified
- 07 Oct 2026
- Axioms
- none listed
- Built on 3
- 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.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.BoolFunA Boolean function of arity $n$ is an element of type $\{0,1\}^n \to \mathbb{R}$, defined as an abbreviation for…
- Used by 4
- BoolBLR.triple_expectation_eq_cube_fourierCube of Fourier coefficients as an autocorrelation expectation. Let $f : \{0,1\}^n \to \{0,1\}$ be a Boolean-valued function on the…
- BoolFourier.fourier_coeff_convolutionConvolution 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…
- BoolBLR.triple_expectation_eq_cube_fourier_aux_h_substituteExpectation of a function against its Fourier-expanded autocorrelation. Let $f : \{0,1\}^n \to \{0,1\}$ be a Boolean function, and let $g$…
- 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$…
Lean source view module on GitHub
set_option relaxedAutoImplicit false in set_option autoImplicit false in open Finset BooleanAnalysis in /-- Defines convolution of two real-valued Boolean-cube functions. **Source:** [OD14, §1.5]. -/ noncomputable def BoolFourier.convolution {n : ℕ} (f g : BoolFun n) : BoolFun n := fun x => expectation (fun y => f y * g (xor_vec x y))