Polynomial-time access to structure encodings #
The universe size, tuple coordinates, and bit positions are natural numbers
written in unary by polynomial-time machines. Fixed-arity tuple indices,
relation addresses, constant addresses, and encoding lengths use only fixed
sums, powers, and products. Bit reads at these positions therefore have actual
FP implementations, including the false default on missing input bits.
The unary-cardinality parser and the encoded-length check are also polynomial
time. Encoding.Validity uses these primitives to recognize valid encodings in
P, and ModelChecking.PolynomialTime proves the same bound for fixed first-order
queries. SecondOrder.PolynomialTime extends evaluation to relation witnesses
and proves polynomial-time existential-SO certificate checking.
Fixed-arity tuple indices are polynomial-time unary numbers.
Extracting a fixed coordinate of a polynomial-time tuple index is polynomial-time.
Computing a fixed relation's bit address is polynomial-time.
Computing a fixed constant's one-hot bit address is polynomial-time.
The full encoded structure length is polynomial-time in a polynomial-time universe size.
The universe size read from an input's leading unary block is polynomial-time.
Testing the full encoding length against the parsed cardinality is polynomial-time.
A relation-table bit can be tested in polynomial time at polynomial-time coordinates.