closed_neighborhood
Given a finite type V with decidable equality, a simple graph G on V with decidable adjacency, and a finite subset A : Finset V, closed_neighborhood G A is the finite set of vertices v : Finset V for which there exists some u ∈ A such that u = v or G.Adj u v.
Statement
def closed_neighborhood {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (A : Finset V) : Finset V
- Defined in
- arXiv:2611.01281 Section 2
- Verified
- 04 Nov 2026
- Axioms
- none listed
- Used by 5
- three_by_three_torus_moving_target_accuracy_exactOn the 3-by-3 torus C_3 □ C_3, the minimum achievable moving-target localization accuracy starting from the candidate set of all vertices…
- moving_target_strategy_stop_successfulFor any finite type V with decidable equality and simple graph G on V with decidable adjacency, the immediate stopping strategy…
- moving_target_strategy_successfulGiven a finite type V with decidable equality, a simple graph G on V with decidable adjacency, an accuracy threshold s : ℕ, a strategy…
- moving_target_grid_accuracy_le_minFor all M, N ≥ 1, on the M × N rectangular grid (vertices Fin M × Fin N, adjacent when they differ by one in exactly one coordinate) there…
- three_by_cycle_torus_moving_target_accuracy_le_ceilFor every integer n ≥ 3, there exists an adaptive search strategy for a moving target on the 3-by-n torus C_3 □ C_n achieving accuracy at…
Read back from the Lean
For a finite type $V$ with decidable equality, a simple graph $G$ on $V$ with decidable adjacency, and a finite set of vertices $A \subseteq V$, closed_neighborhood G A is defined as the finite set of all vertices $v \in V$ such that there exists some $u \in A$ satisfying $u = v$ or $G\text{.Adj } u\ v$ (that is, the closed neighborhood of $A$ in $G$, consisting of $A$ and all vertices adjacent to at least one vertex in $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 one-step neighborhood of a set of vertices in a simple graph. -/ def closed_neighborhood {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (A : Finset V) : Finset V := Finset.univ.filter fun v => ∃ u ∈ A, u = v ∨ G.Adj u v