Intervals in ℕ #
This file defines intervals of naturals. List.Ico m n
is the list of integers greater than m
and strictly less than n
.
TODO #
- Define
Ioo
andIcc
, state basic lemmas about them. - Also do the versions for integers?
- One could generalise even further, defining 'locally finite partial orders', for which
Set.Ico a b
is[Finite]
, and 'locally finite total orders', for which there is a list model. - Once the above is done, get rid of
Data.Int.range
(and maybeList.range'
?).
Ico n m
is the list of natural numbers n ≤ x < m
.
(Ico stands for "interval, closed-open".)
See also Data/Set/Intervals.lean
for Set.Ico
, modelling intervals in general preorders, and
Multiset.Ico
and Finset.Ico
for n ≤ x < m
as a multiset or as a finset.
Equations
- List.Ico n m = List.range' n (m - n)
Instances For
@[simp]