• No results found

4.5 Coalgebraic Modal Languages Algebraically

4.5.1 Schr¨oder functors

Following the idea used to define a functorM associated with Moss’ language we now define a functor associated with a predicate lifting λ, and in general with a set of predicate liftings Λ.

Definition 4.5.2 (Schr¨oder Functor). Given a predicate lifting λ: 2()×η 2T(), we define a functor

S(λ) :Coalg(T)op−→Alg(P++I)

in the following way. On objects: Given aT-coalgebra(A, α), the functorS(λ)

maps this coalgebra to

[δA, λα,¬A] :PPA+PA+PA−→ PA,

whereδA and¬A are the functions defined on Chapter 3 representing conjunc-

tions, see page 23, and negations, see page 32. On arrows: The functor S(λ)

maps a morphism f : (A, α)−→(B, β)to

Given a set of predicate liftingsΛ, we define a functor S(Λ) :Coalg(T)op−→Alg(P+ Λ +I)

in a similar way. HereP+ Λ +I states for P+`λ∈ΛIηλ+I, whereη

λ is the

arity of λ.

Remark 4.5.3. Notice that one of the reasons why the definition above makes sense, i.e Schr¨oder functors are in fact functors, is that predicate liftings are natural transformation.

Now we can redefine coalgebraic modal languages.

Definition 4.5.4(Coalgebraic Modal languages II). Given aκ-accessible func- torT :Set−→Set, we define the κ-coalgebraic modal language, writtenLκ

T(Λ),

to be the carrier of ( T(Λ),

V

,Λ), where this later structure is an initial al- gebra for the functorPκ+ Λ +I, defined above.

Using this and Schr¨oder functors we redefine the satisfaction relation for coalgebraic modal language as follows: Let T : Set −→ Set be a functor that preserves weak pullbacks and let(A, α)be aTκ-coalgebra. We define

[]α:

T(Λ)−→ PA

to be the unique arrow []α: ( T(Λ),[

V

,Λ])−→(PA,[∧α,Λ,¬α])that exists

inAlg(+ Λ +I). We define|as follows:

s|ϕiffs∈[ϕ.

Using Schr¨oder functors the following is immediate

Theorem 4.5.5. Coalgebraic languages language associated with a functor

are adequate with respect to behavioral equivalence.

Unfortunately not all coalgebraic modal languages with only unary predicate liftings have the Hennessy-Milner property with respect to behavioral equiva- lence, for example modal logic forP-coalgebras. This problem is solved assum- ingκ-accessibility and imposing some properties over the parameter Λ.

In [10] Schr¨oder defines separating sets of predicate liftings as follows. Definition 4.5.6 (Separating sets). A setΛ of predicate liftings for T is sep- aratingiff for each setA, the associated source of transposites

³ f

λA:T A−→2((2

A)η)´

λ∈Λ

is jointly injective for each set A. That is everyt∈T A is uniquely determined by the set

{(λ, X)Λ×(2A)η|tλA(X)}.

We say that setC ⊆T2 is separating if the associated set of predicate liftings is separating.

In other word a set of predicate liftings is separating if it can differentiate elements inT A, i.e ift6=t0 then there existsλΛ andX Asuch that

t∈λA(X) andt0∈/ λA(X).

Using separating sets of predicate liftings Schr¨oder in [10] showed that under the condition of separability, coalgebraic modal languages are expressive. Theorem 4.5.7. LetT be aκ-accessible functor and letΛbe a separating set of predicate liftings, possibly polyadic, forT. ThenLκ(Λ)has the Hennessy-Milner

property with respect to behavioral equivalence in the category of T-coalgebras.

Now it happens to be the case that all accessible functors admit a separating set of predicate liftings, see [10].

Proposition 4.5.8. IfT isκ-accessible and preserves monos, thenT admits a κ-bounded set of polyadic predicate liftings.

As corollary we have

Corollary 4.5.9. Let T be a κ-accessible functor and let Λ be the set of κ- bounded predicate liftings forT. ThenLκ(Λ)has the Hennessy-Milner property

Chapter 5

Hennessy-Milner Logics and

Final Coalgebras

In this chapter we will prove the following:

The existence of an expressive local language for behavioral equivalence is equivalent to the existence of a final coalgebra.

In the last section of this chapter we will use this construction to produce trans- lations between Moss’ language and coalgebraic modal languages.

Final Coalgebras are terminal objects in the category of coalgebras. Final coalgebras are particulary important because they code all the possible be- haviors of states in the category Coalg(T) and have the following coinductive property: Let (Z, ζ) be a final coalgebra ands, s0Z then

s↔ s0 iffs=s0 iffss0,

where the first relation is bisimilarity and the last one is behavioral equivalence. If there is an expressive languageLfor bisimilarity, or behavioral equivalence, the previous equivalence can be extended to

s≡s0 iffs s0 iffs=s0 iffss0,

where the first relation is the logically equivalent relation. Notice that both adequacy and HM are needed to obtain the first equivalence.

In other words: if there is a final coalgebra (Z, ζ) and an adequate language

Lwith the HM for behavioral equivalence then the states of the final coalgebra represent the truth classes ofL, see page 13.

In this chapter we will show that this is the only possibility, i.e. a language

Lis expressive iff we can define a final coalgebraic structure over the set of truth classes, written (L|=, ζ).

5.1

Simple Coalgebras

In this section we will mention concepts of Universal Algebra. We do not enter in details because they are not needed for the formal development of this thesis, but tho be familiar with those concepts might help the intuition. We encourage the interested reader to consult a book in Universal algebra. We recommend [3]. Congruences are one of the central objects in Universal Algebra. An equiv- alence relation θ on a set A, whereA is the underlying set of some algebra, is called a congruence if the algebraic structure can be transferred toA/θto make the quotient map, eθ, into a homomorphism. Now any function has akernel

equivalence relation on its domain, namely

Kerf ={(x, y)|f(x) =f(y)}.

Furthermore, when f is a homomorphism of algebras this is a congruence. In fact in universal algebra the congruences are just the kernels of homomorphisms. An algebra issimpleif it has no non-trivial congruences relations.

Suppose now that Ais the state set of a T-coalgebra, sayα. What does it take to make the quotient setA/θinto a coalgebra? The answer, see [5] or [6], is:

Theorem 5.1.1. Let (A, α) be aT-coalgebra, let θ be an equivalence relation overA andeθ:A−→A/θbe the canonical map. The following are equivalent:

There is a unique structural map :A/θ −→ T(A/θ) such that the fol-

lowing diagram T A -T(A/θ) T(eθ) A -A/θ ? α ? commutes. θ⊆Ker(T(eθ)α).

The relation θ is the kernel of some T-coalgebra morphism with domain

(A, α).

Based on the previous theorem we define the concept of congruence. Definition 5.1.2. An equivalence relation, say θ, over the state set of a T- coalgebra,α, is called a congruence if

θ⊆Ker(T(eθ)α), whereeθ:A−→A/θ is the canonical map.

Not all bisimulations are congruences, that because some bisimulations are not equivalence relations. In general it is not the case that all congruences are bisimulations, unless the functor preserves weak kernels. There is a counterex- ample in [6]. Never the less, see [6], it can be shown that for any functor, any bisimulation can be extended to a smallest congruence containing it.

Proposition 5.1.3. For every bisimulation(R, ρ)there exists the smallest con- gruence relation,hRi, containingR.

Proof. By definition the projectionsπ1, π2:ρ−→αareT-morphism. Lete:α

−→ γ be a coequalizer of π1, π2 in Coalg(T). By Theorem 5.1.1 Ker(e) is a

congruence becauseeis a morphism inCoalg(T). By definition of coequalizers it containsR and it is the smallest congruence containingR.

In the category Set every coequalizer produces an equivalence relation and viceversa. This implies the following corollary.

Corollary 5.1.4. Every bisimulation that is an equivalence relation is a con- gruence.

It is shown in [6] that the set of all congruences is a complete lattice. Theorem 5.1.5. The set of all congruences on a coalgebra(A, α)is a complete lattice. The supremum is given by

_

θj= ( [

θj)∗,

where() is the transitive closure. The infimum is given by ^

θj =Con[ \

θj],

whereCon[R]is the supremum of all congruences contained inR.

The smallest element of the lattice of congruences on (A, α) is trivial, i.e it is the identity, ∆A. But unlike the universal algebra case the largest element ΥA, may be, in general, a proper subset of A×A. For example in the case of the constant functor a pair of states (s, s0) in a coalgebra α:AD belongs to some congruence iffα(s) = α(s0). However the largest congruence has the following uniqueness property:

Theorem 5.1.6. IfΥA is the largest congruence onαthen for every coalgebra β there is at most one morphism f :β −→α/ΥA

Proof. Assume f1, f2 : β −→ α/ΥA are two morphisms. Let e : α/ΥA −→ ξ

coequalize them inColag(T). By Theorem 5.1.1 the relationKer(efΥ), where

fΥ is the quotient map, is a congruence onα. Therefore Ker(efΥ)⊆ ∇A. In

other words, for everya, a0A

ef∇(a) =ef∇(a0) impliesa∇a0.

Fixb∈Band leta∈f1(b), a0∈f2(b). By definitionf∇(a) =f1(b) andf∇(a0) =

f2(b). Then we have

ef∇(a) =ef1(b) =ef2(b) =ef∇(a0).

Hence by the previous observationa∇a0, thereforef

1(b) =f2(b). This concludes

the proof.

The previous theorem shows that coalgebras of the formα/ΥA are weakly terminal, i.e almost terminal but the existence condition is missing. This lead us to the concept of simple coalgebras.

Definition 5.1.7. A coalgebra (A, α)is called simple if its largest, and hence only, congruence is∆A. In other words∆A= ΥA.

Simple coalgebras can also be characterized in the following way Theorem 5.1.8. For a coalgebra(A, α), the following are equivalent.

1. αis a simple coalgebra.

2. Every morphism with domainαis injective.

3. For every coalgebraβ there is at most one morphismf :β−→α. 4. Every epimorphism with domainαis an isomorphism.

Proof. The proof is almost direct from the definitions. The interested reader can also consult??.

Based on this theorem we obtain the following relation between congruences, final coalgebras and simplicity.

Corollary 5.1.9. For any coalgebraα,α/ΥA is simple.

Every final coalgebra is simple.

Using this corollary we can also prove the following.

Theorem 5.1.10. Assume a final coalgebra ζ exists. Then a coalgebra α is simple iff it is isomorphic to a subcoalgebra of ζ.

Related documents