NOTE: the latest version is 2.0.0
See the readme for more information.
You might want a function, where one N-X-Nat should be at least as big as another one.
N-X-Nat
unsafeInterval : NaturalNumber first -> NaturalNumber last -> Interval
We want to promise that
last == first + the interval length
which means
first == last - the interval length
→ N first Is (Difference intervalLength To last) is our final type!
N first Is (Difference intervalLength To last)
safeInterval : NNat (N first Is (Difference interval To last)) -> NNat (N last Is difference) -> Interval
No special meaning.
N n Is difference
b - a.
b - a
Difference a To (Nat1Plus a)
would describe a difference of 1.
Difference a To b
You might want a function, where one
N-X-Natshould be at least as big as another one.We want to promise that
which means
→
N first Is (Difference intervalLength To last)is our final type!