First-order queries belong to machine polynomial time #
Arithmetic evaluation agrees with the original semantics on encoded structures.
For each fixed formula it is polynomial-time when the input string, cardinality,
and free-variable values are polynomial-time. Combining this result with exact
encoding validation proves FODefinable.queryLanguage_mem_P for the existing
machine class P, including every malformed input. The original encoded Boolean
evaluator itself has an FP one-bit verdict.
For open formulas, Formula.tableCode also writes the complete assignment truth
table in polynomial time, with exactly card ^ n bits for n free variables.
This is the standard fixed-formula model-checking argument from Immerman's
Descriptive Complexity, implemented using the library's machine-backed Cobham
closure rules. Logarithmic space is not established. SecondOrder.PolynomialTime
extends arithmetic evaluation to existential second-order certificate checking.
Arithmetic term evaluation on an encoding recovers the semantic element's value.
Term evaluation is polynomial-time on polynomial-time numeric inputs.
Arithmetic formula evaluation on an encoding agrees with first-order satisfaction.
A fixed formula gives a polynomial-time predicate on polynomial-time numeric inputs.
The arithmetic evaluator's one-bit verdict is a polynomial-time string function.
Formula truth-table generation agrees with the canonical relation-table encoding.
Closed arithmetic evaluation agrees with the original sentence semantics.
Sentence truth on arbitrary encoded input is a polynomial-time predicate.
Every fixed first-order sentence defines a binary language in machine P.
The existing decoder-based Boolean sentence evaluator has a polynomial-time verdict.
First-order definability implies polynomial-time membership of the induced binary language.