Zero is less-than-or-equal-to any number.
Modulenatural-arithmetic-0.2.1.0Haskell2010
Arithmetic.Lte
- 28 values
- Packagenatural-arithmetic-0.2.1.0
- Exports28
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceLte.hs
Special Inequalities
3 declarationsAny number is less-than-or-equal-to itself.
Substitution
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 inequality.
Add a constant to the right-hand side of both sides of the 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
4 declarationsAdd a constant to the left-hand side of the right-hand side of the inequality.
Add a constant to the right-hand side of the right-hand side of the inequality.
Composition
4 declarationsCompose two inequalities using transitivity.
Add two inequalities.
Convert Strict Inequality
4 declarationsWeaken a strict inequality to a non-strict inequality.
Weaken a strict inequality to a non-strict inequality, incrementing the right-hand argument by one.
Integration with GHC solver
1 declarationUse GHC's built-in type-level arithmetic to prove that one number is less-than-or-equal-to another. The type-checker only reduces CmpNat if both arguments are constants.