6
$\begingroup$

$\newcommand{\sq}{\mathbin{\square}}$The usual composition $S\diamond R$ of two relations $R\colon A⇸B$ and $S\colon B⇸C$ is defined as follows:

  • For each $(a,c)\in A\times C$, we declare $a\sim_{S\diamond R}c$ if there exists $b\in B$ such that $a\sim_{R}b$ and $b\sim_{S}c$.

Now, consider the relation $S\sq R$ defined as follows:

  • For each $(a,c)\in A\times C$, we declare $a\sim_{S\sq R}c$ if for each $b\in B$, we have $a\sim_{R}b$ and $b\sim_{S}c$.

Intuitively, the composition $\sq$ is quite weird, although its categorical origin is at least natural: categorically, $\diamond$ is a 0-categorical analogue of the coend composition of profunctors, where we view relations as morphisms $R\colon A\times B\to\{\mathtt{true},\mathtt{false}\}$ and then have $$(S\diamond R)^{c}_{a}=\int^{b\in B}S^{c}_{b}\times R^{b}_{a},$$ whereas we have $$(S\sq R)^{c}_{a}=\int_{b\in B}S^{c}_{b}\times R^{b}_{a},$$ where:

  • The product $\times$ on $\{\mathtt{true},\mathtt{false}\}:=\{\mathtt{t},\mathtt{f}\}$ is given by logical conjunction;
  • The coend $\int^{b\in B}$ is given by $\vee_{b\in B}$, the join in the poset $\{\mathtt{t},\mathtt{f}\}$ equipped with logical implication $\implies$.
  • The end $\int_{b\in B}$ is given by $\wedge_{b\in B}$, the meet in $(\{\mathtt{t},\mathtt{f}\},\mathord{\implies})$.

  1. Has $\sq$ found any natural use in practice?
  2. What kinds of nice properties does the 2-category $\mathsf{Rel}^{\sq}$ given by sets, relations and inclusions with the composition $\sq$ has?

For instance, while $\mathsf{Rel}^{\diamond}$ has right Kan lifts and right Kan extensions, $\mathsf{Rel}^{\sq}$ has left ones. Other properties would include whether $\mathsf{Rel}^{\sq}$ is co/complete (1- or 2-categorically), what the adjunctions in $\mathsf{Rel}^{\sq}$ are, etc.

  1. Are there any references which study $\sq$ or $\mathsf{Rel}^{\sq}$?
  2. (This is slightly outside of the scope of the question, but I'm also interested in profunctors with end composition (and the properties $\mathsf{Prof}$ enjoys with such a composition). I'm sure these have been considered before, and likely the results for those are adaptable to $\mathsf{Rel}^{\sq}$)
$\endgroup$
3
  • 3
    $\begingroup$ If you had $\forall b.a\sim b\lor b\sim c$, this would be the composition for apartness. Do you really mean $\land$? (Or the categorical analogues with $\Pi$ and $+$ instead of $\times$.) $\endgroup$ Commented Jan 29 at 22:25
  • $\begingroup$ Yes, I do mean those as in the question, though I know realise I also want to figure out all of the questions I outlined above for apartness and for the composition $\exists b. a\sim b\vee b\sim c$. Thank you so much for the suggestion! $\endgroup$
    – Emily
    Commented Jan 30 at 4:19
  • $\begingroup$ @PaulTaylor On a related note, do you know if there is an established symbol in common usage for the apartness composition of two relations $R$ and $S$, like writing $R\text{(symbol)}S$ for the relation where $a\sim_{R\text{(symbol)}S}c$ iff $\forall b.a\sim b\vee b\sim c$? $\endgroup$
    – Emily
    Commented Jan 30 at 4:21

2 Answers 2

6
$\begingroup$

Your operation $\square$ defined with $\forall$ and $\land$ is associative, because both $a(R\square(S\square T))d$ and $a((R\square S)\square T)d$ expand to $$ (\forall b_1.\ a R b_1)\land(\forall b_2 c_1.\ b_2 S c_1)\land(\forall c_2.\ c_2 T d). $$ However, it does not define a category unless you restrict to relations between singletons. This is because the unit laws give $$ \forall a_1 a_2 b_1 b_2.\quad a_2 R b_1 \iff a_1 R b_1 \iff a_1 R b_2 $$ for any relation $R$.

A "category" without identities can be turned into a genuine category by taking its idempotents as objects (Karoubi construction), but in this case the idempotents are "constant" relations in the above sense, so there is no improvement.

The only useful ways of forming this composition use $\exists$ with $\land$ or $\forall$ with $\lor$.

I'll leave it to you to adapt this to type-theoretic products and sums or to (co)ends, together with (co)products.

$\endgroup$
4
  • $\begingroup$ Thank you so much for the answer, Paul! I really should have checked whether the $\square$ composition was unital+associative, it's disappointing it fails to be so =/ $\endgroup$
    – Emily
    Commented Feb 2 at 22:21
  • $\begingroup$ I think I'll try figuring out which of the 16 magma structures on $\{\mathtt{t},\mathtt{f}\}$ with $\forall$ and $\exists$ give associative and unital compositions for relations one by one next, though I figure these probably won't have analogues for $\mathsf{Prof}$. $\endgroup$
    – Emily
    Commented Feb 2 at 22:22
  • $\begingroup$ @crystallinecohomology: you won't learn anything from classifying structures on a two-element set. Find a real mathematical problem to study, such as the one in your user name! (PS I can't help with either of those topics.) $\endgroup$ Commented Feb 3 at 11:24
  • $\begingroup$ I understand it probably won't lead to anything really that interesting, it's just that I'm curious about whether there are other possible ways to put an associative and unital composition in $\mathsf{Rel}$ (and then study it a bit as a 2-category) following this end/coend strategy, besides the usual composition of relations and the "apartness composition". $\endgroup$
    – Emily
    Commented Feb 4 at 18:13
5
$\begingroup$

If you define the universal composition with respect to the disjunction, rather than the conjunction, then you do get another category structure as Paul mentioned.

In this case, the identities are different for each category structure. In particular, the identity on a set with respect to the universal composition is the set of all antidiagonal pairs. This shouldn't be surprising if you think about it, because both structures are demorgan duals to each other.

In fact, these two category structures interact laxly according to the Frobenius equations making Rel a linear bicategory. This observation is made on page 6 of Cockett, Kolowski and Seeley. I think this is pretty strong evidence why it is natural to define the one category structure as the De Morgan dual of the other!

The two categorical structures of relations have been secretly used in first order logic for a while, albeit before the advent of category theory. I would recommend reading the article of Bonchi et al. for a good exposition on this side of things, as well as some cool novel work using string diagrams.

Regarding your second point, I must point out that relations are not the same as Bool-enriched profunctors. They are almost the same, but the difference is that in Bool-enriched profunctors, for every enriched category there is an opposite category that need not be the same.

However, generalizing the situation in Rel, it is known that relations valued in a Girard quantale has the structure of a linear bicategory. And it isn't hard to imagine that Girard quantale-enriched profunctors would also have the structure of linear bicategories.

$\endgroup$
5
  • $\begingroup$ I think this answer is mistaken — it applies to the “apartness composition” defined by $\forall b.\, a \sim_R b \vee b \sim_S c$ mentioned by Paul Taylor in comments, but the question itself is about the composition defined with $\wedge$ not $\vee$. As Paul says, that composition has no units except on subsingletons. If $I$ is a unit on $X$, then for any $R \subseteq X \times Y$, whenever $(x \sim_R y)$ we have $(\forall x',\ x \sim_I x' \wedge x' \sim_R y )$, so a fortiori $\forall x',\, x' \sim_R y$. Taking $R$ to be equality and $y = x$, we get for any $x$ that $\forall x',\, x' = x$. $\endgroup$ Commented May 3 at 15:44
  • $\begingroup$ Hey Cole, thank you so much for your answer and welcome to MO! I've defined the $\square$ composition with a product instead of a coproduct, and this is what leads it to being non-unital. That said, I can't overstress how much I appreciate your answer, as it gives a number of great resources on the apartness composition as well as on the general categorical stuff going on with it, which I was really eager to read. Again, thank you so much! $\endgroup$
    – Emily
    Commented May 3 at 15:50
  • $\begingroup$ Incidentally, do you know if there's an analogue for profunctors of what we're calling the "apartness composition" for relations here? I figure the end formula $$\mathfrak{q}\mathbin{*}\mathfrak{p}=\int_{B\in\mathcal{D}}\mathfrak{p}^{B}_{A}\mathbin{\textstyle\coprod}\mathfrak{q}^{C}_{B}$$ won't give $\mathsf{Prof}$ a unital composition, but maybe there's a more refined analogue of the "apartness composition" for profunctors that works? $\endgroup$
    – Emily
    Commented May 3 at 15:51
  • $\begingroup$ (I guess another thing to try would be to show that $*$ makes $\mathsf{Prof}$ into a skew-bicategory: maybe while we don't have natural isomorphisms $\mathfrak{p}*\mathrm{Hom}_{\mathcal{C}}\cong\mathfrak{p}$ and $\mathrm{Hom}_{\mathcal{D}}*\mathfrak{p}\cong\mathfrak{p}$, I could see there being a non-invertible map from $\mathfrak{p}*\mathrm{Hom}_{\mathcal{C}}$ to $\mathfrak{p}$ or the other way around in a way that makes $\mathsf{Prof}$ into a skew-bicategory.) $\endgroup$
    – Emily
    Commented May 3 at 15:55
  • $\begingroup$ My apologies, I didn't read Paul's comment properly. I didn't mean to cause any insult. I was just very sloppy. @Emily In Set-enriched profunctors, this does not give you a composition, but I am pretty sure it does for Bool-enriched ones. However, if you want to stay in Set-enriched profunctors, one of the Kan extensions makes Prof into a closed bicategory. $\endgroup$ Commented May 3 at 16:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .