Institutional Frames? Uwe Wolter Technische Universitat Berlin, FB Informatik Sekr. 6-1, Franklinstr. 28/29, D-10587 Berlin E-mail:
[email protected] Abstract. The concept of \institution" [GB84, GB92] has been proven to be appropriate to describe and classify a wide range of speci cation formalisms or logical systems respectively. But considering the relations between logical systems we are faced with many dierent kinds of relevant examples leading to an in ation of de nitions of maps between institutions [Cer93, CM93, KM93, Mes89, SS92]. The present paper is devoted to overcome this divergence of de nitions. Using the results in [TBG91] we analyze the concepts \institution" and \entailment system" [Mes89]. As a result we propose the concepts \institutional frame" and \institutional map" providing a new perspective on logical systems. Thereby we describe logical systems on the conceptual level of signatures, speci cations, and subcategories of models respectively. Finally we sketch how the introduced concepts can provide new insights into the nature of examples discussed in the literature.
1 Introduction The present paper has its roots in a number of problems we tackled within the german project \KorSo - Korrekte Software". One of the main objectives of this project was a framework and a methodology for supporting the development of correct software by means of the application of semantically well-founded speci cation techniques and languages. Our major concerns within KorSo were rstly the semantical foundation of the general purpose speci cation language Spectrum and secondly the realization of case studies. In both directions of research the following situations showed to be typical for the use of speci cation techniques and languages in software development: { For the speci cation of a small local part of a problem it is convenient to use a small and adequate speci cation language with a restricted expressiveness but with a well-understood semantics at hand or at least in mind. After solving the local parts of the problem we are forced to embed or to integrate, in a semantically compatible way, all the dierent local solutions into a general solution within a big and complex speci cation framework, e.g. Spectrum. ?
This work has been partly supported by the German Ministry of Research and Technology (BMFT) as part of the project \KorSo { Korrekte Software".
{ We have to specify dierent aspects of one and the same problem in paral-
lel. We have to treat algebraic and operational aspects as well as aspects of data ow, safety and concurrency. For each of these aspects we have appropriate but quite dierent speci cation techniques which cannot or shall not be agglomerated to one oversized speci cation language. In this situation we have to ensure that all the dierent views to one and the same problem are semantically compatible on the overlapping parts of the speci cation languages in question. { We have to implement speci cations by programs, i.e. we have to transform speci cations in a speci cation language and their model theoretic semantics into programs in a programming language and their operational semantics. Thereby results concerning correctness and compositionality should be preserved by this transformation.
Looking at these situations it becomes quite obvious that the application of formal methods in software development requires a conceptual and theoretical framework which enables us to describe, to relate, and moreover to combine the logical systems underlying the dierent speci cation and programming languages. Especially we have to describe transitions from one speci cation formalism to other speci cation formalisms and we have to prove relevant properties of these transitions. For a uni ed description of logical systems the concept of institution, developed in [GB84, GB92], has been proven to be appropriate. On the basis of this concept we give for instance in [WKWC94] a uni ed formal description of four logical systems used for speci cation purposes. But concerning the relations between logical systems the situation is really unsatisfactory. Motivated by dierent kinds of examples there is a lot of de nitions what a map between institutions should be (see [Cer93, CM93, KM93, Mes89, SS92]). But unfortunately none of these concepts was suited for the description of the maps between the logical systems, we had to deal with in the project. This was the starting point for our analysis of the concepts \institution", \entailment system" [Mes89], and of some of the corresponding concepts of maps. The crucial observation is that in many cases we are not able to relate institutions by a pointwise assignment from sentence to sentence and from model to model respectively. In many cases we can relate institutions only on the level of speci cations, i.e. of sets of sentences, and on the level of subcategories of models respectively. Therefore we decided to introduce the concepts \institutional frame" and \institutional map" providing a new perspective on logical systems which is located on this level of abstraction. By means of these concepts we were able to describe the relations between logical systems, we had to deal with in the project (see [WDC+ 94]). Further these new concepts provide new insights into the nature of examples discussed in the literature. Moreover we hope that the present paper provides a basis for an integration of all the dierent concepts of maps between institutions proposed in the literature. Finally it should be mentioned that our concepts cover naturally the extension of satisfaction from models to morphisms.
2 Institutions In this section we reconstruct some de nitions and results from [GB84, GB92].
De nition1 (Institution). An institution is a quadruple I = (SIGN, Sen, Mod, j=) with SIGN a category whose objects are called signatures, Sen : SIGN ! SET a functor associating to each signature a set of sentences, Mod : SIGN ! CAT op a functor associating to each signature a corresponding category of models, and j= a function associating to each signature a binary relation j= jMod()j Sen() called satisfaction relation, where jMod()j denotes the set of all objects in the category Mod(), in such a way that for each morphism : 1 ! 2 in SIGN the satisfaction condition M 2 j=2 Sen()('1 ) () Mod()(M 2) j=1 '1 ; holds for any M 2 2 jMod( 2 )j and any '1 2 Sen( 1 ) The following pictures may help in visualizing these relationships: j= Mod( 1 ) 1- Sen( 1) 1 * SET Sen
SIGN
HHH j Mod H
j=
CAT op
?
2
Mod()
6
Sen()
? j= Mod( 2 ) 2- Sen( 2)
Given a set of -sentences, i.e. a speci cation ? Sen(), we de ne the category mod()(?) as the full subcategory of Mod() determined by those models M 2 Mod() that satisfy all the sentences in ?, i.e. we have jmod()(?)j = fM 2 jMod()j j 8' 2 ? : M j= 'g: (1) Analogously we de ne for a subcategory M Mod() of -models the speci cation th()(M) Sen() given by those sentences ' 2 Sen() which are satis ed by all models in M, i.e. we set th()(M) = f' 2 Sen() j 8M 2 jMj : M j= 'g: (2) Obviously mod() and th() determine mappings between -speci cations and subcategories of -models and vice versa. The next de nition provides the correct domains and codomains of these mappings.
De nition2 (Speci cations and Subcategories). Given a signature 2 jSIGN j we de ne the category Spec() of all -speci cations as follows: { objects: are all speci cations ? Sen(), { morphisms: are all inverse inclusions ? ? , { composition: is given by the composition of inclusions. 1
2
Analogously we de ne the category Sub() of all subcategories of -models: { objects: are all subcategories M Mod(), { morphisms: are all inclusion functors M1 M2 , { composition: is given by the composition of inclusion functors. Note, that Spec() and Sub() are so-called preorder categories, i.e. there is at most one morphism from one object to another object in these categories. Now we give a categorical formulation of the properties of the Galois correspondence connected with the satisfaction relation j= .
Proposition3 (Galois Correspondence). Given a signature 2 jSIGN j
the equations (1) and (2) de ne functors
mod() : Spec() ! Sub() and th() : Sub() ! Spec() such that th() is left-adjoint to mod() i.e. for any speci cations ? , ?1 , ?2 2 jSpec()j and any subcategories M, M1, M2 2 jSub()j we have:
{ { { { {
mod() functor: ?1 ?2 implies mod()(?1 ) mod()(?2), th() functor: M1 ? M2 implies th()(M1 ) th()(M2 ), unit: M mod() th()( M ) , ? counit: th() mod()(?) ? , adjointness: M mod()(?) i th()(M) ? ,
Proposition 3 shows how the satisfaction relation can be equivalently described by two functors on the conceptual level of speci cations and of subcategories of models. Now we want to formulate the satisfaction condition on this level of abstraction. For the next proposition we have to bear in mind that the preimage F ?1(B0 ) of a subcategory B0 B w.r.t. a functor F : A ! B yields a subcategory of A.
Proposition4 (Satisfaction Condition). For any morphism : ! in 1
2
SIGN the following condition is equivalent to the satisfaction condition: ? ? 1. Mod()?1 mod( 1 )(?1) = mod( 2) Sen()(?1) for any ?1 2 jSpec( 1 )j. Moreover we have an inclusion which can be proper:
2. th( 2) Mod()?1 (M1) Sen() th( 1)(M1 ) for any M1 2 jSub( 1 )j. ?
?
3 Entailment Systems The concept of \entailment system" introduced in [Mes89] re ects those properties of the entailment relation ? ` ' which are independent from the particular rules used to generate the relation `.
De nition5 (Entailment System). An entailment system is a triple E = (SIGN, Sen, `) with SIGN a category of signatures, Sen : SIGN ! SET a functor, and ` a function associating to each signature a binary relation ` }(Sen()) Sen() called entailment relation such that the following
properties are satis ed: 1. re exivity: for any ' 2 Sen(), f'g ` '; 2. monotonicity: if ?1 ` ' and ?2 ?1 then ?2 ` '; 3. transitivity: if ? ` 'i , for i 2 I, and ? [ f'i j i 2 I g ` , then ? ` ; 4. `-translation: if ?1 `1 '1, then for any : 1 ! 2 in SIGN, Sen()(?1) `2 Sen()('1). The entailment relation ` between sets of -sentences and single -sentences can be straightforwardly extended to an equivalent entailment relation between -speci cations. For any speci cation in SIGN we de ne a corresponding extended entailment relation
`} }(Sen()) }(Sen()) = jSpec()j jSpec()j where we set for any -speci cations ? , ? 2 Spec() : ? `} ? i 8 ' 2 ? : ? ` ' (3) Lemma 6. Given a speci cation 2 jSIGN j the entailment relation ` has the 1
1
2
2
2
2
1
2
properties (1)-(4) of de nition 5 if and only if the extended entailment relation `} satis es the following properties for any ?1, ?2, ?3 2 Spec(): 1. projection: ?1 [ ?2 `} ?2, i.e. especially ?1 ?2 implies ?1 `} ?2; 2. product property: if ?1 `} ?2 and ?1 `} ?3, then ?1 `} ?2 [ ?3; 3. compositionality: if ?1 `} ?2 and ?2 `} ?3, then ?1 `} ?3 ; 4. functor property: if ?1 `}1 ?2, then for any : 1 ! 2 in SIGN , Sen()(?1) `}2 Sen()(?2).
Note, that for ?1 = ; the projection property provides the identity property, i.e. ? `} ? for any }? 2 Spec(). Lemma 6 makes clear that the extended entailment relation ` determines a preorder category Ent(). De nition7 (Extended Entailment). Given a signature 2 jSIGN j we de ne the category Ent() of all -speci cations with entailment as follows: { objects: are all speci cations ? 2 jSpec()j, { morphisms: are all extended entailment relations ?1 `} ?2 , { composition: is given by the compositionality property in lemma 6. The projection property in lemma 6 proves that Ent() is an extension of the category Spec(), i.e. for any signature we obtain an embedding functor in() : Spec() ! Ent() with in()(?) = ?: (4) If we consider the set of sentences provable from a speci cation ? we obtain a so-called closure functor from Ent() to Spec(), i.e. we set cl()(?) = f' 2 Sen() j ? ` 'g: (5)
Proposition8 (Closure). Given a signature 2 jSIGN j the equations (4)
and (5) de ne functors
in() : Spec() ! Ent() and cl() : Ent() ! Spec() such that cl() is left-adjoint to in(), i.e. for any speci cations ? , ?1, ?2 2 jSpec()j = jEnt()j we have: { in() functor: ?1 } ?2 implies ?1 `} ?2, { cl() functor: ?1 ` ?2 implies cl()(?1) cl()(?2), { unit: ? `} cl()(?) in Ent(), { counit: cl()(?) } ? in Spec(), { adjointness: ?1 ` ?2 i cl()(?1 ) ?2. In the next steps we exploit the functor property in lemma 6 to gain a nal elegant categorical presentation of the concept \entailment system". Proposition9 (Entailment Functor). The mappings Spec: jSIGN j ! jCAT j and Ent: jSIGN j ! jCAT j given by de nition 2 and de nition 7 respectively can be extended to functors Spec : SIGN ! CAT and Ent : SIGN ! CAT if we set for any : 1 ! 2 in SIGN and for any ?1 2 jSpec( 1 )j: Spec()(?1 ) = Ent()(?1) = Sen()(?1) Note that we can describe Spec by a composition Spec = } Sen if } : SET ! CAT is assumed to be the power set functor assigning to any set A the preorder (}(A); ) considered as a category and assigning to any map f; A ! B the corresponding extension f : }(A) ! }(B) to sets. Theorem 10 (Entailment Categorically). A triple E = (SIGN , Sen, `) is an entailment system i the 5-tuple EC = (SIGN , Spec, Ent, in, cl) satis es the following conditions: 1. Spec : SIGN ! CAT and Ent : SIGN ! CAT are functors. 2. The inclusion functors in() : Spec() ! Ent(), 2 jSIGN j form a natural transformation in : Spec ) Ent : SIGN ! CAT with functors cl() : Ent() ! Spec() left-adjoint to in() for each 2 jSIGN j.
Using the concepts in [TBG91] theorem 10 can be summed up in the slogan An entailment system is an indexed functor with a left-adjoint locally. 1
?
2
Spec( 1 ) Spec()
?
Spec( 2 )
in( 1 ) cl( 1 )
in( 2 ) -
cl( 2 )
Ent( 1 ) Ent()
?
Ent( 2 )
The functors cl() don't form a natural transformation cl : Ent ) Spec. We only have for any : 1 ! 2 in SIGN and any ?1 in Ent( 1 ) an inclusion ? ? cl( 2 ) Ent()(?1) Spec() cl( 1)(?1 ) : (6) It is easy to see that these inclusions can be interpreted as a natural transformation () : cl( 2 ) Ent() =) Spec() cl( 1 ) : Ent( 1 ) ! Spec( 2): (7) Further this system of natural transformations has the necessary property that the functors cl() : Ent() ! Spec(), form a lax natural transformation in the sense of de nition 18 in the appendix (recall that SIGN = (SIGN op )op ) cl : Ent Spec : SIGN ! CAT (8) In [Wol95] we will prove that this fact is generally a consequence of the property \locally left-adjoint". Meseguer uses the category TH of theories to describe maps between entailment systems. TH has as objects (; ?) with a signature and ? Sen() and as morphisms, :( 1 ; ?1) ! ( 2 ; ?2), signature morphisms : 1 ! 2 such that ?2 Sen()(?1 ). Itopis easy to verify that TH can be obtained by the
attening of Spec : (SIGN op ) ! CAT (see de nition 17 and equation 17) op : TH ! SIGN: (9) TH = Flat(Spec)op with Sign = ProjSpec A map from an entailment system E1 = (SIGN 1 , Sen1 , `1 ) to an entailment system E2 = (SIGN 2 , Sen2 , `2 ) in the sense of Meseguer is rstly given by two functors : SIGN 1 ! SIGN 2 and :TH1 ! TH2 such that Sign2 = Sign1 . Using theorem 20 and proposition 21 in appendix it can be proved that this is equivalent to the existence of a lax natural transformation
: Spec1 Spec2 : SIGN 1 ! CAT with = Flat( ): (10) It is worth to mention that the functor property of () : Spec1 () ! Spec2 (()) entails ()(?) ()(;) for any ? in Spec1 (), i.e. ()(;) can be seen as the speci cation obtained by the translation of . Secondly Meseguer assumes a natural transformation : Sen1 ) Sen2 : SIGN 1 ! SET such that the corresponding natural transformation on speci cations = } : Spec1 ) Spec2 : SIGN 1 ! SET satis es for any signature in SIGN 1 and any speci cation ? in Spec1 () ? ? cl() ()(?) = cl() ()(;) [ ()(?) ; (11) i.e. equivalently ()(?) `2( ) ()(?) and ()(;)[()(?) `2( ) ()(?). Finally Meseguer requires for any in SIGN 1 and any ?1 and ?2 in Spec1 (): ?1 `1 ?2 implies ()(?1) [ ()(;) `2( ) ()(?2 ): (12)
Supposing property 11 this is equivalent to ?1 `1 ?2 implies ()(?1) `2( ) ()(?2):
(13)
But this means that for any in SIGN 1 the functor () : Spec1 () ! Spec2 (()) is required to de ne also a functor ` () : Ent1() ! Ent2 (()) where all these functors form a lax natural transformation
` : Ent1 Ent2 : SIGN 1 ! CAT Spec1 SIGN 1
?
SIGN 2
Ent1 Spec2 Ent2
with (in2 ) = ` in1 : (14)
@@@@in
1
-
?? = @@ ?? in @ @ `
CAT
2
In such a way the concept of maps in [Mes89] can be devided into two independent components. Firstly we have a transition on the level of speci cations. Secondly it is assumed that this transition can be represented up to isomorphim by a translation of signatures to speci cations plus a pointwise translation of sentences. As a result of our analysis it seems appropriate to introduce the following general concept of mapping entailment systems. This general concept also covers the translation of sentences into sets of sentences, a situation we are faced with for instance if we have to relate dierent entailment systems for partial algebras.
De nition11 (Institutional Map of Entailment Systems). Given entailment systems E1 = (SIGN 1 , Sen1 , `1 ) and E2 = (SIGN 2, Sen2 , `2 ), an institutional map of entailment systems (; ):E1 ! E2 consists of a functor : SIGN 1 ! SIGN 2 and a lax natural transformation : Spec1 Spec2 such that there exists a unique lax natural transformation ` : Ent1 Ent2 with (in2 ) = ` in1 . We call (; ) natural if is a natural transformation. We call (; ) plain if there exists a natural transformation : Sen1 ) Sen2 with = } .
4 Institutional Frames Using the results and insights gained for entailment systems we carry on with our analysis of the concept of \institution". Condition (1) in proposition 4 suggests the following extension of Sub to a functor.
Proposition12 (Subcategory Functor). The mapping Sub given by de nition 2 can be extended to a functor Sub : SIGN ! CAT if we set for any : ! in SIGN and for any M 2 jSub( )j: Sub()(M ) = Mod()? (M ) Note that Sub = S Mod where S : CAT ! CAT is the contravari1
2
1
1
1
1
1
op
ant subcategory functor. Proposition 3 and condition (1) in proposition 4 make \mod" to a natural transformation with a left-adjoint locally. Proposition13. The functors mod() : Spec() ! Sub(), 2 jSIGN j
form a natural transformation
mod : Spec ) Sub : SIGN ! CAT with functors th() : Sub() ! Spec() left-adjoint to mod() for each 2 jSIGN j. Analogously to the closure \cl" for entailment systems the inclusions in condition (2) of proposition 4 ensure that the functors th() : Sub() ! Spec() form a lax natural transformation th : Sub Spec : SIGN ! CAT: (15) Now we summarize our investigations by introducing the concept of \institutional frame". De nition14 (Institutional Frame). The institutional frame, associated to an institution I = (SIGN, Sen, Mod, j=), is the 5-tuple IF = (SIGN; Spec; Sub; mod; th) with SIGN the category of signatures, Spec : SIGN ! CAT the functor associating to each signature the category of -speci cations, Sub : SIGN ! CAT the functor associating to each signature the category of subcategories of -models, and mod : Spec ) Sub the natural transformation determined by j= which has a locally left-adjoint lax natural transformation th : Sub Spec. Spec SIGN
mod
Sub
@?
th
66 -
CAT
Obviously the concept of \institutional frame" could be de ned without refering to institutions. But for the present paper we have decided for the restricted version. Any institutional frame yields immediately the categorical presentation of an entailment system. For any signature in SIGN we obtain an extended entailment relation j= if we set for any ?1 and ?2 in Spec(): ?1 j= ?2 i mod()(?1 ) j= mod()(?2). (16)
It is easy to see that this de nes an entailment category Entj= () for any in SIGN and that these categories provide a functor Entj= : SIGN ! CAT. Further equation 16 ensures that the maps mod() : jSpec()j ! jSub()j can be interpreted as functors mod()j= : Entj= () ! Sub().
Proposition15 (Induced Entailment System). An institutional frame IF = (SIGN , Spec, Sub, mod, th) de nes an entailment functor Entj= : SIGN ! CAT such that the natural transformation mod : Spec ) Sub can be decomposed into a natural inclusion in : Spec ) Entj= and a natural transformation mod : Entj= ) Sub such that mod = modj= in. Moreover the 5-tuple EC = (SIGN , Spec, Entj= , in, cl) with cl = modj= th de nes an entailment system.
For the de nition of maps of institutions Meseguer uses the so-called extended model functor Mod : TH op ! CAT associating to each theory (; ?) in TH the category mod()(?) and to each morphism : ( 1; ?1) ! ( 2; ?2) in TH the restriction Mod() : mod( 2 )(?2) ! mod( 1)(?1 ) of the functor Mod() : Mod( 2) ! Mod( 1 ) where ?2 Sen()(?1 ) together with the satisfaction condition ensures the de nedness of this restriction. We can describe this extended model functor, also called the \speci cation frame" associated to the institution I , in the following way. Flattening of mod : Spec ) Sub provides a functor Flat(mod) : TH op ! Flat(Sub) since Flat(Spec) = TH op . Thereby Flat(mod) associates to each theory (; ?) the pair (; mod()(?)) and to each morphism : ( ? 1; ?1) ! ( 2; ?2), i.e. to each pair ( : 1 ! 2 ; ?2 Sen()(?1)), the pair : 1 ! 2 ; mod( 2 )(?2) Mod?1(mod( 1)(?1 ) . Next we can de ne a functor Em : Flat(Sub) ! CAT which associates to each object (; M) in Flat(Sub) the category M and to each morphism ( : 1 ! 2; M2 Mod?1(M1)) : ( 1 ; M1) ?! ( 2; M2) the restricted functor Mod() : M2 ! M1. Finally we obtain Mod = Em Flat(mod) for the extended model functor Mod : TH op ! CAT. The crucial point is that we lose the component \th" if we restrict ourselves on the use of Mod. But in our framework we want to keep the functor which is left-adjoint to Flat(mod) and which is provided by the attening of \th", i.e. the functor Flat(th) : Flat(Spec) ! TH op (see [TBG91]). Analogously to entailment systems it should be possible to show that the concept of maps of institutions in [Mes89] can be devided into two independent components each of it a map of institutional frames. De nition16 (Map of Institutional Frames). Given institutional frames IF 1 = (SIGN 1 , Spec1 , Sub1 , mod1 , th1) and IF 2 = (SIGN 2 , Spec2 , Sub2 , mod2, th2 ), a map of institutional frames (; ; ): IF 1 ! IF 2 consists of a functor : SIGN 1 ! SIGN 2 , a lax natural transformation : Spec1 Spec2 , and a lax natural transformation : Sub1 Sub2 such that mod1 = mod2 .
We call (; ; ) natural if and are natural transformations. We call (; ; ) plain if there exist natural transformations : Sen1 ) Sen2 and pl : Mod1 ) Mod2 with = } and = S pl respectively. Spec1 mod @ 1 @@@ SIGN 1 Sub1
?? = - CAT Spec2
?
SIGN 2
Sub2
mod2@@@@
?? -
There are some indications that in general the equality mod1 = mod2 should be weakened to a so-called indexed natural transformation. But this will be a point of future research (see [Wol95]). We believe that the introduced concepts provide a good basis for the study of relations between logical systems. But we are only at the beginning of this research. Especially we hope that the well-developed results in [Cer93, CM93, Mes89] carry over to our framework.
5 One Example In this nal section we want to illustrate the application of our concepts. Because of the limited space we concentrate on one of the motivating examples in [Mes89]. We investigate the relationships between unsorted equational logic and manysorted equational logic. Let IUEQ be the institution of unsorted equational logic for total algebras and let IMEQ be the institution of many-sorted equational logic for total algebras. Obviously the transition from unsortedness to one-sortedness provides a functor 1 : SIGN UEQ ! SIGN MEQ with 1 () = (fg; OP ) for any unsorted signature = (OP ) in SIGN UEQ . Moreover there are for any in SIGN UEQ isomorphisms 1 () : SpecUEQ () ! SpecMEQ (1()) and 1 () : SubUEQ () ! SubMEQ (1()), i.e. we have natural isomorphisms
1 : SpecUEQ ) SpecMEQ 1 : SIGN UEQ ! CAT and 1 : SubUEQ ) SubMEQ 1 : SIGN UEQ ! CAT such that 1 modUEQ = modMEQ 1 . In such a way we obtain a trivial map of institutional frames (1 ; 1; 1 ): IUEQ ! IMEQ . The crucial point is that forgetting sorts provides moreover a functor 2 : SIGN MEQ ! SIGN UEQ left-adjoint to 1 where 2 ((S ; OP )) = (OP ) for any signature = (S ; OP ) in SIGN MEQ . The counit is the identity, i.e. 2 (1((OP ))) = (OP ) for any = (OP ) in SIGN UEQ . The unit is given by the canonical signature morphisms () : (S ; OP ) ! (fg; OP ) for any signature = (S ; OP ) in SIGN MEQ . This adjoint situation on signatures de nes
now straightforwardly a map of institutional frames (2; 2 ; 2 ): IMEQ ! IUEQ if we set
2 = (?1 2) (SpecMEQ ) : SpecMEQ ) SpecUEQ 2 , and 2 = ( ?1 2) (SubMEQ ) : SubMEQ ) SubUEQ 1 . In such a way the relation between unsorted and many-sorted equational logic can be classi ed as an adjoint situation caused by adjoint functors between the corresponding categories of signatures. As a concluding remark we want mention that the motivating example for the concept of \institution morphisms" introduced in [GB84, GB92], namely the extension of equational logic to rst order logic, is also characterized by adjoint functors between the corresponding categories of signatures. The interesting point is that in this case the trivial transition, i.e. the transition from an equational speci cation to a rst order speci cation with an empty predicate component, is the left-adjoint and not the right-adjoint as in the example above.
References [Cer93]
Maura Cerioli. Relationships between Logical Formalisms. PhD thesis, Universita di Pisa{Genova{Udine, 1993. TD-4/93. [CM93] M. Cerioli and J. Meseguer. May I Borrow Your Logic? Proc. MFCS'93, LNCS 711, Springer, 1993, pp. 342-351. [GB84] J. A. Goguen and R. M. Burstall. Introducing institutions. In Proc. Logics of Programming Workshop, LNCS 164, pages 221{256. Carnegie{Mellon, Springer, 1984. [GB92] J. A. Goguen and R. M. Burstall. Institutions: Abstract Model Theory for Speci cation and Programming. Journals of the ACM, 39(1):95{146, January 1992. [KM93] H.-J. Kreowski and T. Mossakowski. Equivalence and Dierence of Intitutions: Simulating Horn Clause Logic With Based Algebras. Technical report, Universitat Bremen, 1993, to appear in MSCS. [Mes89] J. Meseguer. General logics. In H.-D. Ebbinghaus et. al., editor, Logic colloquium '87, pages 275{329. Elsevier Science Publishers B. V.,North Holland, 1989. [SS92] S. Salibra and G. Scollo. A soft stairway to institutions. In Recent Trends in Data Type Speci cation, pages 310{329. Springer, 1992. LNCS 655. [TBG91] A. Tarlecki, R.M. Burstall, and J.A. Goguen. Some fundamental algebraic tools for the semantics of computation. Part III: Indexed categories. TCS, 1991, pp. 239-264. [WDC+ 94] U. Wolter, K. Didrich, F. Cornelius, M. Klar, R. Wess"aly, and H. Ehrig. How to Cope with the Spectrum of spectrum. Technical Report BerichtNr. 94-22, TU Berlin, FB Informatik, 1994. [WKWC94] U. Wolter, M. Klar, R. Wessaly, and F. Cornelius. Four Institutions { A Uni ed Presentation of Logical Systems for Speci cation. Technical Report Bericht-Nr. 94-24, TU Berlin, Fachbereich Informatik, 1994. [Wol95] Uwe Wolter. Institutional frames { a new perspective on logical systems. Technical report, TU Berlin, Fachbereich Informatik, 1995. in preparation.
A Indexed Categories An indexed category C over an index category IND is a functor C : IND op ! CAT. For indexed categories we can consider the corresponding attened categories obtained by the so-called \Grothendieck construction". De nition17 (Flattened Category). Given an indexed category C : IND op ! CAT we de ne the category Flat(C) as follows: { objects: are pairs (i; a) where i 2 jINDj and a 2 jC(i)j. { morphisms: from (i; a) to (j; b) are pairs (; f) where : i ! j is a morphism in IND and f : a ! C()(b) is a morphism in C(i). { composition: Given morphisms (; f) : (i; a) ! (j; b) and (; g) : (j; b) ! (k; c) in Flat(C), let (; g) (; f) = ( ; C()(g) f) : (i; a) ?! (k; c). A attened category Flat(C) comes with a projection functor ProjC : Flat(C) ! IND (17) where Proj C ((i; a)) = i for any (i; a) in Flat(C) and Proj C ((; f)) = for any (; f) in Flat(C). The next de nition generalizes as well the concept of \indexed functor" in [TBG91] as the concept of \natural transformation". De nition18 (Lax NaturalopTransformation). A lax indexed functor F from one indexed category C : IND ! CAT to another D : IND op ! CAT is a lax natural transformation
F : C D : IND op ! CAT; that is, for each i 2 jINDj, there is a functor F(i) : C(i) ! D(i), and for each : i ! j in IND there is a natural transformation () : F(i) C() ) D() F(j) : C(j) ! D(i) such that for any : i ! j and : j ! k in IND ( ) = (D() ()) (() C()): i
?
j
?
k
C(i) C()
6
C(j) C()
6
C(k)
F(i)
- D(i) @ 6 () @ @R D() F(j) D(j) @ 6 () @ @R D() F(k) D(k)
Flattening extends even to lax indexed functors. De nition19 (Flattened Lax Functor). Given a lax indexed functor F : C D : IND op ! CAT the atten functor Flat(F): Flat(C) ! Flat(D) is de ned as follows: { objects: Given (i; a) 2 jFlat(C)j, let Flat(F)((i; a)) = (i; F(i)(a)). { morphisms: Given? a morphism (; f) : (i; a) ! (j; b) in Flat(C), let Flat(F)((; f)) = ; ()(b) F(i)(f) : (i; F(i)(a)) ?! (j; F(j)(b)) in Flat(D), recalling that ()(b) : F(i)(C()(b)) ! D()(F(j)(b)). It is straightforward to show, Flat(F) is a functor. The construction of Flat(F) entails Proj D Flat(F) = Proj C . In [Wol95] we will prove the following theorem. Theorem 20 (Flat versus Lax). For each functor G: Flat(C) ! Flat(D) with Proj D G = Proj C there exists a lax indexed functor Dec(G) : C D : IND op ! CAT with Flat(Dec(G)) = G. Moreover Dec(Flat(F)) = F for any lax indexed functor F : C D : IND op ! CAT . In [Wol95] we also investigate the interaction of attening and composition.
Proposition21 (Flattening and Composition). For any indexed category C : IND op ! CAT and any functor G : IND ! IND the assignments Gfl ((i ; a)) = (G(i ); a) for any (i ; a) in Flat(C G) and Gfl (( ; f)) = (G( ); f) for any ( ; f) in Flat(C G) de ne a functor Gfl : Flat(C G) ! Flat(C) such that the following diagram 2
1
2
2
2
1
2
2
2
is a pullback diagram in CAT .
Flat(C G) Gfl
?
Flat(C)
ProjCG-
IND 2 G
Proj C
- IND?
1
This article was processed using the LATEX macro package with LLNCS style