Two Categories of Relations
Total Page:16
File Type:pdf, Size:1020Kb
Two Categories of Relations Technical Rep ort no Peter Knijnenburg Frank Nordemann Dept of Computer Science Leiden University Niels Bohrweg CA Leiden the Netherlands Email peterkcsleidenunivnl Introduction Recently there have app eared two notions of categories of relations in the literature Freyd introduced the notion of al legory FS and Carb oni and Walters introduced the notion of cartesian bicategory of relations CW On the face of it the two approaches lo ok rather dierent In this pap er we show that the latter axiomatization is equal in a categorical sense to an enrichment of the former The approach by Freyd see denitions and is a very smo oth axiomati zation of the notion of category of relations But as Carb oni observed Car the theory is rather rigid In particular the mo dular law is not satisfactory from a theoretical p oint of view it can not even b e stated unless one has an in volution which is the identity on ob jects which in nature never o ccurs unless one is already in a category of relations Hence Carb oni and Walters prop osed another axiomatization denition b elow which is more categorical So b oth approaches have their strong p oints and the result of this pap er allows to exploit them b oth without any p enalty at all This seems to b e particu lar relevant since categories of relations have b een used recently in theoretical computer science to mo del nondeterministic programs HJ She Man Two categories of relations In this section we rep eat the denition of the two categories For the comp o sition of two arrows R and S in a category R S means rst S and then R Furthermore we assume that comp osition binds more tightly than intersection For further categorical background consult FS Mac The rst denition of a categry of relations we consider in this pap er was introduced by Freyd FS Denition A category A is an allegory i it is a locally ordered category whose homposets have binary meets and an antiinvolution R R satisfying the modular law R S T R T R R An al legory is unitary i it has an object U the unit such that is the U largest morphism U U and for every object A there exists a morphism t A U such that t t A A A A We call a relation R X Y a partial map if it is single valued that is if R R The relation is called a map if it is moreover total that is if R R and R R In other words if R is a map then R is its right adjoint R a R One can prove that a relation R has a right adjoint i R is this right adjoint A tabulation of a relation R X Y is given by two maps f Z X and g Z Y such that g f R and f f g g The last Z condition says that f and g are jointly monic For two ob jects X and Y in an unitary allegory the relation t t X Y can b e shown to b e the largest X Y relation from X to Y We denote it by m In the sequel for a category of X Y relations C we let MapC denote the sub category of C consisting of all ob jects and all maps Denition A unitary al legory is called pretabular i for al l objects X and Y the morphism m has a tabulation We denote this tabulation by X Y 0 X Y X and X Y Y We denote the category of pretabular unitary al legories and structure preserving functors by pTUA We have the following lemma FS Lemma MapA is a cartesian category The product of X and Y is given by the tabulation of m X Y A tabular unitary al legory is a unitary allegory in which each relation has a tabulation In FS it is shown that every pretabular unitary allegory can b e fully and faithfully embedded in a tabular unitary allegory Furthermore each tabular unitary allegory is isomorphic to the category Rel C of relations of a regular category C FS JMP Hence we can consider each pretabular unitary allegory as a sub category of a RelC with C regular Next we introduce the second categorical structure for axiomatizing relations as prop osed by Carb oni and Walters CW Denition A category B is a cartesian bicategory of relations i it is a locally ordered category equipped with a functorial tensor product B B B which has an identity object I and natural isomorphisms X X I X Y Y X X Y Z X Y Z satisfying the classical coherence conditions Furthermore for every object X in B there exists a comonoid structure X X X t X I X X satisfying the fol lowing axioms The arrows and t satisfy the equations for X to be a cocommutative X X comonoid object Mac see gure Each morphism R X Y is a lax comonoid homomorphism That is R R R and t R t Y X Y X For each object X and t have a right adjoint and t respec X X X X tively This cocommutative comonoid structure is the only cocommutative comonoid structure on X with structure morphisms having right adjoints Furthermore every object X is discrete in the sense that X X X X We denote the category of cartesian bicategories of relations and structure pre serving functors by CRel The remarkable thing ab out cartesian bicategories of relations is that lo cal limits and the involution op erator are denable CW To b e precise given two relations R S X Y their intersection is given by R S R S X Y The involution of a relation R X Y is given by the comp osite 1 1 1 R 1 1 Y I Y X X Y Y X I X X Y where t X X = I X X X X t X X X I = X X X Again we call a relation R having a right adjoint a map One can prove that this right adjoint necessarily equals the involution The following lemma is proved in CW Lemma MapB is cartesian category For two objects X and Y the 1 0 1 product is given by X Y with projections t and t 0 0 Furthermore for two relations R and S R S R S X X H H H H 1 X H X H X X H H H Hj R X I X X X X X X X 1 1 t X X X X R X X X X 1 1 X X (X X ) X X (X X ) Figure Co commutative comonoid ob ject X The isomorphism It has b een observed earlier Car that the two categories pTUA and CRel are equivalent In this section we prove that they are in fact isomorphic First we describ e the functor A CRel pTUA Let B b e a cartesian bicategory of relations AB is given by the following data The ob jects and morphisms of AB are the ob jects and morphisms of B The order on the homsets in AB is the order in B The involution is given by the denable involution of B The unit is given by I 0 The tabulation of m is given by X Y X and X Y Y X Y Lemma AB is a pretabular unitary al legory Pro of The pro of follows from a number of theorems in CW By Theorem the homsets of B have nite pro ducts By Theorem there exists an antiinvolution such that R S R S The mo dular law follows from Remark ii The axioms for the unit follow from Theorem ii Finally by Theorem i the pro jections form a tabulation of m Next we describ e the functor C pTUA CRel Let A b e a pretabular unitary allegory C A is given by the following data The ob jects and morphisms of C A are the ob jects and morphisms of A The order on the homsets in C A is the order in A The tensor pro duct of two ob jects A and B is given by the domain of the tabulation of m AB The tensor pro duct of two arrows R A C and S B D is given by 0 0 R S R S AB C D C D AB The identity ob ject of the tensor pro duct is given by the unit The required natural isomorphisms are given by 0 0 0 0 h ti h i hh i i where h i is the pairing op erator of MapA h i and t is already present in A Lemma C A is a cartesian bicategory of relations Pro of We work in the internal language of the regular category asso ciated with A Then to prove that is functorial we need to show that T U R S T R U S This amounts to showing that in the internal language for any relations R S T U c dT c eU d f R a cS b d a cT c eR a cdU d f S b d This equivalence holds in any regular category by Frobenius Recipro city see MR It follows immediately from the denition that preserves the order on hom sets Hence is a homomorphism of bicategories The arrows and are maps and that they are isomorphisms satisfying the classical coherence conditions follows from the fact that they are so in MapA Using the internal language again it is easy to show that they are natural For each ob ject X the maps and t satisfy the axioms for X to b e a X X co commutative comonoid structure since they do so in MapA Let R X Y b e an arrow in A Then t R t since it holds in A Y X Furthermore 0 R R 0 R R 0 0 R R R R Hence R is a lax comonoid homomorphism Supp ose and t is another co commutative comonoid structure Then b oth t and t are maps to the terminal ob ject in MapA and hence they are equal From the counit axiom second diagram in gure it follows that 0 and Hence h i since MapA is cartesian It is straightforward to show that Discreteness holds using the internal lan guage Lemma C AB B Pro of Obviously C AB and B are the same bicategory So we only need to check that the extra structure of C AB and B coincide For example 0 supp ose is the diagonal in B and is the diagonal in C AB Since 0 MapB and MapAB are the same cartesian categories h i The other cases are proved similarly Lemma AC A A Pro of Again it is easy to see that AC A and A are the same bicategory 0 0 Let b e the tabulation of the maximal relation m in A and X Y the tabulation of m in AC A Now reasoning in Map A X Y 1 0 t t h t i X Y X Y X U X Y X U X Y Y X Y X Y X Hence for all ob jects X and Y m has the same tabulation