BoolFourier.xor_vec
defimported Lean
For $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 $(\mathbb{F}_2)^n$.
Statement
set_option relaxedAutoImplicit false in set_option autoImplicit false in open Finset BooleanAnalysis in def BoolFourier.xor_vec {n : ℕ} (x y : hypercube n) : hypercube n
- Defined in
- TCSlib, `BoolFourier.xor_vec`
- 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.BoolFourier.xor_vec← BoolFourier.xor_vec (TCSlib/BooleanAnalysis/BLR/BoolFourier.lean:76): verbatim
- Verified
- 07 Oct 2026
- Axioms
- none listed
- Built on 1
- BoolFourier.hypercubeThe Boolean hypercube of dimension $n$ is the type $\{0,1\}^n$, defined as an abbreviation for
BooleanAnalysis.BoolCube$n$.
- BoolFourier.hypercubeThe Boolean hypercube of dimension $n$ is the type $\{0,1\}^n$, defined as an abbreviation for
- Used by 18
- BoolBLR.is_linear_boolA 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), \]…
- BoolBLR.triple_expectation_eq_cube_fourierCube of Fourier coefficients as an autocorrelation expectation. Let $f : \{0,1\}^n \to \{0,1\}$ be a Boolean-valued function on the…
- BoolFourier.convolutionThe convolution of $f, g : \{0,1\}^n \to \mathbb{R}$ is the function \[ (f * g)(x) = \mathbb{E}_{y}\bigl[f(y)\,g(x \oplus y)\bigr]. \]
- BoolBLR.BLR_accept_prob_pm1_aux_h_eqPointwise $\pm 1$ form of the BLR indicator. Fix $n \in \bbn$ and a Boolean-valued function $f : \{0,1\}^n \to \{0,1\}$, and let…
- BoolBLR.BLR_completeness_aux_h_lift_linearMultiplicativity of the sign lift of an XOR-homomorphism. Let $f : \{0,1\}^n \to \{0,1\}$ be a function that respects componentwise XOR,…
- BoolBLR.BLR_accept_probThe BLR acceptance probability of $f : \{0,1\}^n \to \{0,1\}$ is…
- BoolFourier.fourier_coeff_convolution_aux_h_fubiniInterchange of summation in the convolution coefficient. Let $n$ be a natural number, let $f, g : \{0,1\}^n \to \bbr$ be Boolean…
- BoolFourier.fourier_coeff_convolutionConvolution theorem on the Boolean cube. Let $n$ be a natural number, and let $f, g : \{0,1\}^n \to \bbr$ be Boolean functions. Then for…
- 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.BLR_soundnessSoundness of the BLR linearity test. Let $f : \{0,1\}^n \to \{0,1\}$ and let $\varepsilon \in \bbr$ satisfy $0 \le \varepsilon \le 1$.…
- BoolBLR.linear_bool_iff_character_aux_h_charMultiplicativity of the Walsh characters. Fix $n$ and a subset $S \subseteq [n]$, and let $\chi_S(x) = \prod_{i \in S}(-1)^{x_i}$ be the…
- 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 —…
- BoolFourier.fourier_coeff_convolution_aux_h_charShift rule for character-weighted sums. Let $f, g : \{0,1\}^n \to \bbr$ be Boolean functions, let $S \subseteq [n]$, and write…
- BoolBLR.BLR_accept_prob_pm1BLR acceptance probability in ±1 form. Let $f : \{0,1\}^n \to \{0,1\}$ be a Boolean-valued function, and write…
- BoolBLR.linear_bool_iff_character_aux_h_eq_hXOR-additivity of a Boolean function that lifts to a character. Let $f : \{0,1\}^n \to \{0,1\}$ be a Boolean-valued function whose $\pm 1$…
- BoolFourier.fourier_coeff_convolution_aux_h_splitMultiplicative splitting of a Walsh character along XOR. Let $S \subseteq [n]$, let $f, g : \{0,1\}^n \to \bbr$ be Boolean functions, and…
- BoolBLR.linear_bool_iff_character_aux_h_eqXOR-additivity of a Boolean function whose lift is a character. Let $f : \{0,1\}^n \to \{0,1\}$ be a Boolean-valued function whose $\pm 1$…
- 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
set_option relaxedAutoImplicit false in set_option autoImplicit false in open Finset BooleanAnalysis in /-- Defines pointwise XOR, the group operation on the Boolean cube. **Source:** [OD14, §1.3]. -/ def BoolFourier.xor_vec {n : ℕ} (x y : hypercube n) : hypercube n := fun i => Bool.xor (x i) (y i)