AFTD Auto-Formalizing Theoretical Domains

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

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