Rational hitting lists: signed arithmetic #
Adapted from OpenAI's formalization at revision adc7f1241b42e322a6451854ab7e4b4c146bf78a.
Source: https://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/lean/OAI/Computability/RationalHitting/SignedArithmetic.lean
Imports, namespaces, module visibility, documentation, and formatting are adapted for complexitylib. The source theorem statements and mathematical arguments are retained.
Encode an integer by its sign bit and binary magnitude.
Equations
Instances For
@[instance_reducible]
Compute the magnitude of the signed difference of two binary natural inputs.
Equations
Instances For
Compute the sign of the difference of two binary natural inputs.
Equations
Instances For
Compute the magnitude of the signed difference of two binary natural inputs.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Compute the sign of the difference of two binary natural inputs.
Equations
- One or more equations did not get rendered due to their size.