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.
@[simp]
@[simp]
@[simp]
theorem
set.mem_interval_of_le
{α : Type u}
[linear_order α]
{a b x : α}
(ha : a ≤ x)
(hb : x ≤ b) :
theorem
set.mem_interval_of_ge
{α : Type u}
[linear_order α]
{a b x : α}
(hb : b ≤ x)
(ha : x ≤ a) :
theorem
set.not_mem_interval_of_lt
{α : Type u}
[linear_order α]
{a b c : α}
(ha : c < a)
(hb : c < b) :
theorem
set.not_mem_interval_of_gt
{α : Type u}
[linear_order α]
{a b c : α}
(ha : a < c)
(hb : b < c) :
The open-closed interval with unordered bounds.