Directed rounding soundness for IEEE32Exec #
NN/Floats/IEEEExec/Exec32.lean defines executable directed rounding on the IEEE-754 binary32
grid:
roundDyadicDown/roundDyadicUpround an exact dyadic toward-∞/+∞.addDown/addUp,mulDown/mulUplift this to outward-rounded arithmetic for interval endpoints.
This file proves (one core piece of) the enclosure direction (“golden theorem” style): the directed rounding down kernel for positive dyadics is a sound lower bound for the exact real value.
Scope (what is proved here):
roundDyadicPosDown/roundDyadicPosUpsoundness (inEReal, to handle overflow to±∞).- Full dyadic rounding soundness:
roundDyadicDownis a lower bound androundDyadicUpis an upper bound for the exact dyadic real semantics. - Interval-endpoint soundness for
addDown/addUp/mulDown/mulUpon finite inputs, as inequalities inERealbetween the executable endpoint operation and the exact real operation.
Outside this file's scope:
- Correctly-rounded/outward-rounded transcendental functions w.r.t. a standard libm. IEEE-754 does not specify libm results; for rigorous transcendentals, prefer the Arb oracle backend.
- Division/sqrt interval primitives (substantially larger; requires separate algorithms + proofs).
References:
- IEEE 754-2019 (floating-point arithmetic): doi:10.1109/IEEESTD.2019.8766229
- Goldberg (1991), “What Every Computer Scientist Should Know About Floating-Point Arithmetic”: doi:10.1145/103162.103163
Basic helpers #
Instances For
Interpret bpow at a negative successor exponent as an inverse power of two.
A few float32 constants as reals #
toEReal maps +0 to 0.
toEReal maps -0 to 0.
Shift helpers (floor/ceil division by powers of two) #
shiftRightCeilPow2 is also controlled from above by the corresponding floor quotient:
ceil-division can overshoot by at most 1.
Soundness: directed rounding on positive dyadics #
roundDyadicPosDown is a real lower bound for a positive dyadic.
roundDyadicPosUp mant exp is an EReal upper bound for the positive dyadic (mant : ℝ) * 2^exp.
This is the “ceil” counterpart to toReal_roundDyadicPosDown_le.