The category
Rel has the
category of sets Set as a (wide)
subcategory, where the arrow in
Set corresponds to the relation defined by . A morphism in
Rel is a relation, and the corresponding morphism in the
opposite category to
Rel has arrows reversed, so it is the
converse relation. Thus
Rel contains its opposite and is
self-dual. The
involution represented by taking the converse relation provides the
dagger to make
Rel a
dagger category. The category has two
functors into itself given by the
hom functor: A
binary relation R ⊆
A ×
B and its transpose
RT ⊆
B ×
A may be composed either as
R RT or as
RT
R. The first composition results in a
homogeneous relation on
A and the second is on
B. Since the images of these hom functors are in
Rel itself, in this case hom is an
internal hom functor. With its internal hom functor,
Rel is a
closed category, and furthermore a
dagger compact category. The category
Rel can be obtained from the category
Set as the
Kleisli category for the
monad whose functor corresponds to
power set, interpreted as a covariant functor. Perhaps a bit surprising at first sight is the fact that
product in
Rel is given by the
disjoint union The category
Rel was the prototype for the algebraic structure called an
allegory by
Peter J. Freyd and Andre Scedrov in 1990. Starting with a
regular category and a functor
F:
A →
B, they note properties of the induced functor Rel(
A,B) → Rel(
FA, FB). For instance, it preserves composition, conversion, and intersection. Such properties are then used to provide axioms for an allegory. ==Relations as objects==