Directed square-root bounds #
The integer square-root bracket used by sqrtDown and sqrtUp encloses the exact real square
root after restoring its dyadic scale. For descriptors with fmt.isIEEE = true, directed dyadic
rounding yields extended-real lower and upper bounds on finite nonnegative inputs, including
negative zero.
theorem
FloatLib.Floats.Formats.BinaryInterchange.Model.sqrtDyadicBracket_sound
(fmt : FloatFormat)
(d : Numerics.Dyadic)
(hsign : d.negative = false)
:
The dyadic endpoints computed by sqrtDyadicBracket enclose the exact square root.
theorem
FloatLib.Floats.Formats.BinaryInterchange.Model.toEReal_sqrtDown_le_of_nonnegative
{fmt : FloatFormat}
(x : Model fmt)
(hfmt : fmt.isIEEE = true)
(hfinite : x.isFinite = true)
(hnonnegative : 0 ≤ x.toReal)
:
sqrtDown encloses the exact square root from below for every finite value with nonnegative real
semantics, including negative zero.
theorem
FloatLib.Floats.Formats.BinaryInterchange.Model.le_toEReal_sqrtUp_of_nonnegative
{fmt : FloatFormat}
(x : Model fmt)
(hfmt : fmt.isIEEE = true)
(hfinite : x.isFinite = true)
(hnonnegative : 0 ≤ x.toReal)
:
The exact square root is bounded above by sqrtUp for every finite value with nonnegative real
semantics, including negative zero.