Order Theory
Order theory is a branch of mathematics which investigates the intuitive notion of order using binary relations. It provides a formal framework for describing statements such as "this is less than that" or "this precedes that".
Order theory focus on transitive binary relations, we start our definitions from a basic one -- PreOrder
.
A preorder is a thin category -- hom_set(A, B).size <= 1
.
From PreOrder
, we can add antisymmetric to get Order
:
Note that, there will be no cycle in a partial order, and we can implement topological sort for a partial order.
TODO We can implement sort algorithms for TotalOrder
:
From PreOrder
again, we can get equivalence relation by adding symmetric.