1 Boolean Analysis — Core Definitions
1.1 Overview
This chapter develops the Fourier–Walsh theory of Boolean functions \(f : \{ 0,1\} ^n \to \mathbb {R}\). The uniform probability measure on \(\{ 0,1\} ^n\) endows the space of Boolean functions with an \(L^2\) inner product \(\langle f, g\rangle = \mathbb {E}[fg]\). The Walsh characters \(\chi _S(x) = \prod _{i\in S}(-1)^{x_i}\), indexed by subsets \(S\subseteq [n]\), form an orthonormal basis for this space, yielding the Walsh–Fourier expansion \(f = \sum _S \hat f(S)\, \chi _S\).
The main results are:
Walsh expansion (Fourier inversion).
Parseval’s identity: \(\| f\| ^2 = \sum _S \hat f(S)^2\).
Influence via Fourier: \(\mathrm{Inf}_i[f] = \sum _{S\ni i}\hat f(S)^2\).
Total influence: \(I[f] = \sum _S |S|\, \hat f(S)^2\).
Noise operator in the Fourier domain: \(\widehat{T_\rho f}(S) = \rho ^{|S|}\hat f(S)\).
Reference: Ryan O’Donnell, Analysis of Boolean Functions, Cambridge University Press, 2014.
1.2 The Boolean hypercube and functions
The Boolean hypercube of dimension \(n\) is \(\{ 0,1\} ^n\), represented as the function type \(\mathrm{Fin}\, n \to \mathrm{Bool}\).
A Boolean function of arity \(n\) is a function \(f : \{ 0,1\} ^n \to \mathbb {R}\).
1.3 Uniform measure and expectation
The uniform probability measure on \(\{ 0,1\} ^n\) assigns weight \(2^{-n}\) to each point.
The expectation of \(f\) under the uniform measure:
The \(L^2\) inner product of two Boolean functions with respect to the uniform measure:
The \(L^2\) norm of \(f\): \(\| f\| = \sqrt{\langle f,f\rangle }\).
For any two Boolean functions \(f, g : \{ 0,1\} ^n \to \mathbb {R}\), the \(L^2\) inner product with respect to the uniform measure is symmetric:
Let \(f : \{ 0,1\} ^n \to \mathbb {R}\) be a Boolean function of arity \(n\). Then its \(L^2\) inner product with itself is nonnegative:
Let \(n\) be a natural number and let \(f, g, h : \{ 0,1\} ^n \to \mathbb {R}\) be Boolean functions. With respect to the \(L^2\) inner product under the uniform measure, \(\langle f, g\rangle = 2^{-n}\sum _{x\in \{ 0,1\} ^n} f(x)\, g(x)\), one has
where \(f + g\) denotes the pointwise sum.
1.4 Walsh–Fourier characters
The sign encoding maps \(\mathrm{Bool}\) to \(\{ -1,1\} \subset \mathbb {R}\):
Under the sign encoding \(\sigma \colon \mathrm{Bool}\to \{ -1,1\} \), the Boolean value \(\mathrm{false}\) is sent to \(1\); that is, \(\sigma (\mathrm{false}) = 1\).
Under the sign encoding \(\sigma \colon \mathrm{Bool}\to \{ -1,1\} \), which sends the truth value false to \(1\) and true to \(-1\), the truth value true is mapped to \(-1\); that is, \(\sigma (\text{true}) = -1\).
For every Boolean value \(b\), the sign encoding satisfies \(\sigma (b)^2 = 1\).
For every \(b \in \mathrm{Bool}\), the sign encoding \(\sigma (b) \in \{ -1,1\} \) satisfies \(\sigma (b)\cdot \sigma (b) = 1\); that is, \(\sigma (b)^2 = 1\).
Let \(\sigma \colon \mathrm{Bool}\to \{ -1,1\} \) be the sign encoding, so that \(\sigma (\mathrm{false})=1\) and \(\sigma (\mathrm{true})=-1\). Then for every Boolean value \(b\), negating \(b\) flips the sign of its encoding:
The Walsh–Fourier character associated to \(S\subseteq [n]\) is
The family \(\{ \chi _S\} _{S\subseteq [n]}\) forms an orthonormal basis for \(L^2(\{ 0,1\} ^n,\mathrm{uniform})\).
The Walsh–Fourier character associated to the empty subset of \([n]\) is the constant function equal to \(1\); that is, \(\chi _\emptyset (x) = 1\) for every point \(x\) of the Boolean hypercube \(\{ 0,1\} ^n\).
Fix a dimension \(n\), a coordinate \(i \in [n]\), and a point \(x\) of the Boolean hypercube \(\{ 0,1\} ^n\). Then the Walsh–Fourier character of the singleton set \(\{ i\} \), evaluated at \(x\), is the sign encoding of the \(i\)-th coordinate of \(x\):
Let \(n\) be a natural number, let \(S \subseteq [n]\), and let \(x \in \{ 0,1\} ^n\) be a point of the Boolean hypercube. Then the Walsh–Fourier character \(\chi _S\) satisfies \(\chi _S(x)^2 = 1\); that is, every character takes values in \(\{ -1, 1\} \).
Let \(n\) be a natural number, and let \(S, T \subseteq [n]\) be disjoint subsets of coordinates. Then for every point \(x\) of the Boolean hypercube \(\{ 0,1\} ^n\), the Walsh–Fourier character of the union factors as the product of the characters of the two sets:
Fix \(n\), and for a subset \(S\subseteq [n]\) let \(\chi _S\colon \{ 0,1\} ^n\to \mathbb {R}\) denote the associated Walsh–Fourier character. Then for all subsets \(S,T\subseteq [n]\) and every point \(x\in \{ 0,1\} ^n\),
where \(S\, \triangle \, T\) is the symmetric difference of \(S\) and \(T\).
Let \(n\) be a natural number, let \(S \subseteq [n]\), and let \(x \in \{ 0,1\} ^n\). Writing \(\lnot x\) for the point obtained by flipping every coordinate of \(x\), the Walsh–Fourier character \(\chi _S\) satisfies
where \(\left\lvert S\right\rvert \) is the number of elements of \(S\).
For each \(n\), the number of subsets \(S \subseteq [n]\) is exactly \(2^n\). Since the Walsh characters \(\chi _S\) are indexed by these subsets, there are precisely \(2^n\) of them, matching the dimension of \(L^2(\{ 0,1\} ^n)\).
1.5 Fourier coefficients
The Fourier–Walsh coefficient of \(f\) at frequency \(S\) is
Let \(f\colon \{ 0,1\} ^n\to \mathbb {R}\) be a Boolean function. Then its Fourier–Walsh coefficient at the empty frequency equals its expectation under the uniform measure:
1.6 Walsh expansion
Let \(f:\{ 0,1\} ^n\to \mathbb {R}\) be a Boolean function of arity \(n\). Then at every point \(x\in \{ 0,1\} ^n\),
where the sum ranges over all subsets \(S\) of \([n]\), \(\chi _S\) is the Walsh character of \(S\), and \(\hat f(S)=\langle f,\chi _S\rangle \) is the Fourier–Walsh coefficient of \(f\) at \(S\).
1.7 Orthonormality and Parseval’s identity
For any two subsets \(S, T \subseteq [n]\), the \(L^2\) inner product of the Walsh–Fourier characters \(\chi _S\) and \(\chi _T\), taken with respect to the uniform measure on \(\{ 0,1\} ^n\), satisfies
In particular, the family \(\{ \chi _S\} _{S\subseteq [n]}\) is orthonormal.
Let \(n\) be a natural number and let \(S \subseteq [n]\). Under the uniform measure on the Boolean hypercube \(\{ 0,1\} ^n\), the Walsh–Fourier character \(\chi _S\) satisfies
Let \(f : \{ 0,1\} ^n \to \mathbb {R}\) be a Boolean function, and equip \(\{ 0,1\} ^n\) with the uniform probability measure. Then the \(L^2\) inner product of \(f\) with itself equals the sum of the squares of its Fourier–Walsh coefficients over all subsets \(S \subseteq [n]\):
1.8 Coordinate influence
The point \(x^i\in \{ 0,1\} ^n\) obtained from \(x\) by flipping the \(i\)-th coordinate.
The influence of coordinate \(i\) on \(f\) measures how often flipping bit \(i\) changes the output:
For \(\pm 1\)-valued \(f\) this equals \(\Pr [f(x)\ne f(x^i)]\).
\(I[f] = \sum _{i=1}^n \mathrm{Inf}_i[f]\).
Fix \(n\), a coordinate \(i \in [n]\), and a set \(S \subseteq [n]\). The influence of coordinate \(i\) on the Walsh–Fourier character \(\chi _S\) is
Let \(f:\{ 0,1\} ^n\to \mathbb {R}\) be a Boolean function and fix a coordinate \(i\in [n]\). Then the influence of \(i\) on \(f\) equals the sum of the squared Fourier–Walsh coefficients over all frequencies containing \(i\):
For every Boolean function \(f\colon \{ 0,1\} ^n\to \mathbb {R}\), the total influence of \(f\) is recovered from its Fourier–Walsh spectrum by
where the sum ranges over all subsets \(S\) of \([n]=\{ 1,\dots ,n\} \), \(\left\lvert S\right\rvert \) is the cardinality of \(S\), and \(\hat f(S)\) is the Fourier–Walsh coefficient of \(f\) at frequency \(S\).
Let \(f : \{ 0,1\} ^n \to \mathbb {R}\) be a Boolean function taking values in \(\{ -1, 1\} \), and let \(i\) be one of its \(n\) coordinates. Then the influence of coordinate \(i\) on \(f\) satisfies
where \(x^i\) denotes the point obtained from \(x\) by flipping its \(i\)-th coordinate and the expectation is taken under the uniform measure on \(\{ 0,1\} ^n\).
Let \(f:\{ 0,1\} ^n\to \mathbb {R}\) be a Boolean function on the hypercube of dimension \(n\ge 1\). Then some coordinate carries at least the average influence: there exists an index \(i\) with
where \(I[f]=\sum _{j=1}^{n}\mathrm{Inf}_j[f]\) is the total influence.
1.9 Noise operator
The noise operator \(T_\rho \) with parameter \(\rho \in [-1,1]\), defined via the Fourier domain by
Probabilistically, \(T_\rho f(x) = \mathbb {E}_y[f(y)]\) where each bit of \(y\) agrees with \(x_i\) with probability \(\tfrac {1+\rho }{2}\) and is flipped with probability \(\tfrac {1-\rho }{2}\), independently.
Let \(\rho \in \mathbb {R}\), let \(f:\{ 0,1\} ^n\to \mathbb {R}\) be a Boolean function, and let \(S\subseteq [n]\). Then the Fourier–Walsh coefficient of the noise-operator image \(T_\rho f\) at frequency \(S\) is
Let \(f : \{ 0,1\} ^n \to \mathbb {R}\) be a Boolean function and let \(\rho \in \mathbb {R}\). Then the correlation of \(f\) with its noised version under the uniform measure is given by
where \(\langle \cdot ,\cdot \rangle \) is the \(L^2\) inner product, \(T_\rho \) is the noise operator, and \(\hat f(S)\) denotes the Fourier–Walsh coefficient of \(f\) at \(S\).
1.10 Notable Boolean functions
The dictator function for coordinate \(i\) outputs the sign of the \(i\)-th bit: \(\mathrm{dict}_i(x) = (-1)^{x_i}\). Its unique nonzero Fourier coefficient is \(\widehat{\mathrm{dict}_i}(\{ i\} ) = 1\).
For each coordinate \(i \in [n]\), the dictator function on the Boolean hypercube \(\{ 0,1\} ^n\) coincides with the Walsh–Fourier character associated to the singleton set \(\{ i\} \); that is, \(\mathrm{dict}_i = \chi _{\{ i\} }\) as functions \(\{ 0,1\} ^n \to \mathbb {R}\).
The parity function \(f(x) = (-1)^{x_1+\cdots +x_n}\) satisfies \(\hat f([n]) = 1\) and \(\hat f(S) = 0\) for \(S\ne [n]\).
For every \(n\), the parity function \(\mathrm{parity}_n(x) = \prod _{i=1}^{n}\sigma (x_i)\) on the Boolean hypercube \(\{ 0,1\} ^n\) coincides, as a Boolean function, with the Walsh–Fourier character \(\chi _{[n]}\) indexed by the full set \([n] = \{ 1,\dots ,n\} \); that is, \(\mathrm{parity}_n = \chi _{[n]}\).
The majority function on \(\{ 0,1\} ^{2k+1}\) outputs \(1\) if more than half the inputs are \(\texttt{false}\), and \(-1\) otherwise.
1.11 Sensitivity
The sensitivity of \(f\) at \(x\) is the number of coordinates \(i\) such that flipping bit \(i\) changes \(f(x)\).
The maximum sensitivity of \(f\) over all inputs.
1.12 Properties for Arrow’s theorem
A Boolean function \(f\) is odd if \(f(\lnot x) = -f(x)\) for all \(x\). This models antisymmetry of pairwise preferences in social choice.
\(f\) is \(\pm 1\)-valued if \(f(x)\in \{ -1,1\} \) for all \(x\).
Let \(f : \{ 0,1\} ^n \to \mathbb {R}\) be an odd Boolean function, meaning \(f(\lnot x) = -f(x)\) for every \(x \in \{ 0,1\} ^n\), where \(\lnot x\) denotes the pointwise negation of \(x\). Then for every subset \(S \subseteq [n]\) of even cardinality, the Fourier–Walsh coefficient of \(f\) at \(S\) vanishes: \(\hat f(S) = 0\).
Let \(f : \{ 0,1\} ^n \to \mathbb {R}\) be a \(\pm 1\)-valued Boolean function, so that \(f(x) \in \{ -1, 1\} \) for every \(x \in \{ 0,1\} ^n\). Then its \(L^2\) inner product with itself, taken with respect to the uniform measure on the cube, equals \(1\):
Let \(f \colon \{ 0,1\} ^n \to \mathbb {R}\) be a Boolean function that is \(\pm 1\)-valued, meaning \(f(x) \in \{ -1,1\} \) for every \(x \in \{ 0,1\} ^n\). Then its Fourier–Walsh coefficients satisfy
the sum ranging over all subsets \(S\) of \([n]\).
The Fourier weight at level \(k\) is
1.13 Additional declarations
Let \(P\) be a probability measure on the Boolean hypercube \(\{ 0,1\} ^n\) that assigns every singleton the uniform weight \(2^{-n}\). Then for any Boolean function \(f : \{ 0,1\} ^n \to \mathbb {R}\) and any \(p \in \mathbb {N}\), the \(p\)-th moment of \(f\) under \(P\) equals the uniform expectation of \(f^p\):
For any real numbers \(c_0,\dots ,c_{n-1}\), indexed by \(i \in \mathrm{Fin}\, n\),
where the sum ranges over all subsets \(S\) of the index set (with the empty product equal to \(1\)).
Let \(x, y \in \{ 0,1\} ^n\) be points of the Boolean hypercube. Then the sum of the products of Walsh–Fourier characters over all subsets of \([n]\) satisfies
A Boolean function \(f\) has degree at most \(k\) if every nonzero Fourier coefficient is supported on a set of size at most \(k\): for all \(S\), if \(\hat f(S)\ne 0\) then \(|S|\le k\).
Let \(\sigma \colon \mathrm{Bool}\to \{ -1,1\} \) be the sign encoding, sending the value *false* to \(1\) and the value *true* to \(-1\). Summing \(\sigma \) over the two Boolean values yields
Let \(n\) be a natural number and let \(S \subseteq [n]\). Summing the Walsh–Fourier character \(\chi _S\) over the entire Boolean hypercube \(\{ 0,1\} ^n\) gives
Let \(f, g : \{ 0,1\} ^n \to \mathbb {R}\) be Boolean functions. Then their \(L^2\) inner product with respect to the uniform measure equals the sum, over all subsets \(S \subseteq [n]\), of the products of their corresponding Fourier–Walsh coefficients:
For a point \(x\) in the Boolean hypercube \(\{ 0,1\} ^n\) and a coordinate \(i\), flipping the \(i\)-th coordinate of \(x\) twice returns the original point: \((x^i)^i = x\).
Let \(x\in \{ 0,1\} ^n\) be a point of the Boolean hypercube, and let \(i,j\) be coordinate indices with \(i\ne j\). Writing \(x^i\) for the point obtained from \(x\) by flipping the \(i\)-th coordinate, we have \((x^i)_j = x_j\); that is, flipping coordinate \(i\) leaves coordinate \(j\) unchanged.
Fix a subset \(S\subseteq [n]\) of coordinates. For every point \(x\) of the Boolean hypercube \(\{ 0,1\} ^n\) and every coordinate \(i\in [n]\), the value of the Walsh–Fourier character \(\chi _S\) at the point \(x^i\) obtained by flipping the \(i\)-th coordinate of \(x\) is
The discrete derivative of \(f\) in direction \(i\) is the Boolean function
where \(x^{i\mapsto b}\) sets coordinate \(i\) of \(x\) to \(b\).
Fix an arity \(n\) and a coordinate direction \(i \in \{ 1, \dots , n\} \). For any two Boolean functions \(f, g : \{ 0,1\} ^n \to \mathbb {R}\), the discrete derivative in direction \(i\) satisfies
that is, the operator \(D_i\) is additive.
Fix an arity \(n\) and a coordinate direction \(i \in \{ 1,\dots ,n\} \). For every scalar \(c \in \mathbb {R}\) and every Boolean function \(f : \{ 0,1\} ^n \to \mathbb {R}\), the discrete derivative in direction \(i\) commutes with scalar multiplication:
that is, scaling \(f\) by \(c\) scales its discrete derivative by the same factor.
The discrete derivative \(D_i\) packaged as an \(\mathbb {R}\)-linear map on the space of Boolean functions.
The expectation operator in direction \(i\) averages \(f\) over the two values of coordinate \(i\):
Fix \(n \in \mathbb {N}\) and a coordinate direction \(i \in \{ 1,\dots ,n\} \), and write \(E_i\) for the expectation operator in direction \(i\), which sends a Boolean function \(h : \{ 0,1\} ^n \to \mathbb {R}\) to the function \((E_i h)(x) = \tfrac {1}{2}\bigl(h(x^{i\mapsto 0}) + h(x^{i\mapsto 1})\bigr)\). Then \(E_i\) is additive: for all Boolean functions \(f, g : \{ 0,1\} ^n \to \mathbb {R}\),
Let \(n\) be an arity and let \(i\) be one of its coordinates. For every scalar \(c \in \mathbb {R}\) and every Boolean function \(f : \{ 0,1\} ^n \to \mathbb {R}\), applying the expectation operator in direction \(i\) to the scaled function \(c\, f\) yields \(c\) times the expectation operator applied to \(f\):
The expectation operator \(E_i\) packaged as an \(\mathbb {R}\)-linear map on the space of Boolean functions.
Fix a dimension \(n\) and let \(f, g : \{ 0,1\} ^n \to \mathbb {R}\) be Boolean functions. For any real number \(\rho \), the noise operator \(T_\rho \) is self-adjoint with respect to the \(L^2\) inner product induced by the uniform measure on \(\{ 0,1\} ^n\):