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
At negative exponents, the integer radix-power convention returns zero.
The zeroth integer radix power is one.
The signed radix digit at position k.
Instances For
Every radix digit of zero is zero.
Signed digit extraction commutes with integer negation.
Integer digit positions below zero contain no digit.
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
A nonnegative scale multiplies by the corresponding radix power.
Scaling the zero value gives zero.
A zero-place scale leaves the integer unchanged.
Radix scaling commutes with integer negation.
Extract width radix digits beginning at start; negative widths produce zero.
Instances For
Every radix slice of zero is zero.
A negative-width radix slice is empty and therefore evaluates to zero.
Radix slicing commutes with integer negation.
Number of base-β digits in the absolute value of an integer.
Instances For
Zero has no significant radix digits.
Radix digit count depends only on the integer's absolute value.
Every nonzero integer has a positive radix 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.
A positive radix power has one more digit than its exponent.