BoolBLR.fourier_coeff_le_of_dist_ge_aux_h_lift_pm1
theoremverifiedimported Lean
Product of $\pm 1$ lifts as a disagreement indicator. Let $f, g : \{0,1\}^n \to \{0,1\}$ be Boolean-valued functions on the hypercube, and write $F, G : \{0,1\}^n \to \bbr$ for their $\pm 1$ lifts, given by $F(x) = (-1)^{f(x)}$ and $G(x) = (-1)^{g(x)}$. Then for every point $x \in \{0,1\}^n$, \[ F(x)\,G(x) \;=\; 1 - 2\cdot\mathbf{1}\!\left[f(x) \ne g(x)\right], \] so the product equals $+1$ where $f$ and $g$ agree at $x$ and $-1$ where they disagree.
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in open Finset BoolFourier in lemma BoolBLR.fourier_coeff_le_of_dist_ge_aux_h_lift_pm1 {n : ℕ} (f : BoolFourier.hypercube n → Bool) (g : BoolFourier.hypercube n → Bool) : ∀ (x : BooleanAnalysis.BoolCube n), lift_pm1 f x * lift_pm1 g x = 1 - 2 * if f x = g x then 0 else 1
- Source
- TCSlib, `BoolBLR.fourier_coeff_le_of_dist_ge_aux_h_lift_pm1`
- 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.BoolBLR.fourier_coeff_le_of_dist_ge_aux_h_lift_pm1← BoolBLR.fourier_coeff_le_of_dist_ge_aux_h_lift_pm1 (TCSlib/BooleanAnalysis/BLR/BoolBLR.lean:259): verbatim
- Verified
- 07 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 14
- BooleanAnalysis.sum_boolToSignSign encoding sums to zero over the Booleans. Let $\sigma\colon\mathrm{Bool}\to\{-1,1\}$ be the sign encoding, sending the value *false*…
- BooleanAnalysis.boolToSign_mul_selfSign encoding of false. Under the sign encoding $\sigma\colon\mathrm{Bool}\to\{-1,1\}$, the Boolean value $\mathrm{false}$ is sent to $1$;…
- 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.instModuleRealBooleanFuncBooleanAnalysis.instModuleRealBooleanFunc
- BoolFourier.BoolToPM1The map $\mathrm{BoolToPM1} : \mathrm{Bool} \to \mathbb{R}$ sends $\mathtt{false}$ to $1$ and $\mathtt{true}$ to $-1$, realising the…
- BoolFourier.hypercubeThe Boolean hypercube of dimension $n$ is the type $\{0,1\}^n$, defined as an abbreviation for
BooleanAnalysis.BoolCube$n$. - BooleanAnalysis.BoolCubeThe Boolean hypercube of dimension $n$ is $\{0,1\}^n$, represented as the function type $\mathrm{Fin}\,n \to \mathrm{Bool}$.
- BooleanAnalysis.boolToSign_trueSign encoding of false. Under the sign encoding $\sigma\colon\mathrm{Bool}\to\{-1,1\}$, the Boolean value $\mathrm{false}$ is sent to $1$;…
- BooleanAnalysis.boolToSign_falseSign encoding of false. Under the sign encoding $\sigma\colon\mathrm{Bool}\to\{-1,1\}$, the Boolean value $\mathrm{false}$ is sent to $1$;…
- BooleanAnalysis.boolToSign_notSign encoding of false. Under the sign encoding $\sigma\colon\mathrm{Bool}\to\{-1,1\}$, the Boolean value $\mathrm{false}$ is sent to $1$;…
- BooleanAnalysis.boolToSign_sqSign encoding of false. Under the sign encoding $\sigma\colon\mathrm{Bool}\to\{-1,1\}$, the Boolean value $\mathrm{false}$ is sent to $1$;…
- BoolBLR.lift_pm1Given $f : \{0,1\}^n \to \{0,1\}$, its $\pm 1$ lift $\texttt{BoolBLR.lift\_pm1}\,f : \{0,1\}^n \to \mathbb{R}$ is defined by…
- BooleanAnalysis.instAddCommGroupBooleanFuncBoolean functions form an
ℝ-vector space. - BooleanAnalysis.flipBit_flipBitBit-flip is an involution. For a point $x$ in the Boolean hypercube $\{0,1\}^n$ and a coordinate $i$, flipping the $i$-th coordinate of…
- Used by 1
- BoolBLR.fourier_coeff_le_of_dist_geFourier coefficient bound from distance. Let $f,g:\{0,1\}^n\to\{0,1\}$ be Boolean-valued functions, let $S\subseteq[n]$, and let…
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
set_option autoImplicit true inset_option relaxedAutoImplicit true inopen Finset BoolFourier inlemma BoolBLR.fourier_coeff_le_of_dist_ge_aux_h_lift_pm1 {n : ℕ} (f : BoolFourier.hypercube n → Bool) (g : BoolFourier.hypercube n → Bool) : ∀ (x : BooleanAnalysis.BoolCube n), lift_pm1 f x * lift_pm1 g x = 1 - 2 * if f x = g x then 0 else 1 := by unfold lift_pm1; intro x; rcases f x with ( _ | _ | f ) <;> rcases g x with ( _ | _ | g ) <;> norm_num [ BoolToPM1 ] ;