Finite reachability by inductive counting #
This file isolates the finite-graph correctness argument behind the
Immerman--Szelepcsényi theorem. For a finite directed graph, reached edge source k
is the set of vertices reachable in at most k steps. It stabilizes after at most
Fintype.card V rounds and then agrees with reflexive-transitive reachability.
Enumeration, Round, CertifiedCount, and Rejection describe an inductive-counting
certificate for nonreachability. Their Finset fields are mathematical transcripts of
canonical scans through Finset.univ; they need not be stored by an implementation. A
space-bounded verifier can stream a scan while retaining only the current vertex, a path
certificate, and counters bounded by Fintype.card V.
The final correctness result is nonreachable_iff_counting_certificate.
Add every one-step successor of a finite set.
Equations
- FiniteReachabilityCounting.grow edge S = S ∪ {v : V | ∃ u ∈ S, edge u v}
Instances For
Membership in grow is old membership or a one-step successor of an old vertex.
The vertices reachable from source in at most k directed steps.
Equations
- FiniteReachabilityCounting.reached edge source 0 = {source}
- FiniteReachabilityCounting.reached edge source k.succ = FiniteReachabilityCounting.grow edge (FiniteReachabilityCounting.reached edge source k)
Instances For
An exactly fuel-indexed path in the reflexive closure of edge. Stuttering
allows a path of at most k genuine edges to be padded to exactly k verifier
steps without changing its endpoint.
- zero {V : Type u_1} {edge : V → V → Prop} {source : V} : PaddedPath edge source 0 source
- succ {V : Type u_1} {edge : V → V → Prop} {source : V} {k : ℕ} {old new : V} : PaddedPath edge source k old → old = new ∨ edge old new → PaddedPath edge source (k + 1) new
Instances For
Bounded reachability is exactly existence of a fuel-indexed padded path.
Every bounded-reachable vertex is reachable in the ordinary relational sense.
Once a reachability round adds no vertex, every later round is identical.
If round n has not stabilized, no earlier round has stabilized.
Finite reachability has stabilized after Fintype.card V rounds.
Saturated bounded reachability is exactly reflexive-transitive reachability.
A transcript of vertices for which a canonical scan guessed reachability witnesses.
The fixed scan order means an implementation does not need a duplicate table.
- vertices : Finset V
Instances For
A sound enumeration of the exact expected cardinality contains every reachable vertex.
One complete inductive-counting round.
old records successful old-reachability guesses. new records the vertices declared
reachable in the next round; positive and negative validate both outcomes of the scan.
- old : Enumeration edge source k c
- new : Finset V
Instances For
If the input count to a round is exact, so is its output count.
If an exact counting round leaves the count unchanged, bounded reachability has reached a fixed point. This is the plateau test used by the streaming Immerman--Szelepcsényi verifier.
After a count plateau, every later bounded-reachability layer is the same layer.
A plateau layer is the full reflexive-transitive reachable set, not merely a bounded approximation.
A non-plateau exact round strictly increases the reachable count.
A non-plateau round occurs before the number of vertices. Thus a width-n row counter
needs only enough values for the |V| possible strict-growth rounds.
A sequence of locally verified counting rounds, starting with the singleton source.
- zero {V : Type u_1} [Fintype V] [DecidableEq V] {edge : V → V → Prop} [DecidableRel edge] {source : V} : CertifiedCount edge source 0 1
- succ {V : Type u_1} [Fintype V] [DecidableEq V] {edge : V → V → Prop} [DecidableRel edge] {source : V} {k c d : ℕ} : CertifiedCount edge source k c → ∀ (a✝ : Round edge source k c d), CertifiedCount edge source (k + 1) d
Instances For
Every certified count is the true bounded-reachability count.
The canonical transcript enumerating exactly the bounded-reachable vertices.
Equations
- FiniteReachabilityCounting.canonicalEnumeration edge source k = { vertices := FiniteReachabilityCounting.reached edge source k, card_eq := ⋯, sound := ⋯ }
Instances For
The canonical transcript for one counting round.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Exact bounded-reachability counts always have a certificate.
Certified counts are precisely the true bounded-reachability counts.
A final scan transcript claiming that target is absent.
- seen : Enumeration edge source k c
Instances For
A rejection backed by the exact count proves bounded nonreachability.
The canonical rejection transcript for an absent target.
Equations
- FiniteReachabilityCounting.canonicalRejection edge source h = { seen := FiniteReachabilityCounting.canonicalEnumeration edge source k, target_absent := h }
Instances For
A final scan transcript claiming that every bounded-reachable vertex is nonfinal.
- seen : Enumeration edge source k c
Instances For
A final rejection backed by the exact count excludes every reachable final vertex.
The canonical final rejection transcript.
Equations
- FiniteReachabilityCounting.canonicalFinalRejection edge source h = { seen := FiniteReachabilityCounting.canonicalEnumeration edge source k, all_nonfinal := ⋯ }
Instances For
Abstract Immerman--Szelepcsényi correctness for a finite directed graph: nonreachability is equivalent to certified inductive counts followed by a rejecting scan.
No final vertex is reachable exactly when inductive counting can finish with a scan certifying that every reachable vertex is nonfinal.
Finite-graph Immerman--Szelepcsényi theorem. For every finite directed graph, source vertex, and final predicate, absence of a reachable final vertex is equivalent to an inductive-counting certificate followed by an exhaustive rejecting scan. No automaton model or particular vertex type is built into the statement.