20 lines
445 B
Text
20 lines
445 B
Text
{-|
|
|
Returns `True` for any `Integer` greater than `+0`.
|
|
|
|
`positive` is more efficient than `./greaterThan +0` or `./greaterThanEqual +1`.
|
|
-}
|
|
let not = ../Bool/not.dhall
|
|
|
|
let nonPositive = ./nonPositive.dhall
|
|
|
|
let positive
|
|
: Integer → Bool
|
|
= λ(n : Integer) → not (nonPositive n)
|
|
|
|
let example0 = assert : positive +1 ≡ True
|
|
|
|
let example1 = assert : positive +0 ≡ False
|
|
|
|
let example2 = assert : positive -1 ≡ False
|
|
|
|
in positive
|