Extended-real semantics of interval endpoint selection #
IEEE minimum and maximum agree with lattice min and max on non-NaN values. This module
lifts that contract through the four-corner selectors used by executable interval multiplication
and division.
theorem
FloatLib.Floats.Formats.BinaryInterchange.Model.Interval.toEReal_minOfFour_le_of_le
{fmt : FloatFormat}
(a b c d : Model fmt)
(haNaN : a.isNaN = false)
(hbNaN : b.isNaN = false)
(hcNaN : c.isNaN = false)
(hdNaN : d.isNaN = false)
{a' b' c' d' : EReal}
(ha : a.toEReal ≤ a')
(hb : b.toEReal ≤ b')
(hc : c.toEReal ≤ c')
(hd : d.toEReal ≤ d')
:
Pointwise upper bounds on four non-NaN values bound their executable four-way minimum.
theorem
FloatLib.Floats.Formats.BinaryInterchange.Model.Interval.le_toEReal_maxOfFour_of_le
{fmt : FloatFormat}
(a b c d : Model fmt)
(haNaN : a.isNaN = false)
(hbNaN : b.isNaN = false)
(hcNaN : c.isNaN = false)
(hdNaN : d.isNaN = false)
{a' b' c' d' : EReal}
(ha : a' ≤ a.toEReal)
(hb : b' ≤ b.toEReal)
(hc : c' ≤ c.toEReal)
(hd : d' ≤ d.toEReal)
:
Pointwise lower bounds on four non-NaN values bound their executable four-way maximum.