Decimal coefficient bounds #
Projection, square root and adjacent-value proofs use the same relation between a full coefficient and its trailing digits. These consequences of the descriptor laws apply to every admissible custom layout as well as the named presets.
The trailing digits fill all but one position of the significand precision.
theorem
FloatLib.Floats.Formats.DecimalInterchange.Format.carry_eq
(f : Format)
(coefficient : ℕ)
(quantum : ℤ)
:
A carry at the coefficient bound leaves exactly one leading digit. This identifies the generic radix carry with the descriptor's coefficient limits.
theorem
FloatLib.Floats.Formats.DecimalInterchange.Format.carry_coefficient_lt
(f : Format)
{coefficient : ℕ}
(hc : coefficient ≤ f.coefficientBound)
(quantum : ℤ)
:
Normalizing a coefficient bounded by 10^precision makes the bound strict.
theorem
FloatLib.Floats.Formats.DecimalInterchange.Format.le_carry_quantum
(f : Format)
(coefficient : ℕ)
(quantum : ℤ)
:
A carry either preserves the quantum or increases it by one.