Deterministic deciders of ordered queries #
A deterministic decider of an ordered query on encStructure inputs validates the input tables,
rejects cardinalities below two, runs a block of counter code with a true exit and a false exit,
and accepts or rejects at the exit the block takes. blockDecider assembles such a program
around any block. mem_L_of_decidingBlock reduces membership in L to the correctness of the
block on well-formed inputs of cardinality at least two, with every register bounded by
(N + 1) ^ (d + k) for input length N and maximal input arity d. The extra exponent k lets
the block hold k-tuples of universe elements in single registers.
Ordered first-order model checking and FO(DTC) model checking are the two clients. The
nondeterministic analogue, used by FO(TC) model checking, is nblockDecider in
Classes.LogSpace.FirstOrder.Ordered.NondeterministicDecider.
Main definitions #
Cslib.Logic.FO.Ordered.blockDecider: the shape check, the size guard, the block, accept and reject.
Main results #
Cslib.Logic.FO.Ordered.decider_bounds: the register bound dominates the cardinality, itsk-th power, the input length and the table sizes.Cslib.Logic.FO.Ordered.decider_layout: where the shape check, the guard, the block, accept and reject sit in a decider's code.Cslib.Logic.FO.Ordered.mem_L_of_decidingBlock: a correct block puts the query inL.
The register bound (N + 1) ^ (d + k) of a decider, for input length N and maximal input
arity d, dominates 1, the cardinality n, n ^ k, N and the size of every input table.
The deterministic decider around a block C b T F of length c, placed at b with exits
T (accept) and F (reject): the shape check, the guard rejecting cardinalities below two, the
block, accept, reject. Registers 0 to 2 are the shape check's, followed by s scratch
registers for the block.
Instances For
The layout of a decider whose code is a prefix of length 4 + 6 * v.count (the shape check),
a guard instruction, a block of length c, accept and reject: the guard at 4 + 6 * v.count, the
block at 5 + 6 * v.count, accept and reject right after it.
A deciding block puts an ordered query in L. Let S contain only well-formed inputs
of cardinality at least two. Suppose that on every such input, the block C b T F, run from the
cardinality in register 0 and s registers after the shape check's, exits to T exactly on
members of S and otherwise to F, with every register at most (N + 1) ^ (d + k). Then
blockDecider v C c s decides S in logarithmic space.