Rational hitting lists: tabulation #
Adapted from OpenAI's formalization at revision adc7f1241b42e322a6451854ab7e4b4c146bf78a.
Source: https://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/lean/OAI/Computability/RationalHitting/Tabulation.lean
Imports, namespaces, module visibility, documentation, and formatting are adapted for complexitylib. The source theorem statements and mathematical arguments are retained.
Reusable dense records. Individual word lengths need not be fixed.
Equations
- Complexity.RationalHitting.StackLanguage.listCode ca l = List.flatMap (fun (a : A) => Complexity.RationalHitting.StackLanguage.codeWord (ca a)) l
Instances For
Encode a tabulation state consisting of input, counter, and accumulated outputs.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Polynomial-time tabulation of an arbitrary polynomial-time callback. The construction uses only one finite stack program, including all indexing, record layout, and loop control; the counter is unary.
Equations
Equations
- Complexity.RationalHitting.StackLanguage.instCodingSubtype P = { code := fun (a : { a : A // P a }) => Complexity.RationalHitting.StackLanguage.code ↑a }
A natural number whose computation interface uses unary encoding.
- val : ℕ
The natural number represented in unary.
Instances For
A Boolean word whose computation interface uses its raw bits.
The raw Boolean word.
Instances For
Polynomial time means a concrete finite clean stack program and actual step bound, through Procedure. It is not machine advice or an oracle.