Allows us to commute addition on both sides of an inequality.
Totality: total
Visibility: export Allows us to commute multiplication on both sides of an inequality.
Totality: total
Visibility: export Type describing a relation between two integers.
This is used to solve integer (in)equalities with
a syntax that is similar to the one used for preorder
reasoning.
Totality: total
Visibility: public export
Constructors:
- Totality: total
Visibility: public export Reversed function application.
Totality: total
Visibility: export The identity function for relations.
Totality: total
Visibility: export
Fixity Declarations:
infixl operator, level 0
prefix operator, level 1 Reversed function composition.
Totality: total
Visibility: export
Fixity Declaration: infixl operator, level 0 Thought bubble similar to the one used in
`Syntax.PreorderReasoning`.
Totality: total
Visibility: export
Fixity Declarations:
infix operator, level 1
infix operator, level 1 Replace the right hand side of an (in)equality.
Totality: total
Visibility: export
Fixity Declaration: infix operator, level 1 Replace the right hand side of an (in)equality.
Totality: total
Visibility: export
Fixity Declaration: infix operator, level 1 Replace the left hand side of an (in)equality.
Totality: total
Visibility: export
Fixity Declaration: infix operator, level 1 Replace the left hand side of an (in)equality.
Totality: total
Visibility: export
Fixity Declaration: infix operator, level 1 Replace both sides of an (in)equality.
Totality: total
Visibility: export
Fixity Declaration: infix operator, level 1 Replace both sides of an (in)equality.
Totality: total
Visibility: export
Fixity Declaration: infix operator, level 1 Adding a value on the left does not affect an inequality.
```idris example
|> x < y
<> z + x < z + y ... plusLeft
```
Totality: total
Visibility: export Adding a value on the right does not affect an inequality.
```idris example
|> x < y
<> x + z < y + z ... plusRight
```
Totality: total
Visibility: export The result of adding a positive value is greater than
the original.
Totality: total
Visibility: export The result of adding a positive value is greater than
the original.
Totality: total
Visibility: export The result of adding a positive value is not less than
the original.
Totality: total
Visibility: export The result of adding a positive value is not less than
the original.
Totality: total
Visibility: export The result of adding a negative value is greater than
the original.
Totality: total
Visibility: export The result of adding a negative value is greater than
the original.
Totality: total
Visibility: export The result of adding a positive value is not less than
the original.
Totality: total
Visibility: export The result of adding a positive value is not less than
the original.
Totality: total
Visibility: export Subtracting a value does not affect an inequality.
```idris example
|> x < y
<> x - z < y - z ... minus
```
Totality: total
Visibility: export Subtracting a value from a larger one
yields a positive result.
Totality: total
Visibility: export Subtracting a value from a non-smaller one
yields a non-negative result.
Totality: total
Visibility: export Subtracting a value from a smaller one
yields a negative result.
Totality: total
Visibility: export Subtracting a value from a non-greater one
yields a non-positive result.
Totality: total
Visibility: export We can solve (in)equalities, where the same value has
been added on both sides.
```idris example
|> x + z < y + z
<> x < y ... solvePlusRight
```
Totality: total
Visibility: export We can solve (in)equalities, where the same value has
been added on both sides.
```idris example
|> z + x < z + x
<> x < y ... solvePlusLeft
```
Totality: total
Visibility: export We can solve (in)equalities, where the same value has
been subtracted from both sides.
```idris example
|> x - z < y - z
<> x < y ... solveMinus
```
Totality: total
Visibility: export We can solve (in)equalities, with one side an addition
and the other equalling zero.
```idris example
|> 0 < x + y
<> neg y < x ... solvePlusRightZero
```
Totality: total
Visibility: export We can solve (in)equalities, with one side an addition
and the other equalling the added value.
```idris example
|> y < x + y
<> 0 < x ... solvePlusRightSelf
```
Totality: total
Visibility: export We can solve (in)equalities, with one side an addition
and the other equalling zero.
```idris example
|> 0 < x + y
<> neg x < y ... solvePlusLeftZero
```
Totality: total
Visibility: export We can solve (in)equalities, with one side an addition
and the other equalling the added value.
```idris example
|> x < x + y
<> 0 < y ... solvePlusLeftSelf
```
Totality: total
Visibility: export We can solve (in)equalities, with one side a subtraction
and the other equalling zero.
```idris example
|> 0 < x - y
<> y < x ... solveMinusZero
```
Totality: total
Visibility: export- Totality: total
Visibility: export Negating both sides inverts an inequality.
```idris example
|> x <= y
<> neg y <= neg x ... negate
```
Totality: total
Visibility: export
Fixity Declaration: prefix operator, level 10 Negating both sides inverts an inequality.
```idris example
|> neg x <= neg y
<> y <= x ... negateNeg
```
Totality: total
Visibility: export `negate` specialized to where one side equals zero.
```idris example
|> x < 0
<> 0 < neg x ... negateZero
```
```idris example
|> x <= 0
<> 0 <= neg x ... negateZero
```
Totality: total
Visibility: export `negate` specialized to where one side equals zero and the other
a negated value.
```idris example
|> neg x < 0
<> 0 < x ... negateNegZero
```
```idris example
|> neg x <= 0
<> 0 <= x ... negateNegZero
```
Totality: total
Visibility: export Multiplication with a positive number preserves an inequality.
```idris example
|> x < y
<> z * x < z * y ... multPosLeft zgt0
```
```idris example
|> x <= y
<> z * x <= z * y ... multPosLeft zgt0
```
Totality: total
Visibility: export Multiplication with a positive number preserves an inequality.
```idris example
|> x < y
<> x * z < y * z ... multPosRight zgt0
```
```idris example
|> x <= y
<> x * z <= y * z ... multPosRight zgt0
```
Totality: total
Visibility: export Multiplication with a negative number reverses an inequality.
```idris example
|> x < y
<> z * y < z * x ... multNegLeft zgt0
```
```idris example
|> x <= y
<> z * y <= z * x ... multNegLeft zgt0
```
Totality: total
Visibility: export Multiplication with a negative number reverses an inequality.
```idris example
|> x < y
<> y * z < x * z ... multNegRight zgt0
```
```idris example
|> x <= y
<> y * z <= x * z ... multNegRight zgt0
```
Totality: total
Visibility: export Multiplication with a non-negative number weakens an inequality.
```idris example
|> x < y
<> x * z <= y * z ... multNonNegRight zgte0
```
Totality: total
Visibility: export Multiplication with a non-negative number weakens an inequality.
```idris example
|> x < y
<> z * x <= z * y ... multNonNegLeft zgte0
```
Totality: total
Visibility: export Multiplication with a non-positive number weakens and
reverses an inequality.
```idris example
|> x < y
<> y * z <= x * z ... multNonPosRight zgte0
```
Totality: total
Visibility: export Multiplication with a non-positive number weakens and
reverses an inequality.
```idris example
|> x < y
<> z * y <= z * x ... multNonPosLeft zlte0
```
Totality: total
Visibility: export We can solve (in)equalities, where both sides have
been multiplied with the same positive value.
```idris example
|> z * x < z * y
<> x < y ... solveMultPosLeft zgt0
```
Totality: total
Visibility: export We can solve (in)equalities, where both sides have
been multiplied with the same positive value.
```idris example
|> x * z < y * z
<> x < y ... solveMultPosRight zgt0
```
Totality: total
Visibility: export We can solve (in)equalities, where both sides have
been multiplied with the same negative value.
```idris example
|> z * x < z * y
<> y < x ... solveMultNegLeft zlt0
```
Totality: total
Visibility: export We can solve (in)equalities, where both sides have
been multiplied with the same negative value.
```idris example
|> x * z < y * z
<> y < y ... solveMultNegLeft zlt0
```
Totality: total
Visibility: export We can solve (in)equalities, with one side a multiplication
with a positive number and the other equalling zero.
```idris example
|> 0 < x * y
<> 0 < x ... solveMultPosRightZero ygt0
```
Totality: total
Visibility: export We can solve (in)equalities, with one side a multiplication
with a negative number and the other equalling zero.
```idris example
|> 0 < x * y
<> x < 0 ... solveMultNegRightZero ylt0
```
Totality: total
Visibility: export We can solve (in)equalities, with one side a multiplication
with a positive number and the other equalling zero.
```idris example
|> 0 < x * y
<> 0 < y ... solveMultPosLeftZero xgt0
```
Totality: total
Visibility: export We can solve (in)equalities, with one side a multiplication
with a negative number and the other equalling zero.
```idris example
|> 0 < x * y
<> y < 0 ... solveMultNegLeftZero xlt0
```
Totality: total
Visibility: export We can solve (in)equalities, with one side a multiplication
with a positive number and the other equalling the positive
number.
```idris example
|> y < x * y
<> 1 < x ... solveMultPosRightSelf ygt0
```
Totality: total
Visibility: export We can solve (in)equalities, with one side a multiplication
with a positive number and the other equalling the positive
number.
```idris example
|> x < x * y
<> 1 < y ... solveMultPosLeftSelf xgt0
```
Totality: total
Visibility: export We can solve (in)equalities, with one side a multiplication
with a negative number and the other equalling the negative
number.
```idris example
|> y < x * y
<> x < 1 ... solveMultNegRightSelf ylt0
```
Totality: total
Visibility: export We can solve (in)equalities, with one side a multiplication
with a negative number and the other equalling the negative
number.
```idris example
|> x < x * y
<> y < 1 ... solveMultNegLeftSelf xlt0
```
Totality: total
Visibility: export- Totality: total
Visibility: export - Totality: total
Visibility: export - Totality: total
Visibility: export - Totality: total
Visibility: export - Totality: total
Visibility: export - Totality: total
Visibility: export - Totality: total
Visibility: export - Totality: total
Visibility: export