def
definition
point
show as:
view math explainer →
open explainer
Generate a durable explainer page for this declaration.
open lean source
IndisputableMonolith.Numerics.Interval.Basic on GitHub at line 29.
browse module
All declarations in this module, on Recognition.
explainer page
depends on
used by
-
costRateEL_implies_const_one -
actionJ_convex_on_interp -
actionJ_minimum_unique_value -
geodesic_minimizes_unconditional -
WallpaperGroup -
yieldGapCost_nonneg -
eq_id_or_reciprocal -
octave_loop_neutrality -
ml_geometric_bounds -
gap3_resolved -
essentialSymmetry -
numPointGroups -
totalSpaceGroups -
off_target_not_ideal -
signedValenceCost -
EnergySkewHypothesis -
const_true_zero_fraction -
FalsePointFraction -
falsePointFraction_le_one -
falsePointFraction_nonneg -
IsNatural -
sat_recognition_time_bound -
J_cost -
gauss_bonnet_Q3 -
balanceResidual -
cosmological_constant_resolution -
circularVelocity -
keplerian_falloff -
complementary_explanation -
V_eq_quadratic -
phi_unique_self_similar -
printConstants -
printSummary -
constantsToJSON -
verifiedConstants -
chordSlope -
ECPoint -
nonsingular -
tangentSlope -
extraction_cost_strictly_convex
formal source
26 (I.lo : ℝ) ≤ x ∧ x ≤ (I.hi : ℝ)
27
28/-- Point interval containing a single rational -/
29def point (q : ℚ) : Interval where
30 lo := q
31 hi := q
32 valid := le_refl q
33
34theorem contains_point (q : ℚ) : (point q).contains (q : ℝ) :=
35 ⟨le_refl _, le_refl _⟩
36
37/-- Interval from explicit bounds -/
38def mk' (lo hi : ℚ) (h : lo ≤ hi := by decide) : Interval where
39 lo := lo
40 hi := hi
41 valid := h
42
43/-! ## Interval Arithmetic Operations -/
44
45/-- Addition of intervals: [a,b] + [c,d] = [a+c, b+d] -/
46def add (I J : Interval) : Interval where
47 lo := I.lo + J.lo
48 hi := I.hi + J.hi
49 valid := add_le_add I.valid J.valid
50
51instance : Add Interval where
52 add := add
53
54@[simp] theorem add_lo (I J : Interval) : (I + J).lo = I.lo + J.lo := rfl
55@[simp] theorem add_hi (I J : Interval) : (I + J).hi = I.hi + J.hi := rfl
56
57theorem add_contains_add {x y : ℝ} {I J : Interval}
58 (hx : I.contains x) (hy : J.contains y) : (I + J).contains (x + y) := by
59 constructor