5

Arrows in the category $\bf Rel$ are binary (2-valued) relations between set objects.

Do ternary, 4-term, $n$-term and variadic (2-valued) relations form categories? (Or perhaps one category?).

It may be convenient to study categorically how binary relations relate to mutual relations, as this and this question, or to represent Helly type relations.

$n$-ary relations are mentioned in nlab, but no explicit category seems defined. Neither does the concept seem to be discussed in Freyd & Scedrov's Categories, Allegories. Did I miss it?

By analogy with graphs and hypergraphs, where the former are defined by edges between pairs of vertices, whereas the latter are defined by arbitrary subsets of vertices, it's not clear offhand how would arrows be defined even for a ternary relation $R \subset X \times Y \times Z$?

alancalvitti
  • 3,440
  • 1
    Do you want to know about categories where relations are objects or where they are morphisms? – Hagen von Eitzen Jan 16 '13 at 06:29
  • @HagenvonEitzen, I don't have an opinion on that - but simply adopted the standard definition of $\bf Rel$ – alancalvitti Jan 16 '13 at 06:41
  • Sure, but in Rel, relations $\subset A\times B$ are used as morphisms $A\to B$ as they nicely generelize functions (which are just special binary relations). As we only consider morphisms from one object to another in category theory, anything beyond binary does not fit in as a morphism as such. – Hagen von Eitzen Jan 16 '13 at 07:02
  • Yes I know that's why I added the last paragraph in my Q, but thought maybe there's a potential way to represent $n$-ary relations via products, maybe by equalizing $A \times B \to C$, $B \times C \to A$, $C \times A \to B$ ? – alancalvitti Jan 16 '13 at 07:07
  • Relations (not only binary relations) form a "category with star morphisms" (over $\mathbf{Rel}$) as I define them in my book: http://www.mathematics21.org/algebraic-general-topology.html - I suspect that I am the first person who explicitly defined categories with star morphisms, as they are important for my research of products of morphisms. – porton Jun 02 '15 at 19:04

3 Answers3

7

I hope I understand your question correctly. If you are referring to 3-ary relations as subsets of $A\times B\times C$ and so on for $n$-ary relations in general then these are in fact already incorporated in the category $Rel$. The category $Rel$ has a monoidal structure given by the ordinary cartesian product of sets. Thus, a ternary relation $R \subseteq A\times B\times C$ can be seen as a relation $R\subseteq (A\times B)\times C$ and thus as an arrow in $Rel$ from $A\times B$ to $C$. Similarly any $n$-are relation can be interpreted as a binary relation.

Just like $Rel$ is a dagger category (that is it admits an involution) the monoidal structure on $Rel$ turns it into a cyclic operad. So, if I understand your question correctly, all of the relations you are interested in form the cyclic operad $Rel$, which is completely defined in terms of the category $Rel$ of binary relations + its monoidal structure. I hope this helps.

Ittay Weiss
  • 81,796
  • Thanks Ittay, I wasn't aware of the monoidal structure. How is the distinction between pairwise versus mutual relations on $A \times B \times C$? represented? – alancalvitti Jan 16 '13 at 05:15
  • I'm not sure what you mean by pairwise vs. mutual. – Ittay Weiss Jan 16 '13 at 05:16
  • For example, pairwise intersection of 3 sets doesn't imply that all 3 intersect. Similarly, pairwise independence of random variables doesn't imply mutual independence. (In both cases the converse implications are true) – alancalvitti Jan 16 '13 at 05:18
  • I don't see how this issue is related to n-ary relations. – Ittay Weiss Jan 16 '13 at 05:18
  • The ternary relations I just mentioned are special cases of $n$-ary relations, $n=3$, while binary relations are those with $n=2$ – alancalvitti Jan 16 '13 at 05:19
  • I'm sorry, but I don't understand what the question is. Anyways, I gotta sign off. – Ittay Weiss Jan 16 '13 at 05:20
  • Distinction between pairwise vs. mutual statistical independence: if $A, B, C$ are pairwise independent random variables then $P(AB)-P(A)P(B)=0, P(BC)-P(B)P(C)=0, P(AC)-P(A)P(C)=0$ yet possibly $P(ABC)-P(A)P(B)P(C) \neq 0$ – alancalvitti Jan 16 '13 at 05:24
  • @alancalvitti What does probability theory have to do with category theory? – Hagen von Eitzen Jan 16 '13 at 06:29
  • @HagenvonEitzen, I picked statistical independence to illustrate the distinction between pairwise and mutual relation - here the 2-valued relation values are represented by the values 0 and not 0. If you don't like probability, you can substitute set intersection, or Borromean linking (Massey product vs. Gauss linking number) – alancalvitti Jan 16 '13 at 06:43
  • @alancalvitti I think you are worried about why every ternary relation between $A,B,C$ can be viewed as binary relation between $A\times B$ and $C$. This is so because $A\times B\times C = (A\times B)\times C$ (with suitable interpretation of $=$ or contemplating the very definition of the left hand side) – Hagen von Eitzen Jan 16 '13 at 07:05
  • @HagenvonEitzen, so you're saying it's not possible to represent the situation where binary relations on $A, B, C$ don't imply their mutual relation? – alancalvitti Jan 16 '13 at 07:09
  • @alancalvitti I do not really understand either. Could you please make a concrete example of these relations? – magma Jan 16 '13 at 18:07
  • @magma, hey magma, did you check the 2 links to math.se questions that I liked in the 3rd paragraph of my original Q? – alancalvitti Jan 16 '13 at 20:39
  • @alancalvitti I have read them, but still I do not see why you think or worry that Rel might not be enough. Could you perhaps describe a relation you have in mind and we can see if it fits into Rel? – magma Jan 17 '13 at 00:34
  • @magma, pairwise vs. mutual: (1) set intersection, (2) coprimeness, (3) statistical independence, (4) topological linking. I'm sure there's many more examples in combinatorial geometry, and other branches but have not surveyed it. – alancalvitti Jan 17 '13 at 01:15
  • @magma, fyi, I wrote a separate Q asking for examples of such relations, w/ included figures illustrating (3) and (4) above: http://math.stackexchange.com/questions/281800/example-relations-pairwise-versus-mutual – alancalvitti Jan 19 '13 at 18:11
4

$\text{Rel}$ forms a structure a bit different from a category because it is very "undirected": when considering a relation among $n$ sets it's in some sense unnatural to decide that some of these sets are sources and some of them are targets. While you can describe $\text{Rel}$ as something like a symmetric monoidal dagger category, you're still imposing a directionality on the morphisms that they don't have in the first place, then removing it using further structure.

Instead you can do the following. Let's define a hypercategory to consist of a collection $C_0$ of objects and a collection $C_1$ of bonds. Each bond has an arity $n$, and bonds of arity $n$ come equipped with a tuple of $n$ objects which we'll call the boundary of the bond.

Finally, there are composition operations of the following type: if $f$ is a bond with boundary $(a_1, \dots a_n)$ and $g$ is a bond with boundary $(b_1, \dots b_m)$, and the boundary has some objects $(c_1, \dots c_k)$ in common, then there is a composition given by "gluing along the common boundary," producing a new bond with boundary given by the parts of the boundaries of $f$ and $g$ that weren't glued. These operations satisfy various axioms that I don't know how to cleanly write down but they should be basically intuitive.

The hypercategory structure on $\text{Rel}$ is given by having the objects be sets and the bonds be relations $R \subseteq X_1 \times \dots \times X_n$, with the boundary of $R$ being $(X_1, \dots X_n)$. Composition is given by the usual composition of relations.

Qiaochu Yuan
  • 468,795
  • I don't know anything about hypercategories or bonds (like Lawvere said, n-cat lab is the opposite of category theory), but a relation on say 3 sets A, B, C is just a subset of tuples (a,b,c) - each of which is ordered. Of course symmetric relations can lead to multiple equivalent orders. What is the problem with representing this order in categories? – alancalvitti Feb 26 '18 at 01:49
2

You can define a multicategory of relations: Objects are sets, multimorphisms $(X_1,\dotsc,X_n) \to Y$ are subsets of $X_1 \times \dotsc \times X_n \times Y$. The identity $(Y) \to Y$ is the usual diagonal $\{(y,y) : y \in Y\}$. The composition $R \circ (S_1,\dotsc,S_n)$ of $R : (X_1,\dotsc,X_n) \to Y$ with $S_i : (X_{i1},\dotsc,X_{im_i}) \to X_i$ (for $i \in \{1,\dotsc,n\}$) is given by the set of tuples $\{(a_{11},\dotsc,a_{1m_1},a_{21},\dotsc,a_{n\,m_n},y)$ such that there is some $b \in \prod_{i=1}^{n} X_i$ with $(b,y) \in R$ and $(a_{i1},\dotsc,a_{im_i},b_i) \in S_i$ for all $i \in \{1,\dotsc,n\}$.

Actually, this is the multicategory associated to the usual monoidal category of relations (where the monoidal structure is given by products of sets).