A finite model checker for ordered FO(LFP) #
The formula is fixed while the finite input structure varies. Each least fixed point is computed
by iterating its body n ^ k times on a truth table, where n is the universe size and k is
the relation arity. Outer assignments and relation tables remain fixed throughout the iteration.
Nested fixed points use the same evaluator recursively.
The evaluator is defined on raw syntax and all encoded inputs. Its agreement with least-fixed-point semantics requires the formula's formation certificate and a universe of size at least two, as in the library's canonical ordered structures. Malformed input tables are dealt with separately by the final decision procedure.
Main results #
Cslib.Logic.FO.LFP.ModelChecker.eval_eq_true_iff: bounded evaluation agrees with realization of every well-formed formula, including nested fixed points and captured parameters.Cslib.Logic.FO.LFP.ModelChecker.getD_tableOf: tabulation uses the same tuple numbering as encoded input relations.
References #
- N. Immerman, Relational queries computable in polynomial time, Section 2, Fact 2.1, for the finite iteration bound.
The index of a scoped relation variable in the stack of truth tables.
Instances For
A term's numerical value. Input vocabularies are relational; numeric functions are constants.
Instances For
Input atoms read the supplied tables; order and BIT are computed from natural indices.
Instances For
Evaluate an ordinary bounded formula with separate free and bound assignments.
Instances For
A raw FO(LFP) evaluator. Bounded iteration gives a total algorithm even for invalid syntax.
Instances For
Interpret a stack of relation tables at the arities of a scoped context.
Instances For
An empty table denotes the empty relation, including nullary relations.
Extending the table stack agrees with the typed relation binder.
Natural coordinates give the standard truth-table index.
The bounded evaluator decides the standard realization of every checked formula in the canonical ordered expansion of a decoded input.