Zero is less than one.
Modulenatural-arithmetic-0.2.1.0Haskell2010
Arithmetic.Lt
- 35 values
- Packagenatural-arithmetic-0.2.1.0
- Exports35
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceLt.hs
Special Inequalities
2 declarationsSubstitution
2 declarationsReplace the left-hand side of a strict inequality with an equal number.
Replace the right-hand side of a strict inequality with an equal number.
Increment
4 declarationsAdd a constant to the left-hand side of both sides of the strict inequality.
Add a constant to the right-hand side of both sides of the strict inequality.
Decrement
4 declarationsSubtract a constant from the left-hand side of both sides of the inequality. This is the opposite of incrementL.
Subtract a constant from the right-hand side of both sides of the inequality. This is the opposite of incrementR.
Weaken
6 declarationsAdd a constant to the left-hand side of the right-hand side of the strict inequality.
Add a constant to the right-hand side of the right-hand side of the strict inequality.
Composition
8 declarationsAdd a strict inequality to a nonstrict inequality.
Compose two strict inequalities using transitivity.
Compose a strict inequality (the first argument) with a nonstrict inequality (the second argument).
Multiplication and Division
2 declarationsGiven that m < n/p, we know that p*m < n.
Given that m < roundUp(n/p), we know that p*m < n.
Convert to Inequality
2 declarationsAbsurdities
1 declarationNothing is less than zero.
Integration with GHC solver
2 declarationsUse GHC's built-in type-level arithmetic to prove that one number is less than another. The type-checker only reduces CmpNat if both arguments are constants.