AFTD Auto-Formalizing Theoretical Domains

BooleanAnalysis.boolToSign_true

theoremverifiedimported Lean

Sign encoding of false. Under the sign encoding $\sigma\colon\mathrm{Bool}\to\{-1,1\}$, the Boolean value $\mathrm{false}$ is sent to $1$; that is, $\sigma(\mathrm{false}) = 1$. Under the sign encoding $\sigma\colon \mathrm{Bool}\to\{-1,1\}$, which sends the truth value false to $1$ and true to $-1$, the truth value true is mapped to $-1$; that is, $\sigma(\text{true}) = -1$. For every Boolean value $b$, the sign encoding satisfies $\sigma(b)^2 = 1$. For every $b \in \mathrm{Bool}$, the sign encoding $\sigma(b) \in \{-1,1\}$ satisfies $\sigma(b)\cdot\sigma(b) = 1$; that is, $\sigma(b)^2 = 1$. Let $\sigma\colon\mathrm{Bool}\to\{-1,1\}$ be the sign encoding, so that $\sigma(\mathrm{false})=1$ and $\sigma(\mathrm{true})=-1$. Then for every Boolean value $b$, negating $b$ flips the sign of its encoding: \[ \sigma(\lnot b) \;=\; -\,\sigma(b). \]

Statement

set_option maxHeartbeats 400000 in
open scoped BigOperators in
variable {n : ℕ} in
@[simp]
lemma BooleanAnalysis.boolToSign_true : boolToSign true = -1
Source
TCSlib, `BooleanAnalysis.boolToSign_true`
Lean proof
By Jingzhen Sha, Allan Li, Hydroxyi, Mina, 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.
Verified
07 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
Used by 14

Lean source view module on GitHub

set_option maxHeartbeats 400000 in
open scoped BigOperators in
variable {n : ℕ} in
@[simp]
lemma BooleanAnalysis.boolToSign_true : boolToSign true = -1 := rfl
See it in the graphDiscuss this resultChallenge it