Encyclopedia Numerics Numerics Interval Basic Hi Lt Implies Contains Lt
ARTICLE 4 claims 2 theorems 2 models
Numerics Interval Basic Hi Lt Implies Contains Lt
A small lemma about intervals guarantees that if an interval's top edge sits below a rational number, then every real value inside that interval also sits below it.
The upper-bound guarantee
Interval arithmetic is a way of computing with ranges of values instead of single numbers. A closed interval with rational endpoints is written as a pair of rational numbers, a lower bound and an upper bound, with the guarantee that the lower bound is no larger than the upper bound. The framework's machine-checked library of formal theorems defines such an interval as a structure with two rational fields, lo and hi, together with a proof that lo ≤ hi. The library also defines what it means for a real number x to be contained in an interval: x is contained exactly when lo ≤ x and x ≤ hi, where the rational endpoints are read as real numbers.
The theorem hi_lt_implies_contains_lt states a simple consequence of that definition. If the interval's upper endpoint hi is strictly less than some rational number b, and a real number x is contained in the interval, then x is strictly less than b. The proof is a direct chain of inequalities: x ≤ hi follows from containment, hi < b is the assumption, and the two combine to give x < b. The same library also proves the mirror-image statement for lower endpoints: if b is strictly less than the interval's lower endpoint lo, then every contained real x satisfies b < x.
These lemmas matter because they let a computation conclude a strict bound on a real number without ever touching the real number directly. The interval's endpoints are rational, so they can be computed exactly. If the computed interval's upper endpoint is below a target threshold, the lemma certifies that every real value the interval represents is also below that threshold. This is the rigorous backbone for bounding transcendental functions: the library's docstring says the key insight is using rational endpoints, which the machine can compute exactly, to bound real values.
In Recognition Science, this theorem is a small piece of the framework's numerical infrastructure. It does not derive any physical constant, nor does it touch the forcing chain that produces the golden ratio or the number of spatial dimensions. It is a routine fact about ordered fields, stated and proved inside the machine-checked library so that larger proofs can rely on it. What it establishes is narrow and precise: a strict upper bound on an interval's rational endpoint transfers to a strict upper bound on every real number the interval contains.
The practical consequence for a reader is that interval computations carry certificates. When a computation returns an interval whose upper endpoint is below a bound, the certificate says the true value is below that bound, with no floating-point rounding and no unstated assumption. The theorem does not claim that the interval is tight, that it contains all relevant values, or that any particular real number lies inside it; it only says what follows when containment is already known.
THEOREM hi_lt_implies_contains_lt · IndisputableMonolith/Numerics/Interval/Basic.lean
/-- If I.hi < b, then all x in I satisfy x < b -/
theorem hi_lt_implies_contains_lt {I : Interval} {b : ℚ} (h : I.hi < b) {x : ℝ}
(hx : I.contains x) : x < (b : ℝ) :=
lt_of_le_of_lt hx.2 (by exact_mod_cast h)
THEOREM lo_gt_implies_contains_gt · IndisputableMonolith/Numerics/Interval/Basic.lean
/-- If b < I.lo, then all x in I satisfy b < x -/
theorem lo_gt_implies_contains_gt {I : Interval} {b : ℚ} (h : b < I.lo) {x : ℝ}
(hx : I.contains x) : (b : ℝ) < x :=
lt_of_lt_of_le (by exact_mod_cast h) hx.1
MODEL Interval · IndisputableMonolith/Numerics/Interval/Basic.lean
/-- A closed interval with rational endpoints. -/
structure Interval where
lo : ℚ
hi : ℚ
valid : lo ≤ hi
deriving DecidableEq
MODEL contains · IndisputableMonolith/Numerics/Interval/Basic.lean
/-- Containment: a real number x is in interval I if lo ≤ x ≤ hi -/
def contains (I : Interval) (x : ℝ) : Prop :=
(I.lo : ℝ) ≤ x ∧ x ≤ (I.hi : ℝ)
What this page does not claim
The theorem does not claim that the interval is the smallest interval containing the value, nor that it contains any particular real number. It does not derive any physical constant or any result from the framework's forcing chain. It does not address floating-point arithmetic or any approximate computation method.
Verify this page
Every tagged claim above names its theorem. To check one yourself rather than trust this page, elaborate the source module with Lean 4 and audit its axiom basis:
$ lake env lean IndisputableMonolith/Numerics/Interval/Basic.lean
expected axiom basis: [propext, Classical.choice, Quot.sound] (the Lean kernel's standard three; no RS-specific axioms)
A page whose claims cannot be reproduced this way does not ship. In production, every anchor links to the exact declaration in the public source release, and this block carries the build receipt for the page itself.
Derived articles
This page is generated by a question-recursion engine: the questions its answers raise become the next pages. The current agenda, with open targets marked red:
- How does the library use these endpoint-bound lemmas to prove strict bounds for specific transcendental functions?
- What other operations on intervals, beyond addition, subtraction, and multiplication, carry containment proofs in the library?
- How does the framework's interval arithmetic interact with the forcing chain that derives physical constants?
MACHINE LAYER · GROUNDED CLAIM TABLE · CLICK TO EXPAND
THEOREM hi_lt_implies_contains_lt · IndisputableMonolith/Numerics/Interval/Basic.lean
/-- If I.hi < b, then all x in I satisfy x < b -/ theorem hi_lt_implies_contains_lt {I : Interval} {b : ℚ} (h : I.hi < b) {x : ℝ} (hx : I.contains x) : x < (b : ℝ) := lt_of_le_of_lt hx.2 (by exact_mod_cast h)If the interval's upper endpoint hi is strictly less than some rational number b, and a real number x is contained in the interval, then x is strictly less than b. hi_lt_implies_contains_lt · IndisputableMonolith/Numerics/Interval/Basic.leanTHEOREM lo_gt_implies_contains_gt · IndisputableMonolith/Numerics/Interval/Basic.lean
/-- If b < I.lo, then all x in I satisfy b < x -/ theorem lo_gt_implies_contains_gt {I : Interval} {b : ℚ} (h : b < I.lo) {x : ℝ} (hx : I.contains x) : (b : ℝ) < x := lt_of_lt_of_le (by exact_mod_cast h) hx.1The same library also proves the mirror-image statement for lower endpoints: if b is strictly less than the interval's lower endpoint lo, then every contained real x satisfies b < x. lo_gt_implies_contains_gt · IndisputableMonolith/Numerics/Interval/Basic.leanMODEL Interval · IndisputableMonolith/Numerics/Interval/Basic.lean
/-- A closed interval with rational endpoints. -/ structure Interval where lo : ℚ hi : ℚ valid : lo ≤ hi deriving DecidableEqA closed interval with rational endpoints is written as a pair of rational numbers, a lower bound and an upper bound, with the guarantee that the lower bound is no larger than the upper bound. Interval · IndisputableMonolith/Numerics/Interval/Basic.leanMODEL contains · IndisputableMonolith/Numerics/Interval/Basic.lean
/-- Containment: a real number x is in interval I if lo ≤ x ≤ hi -/ def contains (I : Interval) (x : ℝ) : Prop := (I.lo : ℝ) ≤ x ∧ x ≤ (I.hi : ℝ)x is contained exactly when lo ≤ x and x ≤ hi, where the rational endpoints are read as real numbers. contains · IndisputableMonolith/Numerics/Interval/Basic.lean