Correct rounding in the Float logical model
Library · Source module
Correct rounding in the Float logical model
Upstream candidates for the mathematical API of Lean core's floating-point model. Adapted from the supplied NumLean archive, NumLean/Data/Scalars/IEEE/Round.lean. The archive's SHA-256 and licensing status, the earlier Mathlib search and the changes needed for Lean 4.33 are recorded in docs/design/Finite-Precision-Arithmetic.md. No NumLean dependency is imported. General format lemmas state a two-exponent-bit assumption explicitly where needed; core 4.33 also permits one-bit layouts. These results concern logical arithmetic, not native execution cost.
Main results
* Float.Model.UnpackedFloat.roundWithAccuracy_isCanonical. * Float.Model.UnpackedFloat.abs_toReal_roundWithAccuracy_sub_le. * Float.Model.UnpackedFloat.isNearestFloat_toReal_roundWithAccuracy.
Declarations
- Float.Model.UnpackedFloat.IsCanonical
- Float.Model.UnpackedFloat.abs_toReal_roundWithAccuracy_sub_le
- Float.Model.UnpackedFloat.div_pow_targetExponent_le
- Float.Model.UnpackedFloat.div_pow_targetExponent_le_of_le_targetExponent
- Float.Model.UnpackedFloat.div_pow_targetExponent_le_of_lt
- Float.Model.UnpackedFloat.isBinaryFloat_toReal
- Float.Model.UnpackedFloat.isFinite_roundWithAccuracy
- Float.Model.UnpackedFloat.isNearestFloat_toReal_roundWithAccuracy
- Float.Model.UnpackedFloat.ofMantissaAndAccuracy_mantissa
- Float.Model.UnpackedFloat.roundWithAccuracy_isCanonical
- Float.Model.UnpackedFloat.toReal
- Float.Model.UnpackedFloat.toReal_roundWithAccuracy_exact
- Float.Model.UnpackedFloat.totalExponent_eq