BooleanAnalysis.chiS
defimported Lean
The Walsh--Fourier character associated to $S\subseteq[n]$ is \[ \chi_S(x) \;=\; \prod_{i\in S}(-1)^{x_i} \;=\; \prod_{i\in S}\sigma(x_i). \] The family $\{\chi_S\}_{S\subseteq[n]}$ forms an orthonormal basis for $L^2(\{0,1\}^n,\mathrm{uniform})$.
Statement
set_option maxHeartbeats 400000 in open scoped BigOperators in variable {n : ℕ} in noncomputable def BooleanAnalysis.chiS (S : Finset (Fin n)) : BooleanFunc n
- Defined in
- TCSlib, `BooleanAnalysis.chiS`
- Lean proof
- By Jingzhen Sha, Allan Li, Hydroxyi, Mina, Owen McGinty (from the file's git history), from github.com/Shilun-Allan-Li/tcslib at
c8a02591b1e5(Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.25.0.BooleanAnalysis.chiS← BooleanAnalysis.chiS (TCSlib/BooleanAnalysis/Basic.lean:164): verbatim
- Verified
- 07 Oct 2026
- Axioms
- none listed
- Built on 2
- BooleanAnalysis.BooleanFuncA Boolean function of arity $n$ is a function $f : \{0,1\}^n \to \bbr$.
- BooleanAnalysis.boolToSignThe sign encoding maps $\mathrm{Bool}$ to $\{-1,1\}\subset\bbr$:…
- Used by 41
- BoolBLR.fourier_coeff_le_of_far_from_linearFourier coefficient bound for functions far from linear. Let $f : \{0,1\}^n \to \{0,1\}$ be $\varepsilon$-far from linear, meaning that…
- BooleanAnalysis.walsh_expansionWalsh–Fourier expansion of a Boolean function. Let $f:\{0,1\}^n\to\bbr$ be a Boolean function of arity $n$. Then at every point…
- DecisionTree.chiS_symmDiff_singletonSymmetric difference by a singleton toggles a Walsh character. Let $S\subseteq[n]$, let $i\in[n]$, and let $x\in\{0,1\}^n$. Then the…
- Bonami.fourierCoeff_diffLastFourier coefficient of the half-difference over the last coordinate. Let $f\colon\{0,1\}^{n+1}\to\bbr$ be a Boolean function on $n+1$…
- BooleanAnalysis.chiS_mul_chiSWalsh characters multiply by symmetric difference. Fix $n$, and for a subset $S\subseteq[n]$ let $\chi_S\colon\{0,1\}^n\to\bbr$ denote the…
- BooleanAnalysis.chiS_flipBitWalsh character under a single bit flip. Fix a subset $S\subseteq[n]$ of coordinates. For every point $x$ of the Boolean hypercube…
- ArrowTheorem.profile_kernel_genGeneral profile kernel for paired preference assignments. Let $x, y : \mathrm{Fin}\,6 \to \mathrm{Bool}$ be two preference assignments…
- BooleanAnalysis.fourier_coeff_chiOrthonormality of Walsh characters. For any two subsets $S, T \subseteq [n]$, the $L^2$ inner product of the Walsh--Fourier characters…
- 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}, \]…
- DecisionTree.fourierCoeff_signEvalFourier coefficients of a decision tree. Let $T$ be a decision tree on $n$ Boolean variables, and let $\sigma\!\circ\! T$ denote its…
- BooleanAnalysis.chiS_emptyEmpty-set Walsh character. The Walsh–Fourier character associated to the empty subset of $[n]$ is the constant function equal to $1$; that…
- KKL.lowDegreePartThe low-degree part of $f$ at level $k$ keeps only the Fourier coefficients of degree at most $k$:…
- KKL.lowDegree_l2_error$L^2$ error of the low-degree truncation. Let $f : \{0,1\}^n \to \bbr$ be a Boolean function, and for a natural number $k$ let…
- DecisionTree.signEval_eq_sum_coeffsWalsh expansion of a decision tree's sign function. Let $T$ be a decision tree on $n$ Boolean variables, computing the $\pm 1$-valued…
- Bonami.degree_avgLastAveraging over a coordinate preserves the degree bound. Let $f\colon\{0,1\}^{n+1}\to\bbr$ be a Boolean function on $n+1$ variables, and…
- KKL.low_plus_high_eqLow and high degree parts reconstruct the function. Let $f : \{0,1\}^n \to \bbr$ be a Boolean function and let $k \in \bbn$ be a threshold…
- BooleanAnalysis.sum_chiS_mul_eqCompleteness kernel for the Walsh basis. Let $x, y \in \{0,1\}^n$ be points of the Boolean hypercube. Then the sum of the products of…
- BooleanAnalysis.fourierCoeffThe Fourier--Walsh coefficient of $f$ at frequency $S$ is…
- BooleanAnalysis.dictator_eq_chiDictator function as a singleton character. For each coordinate $i \in [n]$, the dictator function on the Boolean hypercube $\{0,1\}^n$…
- BooleanAnalysis.influence_eq_sum_fourierInfluence via Fourier coefficients. Let $f:\{0,1\}^n\to\bbr$ be a Boolean function and fix a coordinate $i\in[n]$. Then the influence of…
- ArrowTheorem.degree_one_implies_dictatorDegree-one unanimous voting rules are dictatorships. Let $f:\{0,1\}^n\to\bbr$ be a Boolean function that is odd, is $\pm 1$-valued, and is…
- BooleanAnalysis.chiS_negWalsh character under global bit flip. Let $n$ be a natural number, let $S \subseteq [n]$, and let $x \in \{0,1\}^n$. Writing $\lnot x$…
- BooleanAnalysis.chiS_singletonValue of a singleton Walsh character. Fix a dimension $n$, a coordinate $i \in [n]$, and a point $x$ of the Boolean hypercube $\{0,1\}^n$.…
- BooleanAnalysis.plancherelPlancherel's identity. Let $f, g : \{0,1\}^n \to \bbr$ be Boolean functions. Then their $L^2$ inner product with respect to the uniform…
- BooleanAnalysis.sum_chiSSum of a Walsh character over the cube. Let $n$ be a natural number and let $S \subseteq [n]$. Summing the Walsh--Fourier character…
- BooleanAnalysis.innerProduct_chi_selfWalsh characters have unit norm. Let $n$ be a natural number and let $S \subseteq [n]$. Under the uniform measure on the Boolean hypercube…
- ArrowTheorem.profile_kernel_abcaKernel of the ab–ca vote correlation. Fix a natural number $n$ and consider profiles $p$ of $n$ voters, each of whom reports one of the…
- ArrowTheorem.profile_kernel_bccaThe $bc$–$ca$ profile kernel. Let $S, T \subseteq [n]$, and for a profile $p \colon \mathrm{Fin}\,n \to \mathrm{Fin}\,6$ write $x(p)$ for…
- BooleanAnalysis.fourierCoeff_emptyEmpty-set Fourier coefficient is the mean. Let $f\colon\{0,1\}^n\to\bbr$ be a Boolean function. Then its Fourier–Walsh coefficient at the…
- KKL.fourierCoeff_lowDegreePartFourier coefficients of the low-degree truncation. Let $f\colon\{0,1\}^n\to\bbr$ be a Boolean function and $k$ a natural number. For every…
- KKL.highDegreePartThe high-degree part of $f$ at level $k$ keeps only the Fourier coefficients of degree strictly greater than $k$:…
- BoolBLR.linear_bool_iff_character_aux_h_charMultiplicativity of the Walsh characters. Fix $n$ and a subset $S \subseteq [n]$, and let $\chi_S(x) = \prod_{i \in S}(-1)^{x_i}$ be the…
- BoolBLR.linear_bool_iff_characterLinear Boolean functions are exactly the Walsh characters. Let $f : \{0,1\}^n \to \{0,1\}$ be a Boolean function. Then $f$ is linear —…
- KKL.lowDegreePart_depends_on_influentialLow-degree part is close to a junta on the influential coordinates. Let $f:\{0,1\}^n\to\bbr$ be a Boolean function, let $k$ be a natural…
- BoolFourier.fourier_coeff_convolution_aux_h_splitMultiplicative splitting of a Walsh character along XOR. Let $S \subseteq [n]$, let $f, g : \{0,1\}^n \to \bbr$ be Boolean functions, and…
- DecisionTree.fourierCoeff_sum_chiSRecovery of coefficients from a character expansion. Fix $n$, let $c$ assign a real number $c(S)$ to each subset $S \subseteq [n]$, and…
- Bonami.degree_zero_constDegree-zero Boolean functions are constant. Let $f:\{0,1\}^n\to\bbr$ be a Boolean function of degree at most $0$; that is, every set $S$…
- ArrowTheorem.expected_product_helperExpected product from the character kernel. Let $f:\{0,1\}^n\to\bbr$ be a Boolean function, and let $\mathrm{votes}_1,\mathrm{votes}_2$…
- BooleanAnalysis.fourierCoeff_odd_evenVanishing of even-level Fourier coefficients of odd functions. Let $f : \{0,1\}^n \to \bbr$ be an odd Boolean function, meaning…
- BooleanAnalysis.parsevalParseval's identity for Boolean functions. Let $f : \{0,1\}^n \to \bbr$ be a Boolean function, and equip $\{0,1\}^n$ with the uniform…
- ArrowTheorem.profile_inner_product_kernelOrthogonality kernel for the $ab$–$bc$ vote pair. Fix $n$, and for each profile $p \in \{0,\dots,5\}^n$ let…
Lean source view module on GitHub
set_option maxHeartbeats 400000 in open scoped BigOperators in variable {n : ℕ} in /-- The Walsh–Fourier character `χ_S : {0,1}ⁿ → ℝ` associated to a set `S ⊆ [n]`. `χ_S(x) = ∏_{i ∈ S} (-1)^{x_i}`. This forms an orthonormal basis for `L²({0,1}ⁿ, uniform)`. **Source:** [OD14, §1.2]. -/ noncomputable def BooleanAnalysis.chiS (S : Finset (Fin n)) : BooleanFunc n := fun x ↦ ∏ i ∈ S, boolToSign (x i)