left and right euclidean;
Roughly, is the category whose objects are sets and whose morphisms are (binary) relations between sets. It becomes a 2-category (in fact, a 2-poset) by taking 2-morphisms to be inclusions of relations.
is a 2-poset (a category enriched in the category of posets), whose objects or -cells are sets, whose morphisms or -cells are relations , and whose 2-morphisms or -cells are inclusions of relations. The composite of morphisms and is defined by the usual relational composite
and the identity is the equality relation, in other words the usual diagonal embedding
Another important operation on relations is taking the opposite: any relation induces a relation
and this operation obeys a number of obvious identities, such as and .
and there is an obvious category whose objects are spans from to and whose morphisms are morphisms between such diagrams. The terminal span from to is
and a relation from to is just a subobject of the terminal span, in other words an isomorphism class of monos into the terminal span.
To each span from to , there is a corresponding relation from to , defined by taking the image of the unique morphism of spans between and . It may be checked that this yields a lax morphism of bicategories
More generally, given any regular category , one can form a 2-category of relations in similar fashion. The objects of are objects of , the morphisms in are defined to be subobjects of the terminal span from to , and 2-cells are subobject inclusions. To form the composite of and , one takes the image of the unique span morphism
in the category of spans from to , thus giving a mono into the terminal span from to . The subobject class of this mono defines the relation
and the axioms of a regular category ensure that is a 2-category with desirable properties. Similar to what was said above, there is again a lax morphism of bicategories
There is also a functor
that takes a morphism to the functional relation defined by , i.e., the relation defined by the subobject class of the mono
Such functional relations may also be characterized as precisely those 1-cells in which are left adjoints; the right adjoint of is the opposite relation . The unit amounts to a condition
which says that the functional relation is total, and the counit amounts to a condition
which says the functional relation is well-defined.
For generalizations of see