A totally ordered set is a set with a comparison operator that is defined for all members of .
A comparison operator on any set is a binary predicate that satisfies the following properties:
A comparison operator for a totally ordered set (also known as a total_order on that set, hence the name) satisfies one more property:
The real_numbers are a totally ordered set. So are any of the subsets of the real numbers, such as the rational_numbers or the integers.
The complex_numbers do not have a canonical total ordering, and especially not a total ordering that preserves all the properties of the ordering of the real numbers, although one can define a total ordering on them quite easily.