Intervals without endpoints ordering
In any decidable linear order α, we define the set of elements lying between two elements a and
b as Icc (min a b) (max a b).
Icc a b requires the assumption a ≤ b to be meaningful, which is sometimes inconvenient. The
interval as defined in this file is always the set of things lying between a and b, regardless
of the relative order of a and b.
For real numbers, Icc (min a b) (max a b) is the same as segment a b.
Notation
We use the localized notation [a, b] for interval a b. One can open the locale interval to
make the notation available.
interval a b is the set of elements lying between a and b, with a and b included.
Equations
- set.interval a b = set.Icc (min a b) (max a b)
If [x, y] is a subinterval of [a, b], then the distance between x and y
is less than or equal to that of a and b
If x ∈ [a, b], then the distance between a and x is less than or equal to
that of a and b
If x ∈ [a, b], then the distance between x and b is less than or equal to
that of a and b