Is there a standard notation for binary relations in category theory? - MathOverflow most recent 30 from http://mathoverflow.net 2013-05-22T23:41:13Z http://mathoverflow.net/feeds/question/33978 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/33978/is-there-a-standard-notation-for-binary-relations-in-category-theory Is there a standard notation for binary relations in category theory? Category Theory Infant 2010-07-31T05:21:21Z 2010-08-05T05:43:03Z <p>In set theory, I learned that a binary relation is simply a subset of a Cartesian product. Moving on to category theory, it seems that this definition is not enough. Just as a function is no longer its graph, but say an ordered triple of a domain set, a codomain set, and a single-valued subset of their product, it is also useful to have a binary relation be an ordered triple of a domain set, a codomain set, and a subset of their product (e.g. when you are trying to define projections from the graph of the relation to the domain and codomain sets). But whereas there is a well accepted notation $f : X \to Y$ for the former stating that "$f$ is a function with domain $X$ and codomain $Y$", I haven't found any notation of this sort for binary relations. In fact, binary relations do not seem to get any special attention or treatment in standard textbooks, like Mac Lane. So my question is:</p> <p>(1) Is there a standard notation for stating that "$R$ is a binary relation between $X$ and $Y$? (A reference would be good here, even if the notation is not "standard" or "universally accepted".)</p> <p>(2) If not, is there a reason for this lack of interest in it?</p> http://mathoverflow.net/questions/33978/is-there-a-standard-notation-for-binary-relations-in-category-theory/34570#34570 Answer by Aleks Kissinger for Is there a standard notation for binary relations in category theory? Aleks Kissinger 2010-08-04T23:24:47Z 2010-08-04T23:24:47Z <p>In categorical literature, the notation $f: X \rightarrow Y$ only means "$f$ is a function from $X$ to $Y$" in the case where the category you are working in is Set, that is the category of sets and functions. In the category of sets and relations, the same notation means $f$ is a relation from $X$ to $Y$. To answer (perhaps more verbosely) you question about interest, there is actually loads of interest in binary relations. With a bit of digging, one sees that they crop up in various guises all over category theory.</p> <p><br /> <strong>AS A (MONOIDAL) CATEGORY</strong></p> <p>For starters, the category Rel of sets and binary relations is a perfectly good category, and its properties are well understood. Perhaps the reason Rel isn't well covered in the CT classics is because it is primarily of interest as a monoidal category. These are categories that have a notion of "product" that is much weaker than the usual, in that they don't satisfy the usual universal properties, but still form an associative, unital operation one can apply to objects and arrows. While this isn't too far out of the categorical mainstream, you may not necessarily meet them in an introductory course on category theory. </p> <p>Axiomatically, the category of relations is much more like the category of vector spaces. To see this intuitively, picture a relation from $A$ to $B$ as a matrix $M$ whose columns are indexed by the elements of $A$ and whose rows are indexed by the elements of $B$. Then, let $M_{a,b} = 1$ if $a M b$ and $M_{a,b} = 0$ otherwise. Relational composition is just matrix multiplication, replacing $+$ with OR and $*$ with AND. From this point of view, its easy to see that the cartesian product of relations is is much more closely resembles the tensor product of linear maps than it does the cartesian product of functions.</p> <p>The category FRel of finite sets and relations (as well as FHilb, the category of finite dimensional Hilbert spaces, and many more) forms a <em>dagger-compact closed category</em>. If you become familiar with this definition and associated literate, it sums up a good chunk of what categories like FRel are like and what they are good for. There are lots of ways to get stuck in to this. These categories are presented in a quite accessible, physics-oriented format in Bob Coecke's paper: "Introducing categories to the practicing physicist". You can get it here:</p> <p><a href="http://arxiv.org/abs/0808.1032" rel="nofollow">http://arxiv.org/abs/0808.1032</a></p> <p>And Pete Selinger introduces the whole zoo of such categories in "A survey of graphical languages for monoidal categories".</p> <p><a href="http://www.mscs.dal.ca/~selinger/papers/graphical.pdf" rel="nofollow">http://www.mscs.dal.ca/~selinger/papers/graphical.pdf</a></p> <p><br /> <strong>AS SPANS</strong></p> <p>As @Mikola already mentioned, Spans (which are a generalisation of relations) are often used in the place of binary relations in arbitrary categories. A span is just a pair of arrows $f: K \rightarrow X$, $g : K \rightarrow Y$ from a common domain $K$. In categories with products the connection to relations is especially easy to see. Because of the universal property of products, such a pair of arrows determines a unique third arrow $h : K \rightarrow A \times B$. In the case that $h$ is monic, this is just the same as a subset of $A \times B$, i.e. relations as you normally think of them (c.f. @Andrej).</p> <p>Spans are a beautiful and elegant way to deal with maps that are "relation-like" in suitably rich categories. In fact, any category with pullbacks has a natural notion of a "category of spans of C", whose objects are objects of C, whose arrows are spans (i.e. generalised relations), and where composition of spans is by a pullback-based construction that is much like how one composes relations.</p> <p>John Baez has some interesting papers about taking spans of groupoids rather than just spans of sets. In line with the intuition that relations are a bit like matrices over the booleans, he treats spans of groupoids as things that are a bit like matrices over the positive real numbers. The place to start on this is:</p> <p><a href="http://math.ucr.edu/home/baez/groupoidification/" rel="nofollow">http://math.ucr.edu/home/baez/groupoidification/</a></p> <p><br /> <strong>AS PROFUNCTORS</strong></p> <p>Another way you can think of a binary relation between sets is as a function $\chi_R$ <em>out of</em> a cartesian product $A \times B$ of sets onto the two element set {$0, 1$}. Then let $a R b$ iff $\chi_R(a,b) = 1$. Such a function can be used to define any relation, and is called the <em>characteristic function</em> of the relation $R$.</p> <p>We can generalise this in quite a natural way from sets and functions to categories and functors. However, in the category Cat of categories and functors, it turns out the most natural thing to send "characteristic" functors to is the category of Sets. A functor $F : C^{op} \times D \rightarrow Set$ is called a <em>profunctor</em> from the category $C$ to the category $D$. I won't spell out to many details here (for instance, the category $C$ is "op-ed" for a good reason), but suffice it to say that such a map behaves very analogously to a binary relation and comes with natural notions of composition, etc.</p> <p>These become a very powerful tool when working with internal and higher categories, because certain structures you can put on profunctors let you define the notion of a category <em>inside</em> another category. This is a good example of a structure that is quite deep (and that people are only beginning to fully appreciate!) that essentially generalises the basic notion of a binary relation. When you have built up sufficient courage, the canonical reference for profunctors is Bénabou's "Distributors at Work." For the applications I described, they are detailed in papers by Steve Lack and Paul-Andre Mellies, and probably many others.</p> http://mathoverflow.net/questions/33978/is-there-a-standard-notation-for-binary-relations-in-category-theory/34583#34583 Answer by Mike Shulman for Is there a standard notation for binary relations in category theory? Mike Shulman 2010-08-05T05:43:03Z 2010-08-05T05:43:03Z <p>Sometimes people write $R\colon X &#x21F8; Y$ or $R\colon X &#x21AC; Y$. The former is frequently used for morphisms in a category (like the category Rel of sets and relations) which are "like relations, bimodules, or profunctors" rather than like functions, homomorphisms or functors. The latter is used in the chapter on allegories in <em>Sketches of an Elephant</em>; I don't know if it's more widely used.</p>