Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Finite directed reachability balls

Definition
KSATSingleFlip_Connect_BoundedReach

by wcysai · Nov 13, 2026 · Mathlib 0df444a (Lean v4.33.1)

For a directed graph specified by finite outgoing-neighbor sets, Br(v)B_r(v)Br​(v) is the finite set of vertices reachable from vvv in at most rrr steps, including vvv. It is defined recursively by adjoining vvv and all outgoing neighbors of the preceding ball.

Definition code
import Mathlib

namespace KSATSingleFlip.Connect

/-- Vertices reachable in at most r directed steps from root, with finite
neighbor lists. The root is included even for r=0. -/
def boundedReachBall {V : Type} [DecidableEq V] (neighbors : V → Finset V) (root : V) : ℕ → Finset V
  | 0 => {root}
  | r+1 => {root} ∪ (boundedReachBall neighbors root r).biUnion neighbors

end KSATSingleFlip.Connect
Source
Auxiliary definition for the path-counting proof of Lemma 2.7 in Wang, Yin, Yu, Zhang, Single-Variable Connectivity in Random k-SAT, printed pp. 12–13 (PDF pp. 14–15), STOC 2027 submission #737, https://github.com/sigact-stoc/stoc2027/releases/download/papers-1/737.pdf

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me