Four Institutions -- A Unified Presentation of Logical Systems for - - PDF document

four institutions a unified presentation of logical
SMART_READER_LITE
LIVE PREVIEW

Four Institutions -- A Unified Presentation of Logical Systems for - - PDF document

See discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/236607603 Four Institutions -- A Unified Presentation of Logical Systems for Specification Article January 1994 CITATIONS READS 7


slide-1
SLIDE 1

See discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/236607603

Four Institutions -- A Unified Presentation of Logical Systems for Specification

Article · January 1994

CITATIONS

7

READS

11

4 authors, including: Some of the authors of this publication are also working on these related projects: Event nets View project Formal Specification of Distributed Systems View project Uwe Wolter University of Bergen

87 PUBLICATIONS 668 CITATIONS

SEE PROFILE

Felix Cornelius DIFA Deutsches Institut für Fachärztliche Versorgungsforschung

63 PUBLICATIONS 139 CITATIONS

SEE PROFILE

All content following this page was uploaded by Uwe Wolter on 10 August 2016.

The user has requested enhancement of the downloaded file.

slide-2
SLIDE 2

Four Institutions

A Unified Presentation of Logical Systems for Specification

  • U. Wolter, R. Wess¨

aly, M. Klar, F. Cornelius

Bericht-Nr. 94-24

slide-3
SLIDE 3 F
  • ur
Institutions { A Unied Presen tation
  • f
Logical Systems for Sp ecication 1 { Uw e W
  • lter,
Roland W ess aly , Marcus Klar, F elix Cornelius June 28, 1994 1 This w
  • rk
has b een partly supp
  • rted
b y the German Ministry
  • f
Researc h and T ec hnology (BMFT) as part
  • f
the pro ject \K
  • rSo
{ Korrekte Soft w are".
slide-4
SLIDE 4 Abstract W e
  • er
a unied formal description
  • f
four imp
  • rtan
t logical systems used for sp ecication purp
  • ses
in computer science. F
  • r
  • ur
unied presen tation w e use the concept
  • f
institution de- v elop ed in [GB84 , GB92 ] whic h co v ers the follo wing comp
  • nen
ts
  • f
a logical system: signatures, sen tences, mo dels, and satisfaction
  • f
sen tences b y mo dels. W e presen t the institution
  • f
equational logic for total algebras (see [EM85 ]), the institution
  • f
algebraic systems with p
  • sitiv
e Horn form ulas (see [Mal73 ]), the institution
  • f
partial algebras with conditional existence equations (see [Rei87, W
  • l90,
Kn
  • u93]),
and the institution
  • f
! { con tin uous algebras (see [GTWW77 , W es94 ]). The pap er is the starting p
  • in
t for a series
  • f
forthcomimg pap ers where w e will in v estigate the compatibilit y and com bination
  • f
sp ecication tec hniques and languages
  • n
the basis
  • f
the underlying logical systems (see [WDC + 94 , W
  • l94]).
slide-5
SLIDE 5 Con ten ts 1 In tro duction 3 2 Basic Notions 5 2.1 Set Theory : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 5 2.2 Category Theory : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 6 2.3 Institutions : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 7 3 The Institution
  • f
Equational Logic 10 3.1 The Category S I GN
  • f
Signatures : : : : : : : : : : : : : : : : : : : : : : : : : : 10 3.2 The Mo del F unctor M
  • d
E Q : S I GN ! C AT
  • p
: : : : : : : : : : : : : : : : : : : 11 3.3 The Sen tence F unctor S en E Q : S I GN E Q ! S E T : : : : : : : : : : : : : : : : : : 13 3.4 The Satisfaction Condition : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 15 4 The Institution
  • f
Algebraic Systems 18 4.1 The Category S I GN AS
  • f
Signatures : : : : : : : : : : : : : : : : : : : : : : : : : 18 4.2 The F unctor M
  • d
AS : S I GN AS ! C AT
  • p
: : : : : : : : : : : : : : : : : : : : : : 19 4.2.1 The M
  • d
AS {image
  • f
signatures: the Categories
  • f
Algebraic Systems : : 19 4.2.2 The F
  • rgetful
F unctor M
  • d
AS () : : : : : : : : : : : : : : : : : : : : : : : 20 4.2.3 The Mo del F unctor M
  • d
AS : : : : : : : : : : : : : : : : : : : : : : : : : : 21 4.3 The Sen tence F unctor S en AS : S I GN AS ! S E T : : : : : : : : : : : : : : : : : : 21 4.3.1 F
  • rm
ulas for Algebraic Systems : : : : : : : : : : : : : : : : : : : : : : : : 21 4.3.2 T ranslation
  • f
F
  • rm
ulas
  • f
Algebraic Systems : : : : : : : : : : : : : : : : 23 4.3.3 The F unctor S en AS : S I GN AS ! S E T : : : : : : : : : : : : : : : : : : : 24 4.4 The Satisfaction Relation : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 24 4.4.1 The Satisfaction Condition : : : : : : : : : : : : : : : : : : : : : : : : : : 25 5 The Institution
  • f
P artial Algebras 28 5.1 The Category S I GN P A : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 28 5.2 The Mo del F unctor M
  • d
P A : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 29 5.3 The Sen tence F unctor S en P A : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 32 5.4 The Satisfaction Condition in I P A : : : : : : : : : : : : : : : : : : : : : : : : : : 34 6 The Institution
  • f
Con tin uous Algebras 38 6.1 The Category S I GN : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 38 6.2 The Mo del F unctor M
  • d
C A : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 39 6.2.1 The Category M
  • d
C A ()
  • f
Con tin uous Algebras : : : : : : : : : : : : : : 39 6.2.2 The F
  • rgetful
F unctor M
  • d
C A () : : : : : : : : : : : : : : : : : : : : : : : 41 6.3 The Sen tence F unctor S en C A : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 42 6.3.1 The Set S en C A ( )
  • f
Conditional
  • Inequalities
: : : : : : : : : : : : : : 42 1
slide-6
SLIDE 6 6.3.2 The T ranslation
  • f
Sen tences S en C A () : : : : : : : : : : : : : : : : : : : 45 6.4 The Satisfaction Condition : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 47 A P artial Ordered Sets 51 2
slide-7
SLIDE 7 Chapter 1 In tro duction The presen t pap er has its ro
  • ts
in a n um b er
  • f
problems w e tac kled within the german pro ject \K
  • rSo
  • Korrekte
Soft w are". One
  • f
the main
  • b
jectiv es
  • f
this pro ject w as a framew
  • rk
and a metho dology for supp
  • rting
the dev elopmen t
  • f
correct soft w are b y means
  • f
the application
  • f
w ell-founded sp ecication tec hniques and languages. One
  • f
  • ur
ma jor concerns within K
  • rSo
w as the seman tical foundation
  • f
the general purp
  • se
sp ecication language Spectr um dened in [BF G + 93]. While w
  • rking
with Spectr um the follo wing situations sho w ed to b e t ypical for the practical use
  • f
sp ecication tec hniques and languages in soft w are dev elopmen t:
  • F
  • r
the sp ecication
  • f
a small lo cal part
  • f
a problem it is con v enien t to use a small and adequate sp ecication language with a restricted expressiv eness but with a w ell-understo
  • d
seman tics at hand
  • r
at least in mind. After solving the lo cal parts
  • f
the problem w e are forced to em b ed
  • r
to in tegrate, in a seman tically compatible w a y , all the dieren t lo cal solutions in to a general
  • ne
within a big sp ecication framew
  • rk,
e.g. Spectr um. Thereb y the simple seman tics
  • f
the sp ecications in the small languages shall b e transformed in to the naturally more complex seman tics in the big sp ecication framew
  • rk
(see [WDC + 94]).
  • W
e ha v e to sp ecify dieren t asp ects
  • f
  • ne
and the same problem in parallel , algebraic and
  • p
erational asp ects as w ell as asp ects
  • f
datao w, safet y and concurrency . F
  • r
eac h
  • f
these asp ects w e ha v e appropriate but quite dieren t sp ecication tec hniques whic h cannot
  • r
shall not b e agglomerated to
  • ne
  • v
ersized sp ecication language. In this situation w e ha v e to ensure that all the dieren t views to
  • ne
and the same problem are seman tically compatible
  • n
the
  • v
erlapping parts
  • f
the sp ecication languages in question.
  • W
e ha v e to implemen t sp ecications b y programs, i.e. w e ha v e to transform sp ecica- tions in a sp ecication language and their mo del theoretic seman tics in to programs in a programming language and their
  • p
erational seman tics. Thereb y results concerning cor- rectness and comp
  • sitionalit
y should b e preserv ed b y this transformation. When lo
  • king
at these situations it b ecomes quite
  • b
vious that w e need a conceptual and theo- retical framew
  • rk
whic h enables us to describ e and to relate the logical systems underlying the dieren t sp ecication and programming languages. In the last decade the concept
  • f
institution, dev elop ed in [GB84 , GB92 ], has b een pro v en to b e appropriate for suc h a unied description
  • f
logical systems. But un til no w there are no comprehensiv e presen tations
  • f
the logical systems, w e had to deal with in the pro ject, using the concept
  • f
institution. Th us w e decided to pro duce the presen t pap er con taining explicit instan tiations
  • f
the concept
  • f
institution. 3
slide-8
SLIDE 8 In the next step
  • f
  • ur
  • ngoing
w
  • rk
w e will in v estigate the relations b et w een the presen ted four logical systems. While ev aluating the examples w e will dev elop an appropriate theoreti- cal concept
  • f
maps b et w een institutions, to
  • .
In the literature, man y dieren t concepts are prop
  • sed,
e.g. b y Goguen and Burstall [GB84 , GB92 ], b y Meseguer [Mes89 ], b y Salibra and Scollo [SS92], b y Astesiano, Cerioli, and Meseguer [A C92 , Cer93 , CM93 ], and b y Kreo wski and Mossak
  • wski
[KM93 , Mos93 ]. But none
  • f
these concepts reects the complete transition from
  • ne
sp ecication language in to another
  • ne,
whic h is a t ypical situation in
  • ur
con text. The remaining part
  • f
the pap er is
  • rganized
as follo ws: Chapter 2 giv es the basic notions from set theory and category theory . Additionally the concept
  • f
institution is sk etc hed. Chapter 3 presen ts the w ell-kno wn institution
  • f
equational logic for total algebras (see [EM85 ]). This c hapter shall help the reader to b ecome familiar with the use
  • f
institutions for the pre- sen tation
  • f
logical systems. Chapter 4 pro vides an exp
  • sition
  • f
the institution
  • f
algebraic systems in the sense
  • f
Malcev with p
  • sitiv
e Horn form ulas (see [Mal73 ]). In Chapter 5 w e dev elop the institution
  • f
partial algebras with conditional existence equations. Thereb y w e extend the framew
  • rks
in [Rei87], [W
  • l90],
  • r
[Kn
  • u93
] b y predicates. The crucial
  • bserv
ation is that predicates can b e considered as partial maps in to the empt y cartesian pro duct, i.e. in to a designated singleton set. In suc h a w a y predicates can b e naturally included in to the framew
  • rk
  • f
partial algebras. Moreo v er the institution
  • f
algebraic systems b ecomes a logical subsystem
  • f
suc h an extended institution
  • f
partial algebras. Finally , Chapter 6
  • ers
the institution
  • f
!
  • con
tin uous algebras. More results concerning this institution and the institutions
  • f
  • rdered
and pre-con tin uous algebras can b e found in [W es94 ] where w e ha v e in v estigated esp ecially the free constructions w.r.t. signature morphisms in these institutions. 4
slide-9
SLIDE 9 Chapter 2 Basic Notions This c hapter pro vides the notions w e will frequen tly need in the subsequen t c hapters. First
  • f
all w e presume that basic set theory , lik e sets, mappings (functions), comp
  • sition
  • r
c haracteriza- tions
  • f
mappings (functions), lik e injectiv e, surjectiv e
  • r
bijectiv e are w ell{kno wn to the reader. With the notions `mapping' and `function' w e mean the same and use them in terc hangeable. No w w e in tro duce the necessities around S
  • indexed
sets, category theory and the concept
  • f
institution. The reader, who is familiar with these notions should skip this c hapter and use it
  • nly
when basic questions arise, but note that not ev ery question can b e answ ered b y basic notions. 2.1 Set Theory Let S b e an arbitrary set. An S
  • indexed
set A is a family A = (A(s) j s 2 S )
  • f
sets. An S
  • indexed
set A = (A(s) j s 2 S ) is a subset
  • f
an S
  • indexed
set B = (B (s) j s 2 S ), A
  • B
in sym b
  • ls,
if A(s)
  • B
(s) for all s 2 S . In consequence an S
  • indexed
mapping f : A ! B is a family f = (f (s) : A(s) ! B (s) j s 2 S )
  • f
mappings b et w een S
  • indexed
sets A and B . The comp
  • sition
  • f
S
  • indexed
mappings is dened comp
  • nen
t wise, i.e. for f : A ! B and g : B ! C w e get the S
  • indexed
mapping g
  • f
: A ! C , giv en b y g
  • f
= D ef ( g (s)
  • f
(s) : A(s) ! C (s) j s 2 S ). A binary S
  • indexed
relation R
  • A
  • B
b et w een t w
  • S
  • indexed
sets A and B is an S {indexed set R = (R(s) j s 2 S ) where R(s)
  • A(s)
  • B
(s) for ev ery s 2 S . By S
  • w
e denote the set
  • f
all nite w
  • rds
  • n
S , i.e. the set con taining the empt y w
  • rd
  • and
all sequences w = s 1 : : : s n with s i 2 S for 1
  • i
  • n.
F
  • r
an y S {indexed set A w e iden tify A() with a distinguished singleton set A() = D ef fg and w e set A(w)= D ef A(s 1 )
  • A(s
n ) for ev ery w = s 1 : : : s n 2 S
  • ;
n
  • 1
: No w an S
  • indexed
mapping f : A ! B can b e canonically extended for ev ery w 2 S
  • to
a mapping f (w) : A(w) ! B (w ) as follo ws f () ( )= D ef
  • 2
B () ; i.e. f () : A() ! B () is the iden tical mapping
  • n
A() = B () = fg, and f (w)(a)= D ef (f (s 1 )(a 1 ); : : : ; f (s n ) (a n )) 2 B (w) for ev ery w = s 1 : : : s n 2 S
  • ;
n
  • 1
and ev ery a = (a 1 ; : : : a n ) 2 A(w). 5
slide-10
SLIDE 10 2.2 Category Theory The title
  • f
this section promises p erhaps to m uc h. W e
  • nly
dene the t w
  • basic
concepts cate- gory and functor b et w een categories. F urthermore w e giv e some examples in
  • rder
to illustrate these abstract concepts a little and to pro vide necessary categories for the denitions in the next c hapters. The reader, who is in terested in a more detailed
  • r
motiv ated in tro duction to category theory , is referred to the standard literature. See for example MacLane, [Mac71 ], Barr, W ells, [BW90 ]
  • r
the more abstract b
  • k
  • f
Herrlic h and Strec k er, [HS73]. Our denitions are adopted from the article
  • f
P
  • ign
  • e
in the Handb
  • k
  • f
Logic in Computer Science, [P
  • i92
]. Denition 2.2.1 (Category) A category C consists
  • f
  • a
class
  • f
  • b
jects jC j ,
  • a
class
  • f
morphisms M
  • r
(C ),
  • a
source function sour ce : M
  • r
(C ) ! jC j,
  • a
target function tar g et : M
  • r
(C ) ! jC j,
  • a
function id : jC j ! M
  • r
(C ), assigning to eac h
  • b
ject C 2 jC j the iden tit y morphism id(C )
  • r
id C ,
  • a
partial function
  • :
M
  • r
(C )
  • M
  • r
(C ) ! M
  • r
(C ) , satisfying the follo wing prop erties:
  • for
ev ery morphisms f
  • g
2 M
  • r
(C ) w e ha v e f
  • g
dened ( ) tar g et(g ) = sour ce(f ) and then is sour ce(f
  • g
) = sour ce(g ) and tar g et(f
  • g
) = tar g et(f ).
  • sour
ce(id C ) = C = tar g et(id C ), for ev ery C 2 jC j ,
  • if
sour ce(f ) = A and tar g et(f ) = B then id B
  • f
= f and f
  • id
A = f ,
  • if
h
  • g
and g
  • f
are dened then h
  • (g
  • f
) = (h
  • g
)
  • f
. As usual w e write f : A ! B if f 2 M
  • r
(C ) with sour ce(f ) = A and tar g et(f ) = B . Denition 2.2.2 (F unctor) Let C 1 , C 2 b e categories. A functor F : C 1 ! C 2 is a pair (F O bj ; F M
  • r
)
  • f
mappings F M
  • r
: jC 1 j ! jC 2 j and F M
  • r
: M
  • r
(C 1 ) ! M
  • r
(C 2 ) satisfying
  • sour
ce(F M
  • r
(f )) = F O bj (sour ce(f )) for ev ery f 2 M
  • r
(C 1 ),
  • tar
g et(F M
  • r
(f )) = F O bj (tar g et(f )) for ev ery f 2 M
  • r
(C 1 )
  • F
M
  • r
(id C ) = id F O bj (C ) for ev ery C 2 jC j,
  • F
M
  • r
(g
  • f
) = F M
  • r
(g )
  • F
M
  • r
(f ) for ev ery f ; g 2 M
  • r
(C 1 ) if g
  • f
is dened. 6
slide-11
SLIDE 11 Prop
  • sition
2.2.3 (Comp
  • sition
  • f
F unctors) L et C 1 , C 2 , C 3 b e c ate gories and let F : C 1 ! C 2 , G : C 2 ! C 3 b e functors. Then the c
  • mp
  • sition
G
  • F
: C 1 ! C 3 given by G
  • F
(C 1 ) = G(F (C 1 )) for every C 1 2 jC 1 j, G
  • F
(f 1 ) = G(F (f 1 )) for every f 1 2 M
  • r
(C 1 ), is again a functor. A t this p
  • in
t w e w an t to in tro duce the common con v en tion to drop all indices if the con text determines the missing indices. This is con v enien t esp ecially for the authors and w e hop e the readabilit y isn't decreased. F
  • r
instance, a functor F is a pair
  • f
mappings, where b
  • th
the
  • b
ject mapping and the morphism mapping, are referred b y F , instead
  • f
F O bj and F M
  • r
. Let's turn the atten tion to the promised examples, but men tion that w e consider essen tially the examples pro viding the basis for
  • ur
subsequen t w
  • rk.
T
  • see
the full p
  • w
er
  • f
category theory w e m ust refer the reader
  • nce
again to the literature. Example 2.2.4
  • The
category S E T is giv en b y jS E T j is the class
  • f
all sets, M
  • r
(S E T ) is the class
  • f
functions b et w een sets, id maps ev ery set to the iden tit y function, ; sour ce; tar g et are dened canonical.
  • The
p
  • w
erset functor P : S E T ! S E T is giv en b y P (M ) = fX j X
  • M
g for ev ery M 2 jS E T j, P (f )(X ) = f (X ) for ev ery f : M 1 ! M 2 , X 2 P (M 1 ).
  • F
  • r
ev ery category C there is the iden tit y functor id C : C ! C giv en b y id C (C ) = C for ev ery
  • b
ject C 2 jC j, id C (f ) = f for ev ery morphism f 2 M
  • r
(C ) .
  • The
category C AT is giv en b y jC AT j is the class
  • f
small categories, M
  • r
(C AT ) is the class
  • f
functors b et w een small categories, id maps ev ery category C to the iden tit y functor id C , ; sour ce; tar g et are dened canonical (see Prop
  • sition
2.2.3).
  • F
  • r
ev ery category C exists the
  • pp
  • site
(or dual) category C
  • p
giv en b y jC
  • p
j = jC j, M
  • r
(C
  • p
) = M
  • r
(C ), sour ce
  • p
(f ) = tar g et(f ) for ev ery f 2 M
  • r
(C
  • p
) tar g et
  • p
(f ) = sour ce(f ) for ev ery f 2 M
  • r
(C
  • p
), id
  • p
(C ) = id(C ) for ev ery C 2 jC j , f
  • p
g = D ef g
  • f
if g
  • f
dened in C . 2 2.3 Institutions The main purp
  • ses
  • f
this section are t w
  • fold.
W e w an t to motiv ate b
  • th
the necessit y
  • f
a formalization
  • f
logical systems and the adv an tages
  • f
c ho
  • sing
the notion `institution' as the appropriate
  • ne.
As men tioned in the in tro duction from the b eginning
  • f
the algebraic sp eci- cation approac h in the early sev en ties quite a lot
  • f
dev elop ers w
  • rk
ed in their
  • wn
directions, 7
slide-12
SLIDE 12 formalized their
  • wn
kind
  • f
logic and their
  • wn
view to the relationship b et w een syn tax and seman tics in computer science. This div ersit y
  • f
eort lead to an amoun t
  • f
denitions, concepts and notational con v en tions that couldn't b e adv an tageous. F
  • r
instance, to describ e syn tax, in the literature exist among
  • thers
equational signatures, signatures with predicates
  • r
higher-
  • rder
signatures, all
  • f
them com bined with a sp ecial kind
  • f
logic to express prop erties, for example, equations, inequalities, Horn-clauses, rst-order
  • r
higher-order logic are used. As the coun terpart there are sev eral seman tical views. Mo dels could b e equipp ed with partial
  • r
total functions
  • r
higher-order functions as w ell as the domains
  • f
mo dels could b e function spaces, partial
  • rders
  • r
  • therwise
structured. This en umeration is certainly incomplete and rather co- inciden tal, to p
  • in
t
  • ut
that an abstract view to these concepts is desirable. Ho w ev er,
  • ne
need this amoun t
  • f
concepts b ecause
  • f
the div ersit y
  • f
applications and as men tioned, a general purp
  • se
language lik e Spectr um isn't adequate for smaller sp ecications. F rom this p
  • in
t
  • f
view Goguen and Burstall [GB84 , GB92] started to dev elop an abstract view at logical systems. They in tro duced the concept
  • f
institution. Institutions fo cus
  • n
the mo del theoretic asp ects
  • f
logical systems. Institutions consist
  • f
signatures and morphisms b et w een them; form ulas and the translations
  • f
form ulas along signature morphisms; mo dels and the restriction
  • f
mo dels in in v erse direction to signature morphisms; satisfaction
  • f
form ulas b y mo dels whic h has to b e compatible with translation and restriction. In the follo wing y ears sev eral concepts had b een prop
  • sed.
Beside the institution w e see essen- tially t w
  • ther
concepts. First
  • f
all there are sp ecication frames as dened b y Ehrig et. al. []. Sp ecication frames dier from institutions essen tially in the missing satisfaction condition and in gluing syn tax, i.e. the category
  • f
signatures and signature morphisms is replaced b y the cat- egory
  • f
sp ecications and sp ecication morphisms. The second new concept are `general logics' in tro duced b y Meseguer [Mes89 ] to co v er also pro
  • f
theoretic asp ects
  • f
logical systems. General logics enclose institutions, i.e. general logics are institutions pro vided with an en tailmen t system for sen tences. Wh y did w e prefer institutions? The rst reasons are
  • f
pragmatic nature. On
  • ne
hand seman tics
  • f
the sp ecication language Spectr um, as the
  • rigin
  • f
  • ur
tasks, is describ ed as an institution. On the
  • ther
hand w e pa y
  • ur
resp ect to Goguen and Burstall as w ell as to the wide acceptance. Moreo v er, in
  • ur
  • pinion
the satisfaction condition is an imp
  • rtan
t feature, b ecause it is reasonable to force syn tax and seman tics to satisfy certain compatibilit y conditions. Goguen and Burstall ha v e coined the slogan \T ruth is in v arian t under c hange
  • f
notation". ... F urther w e cut
  • ut
the en tailmen t system
  • f
Meseguer, since this could b e a ma jor fo cus
  • f
in terest in the future as w ell as the sp ecication frames
  • f
Ehrig. W e think that it remains a topic
  • f
researc h to clarify for what purp
  • ses
whic h notion is adequate. Our in v estigations will b e
  • ne
step in this direction. No w let us turn to the concrete denition
  • f
an institution. Denition 2.3.1 (Institution) An institution I consists
  • f
  • a
category S I GN , where the
  • b
jects are signatures and the morphisms are signature morphisms,
  • a
functor S en: S I GN ! S E T , assigning to ev ery signature
  • a
set S en()
  • f
  • sen
tences and to ev ery signature morphism
  • :
  • 1
!
  • 2
a translation S en() : S en( 1 )! S en( 2 )
  • f
  • 1
  • sen
tences in to
  • 2
  • sen
tences,
  • a
functor M
  • d
: S I GN ! C AT
  • p
, assigning to ev ery signature
  • a
category M
  • d(
)
  • f
  • mo
dels and
  • f
  • morphisms
and to ev ery signature morphism
  • :
  • 1
!
  • 2
a (forgetful) functor M
  • d()
: M
  • d(
2 )! M
  • d(
1 ), 8
slide-13
SLIDE 13
  • a
satisfaction relation j =
  • jM
  • d(
)j
  • S
en() for ev ery
  • 2
jj , suc h that the satisfaction condition A 2 j =
  • 2
S en()(e 1 ) ( ) M
  • d()(A
2 ) j =
  • 1
e 1 ; holds for ev ery signature morphism
  • :
  • 1
!
  • 2
, ev ery
  • 2
  • mo
del A 2 and ev ery
  • 1
  • sen
tence e 1 . 9
slide-14
SLIDE 14 Chapter 3 The Institution
  • f
Equational Logic 3.1 The Category S I GN
  • f
Signatures In this subsection w e dene the category
  • f
signatures. Signature morphisms enable the trans- lation
  • f
signatures. Denition 3.1.1 (Signature) A man y-sorted signature
  • =
(S ; O P ; dom ; co d) consists
  • f:
  • a
nite set S
  • f
sort sym b
  • ls,
  • a
nite set O P
  • f
  • p
eration sym b
  • ls,
  • dom
: O P ! S
  • ,
  • co
d : O P ! S . The functions dom and co d are called domain and co domain function. Remark 3.1.2 1. It is
  • ften
not ne c essary to denote the functions dom and co d and in this c ase we write
  • =
(S ; O P ) inste ad
  • f
  • =
(S ; O P ; dom ; co d) assuming that the function dom and co d ar e implicitly given. 2. We write
  • p
: s 1 : : : s n ! s and
  • p
: w ! s if w = s 1 ; : : : ; s n = dom(op ) and s = co d (op ). Denition 3.1.3 (Signature Morphism) Giv en t w
  • signatures
  • 1
= (S 1 ; O P 1 ; dom 1 ; co d 1 ) and
  • 2
= (S 2 ; O P 2 ; dom 2 ; co d 2 ) . A signature morphism
  • :
  • 1
!
  • 2
is a pair ( S ,
  • O
P )
  • f
functions consisting
  • f:
  • S
: S 1 ! S 2 a map
  • f
sorts
  • O
P : O P 1 ! O P 2 a map
  • f
  • p
eration sym b
  • ls
suc h that for all
  • p
1 2 O P 1 : dom 2 ( O P (op 1 )) =
  • S
(dom 1 (op 1 )) and co d 2 ( O P (op 1 )) =
  • S
(co d 1 (op 1 )) Remark 3.1.4 1.
  • S
: S
  • 1
! S
  • 2
denotes the extension
  • f
  • S
: S 1 ! S 2
  • n
wor ds, i.e.:
  • S
( 1 ) =
  • 2
10
slide-15
SLIDE 15
  • S
(sw) =
  • S
(s) S (w ) 2. We also write (s) inste ad
  • f
  • S
(s), if s 2 S and (op) for
  • O
P (op ), if
  • p
2 O P . Denition and Prop
  • sition
3.1.5 (The Category S I GN ) The category S I GN has
  • signatures
as
  • b
jects,
  • signature
morphisms as morphisms.
  • The
iden tit y morphisms I d
  • :
  • !
  • are
pairs
  • f
iden tit y maps id
  • =
(id S ; id O P ) and
  • the
comp
  • sition
  • f
morphisms is the comp
  • sition
  • f
maps
  • n
the comp
  • nen
ts, i.e.
  • :
  • 1
!
  • 3
= D ef ( S
  • S
; O P
  • O
P ) for t w
  • signature
morphisms
  • :
  • 1
!
  • 2
and :
  • 2
!
  • 3
. Pro
  • f.
Because this denition based up
  • n
maps in the category S E T it is clear that S I GN forms a category . 2 3.2 The Mo del F unctor M
  • d
E Q : S I GN ! C AT
  • p
The F unctor M
  • d
E Q is the mo del functor in this institution. It in terprets eac h signature
  • b
y assigning it to the class
  • f
{algebras. F urther w e will see that eac h class
  • f
algebras w.r.t. a signature forms a category , so the co domain
  • f
M
  • d
E Q has to b e the quasi category C AT
  • p
. Denition 3.2.1 ({Algebra) Let
  • =
(S ; O P ) b e a signature. A {algebra A = (A(S ); A (O P ) ) is giv en b y
  • A(S
) = (A(s) j s 2 S ) is an S {indexed family
  • f
sets, called carriers.
  • A(O
P ) = (A(op ) j
  • p
2 O P ) is an O P {indexed family
  • f
total functions, with A(op) : A (w) ! A (s) for eac h
  • p
eration sym b
  • l
  • p
: w ! s 2 O P . Remark 3.2.2 1. The notation (A(S ); A (O P )) emphasizes that an algebr a is an interpr etation
  • f
the signa- tur e (S ; O P ) . 2. As r emarke d in Chapter 2 we write A (w) for the c artesian pr
  • duct
A(s 1 )
  • :
: :
  • A(s
n ) in c ase w = s 1 : : : s n . Denition 3.2.3 ({Homomorphism) Giv en
  • {algebras
A and B , a {homomorphism f : A ! B is an S {indexed family
  • f
maps f = (f (s) : A(s) ! B (s) j s 2 S ), suc h that f is compatible with the
  • p
erations, i.e. f (s)(A(op )(a 1 ; : : : ; a n )) = B (op)(f (s 1 )(a 1 ); : : : ; f (s n )(a n )) 11
slide-16
SLIDE 16 for eac h n{ary
  • p
eration sym b
  • l
  • p
: s 1 : : : s n ! s 2 O P and all a i 2 A(s i ) , for
  • i
  • n.
This condition is also called homomorphism condition. Remark 3.2.4 As intr
  • duc
e d in Chapter 2 we denote f (w) : A (w) ! B (w) for f (w)(a)= D ef (f (s 1 )(a 1 ); : : : ; f (s n )(a n )) with a 2 A(w ) . Ther efor e the homomorphism c
  • ndition
c an b e shortly written: f (s)
  • A(op
) = B (op)
  • f
(w ) No w w e can dene the category
  • f
{algebras. Prop
  • sition
3.2.5 (The Category M
  • d
E Q () ) Given a signatur e . The c ate gory M
  • d
E Q () c
  • nsists
  • f
  • {algebr
as as
  • bje
cts,
  • {homomorphisms
as morphisms.
  • The
identity{homomorphism is the identity map
  • n
e ach c arrier and
  • the
c
  • mp
  • sition
  • f
two {homomorphisms is the c
  • mp
  • sition
  • f
maps, i.e. g
  • f
= (g (s)
  • f
(s) : A(s) ! C (s)js 2 S ) for f = (f (s) : A (s) ! B (s) j s 2 S ) and g = (g (s) : B (s) ! C (s) j s 2 S ) . Pro
  • f.
It is clear that the iden tit y homomorphism is really the iden tit y , b ecause the denition based up
  • n
maps. So it is
  • nly
left to pro v e that the comp
  • sition
  • f
t w
  • homomorphisms
is a homomorphism again. 2 Lemma 3.2.6 (Comp
  • sition
  • f
{Homomorphisms) Given two {homomorphisms f : A ! B and g : B ! C . The c
  • mp
  • sition
g
  • f
: A ! C is a {homomorphism. Pro
  • f.
W e ha v e to pro
  • f
that g
  • f
is compatible with the
  • p
erations. (g
  • f
)(s)
  • A(op
) = (g (s)
  • f
(s))
  • A(op)
= g (s)
  • B
(op)
  • f
(w ) = C (op )
  • g
(w )
  • f
(w ) = C (op )
  • (g
  • f
)(w ) for all s 2 S and
  • p
: w ! s 2 O P . 2 Denition 3.2.7 (F
  • rgetful
F unctor M
  • d
E Q ()) Giv en a signature morphism
  • :
  • 1
!
  • 2
, w e dene the forgetful functor M
  • d
E Q () : M
  • d
E Q ( 2 ) ! M
  • d
E Q ( 1 )
  • n
  • 2
{mo dels and
  • 2
{homomorphisms. 1. F
  • r
ev ery
  • 2
{mo del A 2 w e get a
  • 1
{mo del M
  • d
E Q () (A 2 ) where (M
  • d
E Q ()(A 2 ))(s 1 ) = D ef A 2 ( (s 1 )) for ev ery s 1 2 S 1 and (M
  • d
E Q ()(A 2 ))(op 1 ) = D ef A 2 ( (op 1 )) for ev ery
  • p
1 2 O P 1 2. F
  • r
ev ery
  • 2
{homomorphism f 2 : A 2 ! B 2 w e
  • btain
a
  • 1
{homomorphism M
  • d
E Q ()(f 2 ) : M
  • d
E Q () (A 2 ) ! M
  • d
E Q () (B 2 ) 12
slide-17
SLIDE 17 dened b y (M
  • d
E Q ()(f 2 ))(s 1 ) = D ef f 2 ((s 1 )) for all s 1 2 S 1 . Pro
  • f.
F
  • r
ev ery signature morphism
  • :
  • 1
!
  • 2
the forgetful functor M
  • d
E Q () : M
  • d
E Q ( 2 ) ! M
  • d
E Q ( 1 ) dened ab
  • v
e consitutes a functor. 1. M
  • d
E Q () preserv es the iden tities: Let A 2 b e a
  • 2
{Algebra with its iden tit y id A 2 : A 2 ! A 2 . F
  • r
all s 1 2 S 1 w e ha v e M
  • d
E Q () (id A 2 )(s 1 ) = id A 2 ((s 1 )) = id M
  • d
E Q ()(A 2 ) (s 1 ) 2. M
  • d
E Q () is compatible with comp
  • sition:
Giv en t w
  • 2
{homomorphisms f 2 : A 2 ! B 2 and g 2 : B 2 ! C 2 w e ha v e for all s 1 2 S 1 (M
  • d
E Q ()(g 2
  • f
2 ))(s 1 ) = (g 2
  • f
2 )((s 1 )) = g 2 ( (s 1 ))
  • f
2 ((s 1 )) = (M
  • d
E Q ()(g 2 ))(s 1 )
  • (M
  • d
E Q ()(f 2 ))(s 1 ) 2 Denition and Prop
  • sition
3.2.8 (F unctor M
  • d
E Q ) W e can dene M
  • d
E Q as a functor M
  • d
E Q : S I GN ! C AT
  • p
:
  • F
  • r
all signatures
  • 2
j S I GN j, M
  • d
E Q () is the category
  • f
all
  • {algebras
as dened in prop
  • sition
3.2.5.
  • F
  • r
all signature morphisms
  • :
  • 1
!
  • 2
2 M
  • r
(S I GN ), M
  • d
E Q ( ) : M
  • d
E Q ( 2 ) ! M
  • d
E Q ( 1 ) is the 'forgetful'{functor as dened ab
  • v
e. Pro
  • f.
W e ha v e to pro v e that the functor M
  • d
E Q preserv es the iden tit y morphisms and the comp
  • sition,
whic h follo ws immediately from denition 3.2.7. 2 3.3 The Sen tence F unctor S en E Q : S I GN E Q ! S E T In this subsection w e dene terms and sen tences w.r.t. a signature, where the sen tences are equations. The equations can b e translated along a signature morphism and so w e
  • btain
a functor. General Assumption 3.3.1 (Store
  • f
V ariable Sym b
  • ls)
A store
  • f
v ariable sym b
  • ls
is a coun table set
  • f
sym b
  • ls.
In the follo wing it will b e assumed, that the names
  • f
the v ariables are alw a ys distinguishable from all constan ts in an y
  • ther
sp ecication. This store is implicitly giv en for this institution and need normally no men tion. Denition 3.3.2 ({V ariable System) Let
  • =
(S ; O P ) b e a signature. A {v ariable system X for a store
  • f
v ariable sym b
  • ls
  • is
an S {sorted family
  • f
sets (X (s) j s 2 S ) with X (s)
  • for
all s 2 S and 13
slide-18
SLIDE 18 s 1 6= s 2 = ) X (s 1 ) \ X (s 2 ) = ; for all s 1 ; s 2 2 S . Denition 3.3.3 (T erms
  • f
a Signature) Let
  • =
(S ; O P ) b e a signature and X a {v ariable system. T(; X ) = (T(; X )(s) j s 2 S ) is called family
  • f
{terms
  • v
er X and is dened for eac h s 2 S as the minimal set T(; X )(s) for whic h holds:
  • X
(s)
  • T(;
X )(s),
  • p
2 T( ; X )(s) for all
  • p
:
  • !
s 2 O P .
  • p(t
1 ; : : : ; t n ) 2 T(; X )(s) for ev ery
  • p
: s 1 : : : s n ! s 2 O P and all t i 2 T(; X )(s i ) . Denition 3.3.4 ({Equation) Let
  • =
(S ; O P ) b e a signature and X a {v ariable system for . A {equation is (X : l = r ) , where l, r 2 T(; X )(s) s 2 S . Eq(; X ) denotes the set
  • f
all {equations
  • v
er X and Eq( ) is the set
  • f
all equations for a giv en signature, i.e. Eq () = D ef S (Eq( ; X ) j X is a {v ariable system for
  • ).
Signature morphisms pro vide the translation
  • f
signatures, and terms are build
  • v
er a signature so w e can dene the translation
  • f
terms. Denition 3.3.5 (T ranslation
  • f
T erms) Giv en t w
  • signatures
  • 1
= (S 1 ; O P 1 ),
  • 2
= (S 2 ; O P 2 ), a signature morphism
  • :
  • 1
!
  • 2
and X 1 a
  • 1
{v ariable system. W e dene X 2 as a
  • 2
{v ariable system b y X 2 (s 2 ) = D ef S (X 1 (s 1 ) j (s 1 ) = s 2 ) for all s 2 2 S 2 . No w the translation
  • :
T( 1 ; X 1 ) ! T( 2 ; X 2 )
  • f
  • 1
{terms is giv en b y an S 1 {indexed family
  • f
maps (s 1 ) : T( 1 ; X 1 ) (s 1 ) ! T( 2 ; X 2 )((s 1 )) with
  • (s
1 )(x 1 ) = D ef x 1 for all x 1 2 X 1 (s 1 ),
  • (s
1 )(op 1 ) = D ef (op 1 ) for all
  • p
1 :
  • !
s 1 2 O P 1 ,
  • (s
1 )(op 1 (t)) = D ef (op 1 )( (w 1 )(t)) for all
  • p
1 : w 1 ! s 1 2 O P 1 and all t 2 T( 1 ; X 1 )(w 1 ) for all s 1 2 S 1 . Remark 3.3.6 1. Notic e that the union
  • f
variables is disjoint b e c ause
  • f
denition 3.3.2. If X 2 is dene d like ab
  • ve
then we may write (X 1 ) to ac c entuate that this variable system is induc e d by X 1 and . 2. If ther e is no ambiguity, we may write (t) for (s)(t) if t2 T( 1 ; X 1 ) (s). 14
slide-19
SLIDE 19 Denition and Prop
  • sition
3.3.7 (The Sen tence F unctor S en E Q ) The functor S en E Q : S I GN E Q ! S E T is giv en b y: 1. On signatures: S en E Q ( ) = D ef Eq( ) 2. On signature morphisms: S en E Q ( :
  • 1
!
  • 2
) = S en E Q () : Eq( 1 ) ! Eq( 2 ) , where S en E Q ()(X : l 1 = r 1 ) = D ef ((X 1 ) : (l 1 ) = (r 1 )) Pro
  • f.
Again, w e ha v e to sho w that the iden tities and the comp
  • sition
are preserv ed. This follo ws immediately from denition. 2 The functor S en E Q : S I GN E Q ! S E T tak es eac h signature to the set
  • f
all equations
  • v
er this signature and eac h signature morphism to a morphism, whic h translates the equations along the signature morphism. 3.4 The Satisfaction Condition In this subsection w e w an t to pro v e that the syn tactical comp
  • nen
ts are compatible to the seman tics, b y sho wing the satisfaction condition. This is essen tial to yield an institution. Denition 3.4.1 (Assignmen t
  • f
V ariables) Giv en a {algebra A and X a {v ariable system. An assignmen t a : X ! A(S ) for X in A is an S {indexed family
  • f
maps a = (a(s) : X (s) ! A(s)js 2 S ) Denition 3.4.2 (Ev aluation
  • f
{T erms) F
  • r
a giv en {algebra A , T(; X ) and an assignmen t a : X ! A(S ) , the ev aluation
  • f
terms a : T(; X ) ! A(S ) is an S {indexed family
  • f
maps a = (a(s) : T(; X )(s) ! A (s)js 2 S ) dened for all s 2 S as follo ws:
  • a(s)(x
) = D ef a(s)(x) for all x 2 X (s),
  • a(s)(op
) = D ef A (op ) for all
  • p
:
  • !
s 2 O P ,
  • a(s)(op
(t)) = D ef A(op)(a (t)) for all
  • p
: w ! s 2 O P and all t 2 T(; X )(w ) . Denition 3.4.3 (Satisfaction Relation) F
  • r
ev ery signature
  • =
(S ; O P ) the satisfaction relation j =
  • jM
  • d
E Q ( )j
  • S
en E Q ( ), is dened for ev ery {algebra A and ev ery
  • {equation
(X : l = r ) b y Aj =
  • eq
( ) a(l) = a(r) for all assignmen ts a : X ! A(S ). Denition 3.4.4 (Corresp
  • nding
Assignmen ts) Giv en a signature morphism
  • :
  • 1
!
  • 2
, a
  • 2
{mo del A 2 , a
  • 1
{v ariable system X 1 and a
  • 2
{v ariable system (X 1 ) as dened in denition 3.3.5. F
  • r
ev ery assignmen t a 1 : X 1 ! M
  • d
E Q ( )(A 2 )(S 1 ) there is an assignmen t a 2 : (X 1 ) ! A 2 (S 2 ), dened b y 15
slide-20
SLIDE 20 a 2 (s 2 )(x ) = D ef a 1 (s 1 )(x ) for ev ery s 2 2 S 2 , where (s 1 ) = s 2 and x 2 X 1 (s 1 )
  • (X
1 )(s 2 ). In the same w a y for ev ery assignmen t a 2 : (X 1 ) ! A 2 (S 2 ) there is an assignmen t a 1 : X 1 ! M
  • d
E Q ()(A 2 )(S 1 ) giv en b y a 1 (s 1 )(x) = D ef a 2 ( (s 1 ))(x ) for ev ery s 1 2 S 1 , where x 2 X 1 (s 1 )
  • (X
1 )( (s 1 )). In this case w e call (a 1 , a 2 ) pair
  • f
corresp
  • ndig
assignmen ts. The situation ma y b e illustrated b y the follo wing diagram: 6 6 M
  • d
E Q ()(A 2 )(s 1 ) X 1 (s 1 ) A 2 ((s 1 )) =
  • (X
1 )((s 1 )) a 2 ((s 1 )) a 1 (s 1 ) Because
  • do
es not c hange the names
  • f
the v ariables and k eep them disjoin t and b ecause M
  • d
E Q () do es not mo dify the carriers, it is clear that a 2 maps essen tially as a 1 do es in resp ect to the
  • rigin
  • f
the v ariables. Ab
  • v
e w e ha v e seen that w e can form ulate corresp
  • nding
assignmen ts, thereb y w e can sho w that there is a similar relationship for the ev aluation
  • f
terms. Prop
  • sition
3.4.5 (Corresp
  • nding
Ev aluation) Given a signatur e morphism
  • :
  • 1
!
  • 2
, a
  • 2
{mo del A 2 , and a
  • 1
{variable system X 1 . F
  • r
every assignment a 1 : X 1 ! M
  • d
E Q () (A 2 )(S 1 ) we get the c
  • rr
esp
  • nding
assignment a 2 : (X 1 ) ! A 2 (S 2 ) and vic e versa (se e 3.4.4) with a 1 (s 1 )(t ) = a 2 ((s 1 ))( (s 1 )(t )) for al l s 1 2 S 1 , t 2 T( 1 ; X 1 )(s 1 ). Pro
  • f.
W e pro v e this b y structural induction
  • v
er the construction
  • f
the terms. F
  • r
all s 1 2 S 1 and all t 2 T( 1 ; X 1 )(s 1 ): 1. F
  • r
all v ariables t = x, with x 2 X 1 (s): a 1 (s 1 )(x ) = a 1 (s 1 )(x) (def.
  • f
a 1 ) = a 2 ( (s 1 ))(x ) (def.
  • f
a 2 ) = a 2 ( (s 1 ))(x ) (def.
  • f
a 2 ) = a 2 ( (s 1 ))( (s 1 )(x )) (def.
  • f
) 2. F
  • r
constan ts t =
  • p
1 , with
  • p
1 :
  • !
s 1 : a 1 (s 1 )(op 1 ) = M
  • d
E Q () (A 2 )(op 1 ) (def.
  • f
a 1 ) = A 2 ( (op 1 )) (def.
  • f
M
  • d
E Q ( )) = a 2 ((s 1 ))( (op 1 )) (def.
  • f
a 2 ) = a 2 ((s 1 ))( (s 1 )(op 1 )) (def.
  • f
) 16
slide-21
SLIDE 21 3. F
  • r
comp
  • sed
terms t =
  • p
1 (r ), with
  • p
1 : w 1 ! s 1 and r 2 T( 1 ; X 1 )(w 1 ): a 1 (s 1 )(op 1 (r)) = M
  • d
E Q (A 2 ) (op 1 ) (a 1 (w)(r )) (def.
  • f
a 1 ) = M
  • d
E Q (A 2 ) (op 1 ) (a 2 ((w 1 ))( (w 1 )(r))) (induction) = A 2 ((op 1 )) (a 2 ( (w 1 ))( (w 1 )(r))) (def.
  • f
M
  • d
E Q () ) = a 2 ((s 1 )) ((op 1 )( (w 1 )(r))) (def.
  • f
a 2 ) = a 2 ((s 1 )) ((s 1 )(op 1 (r))) (def.
  • f
) 2 Theorem 3.4.6 (Satisfaction Condition) F
  • r
al l signatur e morpisms
  • :
  • 1
!
  • 2
, and al l
  • 1
{e quation (X : l = r ) and every
  • 2
{algebr a A 2 the fol lowing holds: A 2 j =
  • 2
S en E Q ( )(eq ) ( ) M
  • d
E Q ( )(A 2 ) j =
  • 1
eq Pro
  • f.
By prop
  • sition
3.4.5 w e kno w that the ev aluation
  • f
terms in b
  • th
algebras yield the same v alue: a 1 (s)(l) = a 2 ( (s))((s)(l )) resp ectiv ely a 1 (s )(r ) = a 2 ( (s))((s)(r)) where (a 1 , a 2 ) is a pair
  • f
corresp
  • nding
assignmen ts. The satisfaction condition follo ws imme- diately b y this and b y Denition 3.4.3. 2 Corollary 3.4.7 (Institution
  • f
Equational Logic) The institution I E Q
  • f
equational logic c
  • nsists
  • f
  • the
c ate gory S I GN (se e 3.1.5),
  • the
mo del functor M
  • d
E Q : S I GN E Q ! C AT
  • p
(se e 3.2.7),
  • the
sentenc e functor S en E Q : S I GN E Q ! S E T (se e 3.3.7),
  • the
family (j =
  • j
M
  • d
E Q () j S en E Q () j
  • 2
  • n
)
  • f
satisfaction r elations (se e 3.4.3). Pro
  • f.
There is just to pro v e that the satisfaction condition holds. This is done in theorem 3.4.6. 2 17
slide-22
SLIDE 22 Chapter 4 The Institution
  • f
Algebraic Systems 4.1 The Category S I GN AS
  • f
Signatures Denition 4.1.1 (Predicativ e Signature) A predicativ e signature
  • =
(S ; O P ; dom ; co d; P ; a rit y ) consists
  • f:
  • a
nite set
  • f
sort sym b
  • ls
S ,
  • a
nite set
  • f
  • p
eration sym b
  • ls
O P ,
  • a
domain function dom : O P ! S
  • ,
where S
  • is
the set
  • f
nite w
  • rds
  • v
er S ,
  • a
co domain function co d : O P ! S ,
  • a
nite set
  • f
predicate sym b
  • ls
P and
  • an
arit y function a rit y : P ! S
  • ,
suc h that O P \ P = ;. Remark 4.1.2 (Predicativ e Signature) 1. Whenever we talk ab
  • ut
elements
  • f
the fr e e monoid
  • ver
a set, e.g. S
  • ,
we denote them by a single variable, e.g. w 2 S
  • inste
ad
  • f
denoting the elements
  • f
the wor d, sep ar ate d by dots: s 1 : : : s n 2 S
  • .
This abbr eviation also applies later to elements
  • f
the c artesian pr
  • duct.
2. In gener al we wil l write
  • p
: w ! s for an element
  • p
2 O P with dom (op ) = w and co d (op ) = s. Similarly we wil l write P : v whenever a rit y (P ) = v . 3. We wil l write
  • =
(S ; O P ; P ) for short, whenever this is appr
  • priate.
Denition 4.1.3 (Predicativ e Signature Morphism) Giv en t w
  • predicativ
e signatures:
  • i
= (S i ; O P i ; P i ), i = 1,2, a predicativ e signature mor- phism
  • :
  • 1
!
  • 2
is a triple ( S ,
  • O
P ,
  • P
)
  • f
functions
  • S
: S 1 ! S 2
  • O
P : O P 1 ! O P 2
  • P
: P 1 ! P 2 satisfying the follo wing compatibilit y conditions for eac h
  • p
: w ! s2 O P 1 ; P : v 2 P 1 ; s2 S ; w , v 2 S
  • 1
: 18
slide-23
SLIDE 23 (i) dom 2 ( O P (op )) =
  • S
(w ) (ii) co d 2 ( O P (op)) =
  • S
(s) (iii) a rit y 2 ( P (P )) =
  • S
(v ). Denition and F act 4.1.4 (The Category S I GN AS
  • f
Predicativ e Signatures) S I GN AS , consisting
  • f
  • predicativ
e signatures according to Denition 4.1.1 as
  • b
jects,
  • predicativ
e signature morphisms according to Denition 4.1.3 as morphisms forms a category , where
  • the
iden tities are triples
  • f
iden tities in the category S E T ,
  • the
comp
  • sition
is dened as the application
  • f
the comp
  • sition
in S E T to eac h comp
  • nen
t
  • f
the triples. 4.2 The F unctor M
  • d
AS : S I GN AS ! C AT
  • p
4.2.1 The M
  • d
AS {image
  • f
signatures: the Categories
  • f
Algebraic Systems Denition 4.2.1 (Algebraic System) Giv en a signature
  • =
(S ; O P ; P ) 2 j S I GN AS j , w e dene an algebraic
  • system
A = (A(S ) ; A(O P ); A (P )) as follo ws:
  • A(S
) = (A(s) j s 2 S ), an S
  • indexed
family
  • f
sets called carrier sets
  • f
eac h sort,
  • A(O
P ) = (A(op ) : A(w ) ! A(s) j
  • p
: w ! s 2 O P ), an O P
  • indexed
family
  • f
func- tions,
  • A(P
) = (A(P )
  • A(v
) j P : v 2 P ), a P
  • indexed
family
  • f
relations (subsets
  • f
the ap- propriate cartesian pro duct A(v )). Remark 4.2.2 (Algebraic System) Onc e again we fo cus
  • n
the use
  • f
variables for wor ds inste ad
  • f
listing anonymously their c
  • ntents:
A(v ) is an abbr eviation for the c artesian pr
  • duct
A(s 1 )
  • :
: :
  • A(s
n ) pr
  • vide
d that v = s 1 : : : s n (se e Chapter 2). Denition 4.2.3 (Homomorphism) Giv en a predicativ e signature
  • 2
j S I GN AS j and t w
  • algebraic
{Systems A, B . An S
  • indexed
family
  • f
functions f = (f (s) : A(s) ! B (s) j s 2 S ) is called homomorphism f : A ! B , if for an y
  • p
: w ! s 2 O P , P : v 2 P the follo wing com- patibilit y conditions hold: (i) f (s)
  • A
(op ) = B (op )
  • f
(w ) (ii) f (v )
  • A(P
)
  • B
(P )(
  • B
(v )) f (w ), f (v ) denote the usual extension
  • f
functions
  • n
sets to functions
  • n
the cartesian pro duct
  • f
sets, i.e. the parallel application. 19
slide-24
SLIDE 24 Denition and Prop
  • sition
4.2.4 (The Category M
  • d
AS ()) Giv en a signature
  • 2
j S I GN AS j w e dene the category
  • f
algebraic
  • systems
M
  • d
AS ( ) to comprise the class
  • f
all {Systems as
  • b
ject class and the homomorphisms according to Denition 4.2.3 to build the corresp
  • nding
morphism sets. Pro
  • f.
Firstly , the homomorphism b eing the iden tit y (in S E T )
  • n
an y carrier set is indeed an iden tit y; this is
  • b
vious. Secondly , the comp
  • sition
  • f
homomorphisms has to b e a homomorphism as w ell: Giv en {Systems A, B , C and t w
  • homomorphisms
f : A ! B , g : B ! C , w e dene g
  • f
: A ! C to b e the family
  • f
comp
  • sed
mappings in S E T . (i) (g
  • f
)(s)
  • A(op)
= g (s)
  • (f
(s)
  • A(op)
) Comp
  • nen
t wise comp
  • sition
= g (s)
  • (B
(op)
  • f
(w)) f is a homomorphism = C (op)
  • g
(w)
  • f
(w) g is a homomorphism = C (op)
  • (g
  • f
)(w) Comp
  • nen
t wise comp
  • sition
(ii) (g
  • f
)(v )
  • A(P
)
  • g
(v )
  • (f
(v )
  • A(P
)) g is a homomorphism
  • g
(v )
  • B
(P ) f is a homomorphism
  • C
(P ) g is a homomorphism for an y giv en
  • p
: w ! s 2 O P and P : v 2 P . 2 4.2.2 The F
  • rgetful
F unctor M
  • d
AS () Denition and Prop
  • sition
4.2.5 (The F
  • rgetful
F unctor M
  • d
AS () ) Giv en a predicativ e signature morphism
  • :
  • 1
!
  • 2
, w e dene the forgetful functor M
  • d
AS () : M
  • d
AS ( 2 ) ! M
  • d
AS ( 1 ) b et w een the mo del categories
  • f
algebraic systems
  • f
the corresp
  • nding
predicativ e signatures (in
  • pp
  • site
direction) as follo ws: 1.
  • n
  • b
jects (i.e. algebraic systems): Giv en an algebraic
  • 2
{system A 2 , w e dene the algebraic
  • 1
  • system
A 1 = def M
  • d
AS ()(A 2 ) to comprise the follo wing carrier sets,
  • p
erations and relations (predicates): (a) for ev ery sort s 1 2 S 1 : A 1 (s 1 ) = def A 2 ( S (s 1 )) (b) for ev ery
  • p
eration sym b
  • l
  • p
1 2 O P 1 : A 1 (op 1 ) = def A 2 ( O P (op 1 )) (c) for ev ery predicate sym b
  • l
P 1 2 P 1 : A 1 (P 1 ) = def A 2 ( P (P 1 )) 2.
  • n
morphisms (i.e. homomorphisms): Giv en a homomorphism f 2 : A 2 ! B 2 b et w een t w
  • algebraic
  • 2
  • systems,
w e dene the
  • 1
  • homomorphism
f 1 = def M
  • d
AS ( )(f 2 ): M
  • d
AS () (A 2 )!M
  • d
AS ( )(B 2 )
  • n
ev ery sort s 1 2 S 1 b y: f 1 (s 1 ) = def f 2 ( S (s 1 )) Pro
  • f.
1. W e ha v e to sho w that A 1 and f 1 are w ell-dened. This follo ws immediately from Denition 4.1.1, namely from the required compatibilit y
  • f
  • S
with
  • O
P and
  • P
, resp ectiv ely . 20
slide-25
SLIDE 25 2. The rst functor prop ert y is: iden tities are preserv ed. That is in general: F (id A ) = id F (A) . Giv en an algebraic
  • 2
  • system
A 2 and its corresp
  • nding
iden tit y homomorphism id A 2 : A 2 ! A 2 , w e conclude for ev ery sort s 1 2 S 1 : M
  • d
AS ( )(id A 2 )(s 1 ) = id A 2 ( S (s 1 )) (as dened ab
  • v
e) = id M
  • d
AS ()(A 2 ) (s 1 ) (denition ab
  • v
e, 1.(i)) 3. The second functor prop ert y is the comp
  • sition
compatibilit y: F (g
  • f
) = F (g )
  • F
(f ). Giv en t w
  • 2
  • homomorphisms
f 2 : A 2 ! B 2 , g 2 : B 2 ! C 2 leading to the comp
  • sition
g 2
  • f
2 : A 2 !C 2 w e conclude for ev ery s 1 2 S 1 : M
  • d
AS () (g 2
  • f
2 )(s 1 ) = (g 2
  • f
2 )( S (s 1 )) (as dened ab
  • v
e) = g 2 ( S (s 1 ))
  • f
2 ( S (s 1 )) (Comp. in S E T ) = M
  • d
AS ()(g 2 )(s 1 )
  • M
  • d
AS ()(f 2 )(s 1 ) (as dened ab
  • v
e) 2 4.2.3 The Mo del F unctor M
  • d
AS Denition and F act 4.2.6 (The Mo del F unctor M
  • d
AS ) W e dene the mo del functor M
  • d
AS : S I GN AS ! C AT
  • p
as the functor mapping eac h
  • predicativ
e signature
  • to
M
  • d
AS (), the category
  • f
algebraic
  • systems
according to Denition 4.2.4.
  • predicativ
e signature morphism
  • :
  • 1
!
  • 2
to M
  • d
AS (), the forgetful functor according to Denition 4.2.5. 4.3 The Sen tence F unctor S en AS : S I GN AS ! S E T 4.3.1 F
  • rm
ulas for Algebraic Systems General Assumption 4.3.1 (V ariable Store, V ariable System) The store
  • f
v ariable sym b
  • ls
  • is
a coun table set whic h, for ev ery predicativ e signature , admits to c ho
  • se
a subset X (s)
  • for
ev ery s 2 S with the prop ert y that eac h v ariable sym b
  • l
can unam biguously b e assigned a concrete sort s 2 S . More formally this means, for an y t w
  • dieren
t sort sym b
  • ls
s 1 ,s 2 2 S : X (s 1 )\X (s 2 ) = ;, and, with X = def ( S X (s) j s 2 S ): X \(O P [ P ) = ;. W e call X = (X (s) j s 2 S ) a
  • v
ariable system. Denition 4.3.2 (T erms
  • f
a Signature) Giv en a predicativ e signature
  • =
(S ; O P ; P ) and a
  • v
ariable system X . W e call T(; X ) = (T(; X )(s) j s 2 S ) family
  • f
{terms
  • v
er X . It is dened for eac h s 2 S as the minimal set T(; X )(s) satisfying:
  • X
(s)
  • T(;
X ) (s) (every variable is a term)
  • F
  • r
eac h
  • p
:
  • !
s 2 O P w e ha v e
  • p
2 T(; X )(s) (every c
  • nstant
symb
  • l
is a term)
  • F
  • r
ev ery
  • p
: w ! s 2 O P and t2 T(; X )(w) w e ha v e
  • p(t)2
T(; X )(s) (c
  • mplex
terms) 21
slide-26
SLIDE 26 Denition 4.3.3 (A tomic F
  • rm
ula) Giv en a predicativ e signature
  • and
a
  • v
ariable system X . W e dene t w
  • forms
  • f
atomic
  • form
ulas
  • v
er X : 1. W e assume the equation sym b
  • l
`=' to b e not included in P (otherwise w e had to rename the
  • ne
b y the
  • ther).
Let t 1 ,t 2 2 T(; X )(s), s 2 S , b e t w
  • terms
  • f
equal sort. Then t 1 =t 2 is an atomic
  • form
ula
  • v
er X called equation. 2. Giv en a predicate sym b
  • l
P : v 2 P and a (tuple-) term t 2 T( ; X )(v )
  • f
(tuple-) sort v . Then w e ha v e P (t) is an atomic
  • form
ula
  • v
er X . A tomic
  • form
ulas are called atoms for short. Remark 4.3.4 (A tomic F
  • rm
ula) T
  • indic
ate the variable system X the atomic formula is b ase d
  • n
we gener al ly write (X , at). This is imp
  • rtant
for the subse quent denitions that r ely
  • n
this
  • ne.
Ther e's is stil l
  • ne
subtle thing to mention: we use d a c
  • mma
in the ab
  • ve
notation to mer ely indic ate the variable system, the formula is based
  • n.
This do es not ne c essarily me an, that the formula is gener al ly quantife d
  • ver
al l variables to b e found in X . Whenever we want to expr ess that inste ad, we wil l use a c
  • lon
  • r
an explicit quantier! The arising pr
  • blem
is discusse d in R emark 4.3.6. Denition 4.3.5 (Univ ersal Horn F
  • rm
ula) Giv en a predicativ e signature , a
  • v
ariable system X and atomic
  • form
ulas
  • v
er X : at 1 ; : : : ; at n , at according to Denition 4.3.3. W e call f
  • =
(X : at 1 ; : : : ; at n = ) at ) univ ersal horn form ula
  • v
er
  • and
X . Remark 4.3.6 (Univ ersal Horn F
  • rm
ula)
  • This
is a p
  • int
  • f
p
  • ssible
extensions. Horn formulas ar e r ather r estrictive with r esp e ct to the expr essive p
  • wer
users want to have. We think
  • f
the fol lowing extension steps: Gentzen formulas (mor e than
  • ne
atom in the c
  • nclusion),
rst
  • r
der formulas including existential quantic ation.
  • The
ab
  • ve
denition r e quir es that any variable symb
  • l
use d in some at i , at is include d in X . The r everse, however, do es not hold. Particularly when tr ansforming formulas by me ans
  • f
lo gic al r e asoning, e.g. applic ation
  • f
a sp e cialization rule like a^ b! a, we
  • ften
c
  • me
to a state, wher e X c
  • ntains
`unuse d' variables. This implies an ee ct, which is gener al ly unintende d. In c ase this single variable b elongs to a sep ar ate sort, the r efer enc e d formula wil l b e satise d (se e Denition 4.4.5) in any algebr aic system, in which the c arrier set for this sort is empty. This le ads to sometimes r e quir eing al l c arrier sets to b e non empty.
  • Her
e again we put emphasis
  • n
the hand ling
  • f
variables (se e R emark 4.3.4 ab
  • ve).
The Denition
  • f
an \atomic formula" is not subsume d by the denition
  • f
a universal horn formula. If we want to expr ess an atomic formula as a valid formula in the se quel, we have to use it in the ab
  • ve
p attern, i.e. we have to r efer enc e to the variable system and we have to quantify gener al ly
  • ver
it (by syntactic al me ans
  • f
a c
  • lon!).
22
slide-27
SLIDE 27 4.3.2 T ranslation
  • f
F
  • rm
ulas
  • f
Algebraic Systems Denition 4.3.7 (Induced V ariable System) Giv en t w
  • predicativ
e signatures
  • 1
,
  • 2
, a predicativ e signature morphism
  • :
  • 1
!
  • 2
and a
  • 1
  • v
ariable system X 1 . W e call
  • (X
1 ) = ((X 1 )(s 2 ) j s 2 2 S 2 )
  • induced
  • 2
  • v
ariable system with eac h comp
  • nen
t dened b y (X 1 )(s 2 ) = S fX 1 (s 1 ) j s 1 2 S 1 , (s 1 )=s 2 g Remark 4.3.8 (Induced V ariable System) If
  • S
is not surje ctive, the induc e d
  • 2
  • variable
system (X 1 ) c
  • ntains
empty sets
  • f
variable symb
  • ls.
Denition 4.3.9 (T ranslation
  • f
T erms) Giv en t w
  • predicativ
e signatures
  • 1
,
  • 2
, a predicativ e signature morphism
  • :
  • 1
!
  • 2
and a
  • 1
  • term
t 1 2 T( 1 ; X 1 )(s 1 ). W e dene the translation
  • f
t 1 w.r.t. , called (s 1 )(t 1 ) 2 T( 2 ;
  • (X
1 ))( S (s 1 )) recursiv ely b y (i) t 1 2 X 1 (s 1 )= ) (s 1 )(t 1 ) = t 1 (2 (X 1 )) (ii) t 1 :! s 1 2 O P 1 = ) (s 1 )(t 1 ) =
  • O
P (t 1 ) (iii) t 1
  • p
1 (t),
  • p
1 : w 1 ! s 1 2 O P 1 , t2 T( 1 ; X 1 )(w 1 ) = ) (s 1 )(op 1 (t)) =
  • O
P (op 1 )( (w 1 )(t )) Remark 4.3.10 (T ranslation
  • f
T erms) We c an extend the ab
  • ve
denition to an S 1
  • indexe
d map
  • p
erforming the tr anslation
  • f
terms w.r.t. :
  • =
((s 1 ) j s 1 2 S 1 ) (s 1 ) : T( 1 ; X 1 ) (s 1 )!T( 2 ;
  • (X
1 ))( (s 1 ) ) Denition 4.3.11 (T ranslation
  • f
A tomic F
  • rm
ulas) Giv en t w
  • predicativ
e signatures
  • 1
,
  • 2
, a predicativ e signature morphism
  • :
  • 1
!
  • 2
and an atomic
  • 1
  • form
ula at 1 . W e dene the translation (at 1 )
  • f
at 1 w.r.t.
  • according
to the structure
  • f
Denition 4.3.3 as follo ws: (i) at 1 (t 1 = t 1 '), t 1 , t 1 ' 2 T( 1 ; X 1 )(s 1 ) = ) (at 1 ) = def ( (s 1 )(t 1 ) = (s 1 )(t 1 ')), (ii) at 1
  • P
1 (t v ), P 1 : v 1 2 P 1 , t v 2 T( 1 ; X 1 )(v 1 ) = ) (at 1 ) = def
  • P
(P 1 )( (v 1 )(t v )), using the translation
  • f
terms according to Denition 4.3.9 ab
  • v
e. Denition 4.3.12 (T ranslation
  • f
Univ ersal Horn F
  • rm
ulas) Giv en t w
  • predicativ
e signatures
  • 1
,
  • 2
, a predicativ e signature morphism
  • :
  • 1
!
  • 2
, a
  • 1
  • v
ariable system X 1 and a univ ersal horn form ula f
  • 1
= (X 1 : at 1 ; : : : ; at n = ) at )
  • v
er
  • 1
and X 1 , w e dene the translation
  • f
f
  • 1
w.r.t.
  • b
y: (f
  • 1
) = ((X 1 ): (at 1 ); : : : ;
  • (at
n ) = ) (at)) using the Denitions 4.3.7 and 4.3.11. 23
slide-28
SLIDE 28 4.3.3 The F unctor S en AS : S I GN AS ! S E T Denition and F act 4.3.13 (The F unctor S en AS : S I GN AS ! S E T ) W e dene the sen tence functor for algebraic systems: S en AS : S I GN AS ! S E T assigning to eac h predicativ e signature its set
  • f
admissible form ulas (sen tences), formally
  • n
  • b
jects and morphisms b y:
  • S
en AS () is the set
  • f
all univ ersal horn form ulas
  • v
er .
  • S
en AS () =
  • :
S en AS ( 1 ) ! S en AS ( 2 ) is the translation
  • f
univ ersal horn form ulas for an y giv en
  • :
  • 1
!
  • 2
.. 4.4 The Satisfaction Relation Denition 4.4.1 (Assignmen t
  • f
V ariables) Giv en a predicativ e signature 2 j S I GN AS j , an algebraic
  • system
A2 M
  • d
AS ( ) and a
  • v
ariable system X . An assignmen t
  • f
the v ariable sym b
  • ls
in X to v alues in A : a:X !A = (a(s) : X (s)!A(s) j s 2 S ) is a family
  • f
functions that assigns to eac h v ariable sym b
  • l
x
  • ne
v alue a(x) in the algebraic system. Denition 4.4.2 (Ev aluation
  • f
T erms) Giv en a predicativ e signature 2 j S I GN AS j , an algebraic
  • system
A2 M
  • d
AS ( ), a
  • v
ariable system X an assignmen t a:X !A and a
  • term
t2 T(; X )(s). The ev aluation
  • f
t under a: a:T( ; X ) ! A; a=(a(s) j s 2 S ) is dened recursiv ely according to Denition 4.3.2: (i) t2 X (s): a(s)(t ) = def a(s)(t) (ii) t:!s2 O P : a(s)(t ) = def A(t) (iii) t
  • p(t
w ) with
  • p
: w ! s2 O P , t w 2 T(; X )(w): a(s)(op (t w )) = def A(op)(a (w )(t w )) Remark 4.4.3 (Ev aluation
  • f
T erms)
  • We
explicitly assume t2 T(; X ) and the as- signment a
  • p
er ating
  • n
X . The r e ason why we c an r estrict
  • urselves
that way is, that we
  • nly
admit `close d' formulas, i.e. close d under universal quantiing. Otherwise we had to intr
  • duc
e a notion
  • f
`solution ' and \solution sets", i.e. sets
  • f
assignments under which the formula b e c
  • mes
true.
  • Of
c
  • urse
t2 T(; X )
  • nly
me ans that X is the maximum set
  • f
symb
  • ls
that c an b e use d to build t. The pr
  • blems
with empty c arrier sets arise a se c
  • nd
time: If ther e ar e no assignments (they have to
  • p
er ate
  • n
the whole variable system!), then ther e ar e no evaluations, not even for c
  • nstant
symb
  • ls!
Denition 4.4.4 (Ev aluation
  • f
A toms) Giv en a predicativ e signature 2 j S I GN AS j , an algebraic
  • system
A2 M
  • d
AS ( ), a
  • v
ariable system X , an assignmen t a:X ! A and an atomic
  • form
ula at w.r.t
  • and
X . W e call at true under a, if: 24
slide-29
SLIDE 29 (i) at(t 1 =t 2 ): a(s)(t 1 ) = a(s)(t 2 ), i.e. the ev aluation
  • f
the terms t 1 , t 2
  • f
sort s yields the same result in A, (ii) at
  • P
(t): a(v )(t)2 A(P ), i.e. the ev aluation
  • f
the term-tuple t
  • f
sort v in A yields an elemen t
  • f
the relation A (P ). Otherwise w e call at false under a. Denition 4.4.5 (Satisfaction Relation) Giv en a predicativ e signature 2 j S I GN AS j , an algebraic
  • system
A 2 M
  • d
AS (), a
  • v
ariable system X and a univ ersal horn form ula f
  • =
(X : at 1 ; : : : ; at n = ) at) w.r.t . A sat- ises f
  • :
A j =
  • f
  • if
for every assignmen t a:X !A the follo wing holds: If all atoms at i , 1
  • i
  • n,
ev aluate to true under a, then at yields true under a, to
  • .
Remark 4.4.6 (Satisfaction Relation) A gain we mention the \empty c arrier sets"{pr
  • blem.
Whenever X c
  • ntains
variables to a sort s whose interpr etation A(s) is the empty set, the set
  • f
assignments is empty and, thus, the fol lowing formula satise d! 4.4.1 The Satisfaction Condition Denition 4.4.7 (Corresp
  • nding
Assignmen ts) Giv en a predicativ e signature morphism
  • :
  • 1
!
  • 2
, a
  • 1
  • v
ariable system X 1 and a
  • 2
  • algebraic
system A 2 . 1. Giv en an assignmen t a 2 : (X 1 )!A 2 , with (X 1 ) according to Denition 4.3.7, w e dene the corresp
  • nding
assignmen t a 1
  • a
2 : X 1 ! M
  • d
AS ()(A 2 ) dep ending
  • n
a 2 b y: a 1
  • a
2 (s 1 )(x 1 ) = def a 2 ( S (s 1 ))(x 1 ) for ev ery s 1 2 S 1 and x 1 2 X 1 (s 1 ). 2. Giv en an assignmen t a 1 :X 1 ! M
  • d
AS ( )(A 2 ) w e dene the corresp
  • nding
assignmen t a 2
  • a
1 :(X 1 )!A 2 dep ending
  • n
a 1 b y: a 2
  • a
1 (s 2 )(x 2 ) = def a 1 (s 1 )(x 2 ) for ev ery s 2 2 S 2 , s 1 2 S 1 , x 2 2 X 2 , pro vided that s 2 = S (s 1 ). Remark 4.4.8 (Corresp
  • nding
Assignmen ts) 1. a 1
  • a
2 is an S 1
  • sorte
d mapping. That is, we have to dene it for every s 1 2 S 1 . A nalo gously, a 2
  • a
1 has to b e dene d for every s 2 2 S 2 . 2. a 1
  • a
2 is wel l-dene d for every x 1 2 X 1 (s 1 ) . If
  • S
is not inje ctive, i.e. (s 1 ) = (s 1 ) = s 2 , the gener al assupmtion 4.3.1 makes sur e that (X 1 )( S (s 1 )) S (X 1 )( S (s 1 )) actual ly is a disjoint union. 3. a 2
  • a
1 is wel l-dene d for the fol lowing r e asons: again 4.3.1 assur es the unique existenc e
  • f
a sort, every variable b elongs to, even in the c ase
  • f
non-inje ctivity. Se c
  • nd
ly, in c ase
  • f
non surje ctivity we p
  • ssibly
do not nd a sort s 1 with
  • S
(s 1 ) = s 2 . This is no pr
  • blem
b e c ause in that c ase the variable set (X 1 )(s 2 ) is empty (se e Denition 4.3.7). That is, for those sorts, a 2
  • a
1 has to b e the empty mapping. 25
slide-30
SLIDE 30 Summarizing w e conclude the existence
  • f
a corresp
  • nding
assignmen t to eac h
  • f
a 1 :X 1 ! M
  • d
AS ( )(A 2 ), a 2 :(X 1 )!A 2 , whic h is,
  • n
the lev el
  • f
the elements
  • f
X 1 , (X 1 ) and A 2 , M
  • d
AS ( )(A 2 ) essen tially the same. Ob viously , this corresp
  • ndence
is bijectiv e. No w, in Section 4.4 w e ha v e dened extensions
  • f
an assignmen t to terms, atoms (ev aluations) and form ulas. Giv en a pair
  • f
corresp
  • nding
assignmen ts (a 1 , a 2 ), w e can extend b
  • th
  • f
them yielding a notion
  • f
c
  • rr
esp
  • nding
evaluations (a 1 , a 2 ). Lemma 4.4.9 (Corresp
  • nding
Ev aluations) Given a pr e dic ative signatur e morphism
  • :
  • 1
!
  • 2
, a
  • 1
  • variable
system X 1 , an algebr aic
  • 2
  • system
A 2 2 j M
  • d
AS ( 2 ) j and a p air
  • f
c
  • rr
esp
  • nding
assignments (a 1 , a 2 ). They extend to a p air
  • f
corresp
  • nding
ev aluations (se e Denition 4.4.2): a 1 : T( 1 ; X 1 )!M
  • d
AS () (A 2 ) a 2 : T( 2 ;
  • (X
1 ))!A 2 They have for every s 1 2 S 1 , t 1 2 T( 1 ; X 1 )(s 1 ) the fol lowing pr
  • p
erty: a 1 (s 1 )(t 1 ) = a 2 ( S (s 1 ))( (s 1 )(t 1 )) Pro
  • f.
The lemma con tains a prop
  • sition
  • v
er terms t 1 2 T( 1 ; X 1 )(s 1 ) . That is, w e ha v e to pro v e it b y induction
  • v
er the structure
  • f
that term according to Denition 4.3.2: (i) t 1 2 X 1 : a 1 (s 1 )(t 1 ) = a 1 (s 1 )(t 1 ) 4:4:2, (i) = a 2 ( S (s 1 ))(t 1 ) 4:4:7, 1. = a 2 ( S (s 1 ))( (s 1 )(t 1 )) 4:3:9, (i) = a 2 ( S (s 1 ))( (s 1 )(t 1 )) 4:4:2, (i) (ii) t 1 :! s 1 2 O P 1 : a 1 (s 1 )(t 1 ) = M
  • d
AS ()(A 2 )(t 1 ) 4:4:2, (ii) = A 2 ( O P (t 1 )) 4:2:5, 1.(b) = A 2 ( (s 1 )(t 1 )) 4:3:9, (ii) = a 2 ( S (s 1 ))( (s 1 )(t 1 )) 4:1:3, (ii), and 4:4:2, (ii) (iii) t 1
  • p
1 (t w ) with
  • p
1 : w 1 ! s 1 2 O P 1 , t w 2 T( 1 ; X 1 )(w 1 ): a 1 (s 1 )(t 1 ) = a 1 (s 1 )(op 1 (t w )) t 1
  • p
1 (t w ) = M
  • d
AS ()(A 2 )(op 1 )(a 1 (w 1 )(t w )) 4:4:2, (iii) = M
  • d
AS ()(A 2 )(op 1 )(a 2 ( S (w 1 ))( (w 1 )(t w ))) b y induction h yp
  • thesis
= A 2 ( O P (op 1 ))(a 2 ( S (w 1 ))( (w 1 )(t w ))) 4:2:5, 1.(b) = a 2 ( S (s 1 ))( O P (op 1 )( (w 1 )(t w ))) 4:1:3, (ii), and 4:4:2, (iii) = a 2 ( S (s 1 ))( (s 1 )(op 1 (t w ))) 4:3:9, (iii) = a 2 ( S (s 1 ))( (s 1 )(t 1 )) t 1
  • p
1 (t w ) 2 Lemma 4.4.10 (A tomar Satisfaction Condition) Given a pr e dic ative signatur e morphism
  • :
  • 1
!
  • 2
, an algebr aic
  • 2
  • system
A 2 , a
  • 1
  • variable
system X 1 and an atomic
  • 1
  • formula
at 1
  • ver
X 1 , the fol lowing two pr
  • p
  • sitions
ar e e quivalent: 1. at 1 is true under ev ery assignment a 1 :X 1 !M
  • d
AS (A 2 ) (i.e., M
  • d
AS (A 2 ) satises at 1 ). 26
slide-31
SLIDE 31 2. (at 1 ) is true under ev ery assignment a 2 : (X 1 )!A 2 (i.e., A 2 satises (at 1 )). Pro
  • f.
The lemma con tains a prop
  • sition
  • v
er
  • 1
  • atoms
at 1
  • v
er X 1 . That is, w e ha v e to pro v e it
  • v
er the structure
  • f
that atom according to Denition 4.3.3: (i) at 1
  • (t
1 = t 1 ') for giv en t 1 , t 1 ' 2 T( 1 ; X 1 )(s 1 ) : 1: ) 2: Giv en an assignmen t a 2 :(X 1 )!A 2 , w e ha v e to sho w that (at 1 ) is true under a 2 , that is: a 2 ( S (s 1 ))( (s 1 )(t 1 )) = a 2 ( S (s 1 ))( (s 1 )(t 1 ')). By Denition 4.4.7 and its follo wing remarks w e kno w that there is a unique assignmen t a 1 :X 1 ! M
  • d
AS (A 2 ) suc h that <a 1 , a 2 > are corresp
  • nding
assignmen ts. By (1.) w e kno w that at 1 is true under a 1 . This means: a 1 (s 1 )(t 1 ) = a 1 (s 1 )(t 1 ') By Lemma 4.4.9 w e conclude directly the prop
  • sition.
2: ) 1: This part
  • f
the pro
  • f
corresp
  • nds
exactly to the
  • ne
b efore. (ii) at 1
  • P
1 (t v ) for giv en P 1 : v 1 2 P 1 , t v 2 T( 1 ; X 1 ) (v 1 ): 1: ) 2: Giv en w.l.o.g. an assignmen t a 2 :(X 1 )! A 2 , w e ha v e to sho w that (at 1 ) is true under a 2 . Let a 1 :X 1 ! M
  • d
AS (A 2 ) denote the unique corresp
  • nding
assignmen t
  • f
a 2 . What w e ha v e to sho w, is: at 2 satises (P 1 (t v )) , at 2 satises
  • P
(P 1 )( (v 1 )(t v )) 4:3:11, (ii) , a 2 ( S (v 1 ))( (v 1 )(t v ))2 A 2 ( P (P 1 )) 4:4:4, (ii) , a 1 (s 1 )(t v )2 A 2 ( P (P 1 )) 4:4:9 , a 1 (s 1 )(t v )2 M
  • d
AS (A 2 )(P 1 ) 4:2:5, 1.(iii) , P 1 (t v ) is true under a 1 4:3:11 But this is what w e already kno w b y assumption! 2: ) 1: This part
  • f
the pro
  • f
corresp
  • nds
exactly to the
  • ne
b efore (P a y atten tion to the p
  • in
t wise equiv alences
  • f
the steps ab
  • v
e!). 2 Corollary 4.4.11 (The Satisfaction Condition) Given a pr e dic ative signatur e morphism
  • :
  • 1
!
  • 2
, an algebr aic
  • 2
  • system
A 2 , a
  • 1
  • variable
system X 1 and a universal horn formula f
  • 1
= (X 1 : at 1 ; : : : ; at n = ) at ) , the fol lowing satis- faction condition holds: A 2 j =
  • 2
(f
  • 1
) ( ) M
  • d
AS () (A 2 ) j =
  • 1
f
  • 1
Pro
  • f.
The pro
  • f
  • f
this corollary is a direct consequence
  • f
the ab
  • v
e Lemma 4.4.10 and uses the same denitions and ideas. F
  • r
this reasons w e
  • mit
it here. 2 27
slide-32
SLIDE 32 Chapter 5 The Institution
  • f
P artial Algebras 5.1 The Category S I GN P A Denition 5.1.1 (Signature) A signature
  • =
(S ; O P
  • ;
dom ; co d) consists
  • f
  • a
nite set S
  • f
sort sym b
  • ls,
  • a
nite set O P
  • f
  • p
eration sym b
  • ls,
  • a
domain function dom : O P
  • !
S
  • ,
and
  • a
co domain function co d : O P
  • !
S [ fg . Remark 5.1.2 1. Note, that we al low
  • to
b e a c
  • domain
for
  • p
er ation symb
  • ls
thus the c
  • nc
ept
  • f
signatur e use d in this chapter diers fr
  • m
the signatur es use d in the institutions I E Q and I C A . 2. If no c
  • nfusion
arises we wil l write
  • (S
; O P
  • )
inste ad
  • f
(S ; O P
  • ;
dom ; co d ),
  • p
: s 1 : : : s n ! s and
  • p
: s 1 : : : s n !
  • r
  • p
: w ! v , if dom (op) = s 1 : : : s n = w and co d (op ) = s = v
  • r
co d (op ) =
  • =
v . 3. The
  • p
er ation symb
  • ls
c :
  • !
s ar e also c al le d constan t sym b
  • ls
and the
  • p
er ation symb
  • ls
p : w !
  • ar
e r eferr e d to as predicate sym b
  • ls.
Denition 5.1.3 (Signature Morphism) Let
  • 1
= (S 1 ; O P
  • 1
; dom 1 ; co d 1 ) and
  • 2
= (S 2 ; O P
  • 2
; dom 2 ; co d 2 ) b e signatures. A signature morphism
  • :
  • 1
!
  • 2
is a pair ( S ,
  • O
P )
  • f
functions
  • S
: S 1 ! S 2 and
  • O
P : O P
  • 1
! O P
  • 2
suc h that for ev ery
  • p
1 2 O P 1 : dom 2 ( O P (op 1 )) =
  • S
(dom 1 (op 1 )); co d 2 ( O P (op 1 )) =
  • S
(co d 1 (op 1 )); where
  • S
( 1 ) =
  • 2
and
  • S
(w 1 ) =
  • S
(s 1 ) : : :
  • S
(s n ) for ev ery w 1 = s 1 : : : s n 2 S
  • 1
. General Assumption 5.1.4 (Subscript) W e neglect subscripts resp ectiv ely sup erscripts if they are giv en b y the con text, i.e. w e write (s) instead
  • f
  • S
(s) and (op) instead
  • f
  • O
P (op), if p
  • ssible.
F urther the notation
  • :
  • 1
!
  • 2
implicitly supp
  • ses
  • i
= (S i ; O P
  • i
; dom i ; co d i ) for i = 1; 2. 28
slide-33
SLIDE 33 Denition and Prop
  • sition
5.1.5 (Category S I GN P A ) The category S I GN P A
  • f
signatures has
  • signatures
  • =
(S ; O P
  • ;
dom ; co d) as in denition 5.1.1 as
  • b
jects and
  • signature
morphisms
  • :
  • 1
!
  • 2
as in denition 5.1.3 as morphisms. The comp
  • sition
  • :
  • 1
!
  • 3
  • f
t w
  • signature
morphisms
  • :
  • 1
!
  • 2
and :
  • 2
!
  • 3
is dened comp
  • nen
t wise
  • =
D ef ( S
  • S
; O P
  • O
P ) th us for ev ery signature
  • the
iden tical signature morphism I d
  • :
  • !
  • is
giv en b y the pair I d
  • =
(id S ; id O P )
  • f
iden tical functions. Pro
  • f.
It can b e easily c hec k ed that
  • really
b ecomes a signature morphism and that I d
  • is
the iden tit y . 2 5.2 The Mo del F unctor M
  • d
P A Denition 5.2.1 (P artial
  • Algebra)
F
  • r
an y signature
  • =
(S ; O P
  • )
a partial algebra A = (A(S ); A (O P
  • ))
is giv en b y
  • an
S
  • indexed
set A(S ) = (A(s) j s 2 S ), the carrier
  • f
A and b y
  • an
O P
  • indexed
family A(O P
  • )
= (A(op ) j
  • p
2 O P
  • )
  • f
partial
  • p
erations, where for ev ery
  • p
: w ! v 2 O P
  • the
partial
  • p
eration A(op) : A(w )
  • !
A(v ) is giv en b y the domain
  • f
denition domA(op)
  • A(w
) and b y a total function A(op ) : domA(op)
  • !
A(v ) : Remark 5.2.2 1. The c
  • nc
ept
  • f
p artial algebr as do es not for c e the c
  • nstants
to b e dene d in a p artial
  • algebr
a A. F
  • r
a c
  • nstant
symb
  • l
c :
  • !
s ther e exists a c
  • nstant
A(c)( ) 2 A(s)
  • nly
in c ase domA(c ) = A () = fg (cf. se ction 2.1). 2. F
  • r
a pr e dic ate symb
  • l
p : w !
  • 2
O P
  • nly
the domain
  • f
denition domA(p ) is essential b e c ause A (p ) : domA(p )
  • !
A() is a c
  • nstant
function with A(p )(a) =
  • for
every a 2 domA(p) . 3. Note, that a p artial
  • p
er ation A(op) : A (w)
  • !
A(v ) c an b e se en a span A(w) i
  • domA(op
) A(op)
  • !
A(v )
  • f
total functions, wher e i : domA(op) , ! A (w) r epr esents the inclusion domA (op)
  • A(w).
A(op) is a total
  • p
eration if domA(op ) = A (w). Denition 5.2.3 (-Homomorphism) Let
  • =
(S ; O P
  • )
b e a signature and let A , B b e partial
  • algebras.
An S
  • indexed
family f = (f (s) : A(s) ! B (s) j s 2 S ) : A(S ) ! B (S )
  • f
total functions is a (w eak)
  • homomor-
phism, f : A ! B in sym b
  • ls,
i the follo wing t w
  • conditions
(D) and (H) are satised: (D) f (w)(domA (op))
  • domB
(op ) for ev ery
  • p
: w ! v 2 O P
  • .
(H) f (v )(A(op )(a)) = B (op )(f (w)(a)) for ev ery a 2 domA(op )
  • A(w)
,
  • p
: w ! v 2 O P
  • .
29
slide-34
SLIDE 34 A
  • homomorphism
f is a full
  • homomorphism
i (D 1 ) f (w)(domA (op)) = f (w)(A(w ) ) \ B (op ) 1 (f (v )(A(v ))) for ev ery
  • p
: w ! v 2 O P
  • .
A
  • homomorphism
f is a closed
  • homomorphism
i (D 2 ) domA(op) = f (w ) 1 (domB(op) ) for ev ery
  • p
: w ! v 2 O P
  • .
Remark 5.2.4 1. If A(op) and B (op) ar e total, the c
  • nditions
(D), (D 1 ), and (D 2 ) ar e trivial ly satise d. 2. Note, that (D 1 ) implies (D), and that (H) and (D 2 ) to gether imply (D 1 ) thus every close d
  • homomorphism
is ful l and every ful l
  • homomorphism
satises c
  • ndition
(D). 3. F
  • r
pr e dic ates p : w !
  • 2
O P
  • c
  • ndition
(D 1 ) b e c
  • mes
e quivalent to (D pr ed ) f (w)(domA(p )) = f (w ) (A(w ) ) \ domB(p) b e c ause B (p) 1 (f () (A() )) = B (p) 1 (B () ) = B (p) 1 (fg ) = domB (p) . F
  • r
arbitr ary
  • p
: w ! v 2 O P
  • (D
2 ) implies (D pr ed ) and (D pr ed ) to gether with (H) implies (D 1 ). 4. F
  • r
surjectiv e and full
  • homomorphisms
(D 1 ) is simplie d to the c
  • ndition
(D sur j ) f (w)(domA (op)) = B (op) 1 (f (v )(A (v ))) F
  • r
pr e dic ates p : w !
  • we
have f (w)(domA (p)) = domB (p ) in this c ase. In general full
  • homomorphims
are not closed under comp
  • sition.
But full and surjectiv e
  • homomorphims
are closed under comp
  • sition.
Prop
  • sition
5.2.5 (Comp
  • sition
  • f
  • Homomorphisms)
L et b e given two
  • homomorphisms
f : A ! B and g : B ! C . 1. The S
  • indexe
d identic al mapping id A = (id A(s) : A(s) ! A (s) j s 2 S ) : A(S ) ! A(S ) is a close d
  • homomorphism
id A : A ! A. 2. The c
  • mp
  • sition
g
  • f
: A(S ) ! C (S )
  • f
the underlying S
  • mappings
is also a
  • homo-
morphisms g
  • f
: A ! C . 3. g
  • f
is a ful l
  • homomorphisms
pr
  • vide
d that g is ful l and f is ful l and surje ctive. 4. g
  • f
is a close d
  • homomorphisms
pr
  • vide
d that g and f ar e close d. Denition and Prop
  • sition
5.2.6 (Category
  • f
P artial
  • Algebras)
F
  • r
ev ery signature
  • 2
jS I GN P A j the category M
  • d
P A () has
  • partial
  • algebras
A as in Denition 5.2.1 as
  • b
jects and
  • homomorphisms
f : A ! B as in Denition 5.2.3 as morphisms. Pro
  • f.
According to Prop
  • sition
5.2.5 M
  • d
P A () really b ecomes a category . 2 No w w e consider the translation
  • f
categories
  • f
partial algebras w.r.t. signature morphisms. 30
slide-35
SLIDE 35 Denition and Prop
  • sition
5.2.7 (F
  • rgetful
F unctor) F
  • r
ev ery signature morphism
  • :
  • 1
!
  • 2
w e can dene a forgetful functor M
  • d
P A () : M
  • d
P A ( 2 ) ! M
  • d
P A ( 1 ) , as follo ws:
  • n
  • b
jects: F
  • r
ev ery partial
  • 2
  • algebra
A 2 w e ha v e a partial
  • 1
  • algebra
M
  • d
P A () (A 2 ) giv en b y M
  • d
P A () (A 2 )(s 1 ) = D ef A 2 ((s 1 )) for ev ery s 1 2 S 1 , M
  • d
P A () (A 2 )(op 1 ) = D ef A 2 ((op 1 )) for ev ery
  • p
1 : w 1 ! v 1 2 O P
  • 1
.
  • n
morphisms: F
  • r
ev ery
  • 2
  • homomorphism
f 2 : A 2 ! B 2 w e ha v e a
  • 1
  • homomorphism
M
  • d
P A ()(f 2 ): M
  • d
P A ()(A 2 ) ! M
  • d
P A ()(B 2 ) giv en b y M
  • d
P A () (f 2 )(s 1 ) = D ef f 2 ((s 1 )) for ev ery s 1 2 S 1 . Pro
  • f.
1. Iden tities are preserv ed: Let A 2 b e a
  • 2
  • mo
del with iden tit y id A 2 : A 2 ! A 2 . Then w e ha v e for ev ery s 1 2 S 1 M
  • d
P A ()(id A 2 )(s 1 ) = id A 2 ((s 1 )) = id M
  • d
P A ()(A 2 ) (s 1 ). 2. Compatibilit y with comp
  • sition:
Let f 2 : A 2 ! B 2 and g 2 : B 2 ! C 2 b e t w
  • 2
  • homomor-
phisms. Then w e ha v e for ev ery s 1 2 S 1 M
  • d
P A ()(g 2
  • f
2 )(s 1 ) = (g 2
  • f
2 )((s 1 )) = g 2 ((s 1 ))
  • f
2 ((s 1 )) = M
  • d
P A () (g 2 )(s 1 )
  • M
  • d
P A ()(f 2 )(s 1 ). 2 Denition and Prop
  • sition
5.2.8 (Mo del F unctor M
  • d
P A ) The pair (M
  • d
P A;O bj ; M
  • d
P A;M
  • r
)
  • f
mappings M
  • d
P A;O bj : jS I GN P A j ! jC AT
  • p
j and M
  • d
P A;M
  • r
: M
  • r
(S I GN P A ) ! M
  • r
(C AT
  • p
) giv en b y M
  • d
P A;O bj ( ) = D ef M
  • d
P A () for ev ery
  • 2
jS I GN P A j , and M
  • d
P A;M
  • r
() = D ef M
  • d
P A () for ev ery
  • :
  • 1
!
  • 2
2 M
  • r
(S I GN P A ) denes the mo del functor M
  • d
P A : S I GN P A ! C AT
  • p
. Pro
  • f.
M
  • d
P A is w ell-dened according to 5.2.6 and 5.2.7. The functor prop erties M
  • d
P A (I d
  • )
= I d M
  • d
P A () for ev ery
  • 2
jS I GN P A j and M
  • d
P A (
  • )
= M
  • d
P A ()
  • M
  • d
P A ( ) for all
  • :
  • 1
!
  • 2
, :
  • 2
!
  • 3
in S I GN P A are also ensured b y denition 5.2.6 and 5.2.7. 2 31
slide-36
SLIDE 36 5.3 The Sen tence F unctor S en P A General Assumption 5.3.1 (Store
  • f
V ariable Sym b
  • ls)
The store
  • f
v ariable sym b
  • ls
is assumed to b e a coun table set
  • f
sym b
  • ls
dieren t from all
  • ther
sym b
  • ls
used in the institution I P A . Denition 5.3.2 (S
  • System
  • f
V ariables) F
  • r
a signature
  • =
(S ; O P
  • )
an S
  • system
X
  • f
v ariables is an S
  • indexed
set X = (X (s ) j s 2 S ) with X (s)
  • for
all s 2 S and s 1 6= s 2 = ) X (s 1 ) \ X (s 2 ) = ; for all s 1 ; s 2 2 S . Since w e allo w predicate sym b
  • ls
p : w !
  • w
e can not
  • nly
construct terms
  • f
regular sorts s 2 S but also terms
  • f
the `sort' . But
  • denotes
the empt y sequence in S
  • and
is not a sort sym b
  • l
itselfs. General Assumption 5.3.3 (Predicate Sym b
  • l)
The predicate sym b
  • l
  • is
assumed to b e a distinguished sym b
  • l
predened for the institution I P A . Giv en a set S
  • f
sort sym b
  • ls
w e denote b y S
  • =
S [ f g the extension
  • f
S b y
  • .
F urther the sort comp
  • nen
t : S 1 ! S 2
  • f
a signature morphism
  • :
  • 1
!
  • 2
will b e also considered as a mapping : S
  • 1
! S
  • 2
where ( ) =
  • .
F
  • r
a partial
  • algebra
A = (A(S ); A(O P
  • )
) w e set A( ) = D ef A() = fg (cf. section 2.1) and extend in suc h a w a y the S
  • indexed
set A(S ) = (A(s) j s 2 S ) canonically to an S
  • indexed
set A(S
  • )
= (A(v ) j v 2 S
  • ).
Denition 5.3.4 (-T erm) F
  • r
a signature
  • =
(S ; O P
  • )
and an S
  • system
X
  • f
v ariables the S
  • indexed
set T(; X )
  • =
(T(; X )
  • (v
) j v 2 S
  • )
  • f
all
  • terms
  • v
er X is dened to b e the smallest S
  • indexed
set suc h that 1. X (s)
  • T(;
X )
  • (s)
for ev ery s 2 S , 2. hi 2 T( ; X )
  • (
), 3. c (t) 2 T(; X )
  • (s)
for ev ery c :
  • !
s 2 O P
  • ,
s 2 S , and all t 2 T( ; X )
  • (
), 4. p(t 1 ; : : : ; t n ) 2 T(; X )
  • (
) for ev ery p : w !
  • 2
O P
  • with
w = s 1 : : : s n , 1
  • n
and all t i 2 T(; X )
  • (s
i ) , 1
  • i
  • n.
5.
  • p(t
1 ; : : : ; t n ) 2 T(; X )
  • (s)
for ev ery
  • p
: w ! s 2 O P
  • with
w = s 1 : : : s n , 1
  • n
and all t i 2 T(; X )
  • (s
i ) , 1
  • i
  • n.
The terms in T(; X )
  • (
) are referred to as predicativ e
  • terms.
Remark 5.3.5 (Sp ecial T erms) 1. The
  • terms
p(t 1 ; : : : ; t n ) and
  • p(t
1 ; : : : ; t n ) in Denition 5.3.4 wil l b e also denote d by p(t) and
  • p(t)
r esp e ctively wher e t = (t 1 ; : : : ; t n ) 2 T(; X )
  • (w)
is the c
  • rr
esp
  • nding
n-tuple
  • f
  • terms.
32
slide-37
SLIDE 37 2. A c c
  • r
ding to rule (2) and (3) ther e is a term c(hi ) 2 T(; X )
  • (s)
for every c
  • nstant
symb
  • l
c :
  • !
s . But additional ly we have for every pr e dic ative term p(t 1 ; : : : ; t n ) 2 T(; X )
  • ()
a term c(p (t 1 ; : : : ; t n )) 2 T( ; X )
  • (s)
also with the symb
  • l
c
  • n
top. Semantic al ly this c an b e interpr ete d as a \r estricte d c
  • nstant",
i.e. a c
  • nstant
  • nly
dene d if p(t 1 ; : : : ; t n ) b e c
  • mes
true. 3. Contr ary to the institution I AS
  • f
A lgebr aic Systems pr e dic ative terms ar e al lowe d to b e- c
  • me
subterms
  • f
  • ther
terms. Denition 5.3.6 (Existence
  • Equation)
F
  • r
a signature
  • =
(S ; O P
  • )
an existence
  • equations
(X ; l e = r )
  • v
er an S
  • system
X
  • f
v ariables is giv en b y t w
  • terms
l ; r 2 T( ; X )
  • (v
), v 2 S
  • .
Note, that in l and r
  • nly
  • ccur
v ariables from X . But,
  • n
the
  • ther
side there can b e v ariables in X not
  • ccuring
in l and r . Denition 5.3.7 (Conditional Existence
  • Equation)
F
  • r
a signature
  • =
(S ; O P
  • )
and an S
  • system
X
  • f
v ariables a conditional existence
  • equation
cee
  • v
er X is cee = (X : l 1 e = r 1 ; : : : ; l n e = r n = ) l e = r ) , with
  • n
where (X ; l 1 e = r 1 ) ; : : : ; (X ; l n e = r n ) , and (X ; l e = r ) are existence
  • equations
  • v
er X . By Cee(; X ) w e denote the set
  • f
all conditional existence
  • equations
  • v
er X , and Cee( ) = D ef S (Cee( ; X ) j X
  • is
an S
  • system
  • f
v ariables). is the set
  • f
all conditional existence
  • equations.
W e dra w atten tion to the fact that an equation (X : l = r ) in the sense
  • f
the institution I E Q (cf. Denition 3.3.5) is not equiv alen t to an existence equation (X ; l e = r ). (X : l = r ) has to b e in terpreted as a conditional existence equation (X : ; = ) l e = r ) with an empt y premise. F
  • r
an algebra A the seman tics
  • f
(X ; l e = r ) will b e the set
  • f
solutions
  • f
(X ; l e = r ) in A. Con trary the seman tics
  • f
(X : l = r )
  • r
(X : ; = ) l e = r ) in A will b e a truth v alue. Denition 5.3.8 (T ranslation
  • f
T erms) Let b e giv en t w
  • signatures
  • 1
= (S 1 ; O P
  • 1
) ,
  • 2
= (S 2 ; O P
  • 2
) , a signature morphism
  • :
  • 1
!
  • 2
, and an S 1
  • system
X 1
  • f
v ariables. W e dene an S 2
  • system
X 2
  • f
v ariables as follo ws X 2 (s 2 ) = D ef S (X 1 (s 1 ) j s 1 2 S 1 ;
  • (s
1 ) = s 2 ) for all s 2 2 S 2 . F urther the translation
  • :
T( 1 ; X 1 )
  • !
T( 2 ; X 2 )
  • f
  • 1
  • terms
is an S
  • 1
  • indexed
family
  • f
maps (v 1 ) : T( 1 ; X 1 )
  • (v
1 ) ! T( 2 ; X 2 )
  • ((v
1 )) , v 1 2 S
  • 1
giv en b y 1. (s 1 )(x 1 ) = D ef x 1 for eac h x 1 2 X 1 (s 1 ), s 1 2 S 1 , 2. ( )(hi ) = D ef hi , 3. (s 1 )(c 1 (t)) = D ef (c 1 )( ( )(t )) for ev ery c 1 :
  • 1
! s 1 2 O P
  • 1
and all t 2 T( 1 ; X 1 )
  • (
), 4. ( )(p 1 (t)) = D ef (p 1 )( (w 1 )(t )) for ev ery p 1 : w 1 !
  • 1
2 O P
  • 1
with w 1 = s 1 : : : s n , 1
  • n
and all t 2 T( 1 ; X 1 )
  • (w
1 ). 33
slide-38
SLIDE 38 5. (s 1 )(op 1 (t)) = D ef (op 1 )((w 1 )(t)) for ev ery
  • p
1 : w 1 ! s 1 2 O P
  • 1
with w = s 1 : : : s n , 1
  • n
and all t 2 T( 1 ; X 1 )
  • (w
1 ). General Assumption 5.3.9 1. The comp
  • nen
ts
  • f
X 2 are pairwise disjoin t, th us X 2 really b ecomes an S 2
  • system
  • f
v ariables. X 2 will b e also denoted b y (X 1 ) to p
  • in
t
  • ut
that this system
  • f
v ariables is induced b y X 1 and
  • .
2. If there is no am biguit y , w e will write (t) instead
  • f
(w 1 )(t) if t 2 T( 1 ; X 1 )
  • (w
1 ). Denition and Prop
  • sition
5.3.10 (T ranslation
  • f
Sen tences) F
  • r
an y signature morphism
  • :
  • 1
!
  • 2
the translation
  • :
T( 1 ; X 1 )
  • !
T( 2 ; X 2 )
  • f
terms can b e extend to a translation
  • f
conditional existence equations
  • :
Cee ( 1 )
  • !
Cee ( 2 ) where for ev ery cee = (X 1 : l 1 e = r 1 ; : : : ; l n e = r n = ) l e = r ) 2 Cee ( 1 ) : (cee) = D ef ((X 1 ) : (l 1 ) e = (r 1 ); : : : ;
  • (l
n ) e =
  • (r
n ) = ) (l ) e = (r )) : Denition and Prop
  • sition
5.3.11 (Sen tence F unctor S en P A ) The sen tence functor S en P A : S I GN P A ! S E T is giv en b y: 1. S en P A () = D ef Cee( ) for ev ery signature
  • 2
jS I GN P A j and 2. S en P A () = D ef
  • :
Cee ( 1 ) ! Cee( 2 ) for ev ery signature morphims
  • :
  • 1
!
  • 2
in S I GN P A . Pro
  • f.
W e ha v e to sho w that the iden tities and the comp
  • sition
are preserv ed b y S en P A . But, this follo ws immediately from the denitions and prop
  • sitions
ab
  • v
e. 2 The functor S en P A : S I GN P A ! S E T tak es eac h signature to the set
  • f
all conditional existence equations
  • v
er this signature and eac h signature morphism to a morphism, whic h translates the conditional existence equations along the signature morphism. 5.4 The Satisfaction Condition in I P A In this section w e consider the satisfaction
  • f
conditional existence equations in partial algebras. F urther w e sho w for signature morphisms the compatibilit y
  • f
satisfaction w.r.t. the translation
  • f
conditional existence equations in
  • ne
direction and the translation
  • f
partial algebras in the
  • ther
direction. Firstly w e dene the ev aluation
  • f
terms for an assignmen t
  • f
v ariables in a giv en partial algebra. Con trary to the institutions I E Q and I AS the ev aluation
  • f
terms in I P A b ecomes
  • b
viously partial, i.e. a term t will b e ev aluable for some assignmen ts and will b e not ev aluable for
  • ther
assignmen ts. Denition 5.4.1 (Assignmen t
  • f
V ariables) Let b e giv en a signature
  • =
(S ; O P
  • ),
a partial
  • algebra
A, and an S
  • system
X
  • f
v ariables. An assignmen t a : X ! A (S ) for X in A is an S {indexed family
  • f
maps a = (a(s) : X (s) ! A(s) j s 2 S ): 34
slide-39
SLIDE 39 Denition 5.4.2 (Ev aluable
  • {T
erms) Let b e giv en a signature
  • =
(S ; O P
  • ),
a partial
  • algebra
A, and an S
  • system
X
  • f
v ariables. F
  • r
an assignmen t a : X ! A(S ) , the S
  • indexed
set T(a)
  • =
(T(a)
  • (v
) j v 2 S
  • )
  • T(;
X )
  • f
all a-ev aluable
  • terms
and the corresp
  • nding
partial ev aluation a: T(a)
  • !
A(S
  • )
  • f
  • terms,
i.e. the S
  • indexed
family
  • f
maps a = (a(v ) : T(a)
  • (v
) ! A(v ) j v 2 S
  • )
are inductiv ely dened as follo ws: 1. for ev ery s 2 S : (a) X (s)
  • T(a)
  • (s),
(b) a(s)(x ) = D ef a(s)(x) for eac h x 2 X (s) ; 2. (a) hi 2 T(a)
  • (
) , (b) a( )(hi ) = D ef
  • ;
3. for ev ery c :
  • !
s 2 O P
  • ,
s 2 S , and all t 2 T(; X )
  • (
): (a) c (t) 2 T(a)
  • (s)
i t 2 T(a)
  • (
) and domA(c ) = fg , (b) a(s)(c (t)) = D ef A(c )( ) if c(t) 2 T(a)
  • (s)
; 4. for ev ery p : w !
  • 2
O P
  • with
w = s 1 : : : s n , 1
  • n
and all t i 2 T(; X )
  • (s
i ), 1
  • i
  • n
: (a) p(t 1 ; : : : ; t n ) 2 T(a)
  • (
) i t i 2 T(a)
  • (s
i ) for 1
  • i
  • n
and (a(s 1 )(t 1 ); : : : ; a(s n )(t n )) 2 domA(p ) , (b) a( )(p (t 1 ; : : : ; t n ) ) = D ef
  • if
p(t 1 ; : : : ; t n ) 2 T(a)
  • (
) ; 5. for ev ery
  • p
: w ! s 2 O P
  • with
w = s 1 : : : s n , 1
  • n
and all t i 2 T(; X )
  • (s
i ) , 1
  • i
  • n:
(a)
  • p(t
1 ; : : : ; t n ) 2 T(a)
  • (s)
i t i 2 T(a)
  • (s
i ) for 1
  • i
  • n
and (a(s 1 )(t 1 ); : : : ; a(s n )(t n )) 2 domA(op ) , (b) a(s)(op (t 1 ; : : : ; t n ) ) = D ef A(op )(a(s 1 )(t 1 ); : : : ; a(s n )(t n )) if
  • p(t
1 ; : : : ; t n ) 2 T(a)
  • (s
) . Note, that the single elemen t
  • in
A( ) = A () pla ys the r^
  • le
  • f
the truth v alue true. Denition 5.4.3 (Solution
  • f
Existence
  • Equation)
Let b e giv en a signature
  • =
(S ; O P
  • ),
a partial
  • algebra
A, and an S
  • system
X
  • f
v ariables. An assignmen t a : X ! A (S ) for X in A is a solution
  • f
an existence
  • equation
(X ; l e = r ) with l ; r 2 T(; X )
  • (v
); v 2 S
  • in
A , A ; a j =
  • (X
; l e = r ) in sym b
  • ls,
i l and r are a-ev aluable to the same v alue, i.e. i l ; r 2 T(a)
  • (v
) and a(l ) = a(r ): 35
slide-40
SLIDE 40 Denition 5.4.4 (Satisfaction Relation) F
  • r
ev ery signature
  • =
(S ; O P
  • )
the satisfaction relation j =
  • jM
  • d
P A ( )j
  • S
en P A ( ) is dened as follo ws: A conditional existence
  • equation
(X : l 1 e = r 1 ; : : : ; l n e = r n = ) l e = r ) 2 S en P A ( ) is satised in a partial
  • algebra
A 2 jM
  • d
P A ( )j , i.e. A j =
  • (X
: l 1 e = r 1 ; : : : ; l n e = r n = ) l e = r ) ; i for all assignmen ts a : X ! A(S ) : n ^ i=1 A ; a j =
  • (X
; l i e = r i ) = ) A ; a j =
  • (X
; l e = r ) : The compatibilit y
  • f
the satisfaction relations with signature morphisms is essen tially based
  • n
the translation
  • f
assignmen ts and
  • f
ev aluations along signature morphisms. Denition 5.4.5 (Corresp
  • nding
Assignmen ts) F
  • r
a signature morphism
  • :
  • 1
!
  • 2
, a partial
  • 2
  • algebra
A 2 , and an S 1
  • system
X 1
  • f
v ari- ables let (X 1 ) b e the
  • 2
  • system
  • f
v ariables according to 5.3.8 and 5.3.9. Then for ev ery assignmen t a 1 : X 1 ! M
  • d
P A () (A 2 )(S 1 ) there is an assignmen t a 2 : (X 1 ) ! A 2 (S 2 ) dened b y a 2 ((s 1 ))(x ) = D ef a 1 (s 1 )(x) for ev ery s 1 2 S 1 and all x 2 X 1 (s 1 )
  • (X
1 )((s 1 )). Con v ersely this equation denes for ev ery assignmen t a 2 : (X 1 ) ! A 2 (S 2 ) an assignmen t a 1 : X 1 ! M
  • d
P A () (A 2 )(S 1 ), i.e. a 1 (s 1 )(x ) = D ef a 2 ((s 1 ))(x ) for ev ery s 1 2 S 1 and all x 2 X 1 (s 1 )
  • (X
1 )((s 1 )). (a 1 ; a 2 ) is called a pair
  • f
corresp
  • nding
assignmen ts. Next w e can sho w that the translation
  • f
terms do es not c hange the results
  • f
ev aluations. Prop
  • sition
5.4.6 (Corresp
  • nding
P artial Ev aluations) L et b e given a signatur e morphism
  • :
  • 1
!
  • 2
, a p artial
  • 2
  • algebr
a A 2 , an S 1
  • system
X 1
  • f
variables and a p air (a 1 ; a 2 )
  • f
c
  • rr
esp
  • nding
assignments. Then we
  • btain
due to Denition 5.4.2 a p air
  • f
corresp
  • nding
partial ev aluations a 1 : T(a 1 )
  • !
M
  • d
P A () (A 2 )(S
  • 1
) and a 2 : T(a 2 )
  • !
A 2 (S
  • 2
) such that for al l
  • 1
  • terms
t 2 T( 1 ; X 1 )(s 1 ), s 1 2 S 1 : 1. t 2 T(a 1 )
  • (s
1 ) i (t) 2 T(a 2 )
  • ((s
1 )), and 2. a 1 (s 1 )(t) = a 2 ((s 1 ))( (t )) if t 2 T(a 1 )
  • (s
1 ). Pro
  • f.
By structural induction according to the inductiv e denitions
  • f
the partial ev aluation
  • f
terms in 5.4.2 and
  • f
the translation
  • f
terms in 5.3.10. Compare the pro
  • fs
  • f
the analog results in the institutions I E Q , I AS , and I C A . 2 Theorem 5.4.7 (Satisfaction Condition) F
  • r
every signatur e morphism
  • :
  • 1
!
  • 2
, every p artial
  • 2
  • algebr
a A 2 , and every c
  • nditional
existenc e
  • 1
  • e
quation cee = (X 1 : l 1 e = r 1 ; : : : ; l n e = r n = ) l e = r ) the satisfaction c
  • ndition
A 2 j =
  • 2
S en P A ()(cee ) ( ) M
  • d
P A () (A 2 ) j =
  • 1
cee: holds (cf. Denition 2.3.1). 36
slide-41
SLIDE 41 Pro
  • f.
Due to Denition 5.4.3 and Prop
  • sition
5.4.6 w e ha v e for eac h pair (a 1 ; a 2 )
  • f
corre- sp
  • nding
assignmen ts and eac h existence
  • 1
  • equation
(X 1 ; l e = r ) A 2 ; a 2 j =
  • 2
((X 1 );
  • (l
) e = (r ) ( ) M
  • d
P A () (A 2 ); a 1 j =
  • 1
(X 1 ; l e = r ) th us the satisfaction condition follo ws immediately from Denition 5.4.4. 2 Denition and Prop
  • sition
5.4.8 (Institution I P A ) The follo wing four comp
  • nen
ts:
  • the
category S I GN P A due to Prop
  • sition
5.1.5,
  • the
mo del functor M
  • d
P A : S I GN P A ! C AT
  • p
due to Prop
  • sition
5.2.8,
  • the
sen tence functor S en P A : S I GN P A ! S E T due to Prop
  • sition
5.3.11, and
  • the
family (j =
  • j
  • 2
jS I GN P A j)
  • f
satisfaction relations due to Denition 5.4.4 form the institution I P A
  • f
P artial Algebras. Pro
  • f.
The satisfaction condition holds due to Theorem 5.4.7. 2 37
slide-42
SLIDE 42 Chapter 6 The Institution
  • f
Con tin uous Algebras 6.1 The Category S I GN Denition 6.1.1 (Signature) A signature
  • =
(S ; O P ; dom ; co d) consists
  • f
  • a
nite set
  • f
sort sym b
  • ls
S ,
  • a
nite set
  • f
  • p
eration sym b
  • ls
O P ,
  • a
domain function dom : O P ! S
  • ,
and
  • a
co domain function co d : O P ! S . Remark 6.1.2 1. F
  • r
e ase
  • f
r e adability we intr
  • duc
e some abbr eviations. If no c
  • nfusion
arises
  • r
the missing information is cle ar by the c
  • ntext
we write
  • (S
; O P ) inste ad
  • f
(S ; O P ; dom ; co d),
  • p
: s 1 : : : s n ! s
  • r
  • p
: w ! s if dom (op) = s 1 : : : s n = w and co d(op) = s. 2. Pay attention to the functions dom and co d . We intr
  • duc
e d them to exclude
  • verlo
ading
  • f
the
  • p
er ations, although
  • verlo
ading is a desir able pr actic al fe atur e. Example 6.1.3 (Signature for Streams) A STREAM = f sort Stream, Elem &: Elem
  • Stream
! Stream Stream generated b y ?, & g 2 38
slide-43
SLIDE 43 Denition 6.1.4 (Signature Morphism) Let
  • 1
= (S 1 ; O P 1 ; dom 1 ; co d 1 ) and
  • 2
= (S 2 ; O P 2 ; dom 2 ; co d 2 ) b e signatures. A signature mor- phism
  • :
  • 1
!
  • 2
is a pair ( S ,
  • O
P )
  • f
functions
  • S
: S 1 ! S 2 and
  • O
P : O P 1 ! O P 2 satisfying the follo wing compatibilit y conditions for ev ery
  • p
1 2 O P 1 : dom 2 ( O P (op 1 )) =
  • S
(dom 1 (op 1 )); co d 2 ( O P (op 1 )) =
  • S
(co d 1 (op 1 )); where
  • S
( 1 ) =
  • 2
and
  • S
(w 1 ) =
  • S
(s 1 ) : : :
  • S
(s n ) for ev ery w 1 = s 1 : : : s n 2 S
  • 1
. Remark 6.1.5 T
  • minimize
the numb er
  • f
unne c essary r ep etitions the r e ader should ke ep in mind that we ne gle ct subscripts r esp e ctively sup erscripts if they ar e given by the c
  • ntext.
In this p articular c ase we write (s) inste ad
  • f
  • S
(s) and (op) inste ad
  • f
  • O
P (op), if p
  • ssible.
F urther it should b e
  • bvious,
that writing
  • :
  • 1
!
  • 2
we assume that
  • i
= (S i ; O P i ; dom i ; co d i ) for i = 1,2 ar e implicitly given. A bbr eviations
  • f
this kind wil l b e made in the fol lowing without additional r emark. F act 6.1.6 (Category S I GN ) S I GN, consisting
  • f
  • signatures
as in denition 6.1.1 as
  • b
jects,
  • signature
morphisms as in denition 6.1.4 as morphisms forms a category , where
  • the
iden tities are pairs
  • f
iden tities,
  • the
comp
  • sition
is dened comp
  • nen
t wise. Pro
  • f.
F
  • llo
ws immediately from the prop erties in the category S E T and the compatibilit y
  • f
signature morphisms with the domain resp ectiv ely co domain functions. 2 6.2 The Mo del F unctor M
  • d
C A 6.2.1 The Category M
  • d
C A ()
  • f
Con tin uous Algebras Occasionally requiremen ts arise where the w ell-kno wn algebraic metho ds aren't sucen t. F
  • r
instance, dening algebraic seman tics
  • f
recursiv e program sc hemes
  • r
the description
  • f
innite
  • b
jects lik e streams. T
  • deal
prop erly with recursion, xp
  • in
t tec hniques are an usefull to
  • l,
esp ecially in functional programming. F
  • r
that purp
  • se,
the mo dels ha v e to b e equipp ed with complete partial
  • rders.
Ho w ev er, the algebraic approac h do es not imp
  • se
an y c hoice b et w een the v arious notions
  • f
completeness. Resp ecting the seman tic
  • f
Spectr um (see [GR92 ]) w e c hose !
  • complete
partial
  • rders
for the carriers, i.e. for ev ery coun table c hain exists a least upp er b
  • und,
and !
  • con
tin uous functions for the
  • p
erations, i.e. functions preserving least upp er b
  • unds.
Con tin uous mo dels are adv an tageous since all their nite elemen ts are denotable as usual and b eha viour
  • f
the innite elemen ts ma y b e inferred from the nite appro ximations b ecause the
  • p
erations are assumed to b e con tin uous. Denition 6.2.1 (!
  • Con
tin uous
  • mo
del) Let
  • =
(S ; O P ) b e a signature. An !
  • con
tin uous
  • mo
del A = (A(S ); A (O P ); v A ) is giv en b y 39
slide-44
SLIDE 44
  • (A(S
), v A ) = ((A (s); v A(s) ) j s 2 S ) is an S
  • indexed
family
  • f
!
  • complete
partial
  • rders,
  • A(O
P ) = (A(op ) j
  • p
2 O P ) is an O P
  • indexed
family
  • f
!
  • con
tin uous functions with A(op) : A(s 1 )
  • :
: :
  • A(s
n ) ! A(s) if dom (op) = s 1 : : : s n and co d (op ) = s. Remark 6.2.2 1. F
  • r
the denition
  • f
!
  • c
  • mplete
p artial
  • r
ders (!
  • cp
  • )
and !
  • c
  • ntinuous
functions se e in the app endix denitions A:1:8 and A:1:14. However, it is worth noticing the existenc e
  • f
a le ast element ? A(s) for every sort s 2 S . 2. The domain
  • f
mo del functions is wel l-dene d, i.e. for every
  • p
: s 1 : : : s n ! s 2 O P is A(s 1 )
  • :
: :
  • A
(s n ) =: A(w ) an !
  • cp
  • with
the natur al
  • r
dering x v A(w ) y ( ) x i v A(s i ) y i for every i = 1; : : : ; n; wher e x = (x 1 ; : : : ; x n ), y = (y 1 ; : : : ; y n ). Se e also pr
  • p
  • sition
A:1:13 in the app endix. Denition 6.2.3 (!
  • Con
tin uous
  • morphism)
Let
  • =
(S ; O P ) b e a signature and A, B b e !
  • con
tin uous
  • mo
dels. An S
  • indexed
mapping f = (f (s) : A(s) ! B (s) j s 2 S ): A ! B is called !
  • con
tin uous
  • morphism,
if the follo wing three conditions hold:
  • f
(s) (A(op)(a 1 ; : : : ; a n ) ) = B (op )(f (s 1 ) (a 1 ), : : : , f (s n ) (a n )) for ev ery
  • p
: s 1 : : : s n ! s 2 O P and a i 2 A(s i ), i = 0; : : : ; n,
  • f
(s) is !
  • con
tin uous for ev ery s 2 S ,
  • f
(s) is strict for ev ery s 2 S , i.e. f (s)(? A(s) ) = ? B (s) . Remark 6.2.4 1. Me anwhile it should b e familiar to intr
  • duc
e the fol lowing abbr eviation: f (s) (A(op)(a)) = B (op )(f (w )(a)) for every
  • p
: w ! s, w = s 1 : : : s n , a = (a 1 ; : : : ; a n ) 2 A (w). 2. The strictness c
  • ndition
for !
  • c
  • ntinuous
  • morphisms
isn 't ne c essary at the moment, but r esp e cting pr
  • p
erties like initiality
  • f
the mo del
  • f
terms we chose morphisms as dene d. No w w e are in p
  • sition
to build the category M
  • d
C A ()
  • f
!
  • con
tin uous
  • mo
dels and !
  • con
tin uous
  • morphisms
for ev ery signature . Prop
  • sition
6.2.5 (The Category M
  • d
C A ( )) F
  • r
every signatur e
  • is
M
  • d
C A (), c
  • nsisting
  • f
  • !
  • c
  • ntinuous
  • mo
dels as
  • bje
cts,
  • !
  • c
  • ntinuous
  • morphisms
as morphisms, a c ate gory (the mo del c ate gory), wher e
  • the
identity is the identity
  • n
every c
  • mp
  • nent,
  • the
c
  • mp
  • sition
is dene d c
  • mp
  • nentwise.
Pro
  • f.
The prop
  • sition
follo ws immediately b y the prop erties in the category S E T and the fact that strict !
  • con
tin uous functions are closed under comp
  • sition.
See prop
  • sition
A.1.16 in the app endix. The asso ciativit y follo ws from the asso ciativit y
  • f
the comp
  • nen
ts. 2 40
slide-45
SLIDE 45 6.2.2 The F
  • rgetful
F unctor M
  • d
C A () In this short subsection w e consider the translation
  • f
mo del categories with resp ect to signature morphisms to get in p
  • sition
for the denition
  • f
M
  • d
C A , the mo del functor. Denition 6.2.6 (The F
  • rgetful
F unctor M
  • d
C A () ) Let
  • :
  • 1
!
  • 2
b e a signature morphism. W e dene the forgetful functor, denoted b y M
  • d
C A (): M
  • d
C A ( 2 ) ! M
  • d
C A ( 1 ), as follo ws:
  • n
  • b
jects: F
  • r
ev ery
  • 2
  • mo
del A 2 w e ha v e a
  • 1
  • mo
del M
  • d
C A () (A 2 ) giv en b y M
  • d
C A ()(A 2 )(s 1 ) = A 2 ((s 1 )) for ev ery s 1 2 S 1 , M
  • d
C A ()(A 2 )(op 1 ) = A 2 ((op 1 )) for ev ery
  • p
1 : w 1 ! s 1 2 O P 1 , v M
  • d
C A ()(A 2 )(s 1 ) = v A 2 ((s 1 )) for ev ery s 1 2 S 1 .
  • n
morphisms: F
  • r
ev ery
  • 2
  • morphism
f 2 : A 2 ! B 2 w e ha v e a
  • 1
  • morphism
M
  • d
C A ()(f 2 ): M
  • d
C A () (A 2 ) ! M
  • d
C A () (B 2 ) giv en b y M
  • d
C A ()(f 2 )(s 1 ) = f 2 ((s 1 )) for ev ery s 1 2 S 1 . The denition
  • f
M
  • d
C A ()(A 2 ) is w ell-dened, since the !
  • completeness
  • f
the sorts is inher- ited as w ell as the con tin uit y
  • f
the
  • p
erations. Similarly w e conclude that the
  • 1
  • morphism
M
  • d
C A () (f 2 ) in the ab
  • v
e denition is w ell-dened. Ho w ev er, the fact that M
  • d
C A () is indeed a functor is giv en in Prop
  • sition
6.2.7 F
  • r
every signatur e morphism
  • :
  • 1
!
  • 2
the for getful functor M
  • d
C A () : M
  • d
C A ( 2 ) ! M
  • d
C A ( 1 ) as dene d ab
  • ve
is a functor. Pro
  • f.
1. Iden tities are preserv ed: Let A 2 b e a
  • 2
  • mo
del with iden tit y id A 2 : A 2 ! A 2 . Then w e ha v e for ev ery s 1 2 S 1 M
  • d
C A ()(id A 2 )(s 1 ) = id A 2 ((s 1 )) = id M
  • d
C A ()(A 2 ) (s 1 ). 2. Compatibilit y with comp
  • sition:
Let f 2 : A 2 ! B 2 and g 2 : B 2 ! C 2 b e t w
  • 2
  • morphisms.
Then w e ha v e for ev ery s 1 2 S 1 M
  • d
C A () (g 2
  • f
2 )(s 1 ) = (g 2
  • f
2 )((s 1 )) = g 2 ((s 1 ))
  • f
2 ((s 1 )) = M
  • d
C A ()(g 2 )(s 1 )
  • M
  • d
C A ()(f 2 )(s 1 ). 2 Corollary 6.2.8 (The Mo del F unctor M
  • d
C A ) The denitions M
  • d
C A ( ) and M
  • d
C A () determine the mo del functor M
  • d
C A : S I GN ! C AT
  • p
. Pro
  • f.
Giv en b y the prop
  • sitions
6.1.6, 6.2.5 and 6.2.7. 2 41
slide-46
SLIDE 46 6.3 The Sen tence F unctor S en C A In this section w e consider form ulas for ev ery signature and the translation
  • f
form ulas with resp ect to a giv en signature morphism, the necessary parts for the sen tence functor. 6.3.1 The Set S en C A ( )
  • f
Conditional
  • Inequalities
The con tin uous algebra approac h imp
  • ses
some requiremen ts
  • n
the set
  • f
form ulas. W e w an t to force the mo dels to satisfy additional prop erties. In the common approac h this is done b y equations
  • r
conditional equations, for instance. Ho w ev er, for
  • ur
purp
  • se
this isn't sucen t,
  • n
accoun t
  • f
the additional partial
  • rder.
By this means w e m ust b e able to describ e this partial
  • rder.
Ob viously w e need at least inequalities, describing whic h elemen ts are part
  • f
the relation. W e decided, ho w ev er, to go a step further. W e c hose the set
  • f
conditional inequalities as the appropriate set
  • f
form ulas for
  • ur
purp
  • ses.
Moreo v er,
  • n
accoun t
  • f
the an tisymmetrie
  • f
partial
  • rders
w e are able to express equalities as w ell as conditional equalities with conditional inequalities. The fundamen tal notions for ev ery kind
  • f
form ulas are v ariables and terms. General Assumption 6.3.1 The store
  • f
v ariable sym b
  • ls
is assumed to b e a coun table set
  • f
sym b
  • ls.
Remark 6.3.2 We intr
  • duc
e d the stor e
  • f
variable symb
  • ls
to get rid
  • f
any pr
  • blems
linke d with variables. Assuming an universe
  • f
variables, not r estricte d by the c
  • untability
as ab
  • ve,
set the
  • r
etic al pr
  • blems
arise, i.e. the wel l-known set versus class pr
  • blems.
Denition 6.3.3 (-V ariable-System) Let
  • b
e the store
  • f
v ariable sym b
  • ls.
A
  • v
ariable-system X for a giv en signature
  • =
(S ; O P ) is an S
  • indexed
family
  • f
sets (X (s) j s 2 S ) with X (s)
  • for
all s 2 S and s 1 6= s 2 = ) X (s 1 ) \ X (s 2 ) = ; for all s 1 ; s 2 2 S . Remark 6.3.4 Mostly we write just
  • variable-system
X and do not mention the stor e
  • f
vari- able names . One reason to deal with con tin uous algebras is the requiremen t
  • f
innite
  • b
jects, for example streams. In the traditional algebraic approac h
  • nly
nite terms app ear. F
  • r
con tin uous alge- bras, ho w ev er, it is not sucen t to deal with nite terms
  • nly
. There is
  • ne
simple argumen t. Assuming the requiremen t to build a mo del
  • f
terms it is necessary that the terms
  • f
  • ne
sort are extendable to an !
  • cp
  • ,
dening an appropriate partial
  • rder.
The minimal condition for completeness is the least elemen t prop ert y , i.e. a complete partial
  • rder
is pro vided with a least elemen t, denoted b y ?. With the usual construction
  • f
terms there isn't an y term to pla y the part
  • f
the least elemen t. Hence w e ha v e to add a distinguishable term ? s for ev ery sort s 2 S , whic h b eha v es lik e a constan t sym b
  • l.
This means, terms are constructable up
  • n
? s as a sp ecial constan t. A t this p
  • in
t
  • ne
question arises naturally . When ? s b eha v es lik e a constan t, wh y isn't it a predened constan t sym b
  • l
for ev ery signature? The answ er is, b
  • th
w a ys are p
  • ssible.
So, wh y did w e c ho
  • se
  • ur
w a y
  • f
dropping ? s from the sky? The same question arises, talking ab
  • ut
relations lik e equalit y , inequalit y
  • ther
relations
  • r
constan ts with predened seman tic. Mostly these
  • b
jects are necessary for the construction
  • f
form ulas. F
  • rm
ulas are generated b y terms and 42
slide-47
SLIDE 47 v arious relations, lik e for instance equations. These constructors
  • f
form ulas aren't included in the signatures, b ecause there is
  • nly
  • ne
w a y
  • f
in terpretation. Ev ery signature morphism m ust assign ? s to ? s , m ust assign .=. to .=. , etc. Equally the mo del functor is forced to assign ? s to the least elemen t
  • f
the corresp
  • nding
carrier in the mo del. F
  • r
this reasons w e decided to include ? s in the generation
  • f
terms. By this means ? s arises lik e a constan t sym b
  • l
in comp
  • sed
terms and the at
  • rder
isn't the least
  • rder,
as p erhaps exp ected, since the required monoton y
  • f
the
  • p
erations implies an induced
  • rder
generated b y ? v t. F
  • r
example w e ha v e ? s i v s i t i = )
  • p(t
1 ; : : : ; ? s i ; : : : ; t n ) v s
  • p(t
1 ; : : : ; t i ; : : : ; t n ) for ev ery
  • p
: s 1 : : : s n ! s 2 O P . By this means the nite terms fail to b e !
  • complete.
So, it is necessary to extend the nite terms in a minimal w a y with innite terms, i.e. w e add limits
  • f
!
  • c
hains. In the curren t pap er
  • nly
the institution
  • f
con tin uous algebras is to b e stated, ho w ev er, in a follo wing pap er will b e describ ed that the addition
  • f
innite terms is a more general construction. F
  • r
arbitrary partial
  • rders
it is p
  • ssible
to construct the !
  • completion.
Moreo v er, this will turn
  • ut
to b e a free construction. As men tioned w e ha v e to deal with innite terms. By that w e ha v e the problem to denotate them. W e c hose the w a y
  • f
describing terms as a subset (called !
  • con
tin uous
  • terms)
  • f
partial mappings b et w een I N ? + and O P [ X . F
  • r
  • ne-sorted
signatures this is due to [GTWW77 ]. F
  • r
man y-sorted signatures there are
  • nly
a few c hanges. Denition 6.3.5 (Cp
  • f
Sym b
  • ls)
Let
  • =
(S ; O P ) b e a signature and X a
  • v
ariable-system. Dene a at
  • rder
  • f
sym b
  • ls
Sym(s) := f? s ; x ;
  • p
j x 2 X (s ); co d(op) = sg for ev ery sort s 2 S , i.e. ? s v sy m;s x for all x 2 Sym(s) . Denition 6.3.6 (!
  • Con
tin uous
  • terms)
Let
  • =
(S ; O P ) b e a signature and X a
  • v
ariable-system. W e dene the S
  • indexed
family
  • f
!
  • con
tin uous
  • terms
T(; X ) 1 = (T( ; X ) 1 (s) j s 2 S ) for ev ery s 2 S as a subset
  • f
the partial mappings I N ? +
  • !
O P [ ? [ S X (I N ? + is an abbreviation for nite sequences
  • f
p
  • sitiv
e natural n um b ers and ? = f? s j s 2 S g. A partial mapping t: I N ? +
  • !
O P [ ? [ S X is an !
  • con
tin uous
  • term
  • f
sort s 2 S , i
  • t()
2 Sym(s),
  • v
i 2 def (t) = ) v 2 def (t), v 2 I N ? + , i 2 I N and t (v ) =
  • p
with dom (op) = s 1 : : : s n , i
  • n,
  • v
2 def (t), v 2 I N ? + and t(v ) =
  • p
with dom(op ) = s 1 : : : s n , i
  • n
= ) v i 2 def (t) and t(v i) 2 Sym(s i ). Remark 6.3.7 1. The denition
  • f
!
  • c
  • ntinuous
  • terms
is b ase d up
  • n
tr e es. Se e some articial examples in 6:3:8. The tr e e pr
  • p
erty is ensur e d in the se c
  • nd
c
  • ndition,
in p articular, the domain must b e pr ex-close d. The r
  • t
t() expr esses the sort
  • f
e ach term, while the thir d c
  • ndition
guar ante es that the images ar e c
  • mp
atible with sorts and
  • p
er ations. Pay attention to the domain c
  • nditions
expr esse d by the thir d c
  • ndition:
43
slide-48
SLIDE 48 v i = 2 def (t) ( ) v = 2 def (t)
  • r
v 2 def (t), dom(t(v )) = s 1 : : : s n , i > n. 2. A n !
  • c
  • ntinuous
  • term
t is nite if jdef (t)j < 1. Ther efor e nite terms ar e dene d as usual, enriche d by a distinguishable symb
  • l
? s for every sort s 2 S . In the se quel we also use the usual denotation
  • f
nite terms if r e adability is impr
  • ve
d. 3. A n !
  • c
  • ntinuous
  • term
t is c al le d ground
  • term
if t 2 T(; ;) . Example 6.3.8 (!
  • Con
tin uous
  • terms)
Let
  • =
STREAM, stream = s, X (s) = fxg ? s & ? s x & & ? s x x . . . & & & x x x t t 1 t 2 t 3 The illustrated terms are dened b y t =
  • 7!
? s t 1 =
  • 7!
&; 11 7! ? s ; 12 7! x t 2 =
  • 7!
&; 11 7! &; 12; 112 7! x; 111 7! ? s t 3 =
  • 7!
&; 11; 111 7! &; 12; 112; 11 12 7! x ; 1111 7! ? s 2 Prop
  • sition
6.3.9 The !
  • c
  • ntinuous
  • terms
T(; X ) 1 (s) ar e !
  • c
  • mplete
for every s 2 S with r esp e ct to the fol lowing p artial
  • r
der v s : t 1 v s t 2 : ( ) def (t 1 )
  • def
(t 2 ); t 1 (v ) v sy m;s i t 2 (v ) for every v 2 def (t 1 ) with t 1 (v ) 2 Sym(s i ). Pro
  • f.
Eviden tly , v s denes a partial
  • rder.
No w, the pro
  • f
is divided in to three steps.
  • Denition
  • f
sup(G): Let G
  • T(;
X ) 1 (s) b e coun table directed. Dene sup(G) b y def (sup(G)) = [ t2G def (t) and sup (G )(v ) = max ft(v ) j t 2 G with v 2 def (t)g for ev ery v 2 def (sup(G )).
  • sup(G
) is w ell-dened: Since G is directed and v sy m;s is a at
  • rder
for ev ery s 2 S w e conclude for ev ery v 2 def (sup(G )): t 1 (v ) 6= ? s i ; t 2 (v ) 6= ? s i = ) t 1 (v ) = t 2 (v ), for all t 1 , t 2 2 G with v 2 def (t 1 ) \ def (t 2 ). Therefore is sup (G ) w ell-dened and sup (G ) 2 T(; X ) 1 (s).
  • sup(G
) is least upp er b
  • und:
By denition is def (t)
  • def
(sup(G)) and t (v ) v sy m;s i sup(G )(v ) for ev ery t 2 G and v 2 I N ? + with v 2 def (t) . By this means is sup(G) upp er b
  • und
for G. Moreo v er, sup (G ) is less than an y upp er b
  • und
b y construction. 44
slide-49
SLIDE 49 2 The partial
  • rder
  • n
!
  • con
tin uous
  • terms
together with the canonical denition
  • f
the
  • p
era- tions
  • n
terms yield !
  • con
tin uous
  • p
erations and therefore the mo del
  • f
!
  • con
tin uous
  • terms.
Denition 6.3.10 (Conditional
  • Inequalit
y) Let
  • =
(S ; O P ) b e a signature and X a
  • v
ariable-sytem. A conditional
  • inequalit
y ciq
  • v
er X is ciq = (X : l 1
  • r
1 ; : : : ; l n
  • r
n = ) l
  • r
), where l i , r i 2 T(; X ) 1 (s i ), s i 2 S i , for i = 1; : : : ; n and l, r 2 T( ; X ) 1 (s), s 2 S . W e denote the set
  • f
conditional
  • inequalities
  • v
er X b y C I Q C A ( ; X ) and the set
  • f
all conditional
  • inequalities
b y C I Q C A ( ), where C I Q C A () = [ X
  • C
I Q C A ( ; X ) : Remark 6.3.11 Note, that
  • e
qualities (X : l = r ) and c
  • nditional
  • ine
qualities with empty pr emise (X : l
  • r
) , c al le d
  • ine
qualities, ar e c
  • ver
e d. 6.3.2 The T ranslation
  • f
Sen tences S en C A () Next w e dene for ev ery signature morphism a corresp
  • nding
translation
  • f
conditional
  • inequalities,
based up
  • n
the translation
  • f
!
  • con
tin uous
  • terms.
Denition 6.3.12 (Finite Appro ximation
  • f
!
  • Con
tin uous
  • terms)
Let t 2 T(; X ) 1 b e an !
  • con
tin uous
  • term.
W e dene the set
  • f
nite appro ximations
  • f
t, Fin(t ) , b y Fin(t) = fr v t j jdef (r)j < 1g. Lemma 6.3.13 Fin(t) is dir e cte d for every t 2 T(; X ) 1 (s). Pro
  • f.
Let t 1 , t 2 2 Fin(t). Dene r 2 T(; X ) 1 (s) b y def (r ) = def (t 1 ) [ def (t 2 ) and r (v ) = 8 > > > < > > > : max(t 1 (v ); t 2 (v )) ; v 2 def (t 1 ) \ def (t 2 ); t 1 (v ) ; v 2 def (t 1 ) n def (t 2 ); t 2 (v ) ; v 2 def (t 2 ) n def (t 1 ); undened ; else: Clearly r is w ell-dened and upp er b
  • und
for t 1 and t 2 . F urther r is nite and b y denition r v t, b ecause t 1 v t and t 2 v t . Hence is r 2 Fin(t ). 2 Lemma 6.3.14 F
  • r
every t 2 T(; X ) 1 (s) holds: t = sup (Fin(t) ). Pro
  • f.
Apparen tly holds sup(Fin(t)) v t, since t is an upp er b
  • und
for Fin(t). W e dene an !
  • c
hain (t n j n 2 I N)
  • f
nite cuts b y t n (v ) = 8 > > > < > > > : t(v ) ; jv j
  • n
  • 1;
t(v ) ; jv j = n; t(v ) =
  • p
with
  • p
:
  • !
s; ? s i ; jv j = n; v = v i; t(v ) =
  • p
with
  • p
: s 1 : : : s n ! s; i
  • n;
undened ; else: 45
slide-50
SLIDE 50 for ev ery n 2 I N and v 2 I N ? + . By denition w e ha v e t n v t n+1 and t n 2 Fin(t) for ev ery n 2 I N. Since T(; X ) 1 (s) is !
  • complete
exists sup (t n j n 2 I N). By denition is t = sup (t n j n 2 I N). Since (t n j n 2 I N)
  • Fin(t
) w e ha v e t = sup (t n j n 2 I N) v sup (Fin(t) ). Summarizing holds t = sup(Fin(t)). 2 Denition 6.3.15 (T erm T ranslation) Giv en a signature morphism
  • :
  • 1
!
  • 2
and a
  • 1
  • v
ariable-system X 1
  • f
v ariables, there is an induced
  • 2
  • v
ariable-system X 2
  • f
v ariables dened b y X 2 (s 2 ) = [ (s 1 )=s 2 X 1 (s 1 ) for ev ery s 2 2 S 2 : Hence follo ws the translation
  • f
!
  • con
tin uous
  • 1
  • terms
as an S 1
  • indexed
map : T( 1 ; X 1 ) 1 ! T( 2 ; X 2 ) 1 ,
  • =
((s 1 ): T( 1 ; X 1 ) 1 (s 1 ) ! T( 2 ; X 2 ) 1 ((s 1 ))), dened for ev ery s 1 2 S 1 , t 2 T( 1 ; X 1 ) 1 (s 1 ) and v 2 I N ? + b y (s 1 )(t)(v ) = 8 > > > < > > > : ? (s 1 ) ; t(v ) = ? s 1 ; x ; t(v ) = x; x 2 X (s 1 ); (op 1 ) ; t(v ) =
  • p
1 ;
  • p
1 2 O P 1 ; undened ; else : Remark 6.3.16 1. Note, that by denition and X 1
  • T(
1 ; X 1 ) 1 it is p
  • ssible
to write X 2 = (X 1 ) F urther (X 1 ) satises the
  • 2
  • variable-system
c
  • nditions,
i.e. variables
  • f
dier ent sorts ar e distinguishable. 2. The denition
  • f
!
  • c
  • ntinuous
  • 1
  • terms
is wel l-dene d, i.e. the image (t) is an !
  • c
  • ntinuous
2
  • term,
sinc e by denition
  • f
signatur e morphisms the c
  • nditions
  • ne
and thr e e
  • f
the term denition ar e satise d and by denition
  • f
term tr anslation def (t) = def ( (t)) holds. Ther efor e the domain
  • f
(t) is pr ex-close d. F urther ar e images
  • f
innite terms again innite, as exp e cte d. The structur e is inherite d,
  • nly
the names change d. 3. F
  • r
nite terms the tr anslation
  • f
terms is exactly as usual. With the translation
  • f
terms w e are in p
  • sition
to dene the translation
  • f
form ulas, in particular
  • f
conditional
  • inequalities:
The last missing denition to determine the sen tence functor. Denition 6.3.17 (T ranslation
  • f
F
  • rm
ulas) Let
  • :
  • 1
!
  • 2
b e a signature morphism and ciq = (X 1 : l 1
  • r
1 ; : : : ; l n
  • r
n = ) l
  • r
) a con- ditional
  • 1
  • inequalit
y . The translation with resp ect to
  • is
giv en b y (ciq ) = ((X 1 ) : (l 1 )
  • (r
1 ); : : : ;
  • (l
n )
  • (r
n ) = ) (l )
  • (r
)) : Note, that (ciq ) is clearly a
  • 2
  • form
ula. Denition 6.3.18 (The Sen tence F unctor S en C A ) Dene the sen tence functor S en C A : S I GN ! S E T b y 46
slide-51
SLIDE 51 S en C A () = C I Q C A ( ) for ev ery signature , S en C A () =
  • for
ev ery signature morphism long, where
  • is
dened as in denition 6.3.17. Prop
  • sition
6.3.19 S en C A : S I GN ! S E T is a functor. Pro
  • f.
F
  • llo
ws clearly b y denition
  • f
  • n
terms and form ulas. 2 6.4 The Satisfaction Condition In this section w e consider the satisfaction relation b et w een mo dels and conditional inequalities. F urther w e pro v e the compatibilit y
  • f
term translation and mo del translation resp ecting this relation. Firstly w e dene the ev aluation
  • f
terms in a giv en mo del based
  • n
an assignmen t to v ariables. This is done almost as usual. Only for innite terms there are some quite naturally extensions. Denition 6.4.1 (Assignmen t
  • f
V ariables) Giv en an !
  • con
tin uous
  • mo
del A and a
  • v
ariable-system X . An assignmen t a: X ! A(S ) for X in A(S ) is an S {indexed family
  • f
maps a = (a(s ) : X (s ) ! A(s) j s 2 S ). Denition 6.4.2 (Ev aluation
  • f
!
  • Con
tin uous
  • terms)
Giv en an !
  • con
tin uous
  • mo
del A, a
  • v
ariable-system X and an assignmen t a: X ! A(S ), w e dene the ev aluation
  • f
!
  • con
tin uous
  • terms
a: T( ; X ) 1 ! A (S ) as an S {indexed family
  • f
maps a = (a(s) : T(; X ) 1 (s) ! A(s) j s 2 S ) dened for ev ery s 2 S , t 2 T(; X ) 1 (s) as follo ws: 1. t nite: (with usual denotation
  • f
nite terms)
  • a(s)(?
s ) = ? A(s) ,
  • a(s)(x
) = a(s)(x) for ev ery x 2 X (s),
  • a(s)(op
) = A(op) for ev ery
  • p
:
  • !
s 2 O P ,
  • a(s)(op
(r)) = A(op)(a (w)(r )) for ev ery
  • p
: w ! s 2 O P and r 2 T(; X ) 1 (w ) with jr j < 1. 2. t innite: a(s)(t ) = sup a(s)(Fin(t) ), where a(s)(Fin(t)) = fa(s)(r) j r 2 Fin(t ) g: Prop
  • sition
6.4.3 The evaluation
  • f
!
  • c
  • ntinuous
  • terms
is wel l-dene d. Pro
  • f.
F
  • r
nite terms this is w ell-kno wn. F
  • r
innite terms t 2 T(; X ) 1 (s) w e ha v e to sho w that a(s)(Fin(t)) is coun table directed (see prop
  • sition
A.1.12). The coun tabilit y is clear. Eviden tly , a(s)(Fin(t)) is directed, if a(s) is monoton for nite terms, since Fin(t ) is directed b y lemma 6.3.13. Let t 1 v t 2 for t 1 , t 2 2 Fin(t ), i.e. t 1 (v ) v sy m;s i t 2 (v ) for ev ery v 2 def (t 1 ), where t 1 (v ) 2 f? s i ; x ;
  • p
j x 2 X (s i ); co d(op ) = s i g. Then w e ha v e t 1 (v ) = ? s i
  • r
t 1 (v ) = t 2 (v ) for ev ery v 2 def (t 1 ). By this means and a(s i )(? s i ) = ? A(s i ) follo ws the monoton y
  • f
a. 2 47
slide-52
SLIDE 52 The ev aluation is also w ell-dened in the sense that it satises the !
  • con
tin uous
  • morphism
conditions. F urther the ev aluation will turn
  • ut
to b e the
  • nly
existing morphism with domain T(; ;) . So, T(; ;) is initial in M
  • d
C A () . Ho w ev er, this w asn't a pro
  • f,
  • nly
a notew
  • rth
y remark. Next w e consider the satisfaction relation b et w een !
  • con
tin uous !
  • con
tin uous
  • mo
dels and conditional
  • inequalities.
The denition is divided in to t w
  • steps.
The rst part constitutes this relation for a sub class
  • f
form ulas, for
  • inequalities,
i.e. conditional
  • inequalities
with empt y premise. By this means it is easy to dene the relation for conditional
  • inequalities.
Denition 6.4.4 (Satisfaction Relation) F
  • r
ev ery signature
  • =
(S ; O P ) there is a satisfaction relation j =
  • jM
  • d
C A ( )j
  • S
en C A ( ) based
  • n
v alidit y
  • f
assignmen ts for
  • inequalities
giv en b y A , a j =
  • (X
: l
  • r
) ( ) a(s)(l) v A(s) a(s)(r) for ev ery A 2 jM
  • d
C A ()j , for ev ery assignmen t a: X ! A(S ) and (X : l
  • r
) 2 S en C A ( ). Hence w e dene j =
  • for
conditional
  • inequalities
b y A j =
  • (X
: l 1
  • r
1 ; : : : ; l n
  • r
n = ) l
  • r
) ( ) V n i=1 A; a j =
  • (X
: l i
  • r
i ) = ) A ; a j =
  • (X
: l
  • r
); for ev ery assignmen t a : X ! A(S ) for ev ery ev ery conditional
  • inequalit
y (X : l 1
  • r
1 ; : : : ; l n
  • r
n = ) l
  • r
) 2 S en C A () and A 2 jM
  • d
C A () j. There remains to sho w the compatibilit y
  • f
satisfaction relation and translation
  • f
mo dels re- sp ectiv ely sen tences. As w e will see the main
  • bserv
ation is a bijectiv e dep endence b et w een the assignmen ts, resulting in a bijectiv e dep endence b et w een the ev aluations. Denition 6.4.5 (Corresp
  • nding
Assignmen ts) Giv en a signature morphism
  • :
  • 1
!
  • 2
, an !
  • con
tin uous
  • 2
  • mo
del A 2 , a
  • 1
  • v
ariable-system X 1 and the corresp
  • nding
  • 2
  • v
ariable-system (X 1 ) as dened in denition 6.3.15. F
  • r
ev ery assignmen t a 1 : X 1 ! M
  • d
C A () (A 2 )(S 1 ) there is an assignmen t a 2 : (X 1 ) ! A 2 (S 2 ) dened b y a 2 (s 2 )(x ) = a 1 (s 1 )(x ) for ev ery s 2 2 S 2 , where s 1 2 S 1 with (s 1 ) = s 2 and x 2 X 1 (s 1 )
  • (X
1 )(s 2 ). Con v ersely for ev ery assignmen t a 2 : (X 1 ) ! A 2 (S 2 ) there is an assignmen t a 1 : X 1 ! M
  • d
C A () (A 2 )(S 1 ) dened b y a 1 (s 1 )(x) = a 2 ((s 1 ))(x ) for ev ery s 1 2 S 1 , where x 2 X 1 (s 1 )
  • (X
1 )((s 1 )). (a 1 ; a 2 ) is called pair
  • f
corresp
  • nding
assignmen ts. F
  • r
ev ery pair
  • f
corresp
  • nding
assignmen ts w e are able to pro v e that the ev aluations yield the same v alues, since the nite appro ximations
  • f
terms are preserv ed b y term translation resp ecting an arbitrary signature morphism, what is expressed in the follo wing lemma. Lemma 6.4.6 F
  • r
every signatur e morphism
  • :
  • 1
!
  • 2
and t 2 T( 1 ; X 1 ) 1 (s 1 ), s 1 2 S 1 , we have 48
slide-53
SLIDE 53 (s 1 )(Fin(t)) = Fin((s 1 )(t )). Pro
  • f.
W e
  • mit
the simple pro
  • f.
2 Lemma 6.4.7 (Corresp
  • nding
Ev aluations) Given a signatur e morphism
  • :
  • 1
!
  • 2
, an !
  • c
  • ntinuous
  • 2
  • mo
del A 2 , a
  • 1
  • variable-system
X 1 and a p air
  • f
c
  • rr
esp
  • nding
assignments (a 1 ; a 2 ). F
  • r
every s 1 2 S 1 and t 2 T( 1 ; X 1 ) 1 (s 1 ) and every assignment a 1 : X 1 ! M
  • d
C A () (A 2 )(S 1 ) we have a 1 (s 1 )(t) = a 2 ((s 1 ))((s 1 )(t)): (a 1 ; a 2 ) is c al le d pair
  • f
corresp
  • nding
ev aluations. Pro
  • f.
1. Finite terms:
  • t
= ? s 1 : a 1 (s 1 )(? s 1 ) = ? M
  • d
C A ()(A 2 )(s 1 ) (def. a 1 ) = ? A 2 ((s 1 )) (def. M
  • d
C A () ) = a 2 ((s 1 ))(? (s 1 ) ) (def. a 2 ) = a 2 ((s 1 ))( (s 1 )(? s 1 ))) (def. )
  • t
= x, x 2 X (s 1 ): a 1 (s 1 )(x) = a 1 (s 1 )(x ) (def. a 1 ) = a 2 ((s 1 ))(x ) (def. a 2 ) = a 2 ((s 1 ))( (s 1 )(x)) (def.
  • and
a 2 )
  • t
=
  • p
1 ,
  • p
1 :
  • !
s 1 : a 1 (s 1 )(op 1 ) = M
  • d
C A ()(A 2 )(op 1 ) (def. a 1 ) = A 2 ((op 1 )) (def. M
  • d
C A ()) = a 2 ((s 1 ))( (s 1 )(op 1 )) (def.
  • and
a 2 )
  • t
=
  • p
1 (r ),
  • p
1 : w 1 ! s 1 , r 2 T( ; X ) 1 (w 1 ), jrj < 1: a 1 (s 1 )(op 1 (r)) = M
  • d
C A ()(A 2 )(op 1 )(a 1 (w 1 )(r)) (def. a 1 ) = M
  • d
C A ()(A 2 )(op 1 )(a 2 ((w 1 ))( (w 1 )(r))) (induction) = A 2 ((op 1 ))(a 2 ((w 1 ))( (w 1 )(r))) (def. M
  • d
C A ()) = a 2 ((s 1 ))((op 1 )((w 1 )(r))) (def. a 2 ) = a 2 ((s 1 ))( (s 1 )(op 1 (r))) (def. ) 2. Innite terms: a 1 (s 1 )(t) = sup a 1 (s 1 )(Fin(t)) (def. a 1 ) = sup a 2 ((s 1 ))( (s 1 )(Fin(t) )) (induction) = sup a 2 ((s 1 ))(Fin( (s 1 )(t)) ) (lemma 6.4.6) = a 2 ((s 1 ))( (s 1 )(t)) (def. a 2 ) 2 Theorem 6.4.8 (Satisfaction Condition) F
  • r
every signatur e morphism
  • :
  • 1
!
  • 2
, every !
  • c
  • ntinuous
  • 2
  • mo
del A 2 , and every c
  • ndi-
tional
  • 1
  • ine
quality ciq = (X 1 : l 1
  • r
1 ; : : : ; l n
  • r
n = ) l
  • r
) we have A 2 j =
  • 2
S en C A ()(ciq) ( ) M
  • d
C A ()(A 2 ) j =
  • 1
ciq : 49
slide-54
SLIDE 54 Pro
  • f.
F
  • llo
ws directly b y the denition
  • f
the forgetful functor M
  • d
C A () , the denition
  • f
the translation
  • f
conditional
  • inequalities
S en C A () =
  • and
lemma 6.4.7. 2 Corollary 6.4.9 The c ate gories S I GN , S E T , C AT
  • p
with the functors M
  • d
C A (se e c
  • r
  • l
lary 6:2:8) and S en C A (se e pr
  • p
  • sition
6:3:19) form an institution in the sense
  • f
[GB92], c al le d the institution
  • f
con tin uous algebras with conditional inequalities. 50
slide-55
SLIDE 55 App endix A P artial Ordered Sets Denition A.1.1 (P artial Order, T
  • tal
Order) A partial
  • rder
(p
  • set)
is a pair (M ; v M ), where M is a set and v M
  • M
  • M
is a reexiv e, (8 x 2 M : x v M x), an tisymmetric, (8 x,y 2 M : x v M y , y v M x ) y = x) and transitiv e, (8 x, y , z 2 M : x v M y , y v M z ) x v M z ). relation
  • n
M . A partial
  • rder
(M ; v M ) is a total
  • rder,
if for all x, y 2 M holds x v M y
  • r
y v M x. Denition A.1.2 (Flat Order) Let M b e an arbitrary set and ? M = 2 M . Dene canonical the at
  • rder
  • n
M [ f? M g b y x v y ( ) x = ? M
  • r
x = y , for all x, y 2 M [ f? M g . Denition A.1.3 (Cartesian Pro duct) Let (M i ; v M i ), i = 1, : : : ; n b e partial
  • rders.
The cartesian pro duct (M ; v M ) is dened b y
  • M
= M 1
  • :
: :
  • M
n ,
  • x
v M y ( ) x i v M i y i , for i = 1,: : : ; n , for ev ery x = (x 1 ; : : : ; x n ) , y = (y 1 ; : : : ; y n ) 2 M . It is easy to see that the cartesian pro duct
  • f
p
  • sets
yields a p
  • set.
Denition A.1.4 Let (M ; v M ) b e a partial
  • rder,
X
  • M
. W e dene that x 2 M is upp er b
  • und
  • f
X , if y v M x, for all y 2 X , lo w er b
  • und
  • f
X , if x v M y , for all y 2 X , least upp er b
  • und
  • f
X , if x is upp er b
  • und
and for all upp er b
  • unds
y 2 M hold: x v M y , greatest lo w er b
  • und
  • f
X , if x is upp er b
  • und
and for all upp er b
  • unds
y 2 M hold: y v M x, maxim um
  • f
X , if x is least upp er b
  • und
  • f
X and x 2 X , minim um
  • f
X , if x is greatest lo w er b
  • und
  • f
X and x 2 X . 51
slide-56
SLIDE 56 W e denote ev ery least upp er b
  • und
for X b y sup M (X ), ev ery greatest lo w er b
  • und
for X b y inf M (X ), ev ery maxim um for X b y max M (X ) and ev ery minim um for X b y min M (X ). Lik e usual w e
  • mit
the indices if they are giv en b y the con text. F urther the set
  • f
all upp er b
  • unds
  • f
X is denoted b y X u and the set
  • f
all lo w er b
  • unds
  • f
X b y X l . Denition A.1.5 (W ell-Order) A relation v
  • n
a set M is a w ell-order if for ev ery non-empt y subset X
  • M
the minim um min (X ) exists. In particular ev ery w ell-order is a total
  • rder.
Denition A.1.6 (Subsets
  • f
a P artial Order) Let (M ; v M ) b e a partial
  • rder.
A subset C
  • M
is called
  • c
hain if C is a total
  • rder,
  • !
  • c
hain if C is a c hain suc h that for ev ery x 2 C
  • nly
for a nite n um b er
  • f
elemen ts y 2 C holds: y v M x.
  • directed
set if C 6= ; and for all x, y 2 C exist z 2 C with x v M z and y v M z . Remark A.1.7 1. Evidently every !
  • chain
is a chain and every chain is a dir e cte d set. 2. We c al l (M ; v M ) strict, if sup (;) = ? M exists. Denition A.1.8 (!
  • Cp
  • )
A partial
  • rder
(M ; v M ) is called !
  • cp
  • i
for ev ery !
  • c
hain C the least upp er b
  • und
sup (C ) exists. Remark A.1.9 1. Note, that for every !
  • cp
  • exists
the le ast element ? M , sinc e the empty set is an !
  • chain
(sup(;) = ? M ). 2. Every at
  • r
der is an !
  • cp
  • sinc
e chains c
  • ntain
at most two elements. Denition A.1.10 (Sub-!
  • Cp
  • )
Let (M ; v M ) b e an !
  • cp
  • and
X
  • M
. Then X is a sub-!
  • cp
  • f
M , if for ev ery !
  • c
hain C
  • X
the least upp er b
  • und
sup X (C ) exists suc h that sup X (C ) = sup M (C ). Remark A.1.11 Mention that ? X = ? M sinc e ; is an !
  • chain.
Prop
  • sition
A.1.12 (Characterisations
  • f
!
  • cp
  • 's)
L et (M ; v M ) b e a p artial
  • r
der. Then the fol lowing c
  • nditions
ar e e quivalent: 1. F
  • r
every !
  • chain
in M exists the le ast upp er b
  • und.
2. F
  • r
every c
  • untable
chain in M exists the le ast upp er b
  • und.
3. F
  • r
every c
  • untable
dir e cte d subset
  • f
M exists the le ast upp er b
  • und.
52
slide-57
SLIDE 57 Pro
  • f.
3) = ) 2): Eviden tly b y remark A.1.7. 2) = ) 1): Eviden tly b y remark A.1.7. 1) = ) 3): Let D
  • M
b e a coun table directed set and assume the existence
  • f
sup (C ) for ev ery !
  • c
hain C
  • M
. Cho
  • se
a w ell-order
  • n
D , i.e. D = fx n g n2 I N and x n+1 = min (G nfx ; : : : ; x n g). Denote an upp er b
  • und
(w.r.t. v M ) for nite X
  • M
b y u X . De- ne an !
  • c
hain C
  • M
and an !
  • c
hains G n , C n
  • M
inductiv ely b y
  • C
= G = fx g,
  • G
n+1 = G n [ fy n+1 ; u G n [fy n+1 g g, where y n+1 = min(G nG n ) w.r.t. ,
  • C
n+1 = C n [ u G n [fy n+1 g . By denition follo ws for ev ery n 2 I N
  • y
n
  • y
n+1 , y n 6= y n+1 ,
  • G
n
  • G
n+1 , G n nite directed w.r.t. v M ,
  • C
n
  • C
n+1 , C n nite c hain,
  • F
  • r
ev ery y 2 G exists a n 2 I N with y v M max C n . Therefore w e ha v e C = [ n2I N C n is an !
  • c
hain with sup C v M u for ev ery upp er b
  • und
u 2 G u , since C
  • G.
y v M sup C for ev ery y 2 G, since y v M max C n for appropriate n2 I N . Summarizing is sup C = sup G, i.e. for ev ery G
  • M
coun table directed exists the least upp er b
  • und.
2 Prop
  • sition
A.1.13 (Cartesian Pro duct
  • f
!
  • Cp
  • 's)
The c artesian pr
  • duct
(M ; v M ) as dene d in denition A:1:3 is an !
  • cp
  • i
(M i ; v M i ) is an !
  • cp
  • for
every i = 1, : : : ; n: Pro
  • f.
The pro
  • f
is straigh t forw ard and therefore
  • mitted.
2 Denition A.1.14 (F unctions
  • n
Cp
  • 's)
Let (M 1 ; v M 1 ) and (M 2 ; v M 2 ) b e partial
  • rders
and f : M 1 ! M 2 . Then f is monoton :( ) F
  • r
ev ery nite c hain C holds: sup f (C ) exists and f (sup(C )) = sup f (C ) f is !
  • con
tin uous :( ) (M 1 ; v M 1 ) and (M 2 ; v M 2 ) are !
  • cp
  • 's
and for ev ery !
  • c
hain C holds: sup f (C ) exists and f (sup(C )) = sup f (C ) P a y atten tion to the denition
  • f
monoton functions. It is exactly as usual, i.e. f monoton :( ) x 1 v M 1 x 2 = ) f (x 1 ) v M 2 f (x 2 ) for all x 1 , x 2 2 M 1 , 53
slide-58
SLIDE 58 b ecause fx 1 , x 2 g with x 1 v x 2 is a nite c hain. Remark A.1.15 Every !
  • c
  • ntinuous
function is monoton. Prop
  • sition
A.1.16 (Comp
  • sition)
L et (M 1 ; v M 1 ) and (M 2 ; v M 2 ) b e !
  • cp
  • 's
and f : M 1 ! M 2 , g : M 2 ! M 3 b e !
  • c
  • ntinuous
functions. Then g f is !
  • c
  • ntinuous.
Pro
  • f.
Let C
  • M
1 b e an !
  • c
hain. Since f is monoton w e conclude that f (C ) is an !
  • c
hain. Then follo ws b y denition A.1.14 g (f (sup(C ))) = g (sup (f (C ))) (f !
  • con
tin uous) = sup (g (f (C ))) (g !
  • con
tin uous and f (C ) is c hain) 2 54
slide-59
SLIDE 59 Biblio graph y [A C92] E. Astesiano and M. Cerioli. Relationships b et w een Logical Framew
  • rks.
In R e c ent T r ends in Data T yp e Sp e cic ation, pages 126{143. Springer, 1992. LNCS 655. [BF G + 93] M. Bro y , C. F acc hi, R. Grosu, R. Hettler, H. Humann, D. Nazareth, F. Re- gensburger, and K. Stlen. The Requiremen t and Design Sp ecication Language Spectrum { An Informal In tro duction, V ersion 1.0. T ec hnical rep
  • rt,
T ec hnisc he Univ ersit at M
  • unc
hen, 1993. [BW90] M. Barr and C. W ells. Cate gory The
  • ry
for Computing Scienc e. Series in Computer Science. Pren tice Hall In ternational, London, 1990. [Cer93] Maura Cerioli. R elationships b etwe en Lo gic al Formalisms. PhD thesis, Univ ersit a di Pisa{Geno v a{Udine, 1993. TD-4/93. [CKL93] F elix Cornelius, Marcus Klar, and Mic hael L
  • w
e. Ein Fallb eispiel f
  • ur
KORSO: Ist{Analyse HDMS-A. T ec hnical Rep
  • rt
93-28, 1993. [CM93] M. Cerioli and J. Meseguer. Ma y I Borro w Your Logic? T ec hnical rep
  • rt,
SRI In ternational, Menlo P ark, 1993. [EM85] H. Ehrig and B. Mahr. F undamentals
  • f
A lgebr aic Sp e cic ation 1: Equations and Initial Semantics, v
  • lume
6
  • f
EA TCS Mono gr aphs
  • n
The
  • r
etic al Computer Sci- enc e. Springer, Berlin, 1985. [GB84] J. A. Goguen and R. M. Burstall. In tro ducing institutions. In Pr
  • c.
L
  • gics
  • f
Pr
  • gr
amming Workshop, LNCS 164, pages 221{256. Carnegie{Mellon, Springer, 1984. [GB92] J. A. Goguen and R. M. Burstall. Institutions: Abstract Mo del Theory for Sp eci- cation and Programming. Journals
  • f
the A CM, 39(1):95{146 , Jan uary 1992. [GR92] Radu Grosu and F ranz Regensburger. The Logical F ramew
  • rk
  • f
Spectr um. Pre- liminary T ec hnical Rep
  • rt,
Draft V ersion, Decem b er 1992. [GTWW77] J. A. Goguen, J. W. Thatc her, E. G. W agner, and J. B. W righ t. Initial algebra seman tics and con tin uous algebras. JA CM, 24(1):68{95, 1977. [HS73] H. Herrlic h and G. Strec k er. Cate gory The
  • ry.
Allyn and Bacon, Ro c kleigh, New Jersey , 1973. [KM93] H.-J. Kreo wski and T. Mossak
  • wski.
Equiv alence and Dierence
  • f
In titutions: Sim ulating Horn Clause Logic With Based Algebras. T ec hnical rep
  • rt,
Univ ersit at Bremen, 1993. 55
slide-60
SLIDE 60 [Kn
  • u93]
Reinhard Kn
  • upp
el. Algebraisc he Grundlagen der Sp ezik ation partieller Algebren mit b edingten Existenzgleic h ungen. Master's thesis, TU Berlin, FB Informatik, 1993. in German. [Mac71] S. Mac Lane. Cate gories for the Working Mathematician, v
  • lume
5
  • f
Gr aduate T exts in Mathematics. Springer, New Y
  • rk,
1971. [Mal73] A. I. Malcev. A lgebr aic Systems. Springer, 1973. [Mes89] J. Meseguer. General logics. In H.-D. Ebbinghaus et. al., editor, L
  • gic
c
  • l
lo quium '87, pages 275{329. Elsevier Science Publishers B. V.,North Holland, 1989. [Mos93] Till Mossak
  • wski.
Sim ulations b et w een v arious institutions
  • f
partial and total algebras. T alk at the COMP ASS w
  • rkshop,
Dresden, Septem b er 1993. [P
  • i92]
A. P
  • ign
  • e.
Basic category theory . In S. Abramsky , D. M. Gabba y , and T. S. E. Maibaum, editors, Handb
  • k
  • f
L
  • gic
in Computer Scienc e. Oxford Univ ersit y Press Inc., New Y
  • rk,
1992. [Rei87] H. Reic hel. Initial Computability, A lgebr aic Sp e cic ations, and Partial A lgebr as. Oxford Univ ersit y Press, Oxford, 1987. [SS92] S. Salibra and G. Scollo. A soft stairw a y to institutions. In R e c ent T r ends in Data T yp e Sp e cic ation, pages 310{329. Springer, 1992. LNCS 655. [WDC + 94] U. W
  • lter,
K. Didric h, F. Cornelius, M. Klar, R. W ess"aly , and H. Ehrig. Ho w to Cop e with the Sp ectrum
  • f
spectr um. T ec hnical Rep
  • rt
Beric h t-Nr. 94-22, TU Berlin, FB Informatik, 1994. [W es94] Roland W ess aly . Institutions
  • f
partially
  • rdered
sets. Master's thesis, TU Berlin, FB Informatik, June 1994. [W
  • l90]
U. W
  • lter.
An Algebraic Approac h to Deduction in Equational P artial Horn The-
  • ries.
J. Inf. Pr
  • c
ess. Cyb ern. EIK, 27(2):85{128, 1990. [W
  • l94]
Uw e W
  • lter.
Institutional frames. In R e c ent T r ends in Data T yp e Sp e cic ation. 10th W
  • rkshop
  • n
Sp ecication
  • f
Abstract Data T yp es, Geno v a, Italy , Ma y 1994, Springer-V erlag, 1994. in preparation. 56

View publication stats View publication stats