AFTD Auto-Formalizing Theoretical Domains

hypercube_relative_opposite

def

Given a finite set X : Finset (Fin n → Bool) and a Boolean vector d : Fin n → Bool, hypercube_relative_opposite X d is the Boolean vector obtained by negating d i for all coordinates i in the Finset hypercube_nonconstant_coords X and keeping d i unchanged otherwise.

Statement

def hypercube_relative_opposite {n : ℕ} (X : Finset (Fin n → Bool)) (d : Fin n → Bool) : Fin n → Bool
Defined in
arXiv:2610.38287 Definition 1
Verified
08 Nov 2026
Axioms
none listed
Built on 1
  • hypercube_nonconstant_coordsGiven a finite set X : Finset (Fin n → Bool), hypercube_nonconstant_coords X is the Finset (Fin n) of all coordinates i : Fin n for which…
Used by 2

Read back from the Lean

Given a natural number $n$, a finite set $X$ of boolean functions on $\mathrm{Fin}(n)$ (vertices of the $n$-dimensional hypercube), and a boolean function $d : \mathrm{Fin}(n) \to \mathrm{Bool}$, hypercube_relative_opposite X d is the function from $\mathrm{Fin}(n)$ to $\mathrm{Bool}$ that flips (negates) the coordinate $d(i)$ if coordinate $i$ is in hypercube_nonconstant_coords X, and leaves $d(i)$ unchanged 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

/-- The relative opposite point of a Boolean vector d with respect to a set X. -/
def hypercube_relative_opposite {n : ℕ} (X : Finset (Fin n → Bool)) (d : Fin n → Bool) : Fin n → Bool := fun i => if i ∈ hypercube_nonconstant_coords X then !d i else d i
See it in the graphDiscuss this resultChallenge it