BoolBLR.is_linear_bool
defimported Lean
A function $f : \{0,1\}^n \to \{0,1\}$ is linear if for all
$x, y \in \{0,1\}^n$ we have
\[
f(x \oplus y) = f(x) \oplus f(y),
\]
where $\oplus$ denotes bitwise XOR (i.e.\ Bool.xor).
Statement
open Finset BoolFourier in def BoolBLR.is_linear_bool {n : ℕ} (f : hypercube n → Bool) : Prop
- Defined in
- TCSlib, `BoolBLR.is_linear_bool`
- 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.is_linear_bool← BoolBLR.is_linear_bool (TCSlib/BooleanAnalysis/BLR/BoolBLR.lean:43): verbatim
- Verified
- 07 Oct 2026
- Axioms
- none listed
- Built on 2
- 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$.
- Used by 8
- BoolBLR.fourier_coeff_le_of_far_from_linearFourier coefficient bound for functions far from linear. Let $f : \{0,1\}^n \to \{0,1\}$ be $\varepsilon$-far from linear, meaning that…
- 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…
- BoolBLR.linear_bool_iff_character_aux_h_fx_2Value of a linear Boolean function from its values on basis vectors. Let $f : \{0,1\}^n \to \{0,1\}$ be a linear Boolean function, meaning…
- BoolBLR.linear_bool_iff_character_aux_h_fxValue of a linear Boolean function from its action on basis vectors. Let $f : \{0,1\}^n \to \{0,1\}$ be a linear Boolean function, meaning…
- BoolBLR.epsilon_far_from_linearA function $f : \{0,1\}^n \to \{0,1\}$ is $\varepsilon$-far from linear if $0 \le \varepsilon \le 1$ and for every linear function…
- BoolBLR.BLR_completeness_aux_h_linearLinearity gives additivity on XOR. Let $f : \{0,1\}^n \to \{0,1\}$ be a linear function, meaning that $f(x \oplus y) = f(x) \oplus f(y)$…
- BoolBLR.linear_bool_iff_characterLinear Boolean functions are exactly the Walsh characters. Let $f : \{0,1\}^n \to \{0,1\}$ be a Boolean function. Then $f$ is linear —…
- BoolBLR.linear_bool_iff_character_aux_h_fx_1Value of a linear Boolean function on an indicator vector. Let $f : \{0,1\}^n \to \{0,1\}$ be a linear Boolean function, meaning…
Lean source view module on GitHub
open Finset BoolFourier in /-- Defines a Boolean linear function by preservation of pointwise XOR. **Source:** [OD14, §1.6]. -/ def BoolBLR.is_linear_bool {n : ℕ} (f : hypercube n → Bool) : Prop := ∀ x y, f (xor_vec x y) = Bool.xor (f x) (f y)