An ordered ring is a ring with a total order compatible with the ring structure. Specifically, it must satisfy these axioms for any :
An element of the ring is called "positive" if and "negative" if . The second axiom, then, says that the product of nonnegative elements is nonnegative.
An ordered ring that is also a field is an ordered_field.
First suppose . Using the first axiom to add to both sides, . For the other direction, suppose . Then .
Suppose and are nonpositive elements of , that is . From the first axiom, , and similarly . By the second axiom . But , so .
Let be such an element. Since the ordering is total, either or . In the first case, the second axiom gives . In the second case, the previous property gives , since is nonpositive. Either way we have .
Clearly . So is a square, which means it's nonnegative.
The real numbers are an ordered ring (in fact, an ordered_field), as is any subring of , such as .
The complex numbers are not an ordered ring, because there is no way to define the order between and . Suppose that , then, we have , which is false. Suppose that , then , but then we have , which is again false. Alternatively, is a square, so it must be nonnegative; that is, , which is a contradiction.