The following is written at the request of Victor Porton, and is an extremely nuts-and-bolts description of the cartesian closed structure of the category , whose objects are sets equipped with a binary relation and whose morphisms preserve the assigned relations.
From a high-level point of view, is equivalent to the category of -separated presheaves on the presheaf topos of directed graphs. It is well-known that the (full) inclusion of separated presheaves (for a topology on a presheaf category) has a left adjoint that preserves finite products, and it follows that the separated presheaves forms an exponential ideal within the ambient presheaf topos, and thus in particular is cartesian closed. (Indeed, much more is true: not only is the category of separated presheaves cartesian closed, it is a quasitopos, hence it is locally cartesian closed as well.) As a special case, the cartesian closed structure of is inherited from the cartesian closed structure of the ambient category .
Our plan is to descend from the general to the particular. First we give a general description of the cartesian closed structure on presheaf categories, but in very elementary nuts-and-bolts fashion. (That is, we bypass the more conceptual descriptions involving presheaves as colimits of representable functors, the Yoneda lemma, etc. – in other words, we just unwind the definitions, which is straightforward but less than enlightening.) Then we apply this directly to the special case . Then, we specialize further to the subcategory and examine the cartesian closed structure directly in this case.
Possibly all this will eventually be extended to “funcoids” and “reloids”.
The cartesian closed category of directed graphs
First we describe the exponential or internal hom in the cartesian closed category of directed graphs .
Consider the category with objects and non-identity morphisms as follows:
The category of directed graphs is equivalent to the category of presheaves . Given , the set of vertices is , the set of edges is , the source function is , and the target function is .
Cartesian closed structure on presheaf toposes
Consider any small category . If are presheaves on , their exponential is (by abstract nonsense) given by the formula
where for an object of , we let denote the hom-functor , and a set of natural transformations. (Note: if is a natural transformation, we denote its component at an object by .) Given a morphism of , the map takes a natural transformation to the composite transformation
The evaluation transformation is the one whose component at an object is the map which takes a pair to the element .
Suppose given a natural transformation . We define the exponential transpose to be the transformation whose component at is the map that takes an element to the transformation whose component at an object is defined to be the function
that sends a pair to .
These definitions specify the cartesian closed structure of the presheaf category. The cartesian closure means that the function
(natural in ) is inverse to the function that maps a transformation to the composite
The verification that these two functions are mutually inverse is given in the proofs of the following two propositions.
Proposition
Given , the composite given by
is again.
Proof
Let be any object of the category , and let . We must verify that
By definition of , the left-hand side is
which by definition of is , as required.
Proposition
Given , the exponential transpose of the composite
is again.
Proof
Let be an object of the category . We must verify that the exponential transpose of the transformation , where takes to
is . In other words, that for any object and element , we have . In other words, that for any object , any morphism , and any element , that
By definition, is the transformation which takes an object to the function that sends a pair to
Here the expression on the right is the result of applying to the composite in the naturality diagram
and so it is the same result as applying to the composite . This result is (by definition) the composite transformation
Putting all this together, we have the equations
as was to be shown.
Cartesian closed structure on directed graphs
Now we consider apply the previous section to the special case , where the presheaves may be identified with directed graphs.
Taking , and letting be directed graphs, the set of vertices is the set of natural transformations
where we note that is empty and is a singleton, and so this set is naturally identified with the set of functions
between the sets of vertices of and .
The set of edges is the set of natural transformations
Here is a singleton and , so the data of an edge of amounts to a pair of functions
or if you like, a triple of functions , subject to a naturality condition that amounts to asserting commutativity of the diagrams
It is straightforward to check (following the definitions of the preceding section) that the source of an edge of is the vertex of , and that the target of is the vertex .
The evaluation map consists of a vertex function and an edge function . The vertex function is, according to the above, a function and is just ordinary evaluation, mapping a pair to . The edge function maps a pair to .
Given a map of directed graphs, consisting of a vertex map and an edge map , the exponential transpose is described as follows. The vertex map is just the exponential transpose in the category of sets, taking an vertex to . The edge map takes an edge to a triple
where, letting and be the source and target of , we take and and .
All of these constructions are just special cases of the general considerations in the previous section, and so these constructions indeed define the cartesian closed structure on the category of directed graphs.
Cartesian closed structure on
Now we specialize even further to the case where we consider only directed graphs where is a monomorphism or injective function. The full subcategory consisting of such graphs and graph morphisms between them is equivalent to , the category of sets equipped with an endorelation . (Briefly, any such directed graph is isomorphic to one where we take to be a subset inclusion , just by replacing a monomorphism by its image.)
In this case, we may verify directly that if and are directed graphs for which the source-target pairings , are injective, then the source-target pairing for , mapping a triple to the pair , is also injective. In other words, given there is at most one function for which
But this is clear: injectivity of means there is at most such that
This shows that is closed with respect to the cartesian closed structure on .
Recasting all this in the language of sets equipped with endorelations: if and are such structures, then their internal hom is the set of functions , where there is an edge or relation if there is an edge whenever there is an edge . (Here plays the role of in the previous paragraph, and plays the role of .)
Created on November 24, 2013 at 10:58:26
by
Todd Trimble