AFTD Auto-Formalizing Theoretical Domains

simple_graph_hypercube

def

The hypercube graph Q_n on vertex set Fin n → Bool, where two vertices are adjacent if and only if they differ at exactly one coordinate.

Statement

def simple_graph_hypercube (n : ℕ) : SimpleGraph (Fin n → Bool)
Defined in
arXiv:2610.18463 Question 5.4
Verified
25 Oct 2026
Axioms
none listed
Used by 8

Read back from the Lean

The definition simple_graph_hypercube n defines a simple graph whose vertices are functions u : Fin n → Bool, where edges are generated (via SimpleGraph.fromRel) by the relation that there exists a unique index i : Fin n such that u i ≠ v i. Two vertices u and v are adjacent if and only if u ≠ v and there exists a unique i : Fin n such that u i ≠ v i.

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 hypercube graph Q_n on vertices Fin n → Bool. -/
def simple_graph_hypercube (n : ℕ) : SimpleGraph (Fin n → Bool) :=
  SimpleGraph.fromRel (fun u v => ∃! i : Fin n, u i ≠ v i)
See it in the graphDiscuss this resultChallenge it