AFTD Auto-Formalizing Theoretical Domains

hypercube_coord_reflect

def

Given a coordinate subset T of Fin n and a Boolean vector x : Fin n → Bool, hypercube_coord_reflect T x is the Boolean vector obtained by negating the coordinate x i if i ∈ T and leaving it unchanged otherwise.

Statement

def hypercube_coord_reflect {n : ℕ} (T : Finset (Fin n)) (x : Fin n → Bool) : Fin n → Bool
Defined in
arXiv:2610.38287 Eq. (14)
Verified
08 Nov 2026
Axioms
none listed
Used by 5

Read back from the Lean

hypercube_coord_reflect defines a function which, given a natural number $n$ (implicit), a finite set of indices $T \subseteq \mathrm{Fin}(n)$, and a boolean vector $x : \mathrm{Fin}(n) \to \mathrm{Bool}$, produces the boolean vector $\mathrm{Fin}(n) \to \mathrm{Bool}$ mapping each index $i \in \mathrm{Fin}(n)$ to the boolean negation of $x(i)$ if $i \in T$, and to $x(i)$ otherwise.

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

/-- Coordinate reflection of a Boolean vector on Fin n with respect to a coordinate subset T. -/
def hypercube_coord_reflect {n : ℕ} (T : Finset (Fin n)) (x : Fin n → Bool) : Fin n → Bool := fun i => if i ∈ T then !x i else x i
See it in the graphDiscuss this resultChallenge it