== Summary of partial orders ==
Just as equivalence relations capture our expectations about "equals", order
relations capture our expectations about "less than or equal to". When you
write a .equals function in your programming language of choice, you should
check that your function satisfies the equivalence relation axioms; when you
write a .compare function you should check the ordering axioms.
== Order relation axioms ==
Ordering axioms: A relation R on a set A is a /partial order/ if it satisfies the
following properties:
- R is reflexive (forall x, xRx)
- R is transitive (forall x, y, z, if xRy and yRz then xRz)
- R is _anti_symmetric: forall x and y, if x R y and y R x then x = y
A relation R on A is a /total order/ if it is a partial order and also satisfies
- R is total: for all x and y, either xRy or yRx
== Examples ==
- <= is a total order on the natural numbers (and also rationals, reals, ...)
- >= is also a total order on the natural numbers (and others)
- the = relation (i.e. xRy if and only if x=y) is a partial order on any set
- the is-an-ancestor-of relation is a partial order (if you define yourself as your own ancestor)