Rational hitting lists: binary gcd #
Adapted from OpenAI's formalization at revision adc7f1241b42e322a6451854ab7e4b4c146bf78a.
Source: https://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/lean/OAI/Computability/RationalHitting/BinaryGcd.lean
Imports, namespaces, module visibility, documentation, and formatting are adapted for complexitylib. The source theorem statements and mathematical arguments are retained.
Embed the subtraction registers in the division register bank.
Instances For
The subtraction program renamed into ten registers.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Select the successful subtraction result or restore the original value.
Equations
- One or more equations did not get rendered due to their size.
Instances For
One attempted subtraction, followed by normalization and scratch cleanup.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Remainder 0, denominator 5, unread MSD numerator 6, quotient 7.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Repeat binary division steps over the input bits.
Equations
Instances For
Binary division starts with numerator in 0 and denominator in 5. The original denominator is retained; quotient is placed in 7, remainder in 0. Every other register is cleared.
Equations
- One or more equations did not get rendered due to their size.