Canonical ordered first-order model checking in logarithmic space #
For each fixed sentence over a finite relational input vocabulary expanded by canonical numeric
symbols, its encoded query language belongs to L. Numeric 0, 1, max, order and BIT have
the actual meanings on Fin n, for n ≥ 2, including inside quantified formulas. They are
computed from cardinality and indices, with no extra numeric input tables.
The input uses encStructure: unary cardinality followed by the framed input relation tables in
tupleIndex order. Malformed table shapes and cardinalities below two are rejected. The space
bound is logarithmic in the full encoded input length; the sentence and vocabulary are fixed.
This is a theorem at that encoding, with no assertion about raw words outside its image.
The decider is blockDecider (shape check, size guard, accept/reject) around the shared
quantified control. Terms become native
counter expressions; input relations read their actual table bits, order compares values, and
BIT uses Christian Reitwiessner's binary digit algorithm, certified in linear work space in the
binary value and index. The counter-program simulation charges intermediate expression storage.
This establishes ordered model checking. Ordered interpretations are computed in logarithmic
space, and L and P are closed under ordered first-order reductions, in
CslibFrontier.Computability.Complexity.Classes.LogSpace.FirstOrder.Ordered.Reduction; capture
remains open.
Main definitions #
Cslib.Logic.FO.Ordered.queryLanguage: valid encodings satisfying a fixed ordered sentence.Cslib.Logic.FO.Ordered.ModelChecker.termExpr: native values of terms with numeric constants.Cslib.Logic.FO.Ordered.ModelChecker.formulaCode: the compiled code of a formula.
Main results #
Cslib.Logic.FO.Ordered.ModelChecker.atomicCompiler_correct: the concrete atomic handlers.Cslib.Logic.FO.Ordered.queryLanguage_mem_L: ordered first-order data complexity is inL.
References #
- N. Immerman, Descriptive Complexity, Theorem 3.1, pp. 57–59. The proof's fixed-formula argument is used with the library's explicit framing and table-order conventions.
- The original order-free counter model checker and Christian Reitwiessner's native binary arithmetic and binary digit access are reused, with their source authorship retained.
Valid encodings of canonical ordered structures satisfying the fixed sentence. Cardinalities zero and one are excluded; the numeric vocabulary is computed rather than encoded.
Instances For
On an admissible cardinality, query membership is exactly shape validity and canonical ordered truth.
Universes smaller than the standard ordered convention are rejected.
Compile a term to its natural index: variables use assignment registers, and the numeric
constants are 0, 1, and the truncated predecessor of register 0 (the cardinality).
Instances For
Actual native handlers for canonical ordered atoms. Input relations use their framed table; order and BIT use only the compiled numeric arguments.
Instances For
The ordered handlers compute their canonical semantics from the original encoded input.
Shared quantified control instantiated with the actual ordered handlers.
Instances For
Every fixed canonical ordered first-order query is in L at the actual structure encoding.
The decider is blockDecider around the compiled sentence: it rejects malformed table shapes and
sizes zero/one; its numeric symbols are computed from the indices, including under quantifiers.