Rational hitting lists: unary arithmetic #
Adapted from OpenAI's formalization at revision adc7f1241b42e322a6451854ab7e4b4c146bf78a.
Source: https://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/lean/OAI/Computability/RationalHitting/UnaryArithmetic.lean
Imports, namespaces, module visibility, documentation, and formatting are adapted for complexitylib. The source theorem statements and mathematical arguments are retained.
@[reducible, inline]
Unary division state containing divisor, quotient, and remainder.
Equations
- One or more equations did not get rendered due to their size.
Instances For
One unary division step, carrying into the quotient when possible.
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Complexity.RationalHitting.StackLanguage.Procedure.wordLength :
Procedure (fun (x : List Bool) => x) unaryCode List.length
Compute raw word length as a unary output.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Advance threshold-bounded doubling while preserving the threshold.
Equations
Instances For
theorem
Complexity.RationalHitting.StackLanguage.doubleBelow_iterate_pow
(t k : ℕ)
(hk : k ≤ t.size)
: