Interval
Interval structures appear throughout Recognition.Certification to represent bounded real quantities with explicit endpoint ordering. Physicists modeling measurement uncertainty or musicians analyzing harmonic intervals reference this structure when they need to certify that a value lies between two reals. It is introduced as a plain structure definition with three fields: the lower bound, upper bound, and the ordering proof. The definition mirrors the rational-endpoint version from Numerics.Interval.Basic but lifts the endpoints to reals.
claimA closed interval on the reals is a triple $(lo, hi, lo_le_hi)$ where $lo, hi : ℝ$ and $lo ≤ hi$.
background
The Recognition.Certification module imports the basic interval structure from Numerics.Interval.Basic, which defines intervals over rationals with a validity predicate. This real-valued version replaces the rational endpoints with reals while retaining the lo ≤ hi constraint. It serves as a lightweight container for interval bounds in contexts such as uncertainty reporting and scale certifications.
proof idea
This is a structure definition, so the declaration itself constructs the type with the three fields without additional lemmas or tactics.
why it matters in Recognition Science
This structure is used in forty downstream declarations, including uncertainty semantics in Measurement.RSNative.Core (which includes an interval constructor), BCS ratio approximations in Chemistry.SuperconductingTc, and musical scale commas in Aesthetics.MusicalScale. It provides the interval representation needed for bounded-quantity certification without invoking full probability measures.
scope and limits
- Does not enforce that the interval is non-empty beyond lo ≤ hi.
- Does not provide operations such as addition or width; those are defined separately.
- Does not assume the endpoints are rational.
formal statement (Lean)
11structure Interval where
12 lo : ℝ
13 hi : ℝ
14 lo_le_hi : lo ≤ hi
15
used by (40)
-
comma_small -
bcs_ratio_approx -
Uncertainty -
octave_is_two -
superparticular_gt_one -
TailFluxVanishImpliesCoerciveHypothesisAt -
ProjectedPDEPairingHypothesisAt -
add -
add_contains_add -
add_hi -
add_lo -
contains -
contains_point -
hi_le_implies_contains_le -
hi_lt_implies_contains_lt -
Interval -
lo_ge_implies_contains_ge -
lo_gt_implies_contains_gt -
mk' -
mulPos -
mulPos_contains_mul -
neg -
neg_contains_neg -
neg_hi -
neg_lo -
npow -
npow_contains_pow -
point -
smulPos -
smulPos_contains_smul