CommunicationComplexity.boolSign
defimported Lean
$\texttt{boolSign} : \mathrm{Bool} \to \mathbb{R}$ assigns the real value $1$ to $\mathrm{false}$ and $-1$ to $\mathrm{true}$, embedding Boolean values into the multiplicative group $\{\pm 1\} \subset \mathbb{R}$.
Statement
set_option relaxedAutoImplicit false in set_option autoImplicit false in def CommunicationComplexity.boolSign (b : Bool) : ℝ
- Defined in
- TCSlib, `CommunicationComplexity.boolSign`
- Lean proof
- By Lucy Horowitz, Timothe Kasriel, Mihir Singhal, from github.com/Shilun-Allan-Li/tcslib at
c8a02591b1e5(Copyright (c) 2026 Lucy Horowitz, Timothe Kasriel, and Mihir Singhal. 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.CommunicationComplexity.boolSign← CommunicationComplexity.boolSign (TCSlib/CommunicationComplexity/DeterministicCC/Helper.lean:66): verbatim
- Verified
- 07 Oct 2026
- Axioms
- none listed
- Used by 8
- CommunicationComplexity.Deterministic.Protocol.signedBias_eq_sum_rectanglesSigned bias as a sum over leaf rectangles. Let $\mu$ be a finite probability space on $X \times Y$, let $p$ be a deterministic Boolean…
- CommunicationComplexity.Deterministic.Protocol.signedBias_eq_one_sub_two_distributionalErrorSigned correlation and distributional error. Let $X$ and $Y$ be the input types of Alice and Bob, and let $\mu$ be a finite probability…
- CommunicationComplexity.Deterministic.Protocol.rectangleSign_eq_boolSignRectangle sign equals Boolean sign on leaf rectangles. Let $p$ be a deterministic two-party communication protocol with Boolean output,…
- CommunicationComplexity.boolSign_xorBoolean sign turns XOR into multiplication. Write $\mathrm{sgn} : \mathrm{Bool} \to \bbr$ for the Boolean sign map, which sends…
- CommunicationComplexity.discrepancyLet $\mu$ be a finite probability space on $X \times Y$, let $g : X \to Y \to \mathrm{Bool}$, and let $S \subseteq X \times Y$. The…
- CommunicationComplexity.Deterministic.Protocol.sum_indicator_leafRectangles_eqIndicator sum over leaf rectangles recovers the protocol output. Let $X$ and $Y$ be input types whose product $X \times Y$ carries a…
- CommunicationComplexity.boolSign_mul_boolSign_eq_sub_two_indicatorProduct of two Boolean signs. For all Boolean values $a$ and $b$, the product of their signs satisfies…
- CommunicationComplexity.Deterministic.Protocol.one_sub_two_distributionalError_le_two_pow_mulDiscrepancy lower bound on distributional error. Let $\mu$ be a finite probability measure on $X \times Y$, let…
Lean source view module on GitHub
set_option relaxedAutoImplicit false in set_option autoImplicit false in /-- The `±1` sign attached to a Boolean value. We use `1` for `false` and `-1` for `true`, i.e. the encoding `b ↦ (-1)^b` of [OD14, §1.1]. -/ def CommunicationComplexity.boolSign (b : Bool) : ℝ := if b then -1 else 1