Soundness of rational interval operations #
Contains interprets executable rational endpoints as a closed real interval. The arithmetic
lemmas propagate membership without imposing a floating-point format or rounding policy.
A real value lies between the rational endpoints.
Instances For
theorem
FloatLib.Numerics.RationalInterval.lo_le_hi
{interval : RationalInterval}
{x : ℝ}
(hx : interval.Contains x)
:
Every nonempty interval has ordered rational endpoints.
A point interval contains its exact rational value.
theorem
FloatLib.Numerics.RationalInterval.contains_neg
{interval : RationalInterval}
{x : ℝ}
(hx : interval.Contains x)
:
Negating an enclosed real value reverses the endpoint inequalities.
theorem
FloatLib.Numerics.RationalInterval.contains_add
{left right : RationalInterval}
{x y : ℝ}
(hx : left.Contains x)
(hy : right.Contains y)
:
Addition preserves enclosure.
theorem
FloatLib.Numerics.RationalInterval.contains_sub
{left right : RationalInterval}
{x y : ℝ}
(hx : left.Contains x)
(hy : right.Contains y)
:
Subtraction preserves enclosure.
theorem
FloatLib.Numerics.RationalInterval.contains_scaleNonnegative
{interval : RationalInterval}
{x : ℝ}
(hx : interval.Contains x)
{factor : ℚ}
(hfactor : 0 ≤ factor)
:
(interval.scaleNonnegative factor).Contains (↑factor * x)
A nonnegative rational scale preserves the endpoint inequalities.
theorem
FloatLib.Numerics.RationalInterval.contains_scale
{interval : RationalInterval}
{x : ℝ}
(hx : interval.Contains x)
(factor : ℚ)
:
Signed rational scaling preserves enclosure with the appropriate endpoint order.
theorem
FloatLib.Numerics.RationalInterval.contains_squareNonnegative
{interval : RationalInterval}
{x : ℝ}
(hx : interval.Contains x)
(hnonnegative : 0 ≤ x)
:
interval.squareNonnegative.Contains (x ^ 2)
Squaring a nonnegative enclosed value preserves enclosure.
theorem
FloatLib.Numerics.RationalInterval.contains_squareRepeat
{interval : RationalInterval}
{x : ℝ}
(hx : interval.Contains x)
(hnonnegative : 0 ≤ x)
(n : ℕ)
:
(interval.squareRepeat n).Contains (x ^ 2 ^ n)
Repeated squaring encloses the corresponding power of a nonnegative real value.