Inductive counting for negated closures #
A negated closure ¬ TC E s₀ z₀ over k-tuples of a universe of size n is certified
nondeterministically by the inductive counting of [Imm88] and [Sze87]. Tuples
are coded by numbers below n ^ k: the code of xs is (finFunctionFinEquiv xs : ℕ), which is
Cslib.Logic.tupleIndex xs by definition, spelled as in the closure loop and codeE. Round i
is the set of codes reachable from the code of s₀
within i steps (Cslib.InductiveCounting.roundSet for codeEdge E). Knowing the size of
round i, one test decides membership of a code y in round i + 1: it guesses the members of
round i in increasing order, certifies each by a walk of at most i steps, certifies for each
whether it reaches y in at most one step, and checks the number guessed. Counting the members
of round i + 1 this way gives its size; the final test of the code of z₀ at round n ^ k
decides reachability.
Main definitions #
Cslib.Logic.FO.Ordered.TCModelChecker.codeEdge: the edge relation on codes.Cslib.Logic.FO.Ordered.TCModelChecker.countRound: roundi, the codes reachable withinisteps.Cslib.Logic.FO.Ordered.TCModelChecker.TestPre: the state before one test.
Main results #
Cslib.Logic.FO.Ordered.TCModelChecker.mem_roundSet_codeEdge_iff: rounds are bounded reachability.Cslib.Logic.FO.Ordered.TCModelChecker.test_sound,Cslib.Logic.FO.Ordered.TCModelChecker.test_complete: one test.Cslib.Logic.FO.Ordered.TCModelChecker.count_sound,Cslib.Logic.FO.Ordered.TCModelChecker.count_complete: the counting block.
References #
Walks between codes are walks between tuples.
Rounds are bounded reachability: the code of ys is in round i exactly when ys is
reached from xs within i steps.
Round n ^ k is reachability.
The state before one test of inductive counting: registers below base as in regs₀, the
round i < n ^ k in register base, its size in base + 1, and the candidate y < n ^ k in
base + 3.
- kept : Turing.CounterProgram.Kept B base regs₀ regs
The registers below
baseand the length are kept, and every register is bounded. The test's registers exist.
The universe size is in register
0.The round is in register
base.The round is below
n ^ k.The size of the round is in register
base + 1.The candidate is in register
base + 3.The candidate is below
n ^ k.
Instances For
Soundness of one test: from the state before a test of y against round i, every
branch rejects or reaches T with register base + 6 recording whether y is in round
i + 1, given sound walk and edge codes.
Completeness of one test: from the state before a test of y against round i, some
branch reaches T with register base + 6 recording whether y is in round i + 1, given
complete walk and edge codes.
Soundness of the counting block: every branch rejects or reaches T with the target
z₀ not reachable from s₀, given sound tests.
Completeness of the counting block: when the target z₀ is not reachable from s₀,
some branch reaches T, given complete tests.