Kan Extensions of Institutions
Total Page:16
File Type:pdf, Size:1020Kb
Journal of Universal Computer Science, vol. 5, no. 8 (1999), 482-492 submitted: 7/8/99, accepted: 14/8/99, appeared: 28/8/99 Springer Pub. Co. Kan Extensions of Institutions 1 Grigore Rosu Department of Computer Science & Engineering, University of California at San Diego [email protected] Abstract: Institutions were intro duced by Goguen and Burstall [GB84 , GB85 , GB86 , GB92 ] to formally capture the notion of logical system. Interpreting institutions as func- tors, and morphisms and representations of institutions as natural transformations, we give elegant pro ofs for the completeness of the categories of institutions with morphisms and representations, resp ectively, show that the dualitybetween morphisms and rep- resentations of institutions comes from an adjointness b etween categories of functors, and prove the co completeness of the categories of institutions over small signatures with morphisms and representations, resp ectively. Category: F.3, F.4 1 Intro duction There are di erent logical systems successfully used in theoretical computer sci- ence, such as rst and higher order logic, equational logic, Horn clause logic, tem- p oral logics, mo dal logics, in nitary logics, and many others. As a consequence of the fact that many general results of these logics are not dep endent on the partic- ular ingredients of their underlying logic, abstracting Tarski's classic semantic de nition of truth [Tar44], Goguen and Burstall [GB84, GB85, GB86, GB92] develop ed the notion of institution to formalize the informal notion of \logical system". The main requirement is the existence of a satisfaction relation b etween mo dels and sentences which is consistent under change of notation. Much interest has b een shown in the study of institutions since they rst app eared in 1986. Institutions have b een given for lamb da calculus, higher order logic with p olymorphic typ es, second order and mo dal logics. Mosses [Mos89] shows that his uni ed algebras form an institution, Goguen [Gog91] shows that his hidden-sorted equational logic is an institution, Mossakowski [Mos96] gives hierarchies of institutions for total, partial and order-sorted logics, Rosu [Ros94] gives an institution for order-sorted equational logic. Diaconescu, Goguen and Stefaneas [DGS93] and Rosu [Ros99] use institutions to study mo dularization. Diaconescu [Dia98] intro duces extra theory morphisms for institutions to give logical semantics for multiparadigm languages like CafeOBJ [DF98]. Fiadeiro and Sernadas [FS88] intro duces the notion of -institution based on deduction rather than satisfaction, and Pawlowski [Paw96]intro duces the notion of context institution to deal with variable contexts and substitutions. Cerioli and Meseguer [CM97], Cerioli [Cer93], Tarlecki [Tar96a], Mossakowski [Mos96] study relation- ships and translations b etween institutions. Muchinteresting work using institu- tions has b een done byTarlecki [Tar84,Tar86a,Tar86b,Tar86c,Tar87,Tar96a] and by Sannella and Tarlecki [ST86, ST87, ST88]. 1 On leave from Fundamentals of Computing, Faculty of Mathematics, Universityof Bucharest, Romania. Rosu G.: Kan Extensions of Institutions 483 As suggested by Goguen and Burstall [GB92], an institution can b e regarded as a functor from its category of signatures to some sp ecial category. This more categorical view allows us to show that some known results on institutions are instances of results in category theory, and also to obtain new results. Two main apparently distinct maps b etween institutions are b eing considered in the literature: institution morphisms due to Goguen and Burstall [GB92] and institution representations due to Tarlecki [Tar87, Tar96a]. We show that the categories of institutions with morphisms IN S and of institutions with r epr representations IN S , resp ectively, are sp ecial attened indexed categories, thus their completeness following immediately. Arrais and Fiadeiro [MJ96] showed that given an adjunction between two categories of signatures, an institution morphism gives birth to an institution representation and the vice-versa. We show that this duality is actually a natural consequence of the fact that the adjointness b etween the categories of signatures can b e contravariantly lifted to functor categories. Given a functor between two categories of signatures, any institution over the source signature category can b e extended to an institution over the target signature category along that functor in two canonical ways given by the left and the right Kan extensions, resp ectively. As a consequence, the categories of insti- tutions over small signatures with morphisms and representations, resp ectively, are co complete. 2 Category Theory We assume the reader familiar with many categorical concepts. We use semicolon for morphisms comp osition and it is written in diagrammatic order, that is, if f : A ! B and g : B ! C are two morphisms then f ; g : A ! C is their comp osition. We also use \;" for vertical comp osition of natural transformations and \" for horizontal comp osition of natural transformations. op It is known that Cat and implicitly Cat and Set are b oth complete and co complete. The reader is assumed familiar with limits and colimits in Set and Cat . 2.1 Indexed Categories Let Ind be any category, called \of indexes". op De nition 1. An indexed category is a functor C : Ind ! Cat. FlatC is the category having pairs i; a as ob jects, where i is an ob ject in Ind and 0 0 a is an ob ject in C , and pairs ; f : i; a ! i ;a as morphisms, where i 0 0 2 Indi; i and f 2 C a; C a . i The following two theorems show conditions under which the attened cat- egory of an indexed category is complete or co complete [TBG91]: op Theorem 2. If C : Ind ! Cat is an indexedcategory such that Ind is com- plete, C is complete for al l indices i 2jIndj, and C : C ! C is continuous i j i for al l index morphisms : i ! j , then FlatC is complete. 484 Rosu G.: Kan Extensions of Institutions op Theorem 3. If C : Ind ! Cat is an indexed category such that Ind is co- complete, C is cocomplete for al l indices i 2jIndj, and C : C ! C has a left i j i adjoint for al l index morphisms : i ! j , then Flat C is cocomplete. op Given an indexed category C : Ind ! Cat , one can easily build another op op op op op op indexed category C : Ind ! Cat such that C is C and C : C ! 0 i i i op op 0 C is C for every 2 Indi; i . The following corollaries are immediate i from Theorems 2 and 3, resp ectively: op Corollary 4. If C : Ind ! Cat is an indexedcategory such that Ind is com- plete, C is cocomplete for al l indices i 2jIndj, and C : C ! C is cocontinuous i j i op for al l index morphisms : i ! j , then FlatC is complete. op Corollary 5. If C : Ind ! Cat is an indexed category such that Ind is co- complete, C is complete for al l indices i 2jIndj, and C : C ! C has a right i j i op adjoint for al l index morphisms : i ! j , then Flat C is cocomplete. 2.2 Functor Categories and Kan Extensions S Let T be a category. For any category S, let T be the category of functors 0 from S to T and natural transformations, and for any functor : S ! S , 0 S S 0 0 let T : T ! T be the functor de ned as T I = ; I for functors 0 0 0 0 I : S ! T and T = 1 for natural transformations : I I . 1 2 op S Also, let T : Cat ! Cat b e the functor that takes a category S to T and op 0 : Cat ! Cat is an indexed a functor : S ! S to T . Then obviously T category, and S Prop osition 6. If T is complete cocomplete then T is complete cocomplete for any category S and T is continuous cocontinuous for any functor : S ! 0 S . S Hint: The limits colimits in T are built \pointwise" see[Lan71 ], pg. 112. De nition 7. Given functors K : S ! S and I : S ! T, a right Kan 1 2 1 1 extension of I along K is a pair containing a functor I : S ! T and 1 2 2 K a natural transformation : K ; I I which is universal from T to I , 2 1 1 0 0 0 that is, for every I : S ! T and : K ; I I there is a unique natural 2 1 2 2 0 0 transformation : I I such that = 1 ; . Dually, a left Kan 2 K 2 extension of I along K is a functor I : S ! T and a natural transformation 1 2 2 K 0 : I K ; I which is universal from I to T , that is, for every I : S ! T 1 2 1 2 2 0 0 0 and : I K ; I there is a unique natural transformation : I I such 1 2 2 2 0 that = ;1 . K The following ma jor result see [Lan71] plays an imp ortant role in our pap er: Prop osition 8. Given a smal l category S , 1 { If T is complete then any functor I : S ! T has a right Kan extension 1 1 K along any K : S ! S , and T has a right adjoint, and 1 2 { If T is cocomplete then any functor I : S ! T has a left Kan extension 1 1 K along any K : S ! S , and T has a left adjoint. 1 2 Rosu G.: Kan Extensions of Institutions 485 The following theorem gives other conditions see Corollary 11 under which Kan extensions exist. Theorem 9.