AFTD Auto-Formalizing Theoretical Domains

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.
Verified
07 Oct 2026
Axioms
none listed
Used by 8

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
See it in the graphDiscuss this resultChallenge it