nLab
profunctor

Contents

Definition

If C and D are categories, a profunctor from C to D is a functor D op×CSet. Such a profunctor is usually written as F:CD.

Every functor f:CD induces two profunctors D(1,f):CD and D(f,1):DC, defined by D(1,f)(d,c)=D(d,f(c)) and D(f,1)(c,d)=D(f(c),d). These profunctors are called representable (or sometimes one of them is corepresentable). In particular the identity profunctor Id:CC is represented by the identity functor and hence is given by the hom-functor C(,):C op×CSet.

The notion generalizes to many other kinds of categories. For instance, if C and D are enriched over some symmetric closed monoidal category V, then a profunctor from C to D is a V-functor D opCV. If they are internal categories, then a profunctor CD is an internal diagram? on D op×C, and so on. There are also other equivalent definitions in each case; see below.

A profunctor is also sometimes called a (bi)module or a distributor or a correspondence, though the latter word is also used for a span. The term “module” tends to be common in Australia, especially in the enriched case; here the intuition is that for one-object V-categories, i.e. monoids in V, profunctors really are the same as bimodules between such monoids in the usual sense. “Profunctor” is perhaps more common in the Set-based and internal cases (but is also used in the enriched case); here the intuition is that a profunctor is a generalization of a functor, via the construction of “representable” profunctors. Jean Bénabou, who invented the term and originally used “profunctor,” now prefers “distributor,” which is supposed to carry the intuition that a distributor generalizes a functor in a similar way to how a distribution generalizes a function.

Note that the convention that a profunctor is a functor D op×CSet is not universal; some authors reverse C and D and/or put the “op” on the other one. See the discussion below.

The bicategory of profunctors

Profunctors are composed by using a coend to “trace out” the middle variable. Specifically, for profunctors F:CD and G:DE, their composite GF:CE is defined to be

GF:= dDF(d,)G(,d).G \circ F := \int^{d \in D} F(d,-)\otimes G(-,d) \,.

This yields a bicategory in which

  • objects are categories,

  • morphisms are profunctors with the above composition, and

  • 2-morphisms are natural transformations.

This bicategory is variously denoted Prof, Mod, or Dist, according to one’s chosen name for profunctors. In the enriched case, it is written VProf or VMod or VDist.

The construction of the “representable” profunctors D(1,f) and D(f,1) from a functor f:CD yield two identity-on-objects functors CatProf and Cat opProf. Moreover, it is easy to check that D(1,f)D(f,1) in the bicategory Prof; thus CatProf is a proarrow equipment in the sense of Wood (in fact, the prototypical one). This same fact can also be expressed by defining a (pseudo) double category in which functors and profunctors are the two kinds of arrows; the construction of representable profunctors is then given by companions and conjoints in this double category, which make it a framed bicategory, hence an equivalent representation of a proarrow equipment.

Alternative definitions

In terms of colimit-preserving functors on presheaf categories

A basic fact (e.g. Kashiwara, Schapira, Categories and Sheaves, corollary 2.7.4, page 63) is that for A a cocomplete category, colimit-preserving functors from presheaves on some category C to A are canonically equivalent to functors from C to A: we have an equivalence of functor categories

Cocont(PSh(C),A)Func(C,A).Cocont(PSh(C),A) \simeq Func(C,A) \,.

This may be thought of as a consequence of the co-Yoneda lemma (and hence, of course, of the Yoneda lemma) which says that every presheaf is colimit over representables, i.e. over objects in the image of the Yoneda embedding Y:CPSh(C). This immediate implies that a colimit-preserving functor on PSh(C) is already determined by its restriction along Y to C.

Now, profunctors D opCV are adjunct to functors C[D op,V]PSh(D). Hence by the above, profunctors are equivalent to colimit-preserving functors

PSh(C)PSh(D).PSh(C) \to PSh(D) \,.

Indeed, there is an equivalence of bicategories between VProf and the 2-category of categories and colimit-preserving functors and natural transformation between their presheaf categories. Note that the latter is a strict 2-category which can thus serve as a “natural” strictification of VProf.

An explicit statement of this can be found for instance as prop. 4.2.4

  • Gian Luca Cattani, PhD thesis from BRICS, University of Aarhus (pdf)

From this perspective, the representable profunctor induced by an ordinary V-functor f:CD is the adjunct of the postcomposition

CfDY[D op,V]C \stackrel{f}{\to} D \stackrel{Y}{\to} [D^{op},V]

with the Yoneda embedding under the Hom-adjunction.

The formulation of profunctors as colimit-preserving functors on presheaf categories plays a big role also in the context of (∞,1)-categories. A presentable (∞,1)-category is one equivalent to a localization of some (∞,1)-category of (∞,1)-presheaves (i.e. some reflective (∞,1)-subcategory of the latter). The collection of all presentable (∞,1)-categories and colimit-preserving (∞,1)-functors betweem them forms the symmetric monoidal (∞,1)-category of presentable (∞,1)-categories, whose tensor product is the “bilinear” tensor product coming from interpreting colimit-preserving functors as “linear” (reading: colimit sum).

This (,1)-category Pr L therefore is an (,1)-analog of Set-Mod. In geometric ∞-function theory one finds (see section 4 there) that morphisms in Pr L encode the “correspondence operations” such as Fourier-Mukai and its generalizations. See in that context also the examples below.

In terms of two-sided discrete fibrations

Recall that a functor D opSet can equivalently be described as a discrete (Grothendieck) fibration, and similarly a functor CSet can be described as a discrete opfibration. Thus, a profunctor D op×CSet could be described by a discrete opfibration over D op×C, or a discrete fibration over D×C op, but there is also a more directly “two-sided” fibrational description. A two-sided fibration from C to D is a functor EC×D which is a fibration over D and an opfibration over C in a compatible way; see Grothendieck fibration for details. Such a fibration represents a pseudofunctor D op×CCat, and hence if it is discrete it represents a profunctor D op×CSet.

This definition/characterization of profunctors works for internal categories as well, but not for enriched ones. It is sometimes called the graph of a profunctor (although this is sometimes also used for the other fibrational representations mentioned above).

In terms of two-sided codiscrete cofibrations

Yet another way of representing profunctors is via their collages, also called cographs. The collage of a profunctor H:CD is, in particular, a category H¯ equipped with functors CH¯ and DH¯ which are fully faithful and jointly bijective on objects.

In fact, the objects of the undercategory (CD)/Cat which are collages of profunctors CD can be characterized, up to equivalence, as the two-sided codiscrete cofibrations, i.e. the two-sided discrete fibrations in Cat op. In simpler and more explicit language, these are the categories M which contain C and D as disjoint full subcategories which are jointly-wide (i.e. together contain all the objects), and such that there are no morphisms from an object of C to an object of D. Equivalently, they are the categories which admit a functor to the interval category I such that D is the fiber over 0 and C is the fiber over 1.

When viewing a profunctor H:CD in this way, one may sometimes speak of elements of H(d,c) as heteromorphisms from d to c, since they are morphisms in the category H¯ and can be “composed” with morphisms of C and D (this corresponds to the “action” of C and D on H in the other formulations), but they go between objects of two different categories (namely C and D).

This characterization works just as well in both the internal and enriched case. Perhaps surprisingly, it also tends to give the “right” notion of profunctor starting with many other, even more exotic, 2-categories. However, it is trickier to figure out how to define the composite of profunctors viewed as codiscrete cofibrations; see codiscrete cofibration.

Comparing fibrations and cofibrations

If CgH¯fD is a codiscrete cofibration representing a profunctor H from C to D, then the two-sided discrete fibration representing the same profunctor can be obtained as the comma category (fg) with its two projections to C and D.

Dually, if CpEqD is a two-sided discrete fibration representing a profunctor from C to D, then the codiscrete cofibration representing the same profunctor can be obtained as the cocomma object? (qp) with the two inclusions of C and D.

In fact, in any 2-category with comma and cocomma objects,we have an adjunction

cocomma:Span(C,D)Cospan(C,D):comma.cocomma: Span(C,D) \;\rightleftarrows\; Cospan(C,D) : comma.

One can show that comma objects are always discrete fibrations, and dually cocomma objects are always codiscrete cofibrations. In Cat and other similar 2-categories, this adjunction is idempotent and restricts to an equivalence between the categories of discrete fibrations and codiscrete cofibrations (both of which are of course equivalent to the category of profunctors from C to D). This is a two-sided version of the Grothendieck construction.

Examples

  • Recall that a one-object Vect-enriched category is just an algebra, while a general Vect-enriched category is an algebroid. The full sub-bicategory of VectMod on one-object Vect-enriched categories is the familiar category of algebras, bimodules and bimodule homomorphisms. In this case, the “representable” profunctors correspond to the way in which every morphism AB of algebras induces the A-B bimodule which as a vector space is B with obvious right B action and left A-action induced by first mapping A to B via f and then using multiplication in B.

  • The full sub-bicategory of SetProf on discrete categories is the bicategory of sets, spans of sets and morphisms of spans:

    SetMod discSpan(Set).Set\Mod_{disc} \simeq Span(Set) \,.

    In this case, the representable profunctor induced by a map f:CD of sets is the span

    C Id f C D\array{ && C \\ & {}^{Id}\swarrow && \searrow^{f} \\ C &&&& D }
  • Similarly, the full sub-bicategory of internal profunctors in S=(Set op,×) on “discrete categories” is the bicategory of cospans

    Set opMod discSpan(Set op)=Cospan(Set).Set^{op}\Mod_{disc} \simeq Span(Set^{op}) = Cospan(Set) \,.

References

(what is a good comprehensive reference?)

Some exposition at

  • John Baez, Re: Klein 2-Geometry VII (blog)

The common generalization of bimodules and spans in terms of profunctors has been discussed on the blog at

  • John Baez, Bimodules versus spans (blog)

There is a discussion of profunctors in the recently republished:

  • J.-M. Cordier and T. Porter, (1989), Shape Theory: Categorical Methods of Approximation, Mathematics and its Applications, Ellis Horwood. Reprinted Dover (2008).

Excellent notes from a course on distributors given by Jean Bénabou in June 2000 at TU Darmstadt, and prepared by Thomas Streicher, are available from his website http://www.mathematik.tu-darmstadt.de/~streicher.


Notation

Profunctors are often notated with a slashed or barred arrow, as in CD, which is U+21F8 in Unicode. It is not always obvious how to draw this character, so here are some hints.

  • On the nLab (or anywhere that accepts SGML character entities, including raw HTML on the web), it can be found using a Unicode entity:

    ⇸
  • In LaTeX, one can use \nrightarrow (producing ‘’) in a pinch, but a nice-looking extensible barred arrow command can also be produced with the following preamble code (modified from amsmath’s \xrightarrow):

    \makeatletter
    \def\slashedarrowfill@#1#2#3#4#5{%
      $\m@th\thickmuskip0mu\medmuskip\thickmuskip\thinmuskip\thickmuskip
       \relax#5#1\mkern-7mu%
       \cleaders\hbox{$#5\mkern-2mu#2\mkern-2mu$}\hfill
       \mathclap{#3}\mathclap{#2}%
       \cleaders\hbox{$#5\mkern-2mu#2\mkern-2mu$}\hfill
       \mkern-7mu#4$%
    }
    \def\rightslashedarrowfill@{%
      \slashedarrowfill@\relbar\relbar\mapstochar\rightarrow}
    \newcommand\xslashedrightarrow[2][]{%
      \ext@arrow 0055{\rightslashedarrowfill@}{#1}{#2}}
    \makeatother
  • In Xypic, a barred arrow (to the right, in this example) can be produced with

    \ar[r]|-@{|}

Discussion

The following discussion is about where to put the “op” in the definition of a profunctor.

Todd: There is an inevitable debate here about whether one should use C opDV or CD opV. My own convention is to use the latter. For example, every functor CD yields a profunctor by composition with the Yoneda embedding on D.

Mike: My convention is D opC. I agree with your reasoning for why D should be contravariant; I like to put it first because in the hom-functor C(,) the contravariant variable appears first.

Sridhar Ramesh: But surely, just as well, a functor from C to D yields a contravariant functor from C to Set D and thus a profunctor C opDV, by composition with the contravariant Yoneda embedding of D into Set D? At the moment, I still do not see why there is reason to prefer in the abstract general one to the other of (c,d)Hom D(F(c),d) and (d,c)Hom D(d,F(c)), though it’s not an issue I’ve thought very much about or have strong emotions regarding. Are there further reasons beyond the above?

Mike Shulman: Well, the covariant Yoneda embedding is arguably more natural and important than the contravariant one. If a profunctor CD is a functor CSet D op, then we can think of it as assigning to every cC a presheaf on D, which may or may not be representable. The profunctor “is” a functor just when all its values are representable presheaves. Of course, if instead a profunctor CD were a functor C opSet D, i.e. C(Set D) op, then we could think of it as assigning to each cC a functor DSet, which might or might not be (co)representable. However, for a bunch of reasons it’s often more natural to think of an object of D as determined by the maps into it, rather than the maps out of it—in other words by its generalized elements, or in yet other words by the presheaf it represents. Athough of course formally, there is a complete duality.

References