Bonami.diffLast
defimported Lean
The half-difference $\mathrm{diffLast}\,f$ of $f$ over its last coordinate is the function on $n$ variables given by $\tfrac12\bigl(\mathrm{restrictLast}\,f\,\mathrm{false} - \mathrm{restrictLast}\,f\,\mathrm{true}\bigr)$.
Statement
open BooleanAnalysis in noncomputable def Bonami.diffLast {n : ℕ} (f : BooleanFunc (n + 1)) : BooleanFunc n
- Defined in
- TCSlib, `Bonami.diffLast`
- Lean proof
- By 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.Bonami.diffLast← Bonami.diffLast (TCSlib/BooleanAnalysis/Hypercontractivity/Decomposition.lean:37): verbatim
- Verified
- 07 Oct 2026
- Axioms
- none listed
- Built on 2
- Bonami.restrictLastGiven a Boolean function $f$ on $n+1$ variables and a bit $b$, the restriction $\mathrm{restrictLast}\,f\,b$ is the function on $n$…
- BooleanAnalysis.BooleanFuncA Boolean function of arity $n$ is a function $f : \{0,1\}^n \to \bbr$.
- Used by 6
- 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$…
- Bonami.second_moment_decompSecond-moment decomposition over the last coordinate. Let $f : \{0,1\}^{n+1} \to \bbr$ be a Boolean function on $n+1$ variables. Define…
- Bonami.bonami_expectBonami inequality in expectation form. Let $f : \{0,1\}^n \to \bbr$ be a Boolean function of degree at most $k$, meaning that every…
- Bonami.degree_diffLastDegree bound for the half-difference over the last coordinate. Let $f\colon\{0,1\}^{n+1}\to\bbr$ be a Boolean function of degree at most…
- Bonami.restrictLast_true_eqRecovering the true-restriction from average and half-difference. Let $f : \{0,1\}^{n+1} \to \bbr$ be a Boolean function on $n+1$…
- Bonami.fourth_moment_decompFourth-moment decomposition over the last coordinate. Let $f : \{0,1\}^{n+1} \to \bbr$ be a Boolean function on $n+1$ variables, and let…
Lean source view module on GitHub
open BooleanAnalysis in /-- Defines the half-difference of a Boolean function over its final coordinate. **Source:** [OD14, Cor. 9.6 (proof)]. -/ noncomputable def Bonami.diffLast {n : ℕ} (f : BooleanFunc (n + 1)) : BooleanFunc n := fun x => (restrictLast f false x - restrictLast f true x) / 2