nLab
bicategory of relations

Bicategories of relations

Idea

A bicategory of relations is a (1,2)-category which behaves like the 2-category of internal relations in a regular category. The notion is due to Carboni and Walters.

Definition

Note: in this article, the direction of composition is diagrammatic (i.e., “anti-Leibniz”).

A bicategory of relations is a cartesian bicategory which is locally posetal and moreover in which for every object X, the diagonal Δ:XXX and codiagonal :XXX satisfy the Frobenius condition?:

Δ=(1Δ)(1).\nabla\Delta = (1\otimes \Delta)(\nabla \otimes 1).

Of course, in the locally posetal case the definition of cartesian bicategory simplifies greatly: it amounts to a symmetric monoidal Pos-enriched category for which every object carries a commutative comonoid structure, for which the structure maps Δ X:XXX, ε X:X1 are left adjoint 1-morphisms, and for which every morphism R:XY is a colax morphism of comonoids in the sense that the following inequalities hold:

RΔ YΔ XX(RR),Rε Yε X.R \Delta_Y \leq \Delta_{X \otimes X} (R \otimes R), \qquad R \varepsilon_Y \leq \varepsilon_X.

We remark that such structure is unique when it exists (being a cartesian bicategory is a property of, as opposed to structure on, a bicategory). The tensor product behaves like the ordinary product of relations. Note this is not a cartesian product in the sense of the usual universal property; nevertheless, it is customary to write it as a product ×, and we follow this custom below. It does become a cartesian product if one restricts to the subcategory of left adjoints (called maps), which should be thought of as functional relations.

Properties

We record a few consequences of this notion.

Proposition

(Separability condition) Δ=1.

Proof

In one direction, we have the 2-cell 1Δ which is the unit of the adjunction ΔΔ *=. In the other direction, there is an adjunction εε * between the counit and its dual, and the unit of this adjunction is a 2-cell 1εε *, from which we derive

Δ=ΔΔ *Δ(1×ε)(1×ε *)Δ *=1\Delta\nabla = \Delta\Delta_* \leq \Delta (1 \times \varepsilon)(1 \times \varepsilon_*)\Delta_* = 1

where the last equation follows from the equation Δ(1×ε)=1 and its dual (1×ε *)Δ *=1.

Proposition

(Dual Frobenius condition) Δ=(Δ×1)(1×).

Proof

The locally full subcategory whose 1-cells are maps (= left adjoints) has finite products, in particular a symmetry involution σ for which

Δ Xσ XX=Δ X\Delta_X \sigma_{X X} = \Delta_X

Additionally, the right adjoint σ XY* is the inverse σ XY 1=σ YX. Hence the equation above is mated to σ XX X= X, and we calculate

XΔ X = σ XX XΔ Xσ XX = σ XX(1×Δ X)( X×1)σ XX = (Δ X×1 X)σ X×X,Xσ X×X,X(1 X× X) = (Δ X×1 X)(σ XX×1)(1×σ XX)(1× X) = (Δ X×1 X)(1 X× X)\array{ \nabla_X \Delta_X & = & \sigma_{X X}\nabla_X \Delta_X \sigma_{X X} \\ & = & \sigma_{X X} (1 \times \Delta_X)(\nabla_X \times 1) \sigma_{X X} \\ & = & (\Delta_X \times 1_X) \sigma_{X \times X, X} \sigma_{X \times X, X} (1_X \times \nabla_X) \\ & = & (\Delta_X \times 1_X) (\sigma_{X X} \times 1) (1 \times \sigma_{X X}) (1 \times \nabla_X) \\ & = & (\Delta_X \times 1_X)(1_X \times \nabla_X) }

which gives the dual equation.

Theorem

In a bicategory of relations, each object is dual to itself, making the bicategory a compact closed bicategory.

Proof

Both the unit and counit of the desired adjunction XX are given by equality predicates:

η X=(1ε *XΔX×Xθ X=(X×XXε1)\eta_X = (1 \stackrel{\varepsilon_*}{\to} X \stackrel{\Delta}{\to} X \times X \qquad \theta_X = (X \times X \stackrel{\nabla}{\to} X \stackrel{\varepsilon}{\to} 1)

One of the triangular equations follows from the commutative diagram

X 1×ε * X×X 1×Δ X×X×X 1 ×1 X Δ X×X 1 ε×1 X\array{ X & \stackrel{1 \times \varepsilon_*}{\to} & X \times X & \stackrel{1 \times \Delta}{\to} & X \times X \times X \\ & {}_1\searrow & \downarrow \mathrlap{\nabla} & & \downarrow \mathrlap{\nabla \times 1} \\ & & X & \overset{\Delta}{\to} & X \times X \\ & & & {}_{1}\searrow & \downarrow \mathrlap{\varepsilon \times 1} \\ & & & & X }

where the square expresses a Frobenius equation. The other triangular equation uses the dual Frobenius equation.

The compact closure allows us to define the opposite of a relation R:XY as the 1-morphism mate:

R op=(Y1 Y×η XY×X×X1 Y×R×1 XY×Y×Xθ Y×1 XX)R^{op} = (Y \stackrel{1_Y \times \eta_X}{\to} Y \times X \times X \stackrel{1_Y \times R \times 1_X}{\to} Y \times Y \times X \stackrel{\theta_Y \times 1_X}{\to} X)

In this way, a bicategory of relations becomes a †-compact Pos-enriched category. It may be shown that if f:XY is a map, then f op:YX equals the right adjoint f *. Also, it may be shown that maps coincide with strict comonoid morphisms.

Proposition

If f,g:XY are maps and fg, then f=g. Thus, the locally full subcategory whose morphisms are maps is locally discrete (the hom-posets are discrete).

Proof

A 2-cell inequality α:fg is mated to a inequality α *:g *f *. On the other hand, whiskering 1 Y×α×1 X with 1 Y×η X and θ Y×1 X, as in the construction of opposites above, gives α op:f opg op. Since f op=f * and g op=g *, we obtain f op=g op, and because f opop=f, we obtain f=g.

The Beck-Chevalley condition

Bicategories of relations B satisfy a Beck-Chevalley condition, as follows. Let Prod(B 0) denote the free category with finite products generated by the set of objects of B. According to the results at free cartesian category, Prod(B 0) is finitely complete.

Since Map(B) has finite products, there is a product-preserving functor π:Prod(B 0)Map(B) which is the identity on objects. Again, according to the results of free cartesian category, we have the following result.

Lemma

If a diagram in Prod(B 0) is a pullback square, then application of π to that diagram is a pullback square in Map(B).

Let us call pullback squares of this form in Map(B) product-based pullback squares.

Proposition

Given a product-based pullback square

W h X k f Y g Z\array{ W & \stackrel{h}{\to} & X \\ k \downarrow & & \downarrow f \\ Y & \underset{g}{\to} & Z }

in Map(B), the Beck-Chevalley condition holds: h *k=fg *.

See Brady-Trimble for further details. The critical case to consider is the pullback square

X Δ X×X Δ Δ×1 X×X 1×Δ X×X×X\array{ X & \overset{\Delta}{\to} & X \times X \\ \mathllap{\Delta} \downarrow & & \downarrow \mathrlap{\Delta \times 1} \\ X \times X & \underset{1 \times \Delta}{\to} & X \times X \times X }

where the Beck-Chevalley condition is exactly the Frobenius condition.

One way of interpreting this result is by viewing B as a hyperdoctrine or monoidal fibration over Prod(B 0), where the fiber over an object B is the local hom-poset hom(B,1). Each f:AB in the base induces a pullback functor, by precomposing R:B1 with π(f):AB in Map(B). Existential quantification is interpreted by precomposing with right adjoints π(f) *. The Beck-Chevalley condition exerts compatibility between quantification and pullback/substitution functors.

Relation to allegories

Any bicategory of relations is an allegory. Recall that an allegory is a Pos-enriched -category whose local homs are meet-semilattices, satisfying Freyd’s modular law:

RST(RTS op)SR S \cap T \leq (R \cap T S^{op})S

A proof of the modular law is given in the blog post by R.F.C. (“Bob”) Walters referenced below.

In fact, we may prove a little more:

Theorem

The notion of bicategory of relations is equivalent to the notion of unitary pretabular allegory.

Proof

A bicategory of relations has a unit 1 in the sense of allegories:

  • 1 is a partial unit: we have ε 1=id 1:11, and for any R:11 we have R=Rε 1ε 1=id 1.

  • Any object X is the source of a map ε X:X1, which being a map is entire. Thus 1 is a unit.

A bicategory of relations is also pretabular, for the maximal element in hom(X,Y) is tabulated as (π X) *π Y, where π X, π Y are the product projections for X×Y.

In the other direction, suppose A is a unitary pretabular allegory. To be continued

See also

Other attempted axiomatizations of the same idea “something that acts like the category of relations in a regular category” include:

References

  • Carboni and Walters, “Cartesian Bicategories, I”

  • blog post showing that any bicategory of relations is an allegory. Indeed, a bicategory of relations is equivalent to a unitary pretabular allegory.