Arbitrary integer constructors #
Lean exposes the definitions of Float.ofNat, Float.ofInt, and their binary32 counterparts on
top of its logical floating-point models.
The arbitrary-integer casts use these constructors, whose scientific-literal path has a
small-input fast path. The proofs here cover both branches before applying the shared integer
conversion specification.
Moving exact trailing binary zeros into the exponent does not change model rounding.
A scientific literal with decimal exponent zero is the shared natural-number constructor.
Binary64 natural construction is nearest-even rounding of a denominator-one rational.
Binary32 natural construction is nearest-even rounding of a denominator-one rational.
Binary64 integer construction uses the shared dyadic rounder, including signed overflow.
Binary32 integer construction uses the shared dyadic rounder, including signed overflow.
Int.toFloat has the same rounding specification as Float.ofInt.
Int.toFloat32 has the same rounding specification as Float32.ofInt.