BoolBLR.linear_bool_iff_character_aux_h_char
theoremverifiedimported Lean
Multiplicativity 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 associated Walsh character on the hypercube $\{0,1\}^n$. Then for all $x, y \in \{0,1\}^n$, \[ \chi_S(x \oplus y) \;=\; \chi_S(x)\,\chi_S(y), \] where $x \oplus y$ denotes the componentwise XOR.
Statement
open Finset BoolFourier in lemma BoolBLR.linear_bool_iff_character_aux_h_char {n : ℕ} (S : Finset (Fin n)) (x : BoolFourier.hypercube n) (y : BoolFourier.hypercube n) : BoolFourier.char_S S (BoolFourier.xor_vec x y) = BoolFourier.char_S S x * BoolFourier.char_S S y
- Source
- TCSlib, `BoolBLR.linear_bool_iff_character_aux_h_char`
- 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.linear_bool_iff_character_aux_h_char← BoolBLR.linear_bool_iff_character_aux_h_char (TCSlib/BooleanAnalysis/BLR/BoolBLR.lean:100): verbatim
- Verified
- 07 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 5
- BoolFourier.char_SFor a set $S \subseteq [n]$, the Walsh character $\chi_S : \{0,1\}^n \to \mathbb{R}$ is \[ \chi_S(x) = \prod_{i \in S} (-1)^{x_i}, \]…
- 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}$…
- BooleanAnalysis.chiSThe Walsh--Fourier character associated to $S\subseteq[n]$ is…
- Used by 1
- 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$…
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.
open Finset BoolFourier inlemma BoolBLR.linear_bool_iff_character_aux_h_char {n : ℕ} (S : Finset (Fin n)) (x : BoolFourier.hypercube n) (y : BoolFourier.hypercube n) : BoolFourier.char_S S (BoolFourier.xor_vec x y) = BoolFourier.char_S S x * BoolFourier.char_S S y := by simp only [char_S, BooleanAnalysis.chiS, ← Finset.prod_mul_distrib] congr 1 ; ext i ; simp [xor_vec, BoolToPM1_xor]