Integer Digits, Scaling, and Slices #
These definitions are the effective integer layer used by radix-based rounding algorithms. Signed
division and remainder use Int.tdiv and Int.tmod, matching Flocq's quotient and remainder toward
zero rather than Lean's Euclidean / and % operations.
Integer radix power, with the Flocq convention that negative powers are zero.
Instances For
The signed radix digit at position k.
Instances For
Every signed digit has absolute value strictly smaller than the radix.
Shift an integer left for nonnegative k, and right with truncation for negative k.
Instances For
Extract width radix digits beginning at start; negative widths produce zero.
Instances For
A nonnegative-width slice has absolute value below the corresponding radix power.
Number of base-β digits in the absolute value of an integer.
Instances For
A nonzero integer lies between consecutive powers selected by its digit count.
The radix digit count of a positive integer is the magnitude of its real embedding.
A positive integer is strictly below the radix power selected by its digit count.
The successor of a positive integer does not exceed its next radix-power boundary.
Digit count is monotone with respect to integer absolute value away from zero.
A nonzero product uses at most the sum of the operand digit counts.
A positive radix power has one more digit than its exponent.