AFTD Auto-Formalizing Theoretical Domains

closed_neighbor_set

def

The closed neighborhood of a vertex set A in a graph G is the set of all vertices in A together with all vertices adjacent to at least one vertex of A.

Statement

def closed_neighbor_set {V : Type*} (G : SimpleGraph V) (A : Set V) : Set V
Defined in
arXiv:2611.09627:326
Verified
09 Nov 2026
Axioms
none listed
Used by 1
  • has_asteroidal_triple_nonpathsA graph H contains an asteroidal triple of nonpaths if there exist three pairwise disjoint, pairwise antiadjacent subsets of vertices,…

Read back from the Lean

For an implicit type V, a simple graph G on V, and a subset A of V, closed_neighbor_set G A is defined as the set of all vertices v : V such that there exists some u ∈ A with v = u or G.Adj u v (that is, the closed neighborhood of the set A in G, consisting of all elements of A together with all vertices adjacent to at least one element of A).

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 closed neighborhood of a subset A of vertices in a simple graph G is the union of A and the open neighborhoods of all vertices in A. -/
def closed_neighbor_set {V : Type*} (G : SimpleGraph V) (A : Set V) : Set V := {v | ∃ u ∈ A, v = u ∨ G.Adj u v}
See it in the graphDiscuss this resultChallenge it