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 Order/Interval/Basic.lean
for modelling intervals in general preorders, as well as
sibling definitions alongside it such as Set.Ico
, Multiset.Ico
and Finset.Ico
for sets, multisets and finite sets respectively.
Equations
- List.Ico n m = List.range' n (m - n)
Instances For
@[simp]