November 2017
Intermediate to advanced
670 pages
17h 35m
English
Here're the Ord rules:
|
Name of rule |
Description |
|
Totality |
a.lte(b) or b.lte(a) |
|
Anti-symmetry |
If a.lte(b) and b.lte(a), then a.equals(b) |
|
Transitivity |
If a.lte(b) and b.lte(c), then a.lte(c) |
|
b must be a value of the same Ord as a. If b is not the same Setoid, then the behavior of equals is unspecified (returning false is recommended). The equals variable must return a Boolean (true or false). |
The values used in the rules are a, b and c. A value which has a Setoid must provide an lte method. The lte method is this algebra's operator and it takes one argument.
From the preceding diagram, we see that an Ord is a Setoid, so the Ord has an Equals operator and the Ord must obey the same rules that a Setoid ...