BoolBLR.BLR_completeness_aux_h_lift_linear
theoremverifiedimported Lean
Multiplicativity of the sign lift of an XOR-homomorphism. Let $f : \{0,1\}^n \to \{0,1\}$ be a function that respects componentwise XOR, meaning $f(x \oplus y) = f(x) \oplus f(y)$ for all $x, y \in \{0,1\}^n$, and let $g : \{0,1\}^n \to \bbr$ be its $\pm 1$ lift, $g(x) = (-1)^{f(x)}$. Then $g$ turns XOR into multiplication: \[ g(x \oplus y) \;=\; g(x)\,g(y) \qquad \text{for all } x, y \in \{0,1\}^n. \]
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in open Finset BoolFourier in lemma BoolBLR.BLR_completeness_aux_h_lift_linear {n : ℕ} (f : BoolFourier.hypercube n → Bool) (h_linear : ∀ (x y : BoolFourier.hypercube n), f (BoolFourier.xor_vec x y) = (f x ^^ f y)) : ∀ (x y : BoolFourier.hypercube n), lift_pm1 f (BoolFourier.xor_vec x y) = lift_pm1 f x * lift_pm1 f y
- Source
- TCSlib, `BoolBLR.BLR_completeness_aux_h_lift_linear`
- 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.BoolBLR.BLR_completeness_aux_h_lift_linear← BoolBLR.BLR_completeness_aux_h_lift_linear (TCSlib/BooleanAnalysis/BLR/BoolBLR.lean:367): adapted
What was changed in
BoolBLR.BLR_completeness_aux_h_lift_linear--- TCSlib/BooleanAnalysis/BLR/BoolBLR.lean:367 (BoolBLR.BLR_completeness_aux_h_lift_linear) +++ as compiled here @@ -1,2 +1,5 @@ -private lemma BLR_completeness_aux_h_lift_linear {n : ℕ} (f : BoolFourier.hypercube n → Bool) (h_linear : ∀ (x y : BoolFourier.hypercube n), f (BoolFourier.xor_vec x y) = (f x ^^ f y)) : +set_option autoImplicit true in +set_option relaxedAutoImplicit true in +open Finset BoolFourier in +lemma BoolBLR.BLR_completeness_aux_h_lift_linear {n : ℕ} (f : BoolFourier.hypercube n → Bool) (h_linear : ∀ (x y : BoolFourier.hypercube n), f (BoolFourier.xor_vec x y) = (f x ^^ f y)) : ∀ (x y : BoolFourier.hypercube n), lift_pm1 f (BoolFourier.xor_vec x y) = lift_pm1 f x * lift_pm1 f y := @@ -4,3 +7,3 @@ intros x y; exact (by - convert BoolToPM1_xor ( f x ) ( f y ) using 1; + convert BoolToPM1_xor ( f x ) ( f y ) using 1 <;> try rfl exact h_linear x y ▸ rfl); - Verified
- 07 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 4
- BoolFourier.xor_vecFor $x, y \in \{0,1\}^n$, the vector $\mathrm{xor\_vec}(x,y)_i = x_i \oplus y_i$ is the componentwise XOR, giving the group operation on…
- BoolFourier.hypercubeThe Boolean hypercube of dimension $n$ is the type $\{0,1\}^n$, defined as an abbreviation for
BooleanAnalysis.BoolCube$n$. - BoolFourier.BoolToPM1_xorXOR as multiplication under the $\pm 1$ embedding. Let $\mathrm{BoolToPM1} : \mathrm{Bool} \to \bbr$ be the map sending $\mathtt{false}$…
- BoolBLR.lift_pm1Given $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…
- Used by 1
- BoolBLR.BLR_completenessCompleteness of the BLR linearity test. Let $n$ be a natural number and let $f : \{0,1\}^n \to \{0,1\}$ be linear, meaning that…
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
set_option autoImplicit true inset_option relaxedAutoImplicit true inopen Finset BoolFourier inlemma BoolBLR.BLR_completeness_aux_h_lift_linear {n : ℕ} (f : BoolFourier.hypercube n → Bool) (h_linear : ∀ (x y : BoolFourier.hypercube n), f (BoolFourier.xor_vec x y) = (f x ^^ f y)) : ∀ (x y : BoolFourier.hypercube n), lift_pm1 f (BoolFourier.xor_vec x y) = lift_pm1 f x * lift_pm1 f y := by intros x y; exact (by convert BoolToPM1_xor ( f x ) ( f y ) using 1 <;> try rfl exact h_linear x y ▸ rfl);