nLab
graph of a functor

Contents

Idea

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 f:XYf : X \to Y, or more generally that of a relation RX×YR \subset X \times Y for X,YSet=0CatX,Y \in Set = 0 Cat is nothing but the category of elements of the corresponding characteristic function χ R:X×Y(1)Cat={0,1}\chi_R : X \times Y \to (-1)Cat = \{0,1\}, so the graph of a functor F:CDF\colon C \to D, or more generally that of a profunctor χ:C op×D0Cat=Set\chi : C^{op} \times D \to 0 Cat = Set, is nothing but its category of elements.

Generally, the graph of a functor f:CDf : C \to D between (n,r)(n,r)-categories is the Grothendieck construction of the corresponding correspondence: the fibration classified by the correspondence, i.e. the comma object

Graph(f) * C op×D χ f (n1,r1)Cat \array{ Graph(f) &\to& {*} \\ \downarrow && \downarrow \\ C^{op} \times D &\stackrel{\chi_f}{\to}& (n-1,r-1)Cat }

whenever this makes sense. For instance in the context of (,1)(\infty,1)-category theory the graph may be taken to be the fibration classified by χ f:C×D op(,0)\chi_f : C \times D^{op} \to (\infty,0) as described at universal fibration of (∞,1)-categories.

Definition

For nn \leq \infty let (n1)Cat(n-1) Cat and nCatn Cat be a realization of the notions of nn-category of (n1)(n-1)-categories and of the (n+1)(n+1)-category of nn-categories, respectively, such that standard constructions of category theory work, in particular a version of the Yoneda lemma. See higher category theory.

Then with C,DnCatC,D \in n Cat let f:CDf : C \to D be a (nn-)functor.

By the general logic of distributors this defines an nn-correspondence

χ f:C op×Df op×IdD op×DFunc(,)(n1)Cat \chi_f : C^{op} \times D \stackrel{f^{op} \times Id}{\to} D^{op} \times D \stackrel{Func(-,-)}{\to} (n-1) Cat

The graph of ff is the fibration Graph(f)C op×DGraph(f) \to C^{op} \times D classified by χ f\chi_f.

Mike Shulman: It’s not obvious to me that this is the best thing to call the graph of a functor; there are lots of other graphy things one can construct from a functor that all reduce to the usual notion of the graph of a function. To start with, there is of course also the induced opfibration oven C×D opC\times D^{op}, would you call that the “opgraph”? But actually, the two-sided fibration DPCD \leftarrow P \to C (an opfibration over CC and a fibration over DD) looks to me more like a graph. And then there is of course the other profunctor induced by ff, which gives a fibration over C×D opC\times D^{op}, an opfibration over C op×DC^{op}\times D, and a two-sided fibration from CC to DD.

Urs Schreiber: I would be inclined to loosely say “graph” for all of these and to introduce terminology like “opgraph” when it really matters which specific realization we mean. Because all these seem to be so similar to me that I am not sure if it is worth distinguishing them a lot. For instance, wouldn’t an analogous discussion be possible concerning what we call F op:C opD opF^{op} : C^{op} \to D^{op} given a functor F:CDF : C \to D? I don’t actually know what a standard term is, does one say “opfunctor” for this? But I’d say it doesn’t matter much either way, calling F opF^{op} just a functor which effectively is the functor FF doesn’t do much harm.

Colin Zwanziger: Aren’t we better off defining graph of a function as a span to avoid an arbitrary choice of 1,f\langle 1, f\rangle or f,1\langle f, 1\rangle and then treating the two-sided fibration as the graph of a functor?Edit: Actually, we would still have to choose whether we were taking the graph of the representable or corepresentable profunctor induced by the functor, since these yield different spans. But we have that two functors F and G are adjoint iff (Lawvere's definition) the (graph of F)_A and (graph of G)_B agree. One level down we would have two functions f and g are adjoint (=inverse) iff (graph of f)_A and (graph of g)_B agree, but the two notions of graph turn out to be the same at this level.

Examples

Graphs of 0-functors

To reproduce the ordinary notion of graph of a function let (n,r)=(0,0)(n,r) = (0,0). then (n,r)(n,r)-categories X,YX,Y are just sets and a functor f:XYf : X \to Y is just a function between sets. Moreover, the category of (n1,r)=(1,0)(n-1,r) = (-1,0)-categories is the set {0,1}\{0,1\} of truth values, as described at (-1)-category. The profunctor corresponding to f:XYf : X \to Y is therefore the characteristic function

χ f:X×Y{0,1} \chi_f : X \times Y \to \{0,1\}

that maps

χ f(x,y)={1 iff(x)=y 0 otherwise. \chi_f(x,y) = \left\lbrace \array{ 1 & if f(x) = y \\ 0 & otherwise } \right. \,.

(Notice that in this case X op=XX^{op} = X.)

The 2-pullback of *=1{0,1}{*} = {1} \to \{0,1\} along χ f\chi_f is just the ordinary pullback

Graph(f) * X×Y χ f {0,1} \array{ Graph(f) &\to& {*} \\ \downarrow && \downarrow \\ X \times Y &\stackrel{\chi_f}{\to}& \{0,1\} }

which identifies Graph(f)X×YGraph(f) \hookrightarrow X \times Y with the subset of pairs (x,y)(x,y) for which f(x)=yf(x) = y. This is the ordinary notion of graph of a function.

Graphs of 1-functors

For f:CDf : C \to D an ordinary functor, with corresponding profunctor χ f:C op×DSet\chi_f : C^{op} \times D \to Set, the category Graph(f)Graph(f) is the category of elements χ f\int \chi_f of χ f\chi_f.

If we regard CC and DD as 2-categories under the embedding 1Cat2Cat1Cat \hookrightarrow 2Cat then the profunctor χ f\chi_f corresponding to ff is of the form χ f:C op×DCat\chi_f : C^{op} \times D \to Cat and in this context Graph(f)C op×DGraph(f) \to C^{op} \times D is the Grothendieck construction on χ f\chi_f.

Revised on August 17, 2014 18:50:41 by Colin Zwanziger (174.63.87.107)