AFTD Auto-Formalizing Theoretical Domains

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.
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$.
Used by 18

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)
See it in the graphDiscuss this resultChallenge it