Presenting Functors by Operations and Equations

Marcello M. Bonsangue^{1}^{⋆} Alexander Kurz^{2}^{⋆⋆}

1 LIACS, Leiden University, The Netherlands 2 Department of Computer Science, University of Leicester, UK

Abstract. We take the point of view that, if transition systems are coalgebras for a functor T, then an adequate logic for these transition systems should arise from the ‘Stone dual’ L of T. We show that such a functor always gives rise to an ‘abstract’ adequate logic for T-coalgebras and investigate under which circumstances it gives rise to a ‘concrete’ such logic, that is, a logic with an inductively defined syntax and proof system. We obtain a result that allows us to prove adequateness of logics uniformly for a large number of different types of transition systems and give some examples of its usefulness.

1 Introduction

The question we are concerned with in this paper is how to associate to a given type of transition systems an adequate (modal) logic. Here adequate means that the logic is sound and complete and that two states are bisimilar iff they are logically equivalent (ie, iff they have the same theory). For the latter property, we also say that the logic is expressive or that the semantics is fully abstract.

Our starting point is the theory of coalgebras as in Rutten [29]. That is, the type of a category of transition systems is given by a functor T on a category X and transition systems of type T are T -coalgebras, ie arrows X → T X in X. The basic idea of our approach is that an adequate logic for T -coalgebras is given by the dual functor L of T on the Stone dual A of X as explained below.

[figure: X; T; P; A; S; L]  (1)

A is a category of algebras such as Boolean algebras or distributive lattices representing a propositional logic such as classical or positive propositional logic. P and S are the contravariant^{3} functors that provide the dual equivalence between X and A. Intuitively, P maps a state space X to the logic of propositions on X and S maps an algebra to its ‘canonical model’. That L and T are dual means that there is an isomorphism LP → P T.

⋆ Supported by a fellowship of the Royal Netherlands Academy of Arts and Sciences. ⋆⋆ Partially supported by the Nuffield Foundation Grant NUF-NAL04. 3 Given categories C, C′, we use the notation C → C′ for (covariant) functors such as T and L as well as for contravariant functors such as P and S.

The main contribution (Section 2) of the paper is the notion of a functor having a presentation by operations and equations. Theorem 15 shows that the category of algebras for such a functor is an equationally definable class of algebras (over Set). We then go on to show (Section 4) that, although the dual L of T gives rise to an adequate logic for T -coalgebras, the resulting logic is too abstract to be useful. In particular, inductively defined formulae, a logical calculus and a notion of (inter)derivability are still missing. But these are provided (Section 5) by a presentation of L by operations and equations. Theorem 27 shows how the operations give rise to modal operators, the equations to axioms and how the modal calculus is inherited from equational logic.

The notion of a functor being presentable by operations and equations is modelled on the notion of an algebra being presentable by generators and relations (reviewed in Section 2.1). This will be discussed in more detail now.

Comparison with Work in Domain Theory. The prototypical transition systems, called Kripke frames in modal logic, consist of just a set X and a relation R on X. Writing P for the operation that maps a set to its powerset, (X, R) can also be described by its ‘successor map’, or P-coalgebra, X → PX. P is a functor on the category Set of sets and functions and has analogues on many categories of topological spaces, including important categories of domains. P is then called powerspace, hyperspace or powerdomain.

It is well-known in domain theory that the dual of the powerspace on the corresponding category of algebras can be described using modalities □ and ◇. This goes back to Johnstone [12,13] where a dual of the powerspace, called Vietoris locale, is described. In case of distributive lattices [13, Section 1.8] anticipates the axiomatisation of positive modal logic by Dunn [10]. Winskel [32] used modalities to describe the powerdomain and Robinson [25] established the connection between the work in domain theory and that of Johnstone. Abramsky [1] extended these ideas to give logical descriptions of domains for a large number of other type constructors.

To position our contribution it will be useful to briefly summarise the work mentioned in the previous paragraph using our notation from Diagram (1). To describe a powerspace T on a domain—or more generally on a topological space—X ∈ X, one has to describe the effect of T on the topology of X. This can be done without reference to X, using only the algebraic properties of the topology of X: the topology of T X is given (up to canonical iso) by the algebra L(P X) which is freely generated by symbols □a, ◇a, a ∈ P X satisfying some ‘relations’ as eg □(a ∧ a′) = □a ∧ □a′. To summarise, a logic for T -coalgebras is obtained by describing the dual LP X of T X using the technique of generators and relations: The modal operators arise from the generators and the axioms from the relations.

Our paper formalises the move from generators and relations to the modal logic. Let us explain what needs to be done. Going back to the example of the powerspace, we observe that □a is a formal symbol as a generator of LP X, but □ is a unary operator in the modal logic. Similarly, as a ‘relation’ □(a∧a′) = □a∧□a′ is a pair of terms, but as a logical axiom it is an equation where a, a′ are variables. Moreover, but related, a logic is obtained from a presentation of LP X only if the presentation does not depend on X, that is LP X is given by the ‘same’ generators and relations for all X. The necessary step is to generalise the notion of an algebra being presented to the notion of a functor being presented. As a consequence we obtain Theorems 15 and 27, which uniformly account for a large number of categories X and functors T.

Comparison with Work on Coalgebras. Work on modal logic and coalgebras started with Moss [21] whose proposal works essentially for any functor T (on the category of sets), but does not provide the linguistic means to decompose the structure of T which is needed to allow for a flexible specification language. To address this issue, subsequent work as eg [19,28,11] restricted attention to particular classes of functors. Pattinson [23] showed that these languages arise from modal operators given by certain natural transformations, called predicate liftings. [16] showed that, furthermore, these languages correspond to functors L on the category BA of Boolean algebras. Here we address the opposite question of how to associate a logic to a functor L.

This paper can also be seen as a sequel to [7], where we proposed a general framework for logics of coalgebras based on Stone duality. A general adequateness result was proved for what we call here abstract logics and then, studying the case of the compact powerspace P_{c}, it was shown how to systematically obtain logics for coalgebras over different base categories by presenting the dual of P_{c} by generators and relations. But a formal description of the step from generators and relations to modal operators and axioms was left open.

Acknowledgements. We would like to thank the referees for valuable suggestions. The second author profited from discussions with Neil Ghani, Clemens Kupke and Jiří Rosický.

2 Presenting Functors by Operation and Equations

This section defines what it means for a functor L on an algebraic category A to have a presentation by operations and equations. It is shown that, if L has such a presentation, the category Alg(L) of L-algebras is isomorphic to a category Alg(Σ, E) of algebras for a signature and equations and, moreover, Σ and E are obtained from the presentations of A and L in a modular way. Let us emphasise that this is known for the case A = Set, the novelty here coming from the need to consider other base categories than Set.

2.1 A Brief Review of Algebras and Presentations

Algebras. Given a functor L on a category A, an L-algebra (notation: (A, α) or just α) is an arrow α : LA → A. A morphism f : α → α′ is an arrow f : A → A′ such that f ∘ α = α′ ∘ Lf.

The category of algebras for a signature Σ and equations E is defined as usual^{4} and denoted by Alg(Σ, E). We say that a category A, equipped with a forgetful functor U : A → Set, has a presentation (over Set) if there exists a signature Σ and equations

4 Carriers are sets and arities may be arbitrary cardinals; we allow a set of operations for each arity and a set of equations for each set of variables.

E such that A is concretely^{5} isomorphic to Alg(Σ, E). A (or more precisely U : A → Set) is monadic iff A has such a presentation and U : A → Set has a left adjoint (ie free algebras exist). The left adjoint of U is denoted by F throughout (F X is the free algebra over X and UF X is the set of terms over X quotiented by the equations). Examples: The category of complete Boolean algebras has a presentation but is not monadic, whereas the category of complete atomic Boolean algebras is monadic (and dually equivalent to Set); see [12].

Presenting Algebras by Generators and Relations. The following is tailored towards Section 2.2, for more see Vickers [31]. Suppose we have a monadic functor U : A → Set with left-adjoint F. Then the counit

ε_{A} : F UA → A

gives us a canonical (albeit not economical) presentation of A, namely generated by the elements of UA and quotiented by the kernel {(t, s) | ε_{A}(t) = ε_{A}(s)} of ε_{A}. These presentations are useful to describe operations on algebras. Unfortunately we have only space for one example.

Example 1 (modal algebras). A modal algebra, or Boolean algebra with operator (BAO), is the algebraic structure required to interpret (classical) modal logic which consists of propositional logic plus a unary modal operator □ preserving finite conjunctions. Modal algebras are therefore algebras for the functor V : BA → BA, where VA is defined by generators □a, a ∈ A, and relations □⊤ = ⊤, □(a ∧ a′) = □a ∧ □a′.

Note that in the example above, the symbol □ appears in two roles. First we said that □ is a unary operator. But when we considered □a as a generator, ‘□a’ was just a formal symbol. This observation will lead to Definition 6.

Remark 2. The fact that, in the example above, V is on BA (and not on Set) takes care of the propositional part of modal logic. The definition of VA can be phrased more abstractly by saying that the insertion of generators UA → UVA, a ↦ □a is a universal finite-meet preserving function, that is,

\xymatrix{UA \ar[dr]_{f} \ar[r] & UVA \ar@{.>}[d]^{Uf^{♯}} \\  & UB}

for all B ∈ BA and all finite-meet preserving functions f : UA → UB there is a unique Boolean algebra morphism f^{♯} : VA → B with Uf^{♯}(□a) = f(a). From this observation it is straightforward to show that Alg(V) is indeed isomorphic to the category of modal algebras as usually defined (see eg [15, Definition 2.2.2], [4, Definition 5.19]).

Definition 3 (presentation by generators and relations). Let U : A → Set be monadic (see p.3) with left adjoint F. A presentation ⟨G, R⟩ consists of a set of ‘generators’ G and a set of ‘relations’ R ⊆ UF G × UF G.

5 Concretely means that the isomorphism preserves the underlying sets.

Definition 4 (presented algebra). Continuing from the previous definition, a morphism f : F G → B in A satisfies the relations R if (t, s) ∈ R ⇒ Uf(t) = Uf(s). An algebra A is presented by ⟨G, R⟩ if

\xymatrix{F G \ar[r]^{q} \ar[dr]_{f} & A \ar@{.>}[d]^{f^{+}} \\  & B}

– A comes with an insertion of generators q : G → UA (or, equivalently, q : F G → A) satisfying the relations R,

– for all B ∈ A and all f : F G → B satisfying the relations R there is a unique f^{+} : A → B with f^{+} ∘ q = f.

Proposition 5. Every presentation presents an algebra.

Proof. The proof relies on the fact that, as a category monadic over Set, A has coequalisers. The object presented by ⟨G, R⟩ is given by the coequaliser

\xymatrix{F R \ar[r]_{π_{2}^{♯}} \ar[r]^{π_{1}^{♯}} & F G \ar[r]^{q} & A.}

where π_{1}^{♯}, π_{2}^{♯} come from the projections π_{1}, π_{2} : R → UF G. More concretely, q is the quotient wrt the smallest congruence containing R.

2.2 Presenting Functors by Operations and Equations

Example 1 above shows how the functor V : BA → BA is described using generators and relations. In order to obtain a modal logic from that description, one has to upgrade the set of formal symbols □a to a unary operator □ and, similarly, the relations □(a ∧ a′) = □a∧□a′ to equations in variables a, a′ (Definition 6). Moreover, the presentation of VA is the ‘same’ for all A. This will be crucial for the move from a presentation to a logic: The modal operators (ie the generators) and the axioms (ie the relations) should depend only on the functor and not on specific algebras (Definition 7).

Definition 6 (presentation by operations and equations). Let U : A → Set be monadic with left adjoint F. A presentation of a functor L : A → A by operations and equations consists of

1. a set Σ of operations σ ∈ Σ with arities n_{σ} which gives rise to a functor G_{Σ} : Set → Set, X ↦ ∐_{σ∈Σ} X^{n_{σ}},

2. a class C of sets (of variables) and a collection E = (E_{V})_{V ∈C} of equations E_{V} ⊆ (UF G_{Σ}UF V)^{2}.

A presentation is called finite if Σ only contains operations of finite arity and C contains only finite sets.

Definition 7 (presented functor). Continuing from the previous definition, a morphism f : F G_{Σ}UA → B satisfies the equations E if for all V ∈ C and all v : F V → A it holds (t, s) ∈ E_{V} ⇒ (f ∘F G_{Σ}Uv)(t) = (f ∘F G_{Σ}Uv)(s). A natural transformation f : F G_{Σ}U → L satisfies the equations if f_{A} satisfies the equations for all A ∈ A. A functor L is presented by ⟨Σ, E⟩ if

[figure: F G_{Σ}UF V; F G_{Σ}Uv; F G_{Σ}UA; q_{A}; f; LA; f^{+}; B]

– L comes with a natural transformation, called insertion of generators, q : G_{Σ}U → UL (or, equivalently, q : F G_{Σ}U → L) satisfying the equations E,

– for any B ∈ A and morphism f : F G_{Σ}UA → B satisfying the equations E there is a unique morphism f^{+} : LA → B such that f^{+} ∘ q_{A} = f.

Remark 8. 1. Roughly speaking, if A represents a finitary logic, we will need C to only contain finite sets of variables. But for infinitary logics, a typical requirement for an operator □ in Σ would be to preserve all meets, which is expressed by equations ⋀_{v∈V} □v = □ ⋀_{v∈V} v where V runs through all cardinals.

2. Here we explain the format of the equations E_{V} ⊆ (UF G_{Σ}UF V)^{2}.

– E_{V} ⊆ (UF G_{Σ}UF V)^{2} means that the terms appearing in equations may freely use the operations for A but do not contain nested occurrences of operations from Σ.

– Intuitively, this format arises from our interests in logics that describe coalgebras for a functor T. In contrast to coalgebras for a comonad, the coalgebra map ξ : X → T X encodes what the transition system (X, ξ) can perform in one step. From this point of view, the format E_{V} ⊆ (UF G_{Σ}UF V)^{2} of the axioms E is not a restriction, but formalises that we do not need nested modalities to describe a single transition (nested modalities describe sequences of transition steps).

– Technically, equations of the form E_{V} ⊆ (UF G_{Σ}UF V)^{2} suffice since the terms to be quotiented are all in UF G_{Σ}UA. The reason to exclude more general equations is Theorem 15.

3. Using the approach of Linton [20] and Rosický [26], one can show that Alg(L) can always be described by operations and equations over A. But in that approach the arities describing Alg(L) are objects in A and not cardinalities in Set. In other words, what our approach adds here is that under Definition 7 one does obtain a presentation not only of Alg(L) over A but also of Alg(L) over Set (Theorem 15). The latter is essential to get logics as in Section 5.

4. A presentation of Alg(L) over Set cannot be expected to exist in general, because monadic functors are not closed under composition: Even if Alg(L) → A and A → Set are monadic, the composition Alg(L) → Set need not be so. This is discussed in detail in Kelly and Power [14]. For our purposes, our approach has the advantage that we obtain a presentation of Alg(L) modularly from presentations of A and L (Theorem 15). Moreover, we do not insist on Alg(L) having free algebras.

5. Example 1 seems to suggest that one could express the interplay of the modal and Boolean operators by a distributive law between the functor L describing the modal operators and the monad UF describing the Boolean operators. This approach does not work as L is not even defined on underlying sets but only on algebras.

6. An approach based on monads would not be appropriate because we do not want to insist that Alg(L) has free algebras. (For an example where Alg(L) doesn’t have free algebras although A has, take A to be the category of complete atomic Boolean algebras and L the dual of the powerset.)

Definition 7 will allows us to present Alg(L) by composing a presentation of A with a presentation of L, see Theorem 15. Logically, this corresponds to extending a basic propositional logic (which presents A) with modal operators and modal axioms (which present L). This is also the idea underlying the following examples.

Example 9. 1. As mentioned already in the introduction, to define a functor L by describing LA by generators and relations is a common technique. In all of the cited [12,13,25,31] the given presentations are in fact presentations of L by operations and equations. The reason to make this notion explicit here is to have a uniform translation from presentations to logics that works for functors L in general (see Theorems 15 and 27).

2. The functor V of Example 1 is presented by a signature containing one unary operation □, that is, G_{Σ}X = X. Further, V = {v_{0}, v_{1}}, C = {V }, and, writing ‘· = ·’ instead of ‘(·, ·)’, E_{V} = {□⊤ = ⊤, □(v_{0} ∧ v_{1}) = □v_{0} ∧ □v_{1}}.

3. The functor V above is the dual of the powerspace on Stone. Other type constructors on Stone are studied in [18] (called Vietoris polynomial functors) and their duals on BA are all presentable by operations and equations.

4. The Kripke polynomial functors on Set (including powerset) of [11] have duals on complete atomic Boolean algebras, which have a presentation. The description of the dual of the finite (or compact) powerspace on posets and sets in [7] also provides examples of presentations of functors.

Proposition 10. Each presentation presents a functor.

Proof. Given a presentation ⟨Σ, E⟩ we define the functor L on objects A as

\xymatrix{F E_{V} \ar[r]^{π_{1}^{♯}} \ar[r]_{π_{2}^{♯}} & F G_{Σ}UF V \ar[r]^{F G_{Σ}Uv} & F G_{Σ}UA \ar[r]^{q_{A}} & LA}  (2)

where q_{A} is the joint coequaliser of all pairs (F G_{Σ}Uv ∘ π_{1}^{♯}, F G_{Σ}Uv ∘ π_{2}^{♯}) where v ranges over arrows F V → A. The universal property of LA gives the action of L on morphisms and the naturality of q_{A}.

Proposition 11. The functors that have a presentation are closed under composition.

Proof (Sketch). Consider L_{1} and L_{2} with presentations (Σ_{1}, E_{1}), (Σ_{2}, E_{2}). Then L_{1}L_{2} is presented by (∑_{i∈n} n_{i})-ary operations σ((t_{i})_{i∈n}) where σ ∈ Σ_{1} is n-ary and the t_{i} are n_{i}-ary Σ_{2}-terms in UF G_{Σ_{2}}V. The equations s((t_{i})_{i∈n}) = s′((t′_{i})_{i∈n}) are all those that can be obtained from the equations s = s′ derivable from E_{1} and then substituting terms t_{i} = t′_{i} (with identities derivable from E_{2}).

Remark 12. The proposition shows that we can build up presentations modularly. The construction in the proof has the disadvantage though, that (many) new operations and equations have to be introduced. In practice, therefore, one would rather introduce an additional sort with the benefit of using exactly the operations and equations of the two original presentations. This is as in, eg, [1,27,11,9,30] and will be detailed elsewhere.

Although we are not interested in the case A = Set as such, the following shows that Definition 6 is natural: Up to a size restriction, any functor on Set has a presentation. In particular

Proposition 13. A functor on Set has a finite presentation if and only if it is finitary.

Proof. If an endofunctor L on Set is given as in Diagram (2), then it is not difficult to show that it preserves filtered colimits, given that F, U, and G do so and the sets V are finite. Conversely, given a finitary L, we obtain Σ and E as follows [24, 1.5]. For Σ we let each element in Ln be an n-ary operation,^{6} that is, G_{Σ}X = ∐_{n<ω} Ln × X^{n}. Further, V = {v_{i} | i < ω}, C = {V } and E_{V} = {(Lf(σ))(v_{0}, … v_{m−1}) = σ(v_{f(0)}, … v_{f(n−1)}) | n < ω, σ ∈ Ln, f : n → m}. The natural transformation q_{A} : G_{Σ}UA → LA then maps n < ω, σ ∈ Ln, f : n → A to Lf(σ) ∈ LA.

If we do not insist on A = Set, the two notions become different as the second part of the proof does not generalise. A general characterisation of the functors having a finite presentation will be given elsewhere.

We still have to show how functors that are presentable by operations and equations give rise to logics. Since A is monadic over Set, we can assume that we a have a presentation of A as a category of algebras Alg(Σ_{A}, E_{A}) given by a signature Σ_{A} and equations E_{A}.

Definition 14 (Σ_{A} + Σ_{L}, E_{A} + E_{L}). Let A ≅ Alg(Σ_{A}, E_{A}) and L : A → A be presented by ⟨Σ_{L}, E_{L}⟩. Denote by Σ_{A} +Σ_{L} the disjoint union of the signatures and by E_{A} +E_{L} the disjoint union where equations in E_{A} and E_{L} are understood as equations over Σ_{A} + Σ_{L}.^{7}

E_{A} + E_{L} is a sound and complete (equational) logic for L-algebras:

Theorem 15. Let A ≅ Alg(Σ_{A}, E_{A}) be monadic and ⟨Σ_{L}, E_{L}⟩ a presentation of L : A → A. Then Alg(Σ_{A} + Σ_{L}, E_{A} + E_{L}) is isomorphic to Alg(L).

Proof (Sketch). Write Σ = Σ_{A} + Σ_{L}, E = E_{A} + E_{L}. Consider α : LA → A. The corresponding Σ-algebra A has carrier UA and the interpretation σ^{A} of operations σ ∈ Σ_{L} is given by (UA)^{n_{σ}} → UF G_{Σ_{L}}UA →^{Uq_{A}} ULA →^{Uα} UA. A satisfies the equations

6 Writing Ln we assume that n is the set {0, … n − 1}. 7 Strictly speaking, E_{L} was defined on equivalence classes of Σ_{A}-terms. Formally, one obtains the new E_{L}, denoted E′_{L}, as follows. Let T_{Σ_{A}}V be the set of Σ_{A}-terms over V. Consider a half-inverse m of the quotient T_{Σ_{A}}G_{Σ_{L}}T_{Σ_{A}}V → UF G_{Σ_{L}}UF V (m chooses a representative for each equivalence class). Then E′_{L} = {(m(t), m(s)) | (t, s) ∈ E_{L}}.

E_{A} because A does. A satisfies the equations E_{L} because q_{A} does (Definition 7) and because of the format (E_{L})_{V} ⊆ (UF G_{Σ_{L}}UF V)^{2}.

Conversely, every (Σ, E)-algebra A is also an algebra in A. We then obtain, from the operations in Σ_{L}, a function G_{Σ_{L}}UA → UA, ie a morphism f : F G_{Σ_{L}}UA → A. Since A satisfies the equations E_{L} we obtain by the universal property of Definition 7 a morphism α = f^{+} : LA → A.

Remark 16. 1. Without requiring (E_{L})_{V} ⊆ (UF G_{Σ_{L}}UF V)^{2} in Definition 7, L-

algebras would not need to satisfy the equations E_{L}.

2. We do not insist that Alg(L) → Set be monadic (Remark 8.6).

3. Assume that A = Set and that L has a finitary presentation. Then Theorem 15 and Proposition 13 specialise to the well-known result that Alg(L) is a variety that can be described by equations without nesting of operation symbols, see [3, Section III.3.2, III.4.3]. Let us remark that [3] does not have the notion of a presentation of a functor. We need it here to generalise from Set to other monadic categories A.

3 A Brief Review of Coalgebras and Stone Duality

Coalgebras Given a functor T on a category X, a T -coalgebra (notation: (X, ξ) or just ξ) is an arrow ξ : X → T X in X. A morphism f : ξ → ξ′ is an arrow f : X → X′ such that T f ∘ ξ = ξ′ ∘ f.

Throughout the paper it will be the case that X is the category Set of sets and functions or some category of topological spaces or domains. It makes therefore sense to speak of the elements, or states, of some X ∈ X. We say that two states x, x′ of ξ : X → T X and ξ′ : X′ → T X′ are behaviourally equivalent or bisimilar if there are coalgebra morphisms f, f′ with f(x) = f(x′). This notion of bisimilarity agrees with the standard one in all cases we are aware of.

Stone Duality We sketch some background on Stone duality. It may be skipped and consulted later. A topological space (X, O) is a set X together with a collection O of subsets of X closed under finite intersections and arbitrary unions. Elements a ∈ O are called open sets. A function (X, O) → (X′, O′) is continuous if f^{−1} preserves opens, that is, restricts to a map O′ → O. Topological spaces and continuous maps form the category Top. Note that f^{−1} preserves finite intersections and arbitrary unions.

Abstracting from the set of points X and axiomatising the algebraic properties of a topology O, one arrives at the following notion. A frame^{8} A is a distributive lattice (with bottom ⊥ and top ⊤) with infinite joins satisfying the infinite distributive law a ∧ ⋁ C = ⋁{a ∧ c | c ∈ C} for all a ∈ A and all subsets C ⊆ A. Frames with functions preserving arbitrary joins and finite meets form the category Frm. Frm has free algebras, in other words, the forgetful functor from Frm to Set mapping each frame to its underlying set is monadic.

8 The notions ‘frame’ and ‘Kripke frame’ come from different areas are not related.

There are contravariant functors

\xymatrix{Top \ar[r]^{P} & Frm \ar[l]^{S}}

P (X, O) = O, P (f) = f^{−1} (‘P ’ since P associates to a space X the algebra of predicates over X). If (X, O) is a discrete topological space, then P is the contravariant powerset functor. S(A) = Frm(A, 𝟚), where 𝟚 is the two element frame (consisting of ⊥, ⊤). S(A) carries the topology generated by the sets, for each a ∈ A, {s ∈ S(A) | s(a) = ⊤}. S(f) = λs ∈ S(A) . s∘f. For example, if A is a Boolean algebra, then SA is the space of ultrafilters over A (ultrafilters represent maximal consistent theories).

Fact 17. P, S are adjoint on the right, that is, there is a bijection, natural in X and A,

Top(X, SA) ≅ Frm(A, P X).

The adjunction restricts to a dual equivalence on the subcategories of spaces X and frames A for which the units X → SP X and A → P SA are isomorphisms. These spaces and frames are called sober and spatial, respectively. We will need later that a frame A is spatial iff

∀a, a′ ∈ A.(a ≰ a′ ⇒ ∃s ∈ SA.(s(a) = ⊤ & s(a′) = ⊥)).  (3)

The dual equivalence of sober spaces and spatial frames can be restricted to obtain a large number of interesting examples. We mention here only the duality of the categories Stone of Stone spaces and BA of Boolean algebras and the duality of the categories Spec of spectral spaces and DL of distributive lattices. For details and more examples see [12,31,2].

The adjunction can also be ‘upgraded’ to an adjunction between Top and OFrm, the category of observation frames [5]. It restricts to a dual equivalence for all T0spaces. We can then include the category of posets into the list of possible topological spaces and treat propositional logics without negation but with infinitary meets [6]. This approach was also used in [7].

4 Abstract Logics for Coalgebras

It is shown that adequate logics for T -coalgebras are given by the functor L that is dual to T. This section is independent of Section 2.

Definition 18 (dual functor). Let P : X → A and S : A → X be a dual equivalence and T a functor on X. (L, δ), or simply L, is called a (or the) dual of T on A if there is a natural isomorphism δ : LP → P T.

All duals of T are naturally isomorphic and the canonical one is P T S (but more interesting are those duals L that have a purely algebraic description (Definition 7) which does not go via X). δ allows us to consider the collection of predicates on a coalgebra as an L-algebra. That is, we can lift the functors P and S to an equivalence of algebras and coalgebras. Explicitly, on objects, the lifted P̃ and S̃ are given as

P̃(X, ξ) = LP X ⟶^{δ_{X}} P T X ⟶^{P ξ} P X

S̃(A, α) = SA ⟶^{Sα} SLA ≅ SLP SA ⟶^{(SδS)_{A}} SP T SA ≅ T SA

In order to interpret the dual equivalence connecting A and X as a duality between a logical calculus and its semantics, we need to more specific. For the remainder of the paper we will be working in the situation described by the following diagram

[figure: Coalg(T); P̃; Alg(L); S̃; X; T; P; A; S; L; U; Set; Set; F]  (4)

where we assume that

– the dual equivalence between X and A arises from the adjunction of Top and Frm (or Top and OFrm) by restricting to subcategories (see Section 3),

– L is dual to T (see Definition 18),

– A is monadic (see p.3),

– Alg(L) → A has a left adjoint (ie Alg(L) has free algebras).

Let us emphasise that the last requirement is not essential [7]. But it simplifies the presentation considerably, as we can now take the initial algebra in Alg(L) as a canonical set of propositions. We consider this algebra of propositions as an abstract logic for T -coalgebras, see Definition 21.

Definition 19 (Prop(Var)). Denote by Prop(Var) the (carrier of the) free L-algebra over Var and call the elements of Prop(Var) propositions over variables in Var.

The algebraic semantics is defined in the usual way. Recall that there is a bijection between functions Var → UA and morphisms Prop(Var) → A.

Definition 20 (algebraic semantics). The algebraic semantics φ^{A,h} of φ ∈ Prop(Var) wrt an algebra A ∈ Alg(L) and a valuation of variables h : Var → UA is φ^{A,h} = h^{#}(φ) where h^{#} : Prop(Var) → A is the unique extension of h. Alg(L) ⊧ (φ ≤ ψ) if φ^{A,h} ≤ ψ^{A,h} for all algebras A and all h : V ar → UA.

To each coalgebra (X, ξ) we can associate via P̃ the algebra of propositions over X. This gives the coalgebraic semantics.

Definition 21 (coalgebraic semantics). The semantics [[φ]]_{(X,ξ,h)} of a formula φ ∈ Prop(Var) wrt a coalgebra (X, ξ) ∈ Coalg(T) and a valuation h : Var → P X is given by [[φ]]_{(X,ξ,h)} = φ^{P̃(X,ξ),h}. We write Coalg(T) ⊧ (φ ⊢ ψ) if [[φ]]_{(X,ξ,h)} ⊆ [[ψ]]_{(X,ξ,h)} for all coalgebras and all valuations.

The following proposition can be extended to account for propositions with variables if the notion of bisimulation is appropriately adapted. But we will restrict ourselves to

Proposition 22. Propositions in Prop_{∅} are invariant under bisimilarity.

Proof. We have to show that, given a coalgebra morphism f : (X, ξ) → (X′, ξ′) and x ∈ X, that x ∈ [[φ]]_{(X,ξ)} ⇔ f(x) ∈ [[φ]]_{(X′,ξ′)}. This follows directly from the universal property of the initial algebra Prop_{∅}.

The essence of completeness wrt to the coalgebraic semantics is:

Proposition 23. Alg(L) ⊧ (φ ≤ ψ) ⇔ Coalg(T) ⊧ (φ ⊢ ψ).

Proof. ‘ ⇒ ’ (soundness) is immediate. For ‘ ⇐ ’ (completeness) assume \begin{matrix}/ \\ ⊧ \end{matrix}_{Alg(L)} φ ≤ ψ, ie φ ≰ ψ in Prop(Var). Since Prop(Var) is spatial (see (3)), there is x in S̃(Prop(Var)) such that x ∈ [[φ]]_{Prop(Var)} and x ∉ [[ψ]]_{Prop(Var)}.

Proposition 24. Prop_{∅} is expressive. That is, if two elements x, x′ of two coalgebras (X, ξ), (X′, ξ′) are not bisimilar, then there is φ ∈ Prop_{∅} such that x ⊧ φ ⇔ x′ \begin{matrix}/ \\ ⊧ \end{matrix} φ.

Proof. Without loss of generality, let us assume that x, x′ are two different elements of the final coalgebra (Z, ζ). The two points can be distinguished by a proposition since Prop_{∅} → P̃(Z, ζ) is surjective and P Z is a T0-space.

To summarise the section, we have seen how to obtain an adequate logic for T - coalgebras (where T is an arbitrary functor on a category X satisfying the conditions summarised under Diagram (4)): Just consider as formulae the elements of the initial Lalgebra where L is the dual of T. We called this logic abstract as these formulae do not have much structure. For example, modal operators, an explicit inductive construction of the set of formulae and a logical calculus are still missing.

5 Concrete Logics for Coalgebras

We can now combine the abstract logics from Section 4 with the presentations of functors of Section 2. Assuming that L has a presentation, Theorem 15 gives us an equational calculus for Alg(L). Via the coalgebraic semantics of Definition 21 this yields an equational logic for T -coalgebras, which is adequate by Propositions 22 to 24 and concrete in the sense that we have the equational calculus for reasoning about the coalgebras.

In this section, we translate the equational logic of Theorem 15 to a modal logic. In the case of A = BA (which corresponds to adding a modal logic to classical propositional logic) this is particularly simple: An equation t = s corresponds to the modal formula t ↔ s. As we are interested also in A = DL (and various subcategories), we do not assume here that the logics have implication. We therefore use in the modal logics the notation φ ⊢ ψ to represent the algebraic φ ≤ ψ. As it is clear from Definition 21, ⊢ corresponds to local consequence in the terminology of modal logic.

Definition 25 (modal logic for T -coalgebras). Let X and A be categories as described in Diagram (4) and T a functor on X. Assume that the dual L of T has a presentation ⟨Σ_{L}, E_{L}⟩ (Definition 7) and let A ≅ Alg(Σ_{A}, E_{A}). Operations in Σ_{A} are called propositional connectives and operations in Σ_{L} are called modal operators. Following established notation, we write modal operators σ ∈ Σ_{L} as [σ]. We define

Formulae The set of formulae over a set Var of propositional variables is the smallest

set containing Var and closed under operations in Σ_{A} and Σ_{L}. Sequents A sequent φ ⊢ ψ consists of two formulae φ, ψ. Axiom Schemes Each equation φ = ψ in E_{A} or E_{L} gives rise to axiom schemes

φ ⊢ ψ and ψ ⊢ φ. An axiom is obtained from an axiom scheme by replacing the variables^{9} with formulae.

Calculus We use φ⊣⊢ψ as an abbreviation for φ ⊢ ψ and ψ ⊢ φ. The rules have to guarantee that ⊣⊢ is an equivalence relation. Moreover, for each n-ary operator σ ∈ Σ_{A} + Σ_{L}, we have the congruence rule

\frac{φ_{i}⊣⊢ψ_{i} 0 ≤ i < n}{σ(φ_{i})⊣⊢σ(ψ_{i})}

Semantics Given a coalgebra (X, ξ) and a valuation h : Var → P X, the semantics [[φ]]_{(X,ξ,h)} of a formula is defined inductively on the structure of formulae. For an n-ary modal operator σ ∈ Σ_{L} its semantics is given by (for δ see Definition 18)

\xymatrix{(UP X)^{n} \ar[r] & G_{Σ_{L}}UP X \ar[r]^{q_{P X}} & ULP X \ar[r]^{Uδ_{X}} & UP T X \ar[r]^{UP ξ} & UP X}

mapping ([[φ_{i}]]_{(X,ξ,h)})_{0≤i<n} to [[[σ](φ_{i})]].

Remark 26 (other approaches to modal logics for coalgebras). Apart from Moss [21], all subsequent work we are aware of (as eg [28,11,18,22]) can be casted in terms of so-called predicate liftings as in Pattinson [23]. Predicate liftings give semantics to modal operators for T -coalgebras. They appear here as (UP X)^{n} → G_{Σ_{L}}UP X →^{q_{P X}} ULP X →^{Uδ_{X}} UP T X. It was shown in [16] that any logic given by predicate liftings can be described by a functor L on BA that has a presentation. Our approach therefore subsumes existing ones. But we have also vastly generalised the previous work by moving from set to other topological categories and from BA to other algebraic categories. Moreover, we established a criterion for functors L to give rise to an adequate logic.

Theorem 27. Let L be a logic for T -coalgebras as described in Definition 25. The formulae of L are invariant under bisimilarity and L is sound, complete and expressive.

Proof (Sketch). First show that equational deduction is equivalent to deduction in L. It then follows from Theorem 15 that Prop(Var) is a quotient of the set of L-formulae wrt to the interderivability ⊣⊢ (the so-called Lindenbaum-Tarski algebra of L). Moreover, the coalgebraic semantics (Definition 21) of L is equivalent to the one from Definition 25. Now, having established the relationship between equational and modal logic, soundness and completeness is Proposition 23. Invariance under behavioural equivalence and expressiveness are Propositions 22 and 24, respectively.

9 These are the variables from V, see Definition 7, which are different from the propositional variables from Var.

Remark 28. To keep the presentation in Section 4 simple, we assumed there that Alg(L) has free algebras. But, as shown in [7], this assumption is not necessary (neither always desirable: if T is the powerset functor, then Coalg(T) does not have a final coalgebra and Alg(L) does not have an initial algebra). Theorem 27 then still holds (assuming, as in [7], that T weakly preserves limits of chains).

Example 29. 1. In the case of A = BA one can use → instead of ⊢. For example, the equational logic for the functor V (Example 9.2) translates to a modal logic that adds to classical propositional logic the two axiom schemes □⊤ ↔ ⊤ and □(v_{0} ∧ v_{1}) = □v_{0} ∧ □v_{1}. This is easily seen to be equivalent to the standard calculus of modal logic.

2. The logics of [18] can be understood as presentations of the respective functors.

3. The presentations of the duals of the Kripke polynomial functors of [11] give rise to the infinitary versions of the logics studied there.

Example 30. In [7], we derived in a uniform way the logic for finitely branching transition systems on different topological spaces. The idea was to describe the dual L of the finite (= compact) powerspace, similarly to Example 1, by generators and relations. The completeness proof of the corresponding logics proceeded by, what we call here, the abstract logic (Section 4) of L. But the step from the presentation by generators and relations to the logic was not worked out, being routine and tedious. This gap can now be filled by simply appealing to Theorem 27.

6 Conclusion and Further Work

This paper introduced the notion of a functor having a presentation by operations and equations. It explains how generators and relations give rise to modal operators and axioms and leads to Theorems 15 and 27 which give automatic adequateness proofs once a presentation is given. From a mathematical point of view, the work contributes to the question when a category Alg(L) has a presentation by operations and equations.

Further Work 1. The completeness result relates dual categories as eg BA and Stone or DL and Spec. How completeness wrt Set-coalgebras can be derived from these results is investigated in [17].

2. Remark 12 indicated how to compose presentations of functors. A detailed exposition of this important topic is future work.

3. Proposition 13 showed that the functors on Set with a finite presentation are precisely the finitary functors. A generalisation of this result to other monadic categories than Set will be given elsewhere.

4. An important extension will introduce presentations by operations and implications. These would be necessary to account for some of the functors in, for example, [1].

5. In [8] we apply the notion of a functor having a presentation to the extension of distributive lattices with operators. We show that presentations over posets (which amounts to moving from algebras to ordered algebras) are useful to handle monotone operators.

6. Another important extension will be to replace Set with a presheaf category Set^{C} (which amounts essentially to moving from one-sorted to many-sorted algebras). This will allow us to treat logics with quantifiers or logics for name-passing calculi.

References

1. S. Abramsky. Domain theory in logical form. Annals of Pure and Applied Logic, 51, 1991.

2. S. Abramsky and A. Jung. Domain theory. In Handbook of Logic in Computer Science. OUP, 1994.

3. J. Adámek and V. Trnková. Automata and Algebras in Categories. Kluwer, 1990.

4. P. Blackburn, M. de Rijke, and Y. Venema. Modal Logic. CUP, 2001.

5. M. Bonsangue, B. Jacobs, and J. N. Kok. Duality beyond sober spaces: Topological spaces and observation frames. Theoret. Comput. Sci., 151, 1995.

6. M. Bonsangue and J. Kok. Towards and infinitary logic of domains: Abramsky logic for transition systems. Inform. and Comput., 155, 1995.

7. M. Bonsangue and A. Kurz. Duality for logics of transition systems. In V. Sassone, editor, FoSSaCS’05, volume 3441 of LNCS, 2005.

8. M. Bonsangue, A. Kurz, and I. Rewitzky. Coalgebraic representations of distributive lattices with operators. To appear in Topology and its Applications.

9. C. Cîrstea and D. Pattinson. Modular construction of modal logics. In CONCUR’04, LNCS 3170, 2004.

10. J. M. Dunn. Positive modal logic. Studia Logica, 55(2), 1995.

11. B. Jacobs. Many-sorted coalgebraic modal logic: a model-theoretic study. Theor. Inform. Appl., 35, 2001.

12. P. Johnstone. Stone Spaces. Cambridge University Press, 1982.

13. P. Johnstone. Vietoris locales and localic semilattices. In Continuous Lattices and their Applications, volume 101 of Lecture Notes in Pure and Applied Mathematics. Marcel Dekker, 1985.

14. G. Kelly and J. Power. Adjunctions whose counits are coequalizers and presentations of enriched monads. J.Pure Appl. Algebra, 89, 1993.

15. M. Kracht. Tools and Techniques in Modal Logic. Elsevier, 1999.

16. C. Kupke, A. Kurz, and D. Pattinson. Algebraic semantics for coalgebraic logics. In CMCS’04, ENTCS, 2004.

17. C. Kupke, A. Kurz, and D. Pattinson. Ultrafilter extensions of coalgebras. In CALCO 2005, LNCS 3629, 2005.

18. C. Kupke, A. Kurz, and Y. Venema. Stone coalgebras. Theoret. Comput. Sci., 327, 2004.

19. A. Kurz. Specifying coalgebras with modal logic. Theoret. Comput. Sci., 260, 2001.

20. F. Linton. An outline of functorial semantics. In Seminar on triples and categorical homology theory, LNM 80. 1969.

21. L. Moss. Coalgebraic logic. Annals of Pure and Applied Logic, 96, 1999.

22. L. Moss and I. Viglizzo. Harsanyi type spaces and final coalgebras constructed from satisfied theories. In CMCS’04, ENTCS, 2004.

23. D. Pattinson. Coalgebraic modal logic: Soundness, completeness and decidability of local consequence. Theoret. Comput. Sci., 309, 2003.

24. J. Reiterman. Algebraic theories and varieties of functor algebras. Fund. Math., 118, 1983.

25. E. Robinson. Powerdomains, modalities and the Vietoris monad. Technical report, Computer Laboratory Technical Report 98, University of Cambridge, 1986.

26. J. Rosický. On algebraic categories. In Universal Algebra (Proc. Coll. Esztergom 1977), volume 29 of Colloq. Math. Soc. J. Bolyai, 1981.

27. M. Rößiger. Coalgebras and modal logic. In CMCS’00, volume 33 of ENTCS, 2000.

28. M. Rößiger. From modal logic to terminal coalgebras. Theoret. Comput. Sci., 260, 2001.

29. J. Rutten. Universal coalgebra: A theory of systems. Theoret. Comput. Sci., 249, 2000.

30. L. Schröder. Expressivity of Coalgebraic Modal Logic: The Limits and Beyond. In V. Sassone, editor, FoSSaCS’05, volume 3441 of LNCS, 2005.

31. S. J. Vickers. Topology Via Logic. CUP, 1989.

32. G. Winskel. Note on powerdomains and modality. Theoret. Comp. Sci., 36, 1985.