dhall-nix-lib/Natural/greaterThan.dhall

18 lines
530 B
Text

--| `greaterThan` checks if one Natural is strictly greater than another.
let lessThan = ./lessThan.dhall
let greaterThan
: Natural → Natural → Bool
= λ(x : Natural) → λ(y : Natural) → lessThan y x
let example0 = assert : greaterThan 5 6 ≡ False
let example1 = assert : greaterThan 5 5 ≡ False
let example2 = assert : greaterThan 5 4 ≡ True
let property0 = λ(n : Natural) → assert : greaterThan 0 n ≡ False
let property1 = λ(n : Natural) → assert : greaterThan n n ≡ False
in greaterThan