AFTD Auto-Formalizing Theoretical Domains

BoolBLR.lift_pm1

defimported Lean

Given $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 $x \mapsto (-1)^{f(x)}$, converting each Boolean output to a real sign via BoolToPM1.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open Finset BoolFourier in
def BoolBLR.lift_pm1 (f : hypercube n → Bool) : BoolFun n
Defined in
TCSlib, `BoolBLR.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.
Verified
07 Oct 2026
Axioms
none listed
Built on 3
  • 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$.
  • BoolFourier.BoolFunA Boolean function of arity $n$ is an element of type $\{0,1\}^n \to \mathbb{R}$, defined as an abbreviation for…
Used by 17

Lean source view module on GitHub

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open Finset BoolFourier in
/-- Lifts a Boolean-valued function to its `{±1}`-valued encoding. **Source:** [OD14, §1.6]. -/
def BoolBLR.lift_pm1 (f : hypercube n → Bool) : BoolFun n :=
  fun x => BoolToPM1 (f x)
See it in the graphDiscuss this resultChallenge it