Direct plain polynomial-time primitives #
The canonical rules normalize plain realizing machines inside the internal proof, combine them with machine-level combinators, and conclude plain computability. No tidy asymptotic predicate or bridge participates in their statements or derivations.
Main results #
ComputableInPolyTime.comp,.trans,.pair,.ite,.foldl: direct closure rules.ComputableInPolyTime.fst,.snd: ordinary encoded-pair projections.ComputableInPolyTime.frame,.unframe,.dropFrame: total word framing and parsers.
Frame a raw word with the existing streaming encoder.
Read the first framed word, including incomplete or malformed inputs.
Drop the first framed word, including incomplete or malformed inputs.
Composition, through the machine-level composition of tidy machines. The intermediate word is no longer than the time of the inner machine.
Compose in execution order. This lets fun_prop infer the intermediate encoding from the
inner function when it cannot be inferred from the outer function.
Pairing, for any encoding of pairs, through its pairing combinator.
Case distinction on a Boolean test computable in polynomial time, in any encoding of
Bool.
Left folds, through the machine-level loop. Besides certificates for the list, the initial
value and the step, a polynomially bounded L must bound the length of the list, the encoded
arguments of every step and the encoded intermediate states.
The first projection of an encoding of pairs, from its linear-time machine.
The second projection of an encoding of pairs, from its linear-time machine.
Reuse the same realizing machine for an equal encoded output.
The complete encoded output is bounded by the actual time of its realizing machine.
Pair two computed outputs using the standard pair encoding.
Project the first entry after computing a pair; the input universe is independent.
Project the second entry after computing a pair; the input universe is independent.
Conjunction of two computed Booleans.
Boolean negation on its fixed finite input domain.
Conjunction preserves the full input encoding of both decision procedures.
A proposition-valued conditional computes its decision in the standard Boolean encoding.