is_bent
def
A Boolean function f on (Fin n → ZMod 2) is bent if its Walsh-Hadamard transform has absolute value 2^(n/2) everywhere.
Statement
def is_bent {n : ℕ} (f : (Fin n → ZMod 2) → ZMod 2) : Prop
- Defined in
- arXiv:2610.32239 Section 2, Definition 2.2
- Verified
- 26 Oct 2026
- Axioms
- none listed
- Used by 4
- quadratic_bent_form_three_is_bentThe standard quadratic form on (Fin 6 → ZMod 2) given by z 0 * z 1 + z 2 * z 3 + z 4 * z 5 is bent.
- symmetric_counterexample_eight_not_bentThe eight-variable symmetric Boolean function F_8 is not bent.
- symmetric_counterexample_bent_weight_diff_div_sixteenFor any even n ≥ 8 and any two bent functions g and h on (Fin n → ZMod 2), the difference between the Hamming weight of h and the Hamming…
- boolean_derivative_bent_dim_eight_is_balancedFor every bent function g on (Fin 8 → ZMod 2) and every nonzero vector v, the directional derivative of g along v is balanced.
Read back from the Lean
For a fixed natural number $n$ and a function $f : (\text{Fin } n \to \mathbb{Z}/2\mathbb{Z}) \to \mathbb{Z}/2\mathbb{Z}$, is_bent f asserts that for every $\omega : \text{Fin } n \to \mathbb{Z}/2\mathbb{Z}$, the absolute value of the sum over all $x : \text{Fin } n \to \mathbb{Z}/2\mathbb{Z}$ of (1 if $f(x) + \sum_{i : \text{Fin } n} x(i)\omega(i) = 0$ in $\mathbb{Z}/2\mathbb{Z}$, and $-1$ otherwise) equals $2^{\lfloor n / 2 \rfloor}$ (computed via integer division).
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
Lean source view module on GitHub
/-- A Boolean function is bent if all its Walsh-Hadamard transform coefficients have absolute value 2^(n/2). -/ def is_bent {n : ℕ} (f : (Fin n → ZMod 2) → ZMod 2) : Prop := ∀ ω : Fin n → ZMod 2, |∑ x : Fin n → ZMod 2, if f x + (∑ i : Fin n, x i * ω i) = 0 then (1 : ℤ) else -1| = (2 : ℤ) ^ (n / 2)