AFTD Auto-Formalizing Theoretical Domains

boolean_derivative

def

The directional derivative of a Boolean function f on (Fin n → ZMod 2) along a vector v is the function x ↦ f(x) + f(x + v).

Statement

def boolean_derivative {n : ℕ} (v : Fin n → ZMod 2) (f : (Fin n → ZMod 2) → ZMod 2) : (Fin n → ZMod 2) → ZMod 2
Defined in
arXiv:2610.32239, Section 2
Verified
27 Oct 2026
Axioms
none listed
Used by 7

Read back from the Lean

For a natural number n, a vector v : Fin n → ZMod 2, and a function f : (Fin n → ZMod 2) → ZMod 2, boolean_derivative v f is the function from (Fin n → ZMod 2) to ZMod 2 defined by mapping each x to f(x) + f(x + v).

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

/-- Directional derivative of a Boolean function along a direction vector. -/
def boolean_derivative {n : ℕ} (v : Fin n → ZMod 2) (f : (Fin n → ZMod 2) → ZMod 2) : (Fin n → ZMod 2) → ZMod 2 := fun x => f x + f (x + v)
See it in the graphDiscuss this resultChallenge it