A poset, or partially ordered set, organizes objects with a partial-order relation. Viewed categorically, each object has an identity morphism, and an arrow expresses the chosen order relationship; reflexivity and transitivity make the arrows compose. section 7.4 section 7.1
A poset has several useful characteristics:
- Objects can be related in one direction without every pair being comparable. section 7.1
- Identity arrows are always present, although diagrams commonly omit them for clarity. section 7.1
- Transitive arrows capture relationships that can be reached through an intermediate object. section 7.1
Assignment compatibility between types
Types form a useful posetal category when an arrow means that an expression of type X can be assigned to a variable of type Y. Giraffe and Tiger both relate to Animal and Object, but neither relates to the other. A covariant IE<out T> preserves this ordering: IE<Giraffe> can be assigned to IE<Animal>. section 7.2
Figure 7.1 A small category with three objects, represented by the nodes, and six morphisms, represented by the arrows
Use the three-object diagram to inspect a posetal category whose arrows represent the greater-than-or-equal relationship. section 7.1
