Packing, unpacking and overflow in the Float model
Library · Source module
Packing, unpacking and overflow in the Float model
Upstream candidates for the mathematical API of Lean core's floating-point model. Adapted from the supplied NumLean archive, NumLean/Data/Scalars/IEEE/Pack.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.unpack_isCanonical. * Float.Model.UnpackedFloat.unpack_pack_of_abs_toReal_le. * Float.Model.UnpackedFloat.unpack_pack_unpack.
Declarations
- Float.Model.Format.isBinaryFloat_maxFinite
- Float.Model.UnpackedFloat.FitsExponentRange
- Float.Model.UnpackedFloat.fitsExponentRange_iff
- Float.Model.UnpackedFloat.fitsExponentRange_of_abs_toReal_le
- Float.Model.UnpackedFloat.fitsExponentRange_of_unpack_eq_finite
- Float.Model.UnpackedFloat.fitsExponentRange_zero_iff
- Float.Model.UnpackedFloat.toNat_one_append
- Float.Model.UnpackedFloat.unpack_isCanonical
- Float.Model.UnpackedFloat.unpack_pack_finite
- Float.Model.UnpackedFloat.unpack_pack_finite_of_fitsExponentRange
- Float.Model.UnpackedFloat.unpack_pack_finite_of_lt
- Float.Model.UnpackedFloat.unpack_pack_infinity
- Float.Model.UnpackedFloat.unpack_pack_nan
- Float.Model.UnpackedFloat.unpack_pack_of_abs_toReal_le
- Float.Model.UnpackedFloat.unpack_pack_resign
- Float.Model.UnpackedFloat.unpack_pack_unpack
- Float.Model.UnpackedFloat.unpack_pack_zero