Rational hitting lists: procedure control #
Adapted from OpenAI's formalization at revision adc7f1241b42e322a6451854ab7e4b4c146bf78a.
Source: https://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/lean/OAI/Computability/RationalHitting/ProcedureControl.lean
Imports, namespaces, module visibility, documentation, and formatting are adapted for complexitylib. The source theorem statements and mathematical arguments are retained.
Give a procedure a single external input/output port. The two transfers are real stack programs; scratch registers remain clean.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Unpack an encoded pair into the designated registers.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Package an independently proved two-input clean register routine as a serialized procedure. Its polynomial bound is not an operation oracle: the actual Eval proof is required.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The one-bit encoding of a Boolean value.
Equations
Instances For
Embed a procedure in a larger finite register type.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Deterministic Boolean branching on a serialized pair. Only the selected finite subprogram runs; the tag is physically consumed.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Unary loop count. These symbols are explicitly popped by the loop body.
Instances For
Repeat a procedure using a separate unary counter register.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Bounded iteration is compiled to a real finite loop. The semantic size invariant is a proof obligation, not a loop oracle or added main hypothesis.
Equations
- One or more equations did not get rendered due to their size.