In as far as the notion of functor generalizes that of function and that of profunctor generalizes that of relation, the notion of graph of a (pro)functor generalizes that of graph of a function.
Just as the graph of a function , or more generally that of a relation for is nothing but the category of elements of the corresponding characteristic function , so the graph of a functor , or more generally that of a profunctor , is nothing but its category of elements, a.k.a. Grothendieck construction.
However, there are a number of different ways to construct such a category of elements, depending on the variance of morphisms in and that we include in it. A one-variable functor has two categories of elements, one with a projection to (which is a discrete opfibration) and one with a projection to (which is a discrete fibration). Similarly, a two-variable functor such as has four categories of elements; thus a profunctor has four different “graphs”. In addition, there are two ways to make a functor into a profunctor, so a functor actually has eight graphs.
These can be unified by instead choosing a canonical notion of “graph of a profunctor”, and recognising that, using the fact that Prof is a compact closed 2-category, we can “shift around” the defining factors in a profunctor to produce different graphs.
Let be a profunctor. Using the convention in that article, we say that is a profunctor .
We obtain the following four graphs by shifting around factors:
The category of elements of the profunctor , which comes equipped with a projection to that is a two-sided discrete fibration contravariant over and covariant over . This is the canonical graph associated to the profunctor .
The category of elements of the induced profunctor , using the compact closed 2-category structure on Prof. This comes equipped with a projection to that is a discrete opfibration. It is also the comma category :
The category of elements of the induced profunctor . This graph comes with a projection to that is a discrete fibration; it is the opposite of the previous category.
The category of elements of the induced profunctor . This graphs comes with a projection to that is a two-sided discrete fibration, covariant over and contravariant over ; it is the opposite of the first graph.
If the profunctor is the hom profunctor? of a category , then the first graph is the arrow category of and the second graph is the twisted arrow category of .
Let be a functor, and let and be the corresponding representable profunctors:
We may regard as a profunctor , and as a profunctor . Each of these yield four distinct graphs (with one “canonical” graph), so has 8 resulting distinct graphs (with two “canonical” graphs).
For , let and be a realization of the notions of -category of -categories and of the -category of -categories, respectively, such that standard constructions of category theory work, in particular a version of the Yoneda lemma. See higher category theory.
Then with let be a (-)functor. By the general logic of profunctors this defines -profunctors
We can then consider analogues of all eight kinds of graphs. For instance, the second kind of graph of is the fibration classified by .
In the context of -category theory, this graph may be taken to be the fibration classified by as described at universal fibration of (∞,1)-categories.
To reproduce the ordinary notion of graph of a function let . then -categories are just sets and a functor is just a function between sets. Moreover, the category of -categories is the set of truth values, as described at (-1)-category. The profunctor corresponding to is therefore the characteristic function
that maps
(Notice that in this case .)
The 2-pullback of along is just the ordinary pullback
which identifies with the subset of pairs for which . This is the ordinary notion of graph of a function.
Last revised on February 4, 2026 at 17:28:14. See the history of this page for a list of all contributions to it.