AFTD Auto-Formalizing Theoretical Domains

symmetric_counterexample_three_bent_r

def

The Boolean function r on (Fin 4 → ZMod 2) taking the value 0 on {(1,0,0,1), (0,1,0,1), (1,1,1,1)} and 1 elsewhere.

Statement

def symmetric_counterexample_three_bent_r (X : Fin 4 → ZMod 2) : ZMod 2
Defined in
arXiv:2611.06744, Section 4
Verified
06 Nov 2026
Axioms
none listed

Read back from the Lean

A definition of a function symmetric_counterexample_three_bent_r : (Fin 4 → ZMod 2) → ZMod 2. Given an input vector $X : \text{Fin } 4 \to \mathbb{Z}/2\mathbb{Z}$, it returns $0$ if $(X(0), X(1), X(2), X(3))$ is $(1, 0, 0, 1)$, $(0, 1, 0, 1)$, or $(1, 1, 1, 1)$ (in terms of canonical representatives in $\{0, 1\}$), and returns $1$ for all other thirteen input vectors.

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

/-- The Boolean function r on (Fin 4 → ZMod 2) taking value 0 on {(1,0,0,1), (0,1,0,1), (1,1,1,1)} and 1 elsewhere. -/
def symmetric_counterexample_three_bent_r (X : Fin 4 → ZMod 2) : ZMod 2 :=
  let x0 := X 0; let x1 := X 1; let x2 := X 2; let x3 := X 3
  match x0.val, x1.val, x2.val, x3.val with
  | 1, 0, 0, 1 => 0
  | 0, 1, 0, 1 => 0
  | 1, 1, 1, 1 => 0
  | _, _, _, _ => 1
See it in the graphDiscuss this resultChallenge it