BoolFourier.BoolToPM1_sq
theoremverifiedimported Lean
Square of the Bool-to-$\pm 1$ embedding. For every Boolean value $b$, the image $\mathrm{BoolToPM1}(b)$ under the map sending $\mathtt{false}$ to $1$ and $\mathtt{true}$ to $-1$ satisfies $\mathrm{BoolToPM1}(b)\cdot\mathrm{BoolToPM1}(b) = 1$; that is, this $\pm 1$-valued quantity squares to $1$.
Statement
set_option relaxedAutoImplicit false in set_option autoImplicit false in open Finset BooleanAnalysis in lemma BoolFourier.BoolToPM1_sq (b : Bool) : BoolToPM1 b * BoolToPM1 b = 1
- Source
- TCSlib, `BoolFourier.BoolToPM1_sq`
- 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.BoolFourier.BoolToPM1_sq← BoolFourier.BoolToPM1_sq (TCSlib/BooleanAnalysis/BLR/BoolFourier.lean:94): verbatim
- Verified
- 07 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 2
- 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$;…
- BoolFourier.BoolToPM1The map $\mathrm{BoolToPM1} : \mathrm{Bool} \to \mathbb{R}$ sends $\mathtt{false}$ to $1$ and $\mathtt{true}$ to $-1$, realising the…
- Used by 1
- BoolBLR.BLR_soundness_via_fourier_aux_hparsevalParseval identity for the sign lift of a Boolean function. Let $f : \{0,1\}^n \to \{0,1\}$ be a Boolean-valued function, and let…
Lean source view module on GitHub
set_option relaxedAutoImplicit false in set_option autoImplicit false in open Finset BooleanAnalysis in /-- Shows that every value of the `{±1}` encoding has square one. **Source:** [OD14, §1.3]. -/ lemma BoolFourier.BoolToPM1_sq (b : Bool) : BoolToPM1 b * BoolToPM1 b = 1 := boolToSign_mul_self b