Honest binary choices for inductive counting #
Ghost assertions describe honest scans and the as-yet unguessed suffix of a vertex identifier. They are used only to construct a successful binary-choice replay.
Honest choices reach the final count check even when a bad vertex is reachable
(Cslib.InductiveCounting.exists_replay_done_final); a machine that inspects the count there
learns whether some reachable vertex is bad.
Main definitions #
Cslib.InductiveCounting.BinaryExtension: a vertex extends a partial binary guess.Cslib.InductiveCounting.FullPrefix: the selected count equals the reachable prefix count.Cslib.InductiveCounting.Honest: the assertion maintained by honest choices.
Main results #
Cslib.InductiveCounting.accepts_iff: correctness of the executable, binary-choice small-register controller.Cslib.InductiveCounting.accepts_iff_not_reachable: the controller nondeterministically decides nonreachability.
References #
v can be obtained from the partial guess g by appending bits binary choices.
- done (g : ℕ) : BinaryExtension 0 g g
- bit {n g v : ℕ} (b : Bool) (h : BinaryExtension n (2 * g + b.toNat) v) : BinaryExtension (n + 1) g v
Instances For
The initial controller state satisfies the uniform register bound.
theorem Cslib.InductiveCounting.exists_replay_done_final {N width source : ℕ} {edge : ℕ → ℕ → Bool} {bad : ℕ → Bool} (hsource : source < N) (hwidth : N ≤ 2 ^ width) :
Honest choices reach the final count check, whether or not a bad vertex is reachable:
some replay ends in the final scan's done instruction with every reachable vertex selected.