Analysis on Boolean functions #
This file contains some basic definitions and theorems for analysis
of real-valued Boolean functions mainly following Ryan O'Donnell's book [odonnell2014].
The Hamming cube is represented by the function type Fin n β Fin 2, so that
a BooleanFunc n is a (Fin n β Fin 2) β β.
Thanks to Mathlib, it is relatively straightforward to get started with Fourier analysis:
- Typeclass inference automatically equips
BooleanFunc nwith the appropriate β-vector space structure. - We define inner product space structure via
InnerProductSpace.Coreand show that thewalshCharacters form an orthonormal basis. - Then Plancherel's theorem follows from Mathlib's
OrthogonalFamily.inner_sum.
Even if there was a general framework for Fourier transforms on LCA groups in Mathlib, it may be preferrable to use this ad-hoc definition due to slightly different notational conventions in the context of Boolean functions, and the simplicity of working with finite sums.
Main results #
walsh_fourierexpresses a Boolean function in terms of its Walsh-Fourier transformvariance_le_totalInfluenceis a version of the classical LΒ² PoincarΓ© inequalityfourier_convolutionis the convolution theorem for the Walsh-Fourier transform
Notation #
πdenotes expectation with respect to uniform probability measureΟ Sdenotes the Walsh character associated with anS : Finset (Fin n)πdenotes the Walsh-Fourier transformfourierTransformβ¨β¬, β¬β©denotes the inner product defined as expectation of productββ¬βdenotes the (normalized) LΒ² normβdenotes convolution
The expectation of a Boolean function is its average value with respect to the uniform
probability measure on Fin n β Fin 2.
Equations
- LeanPool.LeanBooleanfun.BooleanFun.expectation = { toFun := fun (f : LeanPool.LeanBooleanfun.BooleanFun.BooleanFunc n) => (1 / 2) ^ n * β i : Fin n β Fin 2, f i, map_add' := β―, map_smul' := β― }
Instances For
Expectation of a Boolean function
Equations
- LeanPool.LeanBooleanfun.BooleanFun.Β«termπΒ» = Lean.ParserDescr.node `LeanPool.LeanBooleanfun.BooleanFun.Β«termπΒ» 1024 (Lean.ParserDescr.symbol "π")
Instances For
Definition of Walsh character
Equations
- LeanPool.LeanBooleanfun.BooleanFun.walshCharacter S x = β i β S, (-1) ^ β(x i)
Instances For
Walsh character
Equations
- LeanPool.LeanBooleanfun.BooleanFun.termΟ = Lean.ParserDescr.node `LeanPool.LeanBooleanfun.BooleanFun.termΟ 1024 (Lean.ParserDescr.symbol "Ο")
Instances For
The Walsh-Fourier transform of a Boolean function f is defined on sets of coordinates
S : Finset (Fin n) as expectation of the Walsh character Ο S times f.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Walsh-Fourier transform on Boolean functions
Equations
- LeanPool.LeanBooleanfun.BooleanFun.termπ = Lean.ParserDescr.node `LeanPool.LeanBooleanfun.BooleanFun.termπ 1024 (Lean.ParserDescr.symbol "π")
Instances For
Boolean functions form an inner product space.
Equations
- One or more equations did not get rendered due to their size.
Walsh characters are LΒ² normalized.
Basis of Walsh characters on BooleanFunc n.
Instances For
Orthonormal basis of Walsh characters on BooleanFunc n.
Equations
Instances For
Walsh-Fourier expansion : Every Boolean function is equal to a linear combination of Walsh characters.
Plancherel/Parseval theorem for Boolean functions.
Plancherel/Parseval theorem for Boolean functions.
Discrete partial "derivative" of a Boolean function with respect to the ith coordinate.
See Def. 2.16 in [odonnell2014].
Equations
- One or more equations did not get rendered due to their size.
Instances For
The ith coordinate Laplacian operator as in Def. 2.25 [odonnell2014].
Equations
- One or more equations did not get rendered due to their size.
Instances For
The ith influence of a Boolean function is defined as the expectation of the ith Laplacian
squared.
Equations
Instances For
The total influence of a Boolean function is defined as the sum of the ith influences.
Equations
Instances For
Covariance of two Boolean functions
Equations
- One or more equations did not get rendered due to their size.
Instances For
Variance of a Boolean function defined via covariance
Equations
Instances For
LΒ² PoincarΓ© inequality : variance of a Boolean function is β€ total Influence. See [odonnell2014], Sec. 2.3.
The kth Fourier weight is the sum of squares of degree k Fourier coefficients
Equations
- LeanPool.LeanBooleanfun.BooleanFun.fourierWeight k f = β S : Finset (Fin n) with S.card = k, |LeanPool.LeanBooleanfun.BooleanFun.fourierTransform f S| ^ 2
Instances For
Alternative expression for degree one Fourier weight in terms in terms of sum over coordinates
Equations
Instances For
Walsh-Fourier multiplier as an β-linear operator on Boolean functions
Equations
- One or more equations did not get rendered due to their size.
Instances For
The noise operator defined via Fourier expansion. See Prop. 2.47 in [odonnell2014].
Equations
- LeanPool.LeanBooleanfun.BooleanFun.noiseOperator Ο = LeanPool.LeanBooleanfun.BooleanFun.multiplier fun (x : β) => Ο ^ x
Instances For
Noise stability
Equations
Instances For
Discrete convolution of Boolean functions
Equations
Instances For
Discrete convolution of Boolean functions
Equations
- One or more equations did not get rendered due to their size.
Instances For
Convolution theorem : the Walsh-Fourier transform turns convolution into pointwise product.