Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Relation Lifting

(draft)

Extending a functor from functions to relations is important to coalgebra for at least two reasons. Relation lifting can be used to define bisimulations and also to define Moss’s coalgebraic logic. In the latter case, the idea is to apply the lifted functor to the satisfiability relation.

Relation lifting can be defined in at least two ways, via spans and via cospans. In both cases the idea is to first represent a relation by a pair of arrows, and then to apply the functor to these arrows.

In the following let Rel\sf Rel be the category which has sets as objects and relations as arrows.

Span-Based Relation Lifting

The idea of the span-based relation lifting of a functor TT is to “tabulate” a relation RR by a span XpRqYX\stackrel p \leftarrow R\stackrel q\rightarrow Y and then to apply the functor TT to the projections, obtaining TXTpTRTqTYTX\stackrel {Tp} \longleftarrow TR\stackrel {Tq}\longrightarrow TY.

Definition: Let T:SetSetT:\sf Set\to Set and XpRqYX\stackrel p \leftarrow R\stackrel q\rightarrow Y be a relation. Then

T:RelRel\overline T:\sf Rel\to Rel

is the relation given by

TR={(a,b)TX×TYwTR.Tp(w)=a & Tq(w)=b}\overline TR = \{(a,b) \in TX\times TY \mid \exists w\in TR\,.\, Tp(w)=a \ \& \ Tq(w)=b\}

Remark: This formulation is specific to set-functors, but can be generalised to other base categories.

Fact: T\overline T preserves composition (and therefore is a functor on Rel\sf Rel) if TT preserves weak-pullbacks.

Example/Exercise: Let P\mathcal P be the powerset functor. It is an interesting exercise to check that (a,b)PX(a,b)\in \overline{\mathcal P}X iff

xa.yb.xRyyb.xa.xRy\begin{gather} \forall x\in \mathcal a\,.\, \exists y\in b\,.\,xRy \\ \forall y\in \mathcal b\,.\, \exists x\in a\,.\,xRy \\ \end{gather}

Fact: P:RelRel\overline {\mathcal P} : \sf Rel \to Rel is a functor. If RR is a partial order then PR\overline {\mathcal P}R is a partial order.

Extending Set-Functors to Ordered Sets

The cospan-based relation lifting starts from the cotabulation (or collage) of a relation RR by a cospan XjRkYX\stackrel j \rightarrow \mathbf R\stackrel k\leftarrow Y, where R\mathbf R is an order on the disjoint union X+YX+Y given by (u,v)R(u,v)\in\mathbf R iff u=vXu=v\in X or (u,v)R(u,v)\in R or u=vYu=v\in Y.

Thus, in order to apply a set-functor TT to jj and kk, we need extend TT from sets to orders. This follows the same idea as the relation lifting in the previous section, but now one closes under reflexivity and transitivity (and quotients by anti-symmetry in the case one works with posets).

Definition: Let (X,)(X,\le) be a pre-order. Write XpqXX\stackrel p \leftarrow {\le}\stackrel q\rightarrow X for the two projections. Then T~(X,)\widetilde T (X,\le) has carrier TXTX and the order on T~(X,)\widetilde T(X,\le)

is the smallest order containing

{(a,b)TX×TXwT().Tp(w)=a & Tq(w)=b}.\{(a,b) \in TX\times TX \mid \exists w\in T(\le)\,.\, Tp(w)=a \ \& \ Tq(w)=b\}.

This defines a functor

T~:OrdOrd\widetilde T:\sf Ord\to Ord

where Ord\sf Ord can be preorders or posets.

Remark: The surjection  TXsT~(X,)\ TX\stackrel s \to \widetilde T (X,\le) has a universal property as the universal solution to the inequation to sTpsTqs\circ Tp\le s\circ Tq. Category theoretically, we can say that ss is the coinserter of (Tp,Tq)(Tp,Tq) and also that T~\widetilde T is the (order-enriched) left Kan extension of DTDT along DD where DD is the embedding of sets into (discrete) ordered sets.

The following fact allows us to use known results about the span-based relation lifting to compute the order-extension of a set-functor in many examples.

Fact: If TT preserves weak pullbacks, then applying T~\widetilde T to a preorder (X,)(X,\le) agrees with applying the relation lifting T\overline T to \le.

Example: Let (X,)(X,\le) be a preorder. For subsets a,bXa,b\subseteq X we have abP~(X,)a\le b\in \widetilde{\mathcal P}(X,\le) iff

xa.yb.xyyb.xa.xy\begin{gather} \forall x\in \mathcal a\,.\, \exists y\in b\,.\,x\le y \\ \forall y\in \mathcal b\,.\, \exists x\in a\,.\,x\le y \\ \end{gather}

In domain theory, this is also known as the Egli-Milner order. When restricted to convex subsets (and modified wrt the empty subset) P~\widetilde{\mathcal P} is known as the Plotkin powerdomain. See also my review of powerdomains.

Cospan-Based Relation Lifting

To cotabulate a relation RX×YR\subseteq X\times Y by a cospan

XjRkYX\stackrel j \rightarrow \mathbf R\stackrel k\leftarrow Y

we need to recall the collage R\bf R of a relation RR. This notion can also be defined in case XX and YY are ordered sets and RR is weakening-closed, that is,

xxRyyxRy.\frac{x'\le x\,R\, y\le y'}{x'\,R\,y'}.

We give the more general definition, because it shows that the cospan-based relation lifting cannot only be used to extend set-functors but also ordered functors.

If RX×YR\subseteq X\times Y is a weakening relation, then the collage R\bf R is an order on the disjoint union X+YX+Y such that xRyx\mathbf R y if (i) xyx\le y in XX or (ii) xRyxRy or (iii) xyx\le y in YY.

Given a functor T:SetSetT:\sf Set\to Set, [1] we can use the collage to give a cospan-based definition of relation lifting.

Definition: Let RX×YR\subseteq X\times Y. Then

T^:RelRel\widehat T: \sf Rel\to Rel

is defined(a,b)T^R(a,b)\in \widehat TR if aba\le b in T~R\widetilde T\bf R.

Fact: If TT preserves weak pullbacks then T=T^\overline T=\widehat T.

Conclusion

The span-based relation lifting can be generalised to ordered sets an is well-behaved if the functor preserves weak pullbacks.

The cospan-based relation lifting is ineherently order enriched, but can be applied to the discrete case if we extend the functor to ordered sets.

One application of relation lifting is to define coalgebraic bisimulation. Here the span-based and the cospan-based definition agree if the functor preserves weak pullbacks, but in general it is only cospan bisimilarity that captures coalgebraic behavioural equivalence/preorder.

The cospan-based relation lifting generalises from ordered sets to Lawvere metric spaces and other categories enriched over a quantale.

References

References can be found in the survey article

Footnotes
  1. (or a functor on preorders or posets)