Basic polynomial-time rules #
Polynomial-time counterparts of Christian Reitwiessner's degree-bounded operations, and Boolean
rules for fun_prop.
Main results #
Turing.MultiTapeTM.PolyBounded.exists_polynomial: express a resource bound by a polynomial.Turing.MultiTapeTM.ComputableTidilyInPolyTime.exists_degree: polynomial-time functions admit explicit time and output degrees.Turing.MultiTapeTM.ComputableTidilyInPolyTime.polyBounded: a computed unary value bounds resources polynomially in the original input encoding.Turing.MultiTapeTM.ComputableTidilyInPolyTime.of_enc_eq: reuse identical encoded outputs.Turing.MultiTapeTM.ComputableTidilyInPolyTime.encoded,.unframe,.dropFrame: compose encoded values and total frame parsing without requiring an inverse for an encoding.Turing.MultiTapeTM.ComputableTidilyInPolyTime.of_finite: functions on finite domains.Turing.MultiTapeTM.ComputableTidilyInPolyTime.fstWithEncoding,.sndWithEncoding: projections that compose with a known encoding conversion.Turing.MultiTapeTM.ComputableTidilyInPolyTime.decide_eq,.beq: equality for fixed encodings.Turing.MultiTapeTM.ComputableTidilyInPolyTime.bool_and',.decide_and,.cond,.ite_decide: compound guards and conditionals with fixed intermediate Boolean encodings.Turing.MultiTapeTM.ComputableInPolyTime.decide_or,.bool_or',.bne,.decide_ne: disjunction and inequality for plain certificates.
A polynomially bounded resource admits a polynomial upper bound at every input size.
An efficiently computed unary value is polynomially bounded in the original encoded input. This supplies input-dependent resource bounds without exposing their polynomial coefficients.
Compose in execution order. This also lets fun_prop infer the intermediate encoding from
the inner function when it cannot be inferred from the outer function.
Project the first component of a polynomial-time pair-valued function.
Project the second component of a polynomial-time pair-valued function.
Project a first component and convert its encoding. Certifying the pair-valued function first determines the source encoding before automation searches for the conversion certificate.
Project a second component and convert its encoding. The pair certificate fixes the source encoding; the conversion certificate supplies the efficient change of representation.
Every polynomial-time function admits explicit time and output degrees.
Reuse a computation when the new function emits the same encoded output word.
Expose an already encoded value as a raw word. No inverse for the encoding is required.
Compute a value and expose its representation, inferring that representation from the supplied certificate before composing.
Read the first frame from any raw word, including malformed encodings.
Drop the first frame from any raw word, including malformed encodings.
Conjoin computed guards, fixing both intermediate Boolean encodings.
Conjunction of efficiently decidable propositions uses the standard Boolean encoding.
Disjunction of efficiently decidable propositions uses the standard Boolean encoding.
A Boolean conditional fixes the guard encoding before automation synthesizes its proof.
A proposition-valued conditional computes its decision in the standard Boolean encoding.
Equality is polynomial-time for any encoding.
Compare computed values for equality, inferring their common encoding from the arguments.
Lawful Boolean equality compares computed values through their common encoding.
Compare two computed values using their common encoding.
Plain polynomial-time automation #
Turing.MultiTapeTM.ComputableTidilyInPolyTime.decide_or for plain certificates.
Disjoin computed guards, fixing both intermediate Boolean encodings.
Lawful Boolean inequality compares computed values through their common encoding.
Compare two computed values using their common encoding.