<figure><img src="image_1.png" /></figure>

HAL
open science

# Strong Completeness for Iteration-Free Coalgebraic Dynamic Logics

Helle Hvid Hansen, Clemens Kupke, Raul Andres Leal

► To cite this version:

Helle Hvid Hansen, Clemens Kupke, Raul Andres Leal. Strong Completeness for Iteration-Free Coalgebraic Dynamic Logics. 8th IFIP International Conference on Theoretical Computer Science (TCS), Sep 2014, Rome, Italy. pp.281-295, 10.1007/978-3-662-44602-7_22. hal-01402072

HAL Id: hal-01402072

https://inria.hal.science/hal-01402072

Submitted on 24 Nov 2016

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Strong Completeness for Iteration-Free
Coalgebraic Dynamic Logics

Helle Hvid Hansen$^{1,2*}$, Clemens Kupke$^{3**}$,
Raul Andres Leal$^{4}$

¹ Radboud University Nijmegen & CWI Amsterdam

² University of Strathclyde

³ Cap Gemini, Amsterdam

**Abstract.** We present a (co)algebraic treatment of iteration-free dynamic modal logics such as Propositional Dynamic Logic (PDL) and Game Logic (GL), both without star. The main observation is that the program/game constructs of PDL/GL arise from monad structure, and the axioms of these logics correspond to certain compatibilty requirements between the modalities and this monad structure. Our main contribution is a general soundness and strong completeness result for PDL-like logics for T-coalgebras where T is a monad and the "program" constructs are given by sequential composition, test, and pointwise extensions of operations of T.

# 1 Introduction

Modal logics are a much used formalism in automated verification thanks to the good balance between their expressive power and their computational properties. Recently, it has been shown that modal logics can be developed in the general framework of coalgebra [4,18], and that the expressiveness and complexity results for Kripke semantics hold more generally across many types of structures [29,30].

In this paper, we aim to develop a coalgebraic framework for dynamic modal logics such as Propositional Dynamic Logic (PDL) [5,12] and Game Logic (GL) [25,26]. In PDL, modalities are indexed by programs whose semantics is given by relations, and program constructs are interpreted by relation algebra. Similarly, in GL, modalities are indexed by games whose semantics is given by monotonic neighbourhood functions.

Our framework for coalgebraic dynamic modal logic builds on the basic observation that in PDL and GL programs/games are interpreted as maps of the form $X \to TX$ where $T$ is a monad. For PDL, $T$ is the covariant powerset monad, and for GL, $T$ is the monotonic neighbourhood monad (both are described in detail later). Such maps can be viewed as arrows in the Kleisli category of the monad $T$ which yields semantics of sequential composition as Kleisli composition. Alternatively, a map $X \to TX$ can be viewed as a $T$-coalgebra which

<footnote>* Supported by NWO-Veni grant 639.021.231.</footnote>

<footnote>** Supported by University of Strathclyde starter grant.</footnote>
leads to a (coalgebraic) modal logic of T-computations. Other constructs, such as choice (∪) and dual (d) in GL, are interpreted by algebraic structure on the set (TX)X = {X → TX} which arises pointwise from algebraic structure on TX. We formalise such constructs using natural operations on functors. We also note that PDL and GL are usually interpreted over so-called standard models, in which the program/game constructs have a certain intended meaning. In our general framework this leads to the notion of a standard model relative to some algebraic structure θ on T. In the current paper, we include tests, but not iteration which will require more assumptions on the monad.

Our main contributions are: (i) a method for associating rank-1 axioms to
natural operations, (ii) a method for axiomatising tests, and (iii) strong com-
pleteness for the ensuing dynamic modal logic.

The rest of the paper is organised as follows. In Section 2 we recall the basics of PDL and GL, and of coalgebraic modal logic and monads. In Section 3, we introduce our general framework for coalgebraic dynamic modal logic. In Section 4, we show how to obtain axioms for sequential composition and natural operations, and provide sufficient conditions for their soundness. In Sections 5 and 6, we prove our strong completeness result which builds on the generic strong completeness result in [31] by showing that a quasi-canonical model can be modified to validate also the non-rank-1 sequential composition axioms. Finally, in Section 7 we conclude and discuss related work. The proofs can be found in the technical report [10].

*Acknowledgements*
We thank Bart Jacobs, Alexander Kurz and Yde Venema for helpful discussions, and the anonymous referees for their useful comments.

2 Preliminaries

2.1 PDL and GL

We briefly recall the basics of the two dynamic modal logics that form our guiding
examples. See the references given for more detail and background information.

**Propositional Dynamic Logic (PDL)** [5,12] is a modal logic for reasoning about program correctness. Modalities are indexed by programs, and a formula `[α]ϕ` should be read as “after all halting executions of program `α`, `ϕ` holds”. PDL programs are built inductively from a set `Prog₀` of atomic programs using the operations of *sequential composition* `(:)`, *choice* ` (∪)` and *iteration* `(*`)`. Moreover, a formula `ϕ` can be turned into a program `ϕ?` by the *test* operation `?`. The semantics of PDL is given by multi-modal Kripke models that contain a relation `R_α` for each program `α`. These models are generally assumed to be *standard* which means that relations for complex programs are defined inductively via composition, union and reflexive, transitive closure of relations over some given interpretation of atomic programs, and a *test* program `ϕ?` is interpreted by restricting the identity relation to the states that satisfy `ϕ`. As a deductive system, PDL is the least normal multi-modal logic that contains the axioms:

$$
\begin{equation}
\begin{array}{l@{\quad}l@{\quad}l}
[\alpha; \beta]\varphi \leftrightarrow [\alpha][\beta]\varphi & [\alpha \cup \beta]\varphi \leftrightarrow [\alpha]\varphi \wedge [\beta]\varphi & [\psi?]\varphi \leftrightarrow (\psi \rightarrow \varphi) \\
\varphi \wedge [\alpha][\alpha^*]\varphi \leftrightarrow [\alpha^*]\varphi & \varphi \wedge [\alpha](\varphi \rightarrow [\alpha]\varphi) \rightarrow [\alpha^*]\varphi &
\end{array}
\tag{1}
\end{equation}
$$
for all programs $\alpha, \beta$ and all formulas $\psi, \varphi$. It is well known that PDL is (weakly) complete with respect to the class of standard PDL models. Strong completeness fails due to the presence of * which makes PDL non-compact.

**Game Logic (GL)** [25,26] is a modal logic for reasoning about strategic ability in determined 2-player games. Here, a modal formula $[\gamma]\varphi$ should be read as "player 1 has a strategy in the game $\gamma$ to ensure an outcome where $\varphi$ holds". The modal language of GL is obtained by extending the program operations of PDL with the game operation dual ($^d$) which corresponds to a role switch of the two players. Game Logic semantics is given by multi-modal monotone neighbourhood models [3,8,9]. We refer to [25,26] for the details. As a deductive system, GL is defined to be the least monotone multi-modal logic containing the following axioms:

$$ \begin{array}{l@{\qquad}l} [\gamma; \delta]\varphi \leftrightarrow [\gamma][\delta]\varphi & [\gamma \cup \delta]\varphi \leftrightarrow [\gamma]\varphi \vee [\delta]\varphi & [\psi?]\varphi \leftrightarrow (\psi \wedge \varphi) \\ \varphi \vee [\gamma][\gamma^*]\varphi \rightarrow [\gamma^*]\varphi & \frac{\varphi \vee [\gamma]\varphi \rightarrow \psi}{[\gamma^*]\varphi \rightarrow \psi} & [\gamma^d]\varphi \leftrightarrow \neg[\gamma]\neg\varphi \end{array} \qquad (2) $$

Both iteration-free GL and dual-free GL are known to be complete for standard GL models (restricted to the appropriate fragment), however, completeness of GL with both * and $^d$ remains an open question. One indication of why completeness for full GL is difficult is that GL can be viewed as a fragment of the modal $\mu$-calculus that spans all levels of the alternation hierarchy [2,26].

## 2.2 Coalgebraic Modal Logic

Coalgebraic modal logic [4,18] is a general framework which encompasses many known modal logics such as normal, classical, graded and probabilistic modal logic. The uniform treatment of these is achieved by viewing the corresponding semantic structures as coalgebras for a functor $T$ [28]. In the present paper, we only consider coalgebras for functors on Set, the category of sets and functions. Let $T$ be a Set-(endo)functor. A $T$-coalgebra is a map $\xi: X \to TX$, and a $T$-coalgebra morphism from $\xi: X \to TX$ to $\xi': X' \to TX'$ is a map $f: X \to X'$ such that $\xi' \circ f = Tf \circ \xi$. $T$-coalgebras and their morphisms form a category $\text{Coalg}(T)$.

We follow the notation from [31] in defining syntax and semantics of coalgebraic modal logic. A modal signature $\Lambda$ consists of a collection of modal operators with associated arities. Given a modal signature $\Lambda$ and a countable set $P$ of atomic propositions, the set $\mathcal{F}(\Lambda)$ of $\Lambda$-formulas is generated by the following grammar:

$$ \varphi ::= p \in P \mid \bot \mid \neg \varphi \mid \varphi \wedge \varphi \mid \Box_{\lambda}(\varphi_1, \dots, \varphi_n) $$

where $\Box_{\lambda} \in \Lambda$ is $n$-ary. For any set $X$, $\text{Prop}(X)$ denotes the set of all propositional formulas over $X$, and $\Lambda(X) = \{\Box_{\lambda}(x_1, \dots, x_n) \mid x_1, \dots, x_n \in X, \Box_{\lambda} \in \Lambda$ is $n$-ary\}.$

Modal formulas will be interpreted in coalgebras. We use the approach to coalgebraic modal logic in which modalities are interpreted via predicate liftings. First, we denote by $Q: \text{Set} \to \text{Set}^{\text{op}}$ the contravariant powerset functor which
maps a set $X$ to its powerset, and a function $f$ to its inverse image map. An $n$-ary predicate lifting for $T$ is a natural transformation $\lambda: Q^n \Rightarrow Q \circ T$. A $(\Lambda, T)$-model $\mathfrak{M}$ consists of a $T$-coalgebra $\xi: X \to TX$, a valuation $V: P \to \mathcal{P}(X)$ of atomic propositions, and an $n$-ary predicate lifting for each $n$-ary modality in $\Lambda$. For formulas $\varphi \in \mathcal{F}(\Lambda)$ the truth set $[\varphi]^{\mathfrak{M}}$ is defined in the expected manner for the atomic propositions and Boolean connectives, and for modal formulas, $[\Box_{\lambda}(\varphi_1, \dots, \varphi_n)]^{\mathfrak{M}} = \xi^{-1}(\lambda_X([\varphi_1]^{\mathfrak{M}}, \dots, [\varphi_n]^{\mathfrak{M}}))$. The map $\xi^{-1} \circ \lambda_X: \mathcal{P}(X)^n \to \mathcal{P}(X)$ is the $n$-ary predicate transformer associated with $\xi$ and $\lambda$. In the remainder of this paper, we will only consider unary modalities and unary predicate liftings.

**Example 1.** The following well known instances of coalgebraic modal logic will be of central interest to the paper. See e.g. [28,29,31] for many other examples.

(i) Coalgebras for the covariant powerset functor $\mathcal{P}: \text{Set} \to \text{Set}$ are Kripke frames, and $\mathcal{P}$-coalgebra morphisms are bounded morphisms. The Kripke box modality is interpreted via the predicate lifting $\lambda_X^\square(U) = \{V \in \mathcal{P}(X) \mid V \subseteq U\}$.

(ii) The neighbourhood functor $\mathcal{N} = \mathcal{Q}^{\text{op}}\mathcal{Q}: \text{Set} \to \text{Set}$ is the composition of $\mathcal{Q}$ with its dual $\mathcal{Q}^{\text{op}}$. $\mathcal{N}$ maps a set $X$ to $\mathcal{P}(\mathcal{P}(X))$, and function $f$ to the double-inverse-image map $\mathcal{N}(f) = (f^{-1})^{-1}$. An $\mathcal{N}$-coalgebra $\nu: X \to \mathcal{N}(X)$ is known in modal logic as a neighbourhood frame, and $\mathcal{N}$-coalgebra morphisms as bounded neighbourhood morphisms [3,11]. The neighbourhood modality is interpreted via the predicate lifting given by $\lambda_X(U) = \{N \in \mathcal{N}(X) \mid U \in N\}$. In this paper we will refer to $\mathcal{N}$-coalgebras as neighbourhood functions.

(iii) The monotone neighborhood functor $\mathcal{M}: \text{Set} \to \text{Set}$ is the subfunctor of $\mathcal{N}$ which maps a set $X$ to the set of upwards closed neighbourhood collections $H \subseteq \mathcal{P}(X)$, i.e., $\mathcal{M}(X) = \{H \in \mathcal{P}(\mathcal{P}(X)) \mid \forall U \subseteq V \subseteq X : U \in H \Rightarrow V \in H\}$, and for a function $f$, $\mathcal{M}(f)$ is obtained by restricting $\mathcal{N}(f)$ to upwards closed neighbourhood collections. Similarly, for the predicate lifting that interprets the monotonic neighbourhood modality. $\mathcal{M}$-coalgebras are known in modal logic as monotonic neighbourhood frames [3,8,9]. We will refer to $\mathcal{M}$-coalgebras as monotonic neighbourhood functions. The name “monotonic” refers to the upwards closure, and will be explained further in the next remark.

**Remark 2.** Neighbourhood functions and (unary) predicate transformers are essentially the same mathematical objects. This basic correspondence arises from the adjunction of the contravariant powerset functor $\mathcal{Q}: \text{Set} \to \text{Set}^{\text{op}}$ with its dual: $\mathcal{Q}: \text{Set} \to \text{Set}^{\text{op}} \to \mathcal{Q}^{\text{op}}: \text{Set}^{\text{op}} \to \text{Set}$. Hence, for all sets $X$ and $Y$ there is a bijection $\text{Set}(X, \mathcal{Q}^{\text{op}}Y) \cong \text{Set}(Y, \mathcal{Q}X)$ given by exponential transpose $f(x)(y) = \hat{f}(y)(x)$. Taking $Y = \mathcal{Q}X$, we get a bijection $\text{Set}(X, \mathcal{Q}^{\text{op}}\mathcal{Q}X) \cong \text{Set}(\mathcal{Q}X, \mathcal{Q}X)$ between neighbourhood functions and predicate transformers given by $U \in \nu(x)$ iff $x \in \hat{\nu}(U)$ for all $x \in X$ and $U \subseteq Y$. Note that $\hat{\nu}: \mathcal{Q}(X) \to \mathcal{Q}(X)$ is a monotonic map (w.r.t. set-inclusion) if and only if $\nu: X \to \mathcal{M}(X) \subseteq \mathcal{Q}^{\text{op}}\mathcal{Q}(X)$ is a monotonic neighbourhood function.

The Set-monad arising from the above adjunction is the neighbourhood monad $\mathcal{N} = \mathcal{Q}^{\text{op}}\mathcal{Q}$ (cf. Example 3(2) below) and it will play a central role in what follows.
## 2.3 Monads

Monads will be used in two different ways. One is related to the view that monads model computational effects [24]. The other is related to their role as abstract algebraic theories [22].

We briefly recall the basic definition. A *monad on Set* is a triple $T = (T, \eta, \mu)$ where $T$ is an *Set-functor*, and $\eta: \text{Id} \Rightarrow T$ (unit) and $\mu: T^2 \Rightarrow T$ (multiplication) are natural transformations that satisfy the following coherence laws: $\mu \circ \eta_T = \mu \circ T\eta = \text{id}_T$ and $\mu \circ \mu_T = \mu \circ T\mu$. Due to lack of space, we cannot provide much background on monads. We refer to [21] for the basic definitions of Kleisli category, Eilenberg-Moore algebra (EM-algebra), and monad morphism.

Monads are used to capture computational effects such as I/O and state by viewing (functional) programs as arrows in the Kleisli category [24]. Here, we consider state-based computing rather than functional programming. This means that we generally view programs as functions $X \to TX$ where $X$ is the state-space of the computation. However, the fact that such functions are also Kleisli maps is, of course, essential for the definition of sequential composition. We write $*$ for composition in $Kl(T)$.

In order to give semantics to test operations, we need $TX$ to contain an element that represents an aborted computation. We will say that a monad $T$ is pointed$^4$ if for each set $X$, $TX$ contains a distinguished element $\perp_{TX}$ (or just $\perp$), and for all maps $f: X \to Y$, $Tf(\perp) = \perp$.

**Example 3.** Let $X$ be an arbitrary set. For $U \subseteq X$, we denote by $\uparrow\{U\}$ the up-set of $\{U\}$ in the poset $\mathcal{N}(X)$, i.e., $\uparrow\{U\} = \{N \in \mathcal{N}(X) | U \in N\}$.

1. The covariant power set functor $\mathcal{P}$ is a monad with unit $\eta_X(x) = \{x\}$ and multiplication $\mu_X(\{U_i | i \in I\}) = \bigcup_{i \in I} U_i$. Arrows in $Kl(\mathcal{P})$ are relations, and $*$ is just relation composition. For a set $X$, $\mathcal{P}(X)$ is the free join-semilattice with bottom on $X$, and $\mathcal{P}$ is pointed by taking $\perp = \emptyset \in \mathcal{P}(X)$.

2. The neighbourhood functor $\mathcal{N}$ is a monad with

$$ \eta_X(x) = \{U \subseteq X | x \in U\} \qquad \mu_X(W) = \{U \subseteq X | \uparrow\{U\} \in W\}. $$

Also $\mathcal{N}$ is pointed by taking $\perp = \emptyset \in \mathcal{N}(X)$. An arrow $X \to \mathcal{NY}$ in $Kl(\mathcal{N})$ is essentially a predicate transformer $QY \to QX$ using the isomorphism via transpose (cf. Remark 2) which translates Kleisli composition of $\mathcal{N}$ into (function) composition of predicate transformers. In particular, for all $\nu_1, \nu_2: X \to \mathcal{NX}$, all $x \in X$ and $U \subseteq X$,

$$ U \in (\nu_2 * \nu_1)(x) \iff x \in \hat{\nu}_1(\hat{\nu}_2(U)) \qquad (3) $$

3. The functor $\mathcal{M}$ is also a pointed monad. The unit $\eta$ and multiplication $\mu$ are obtained by restricting the ones for $\mathcal{N}$, and $\perp = \emptyset$. For a set $X$, $\mathcal{M}(X)$ is the free completely distributive lattice on $X$, cf. [23] (see also [16, 3.8,4.8]).

4. The functor $L = 1 + \text{Id}$ is the “lift monad” (where $1 = \{*\}$). The unit $\eta_X: X \to 1 + X$ is inclusion. The multiplication $\mu_X$ maps $x \in 1 + (1 + X)$ to $x$ iff $x \in X$, and otherwise to $*$. $L$ is pointed by taking $\perp = * \in LX$.

<footnote>$^4$ Our notion of pointed monad is equivalent to requiring a natural transformation $1 \Rightarrow T$ where $1$ is the constant *Set-functor* that maps every set to the singleton set.</footnote>
## 3 Dynamic Coalgebraic Modal Logic

Our goal is to generalise the situation of PDL and GL to dynamic modal logics for other monads $T$. For the pointwise operations it seems at first that the natural operations are those coming from EM-algebras of $\mathbb{T}$. For example, PDL *choice* $\cup$ is interpreted via the join-semilattice structure on $\mathcal{P}(X)$. Similarly, the game operations *choice* and *dual* are interpreted via the lattice structure on $\mathcal{M}(X)$. While it is known that all set monads have a presentation in terms of operations and equations (cf. [20]), such a canonical presentation might be a proper class — a property that is not desirable for the design of a clear and concise programming language. As no “small” canonical choice of pointwise operations seems to be given, we generalise pointwise operations such as *choice* and *dual* using the notion of a natural operation and natural algebra.

**Definition 4.** Let $T: \mathbb{C} \to \text{Set}$ be a functor, a natural $n$-ary operation on $T$ is a natural transformation $\theta: T^n \to T$. More generally, given a signature functor $\Sigma: \text{Set} \to \text{Set}$, a natural $\Sigma$-algebra on $T$ is a natural transformation $\theta: \Sigma T \to T$.

*Example 5.* 1. All Boolean operations are natural on $\mathcal{Q}^{\text{op}}$. The reason is that the inverse-image map of a function preserves all of those.

2. For similar reasons, all Boolean operations on neighbourhood collections, such as e.g. $N \cup K$ for $N, K \in \mathcal{N}X$, are natural on $\mathcal{N}$. The neighbourhood-wise Boolean operations such as e.g. $N \cap K = \{U \cap V | U \in N, V \in K\}$ are not natural on $\mathcal{N}$.

3. Union and intersection are natural on $\mathcal{M}$ (complement does not preserve monotonicity).

4. The *dual* operation defined for all $N \in \mathcal{N}X$ and $U \subseteq X$ by $U \in N^d$ iff $X \setminus U \notin N$ is natural on $\mathcal{N}$ (and $\mathcal{M}$).

5. The only Boolean operation that is natural on $\mathcal{P}$ is union, because the direct image of a function preserves unions, but not intersections or complements.

6. Apart from identity, the lift monad has only one (rather boring) operation *nil* where $\text{nil}_X(t) = *$ for all $t \in LX$.

A natural $n$-ary operation $\theta: T^n \to T$ induces for each set $X$ a pointwise operation $\theta_X$ on $\text{Set}(X, TX) = (TX)^X$ in the expected manner. By cotupling, a natural $\Sigma$-algebra $\theta: \Sigma T \to T$ induces a pointwise $\Sigma$-algebra $\theta_X$ on $(TX)^X$. For $n$-ary $\sigma \in \Sigma$, we denote the $\sigma$-component of $\theta_X$ by $(\theta_\sigma)_X: (TX)^n \to TX$.

Just as the syntax and semantics of PDL and GL is defined relative to a particular set of program/game operations, so is our notion of dynamic syntax and semantics. For the syntax, however, one only needs to fix a signature.

**Definition 6 (Dynamic syntax).** Given a signature functor $\Sigma$, a set of atomic actions $A_0$ and a countable set $P$ of atomic propositions, we define the set $\mathcal{F}(P, A_0, \Sigma)$ of dynamic formulas and the set $A = A(P, A_0, \Sigma)$ of complex actions by mutual induction:

$$ \begin{aligned} \mathcal{F}(P, A_0, \Sigma) &\ni \varphi ::= p \in P \mid \bot \mid \neg\varphi \mid \varphi \wedge \varphi \mid [\alpha]\varphi \\ A(P, A_0, \Sigma) &\ni \alpha ::= a \in A_0 \mid \alpha; \alpha \mid \sigma(\alpha_1, \dots, \alpha_n) \mid \varphi? \end{aligned} $$

where $\sigma \in \Sigma$ is $n$-ary.
For the semantics, we first note that the multi-modal structures of PDL and GL easily generalise to a coalgebra $X \to (TX)^A$ for the “labelled functor” $T^A$. A $T^A$-coalgebra will be called standard relative to some choice of natural algebra on $T$.

**Definition 7 (Standard).** Let $\theta: \Sigma T \Rightarrow T$ be a natural $\Sigma$-algebra on a monad $\mathbb{T}$, and let $\delta: \Sigma A \to A$ be given by restricting action formation to $\Sigma$-operations. A coalgebra $\xi: X \to (TX)^A$ is called $\theta$-standard if the transpose $\hat{\xi}: A \to (TX)^X$ is a $\Sigma$-algebra morphism, i.e.,

$$ \hat{\xi} \circ \delta = \theta_X^X \circ \Sigma \hat{\xi} \qquad (4) $$

We say that $\xi$ is $\theta$-standard if for all $\alpha, \beta \in A$, $\hat{\xi}(\alpha; \beta) = \hat{\xi}(\alpha) * \hat{\xi}(\beta)$.

We now define the notion of a dynamic model relative to a choice of natural algebra $\theta: \Sigma T \Rightarrow T$.

**Definition 8 (Dynamic semantics).** Let $\mathbb{T} = (T, \eta, \mu)$ be a pointed monad, and $\theta: \Sigma T \Rightarrow T$ a natural $\Sigma$-algebra on $T$. A $(P, A_0, \theta)$-dynamic $\mathbb{T}$-model is a triple $\mathfrak{M} = (\xi_0, \lambda, V)$ where $\hat{\xi}_0: A_0 \to (TX)^X$ is an interpretation of atomic actions in $(TX)^X$, $\lambda: Q \Rightarrow Q \circ T$ is a unary predicate lifting for $T$, and $V: P \to P(X)$ is a valuation. We define the truth set $[[\varphi]]^\mathfrak{M}$ of dynamic formulas and the semantics $\hat{\xi}: A \to (TX)^X$ of complex actions in $\mathfrak{M}$ by mutual induction:

$$ \begin{align*} [[p]]^\mathfrak{M} &= V(p), & [[\varphi \wedge \psi]]^\mathfrak{M} &= [[\varphi]]^\mathfrak{M} \cap [[\psi]]^\mathfrak{M}, & [[\neg \varphi]]^\mathfrak{M} &= X \setminus [[\varphi]]^\mathfrak{M}, \\ [[[\alpha]]\varphi]]^\mathfrak{M} &= (\hat{\xi}(\alpha)^{-1} \circ \lambda_X)([[\varphi]]^\mathfrak{M}), & & & \\ \hat{\xi}(\sigma(\alpha_1, \dots, \sigma_n)) &= (\theta_\sigma)^X(\hat{\xi}(\alpha_1), \dots, \hat{\xi}(\alpha_n)), & \text{where } \sigma \in \Sigma \text{ is n-ary,} \\ \hat{\xi}(\alpha; \beta) &= \hat{\xi}(\alpha) * \hat{\xi}(\beta) & \text{(Kleisli composition),} \\ \hat{\xi}(\varphi?)(x) &= \eta_X(x) \text{ if } x \in [[\varphi]]^\mathfrak{M}, \perp_{TX} \text{ otherwise.} \end{align*} $$

We will sometimes refer to the induced $\hat{\xi}$, and its transpose $\xi: X \to (TX)^A$, simply as a $\theta$-dynamic $\mathbb{T}$-model.

Note that, by definition, a $\theta$-dynamic $\mathbb{T}$-model $\xi: X \to (TX)^A$ is both $\theta$-standard and $\theta$-standard.

**Remark 9.** If we would not include tests, then we could drop the requirement of $\mathbb{T}$ being pointed, and define a $\mathbb{T}$-dynamic $(P, A_0, \theta)$-structure to be a coalgebra $\xi: X \to (TX)^A$ whose transpose is the unique $\Sigma \cup \{\cdot\}$-algebra morphism induced by $\hat{\xi}_0: A_0 \to (TX)^X$ and the $\Sigma \cup \{\cdot\}$-algebra structure on $(TX)^X$ given by $\theta$ and Kleisli composition.

# 4 Soundness

In this section we give a general method for finding axioms for $(P, A_0, \theta)$-dynamic $\mathbb{T}$-models. In order for these axioms to be sound, it will be necessary to require
the predicate lifting $\lambda$: $\mathcal{Q} \Rightarrow \mathcal{Q} \circ T$ to interact well with monad structure and pointwise structure.

We start with sequential composition. Not surprisingly, ;-standard models are captured by the axiom $[\alpha; \beta]p \leftrightarrow [\alpha][\beta]p$, for all $\alpha, \beta \in A$.

**Lemma 10.** Let $\xi: X \to (TX)^A$ be ;-standard. If $\hat{\lambda}: T \to \mathcal{Q}^{\text{op}}\mathcal{Q}$ is a monad morphism, then the axiom $[\alpha; \beta]p \leftrightarrow [\alpha][\beta]p$ is valid in $\mathfrak{M}$.

**Remark 11.** As noted in e.g. [17], giving a monad morphism $T \Rightarrow \mathcal{Q}^{\text{op}}\mathcal{Q}$ is the same as giving an Eilenberg-Moore algebra $T2 \to 2$. The view of modalities as EM-algebras for $T$ was already suggested in [24], and more recently in [13]. The correspondence (via the Yoneda lemma) between unary predicate liftings and subsets of $T2$ was observed in [29]. Moreover, it is easy to verify that $\lambda$ corresponds to an EM-algebra iff its Boolean dual $\neg\lambda\neg$ does.

**Example 12.** (i) The Kripke diamond $\lambda_X^{\diamond}(U) = \{V \in \mathcal{P}(X) \mid U \cap V \neq \emptyset\}$ corresponds (via Yoneda) to the free $\mathcal{P}$-algebra $\mathcal{P}\mathcal{P}(1) \to \mathcal{P}(1)$, hence the transpose of $\lambda^{\diamond}$ and of its dual, the Kripke box $\lambda^{\square}$, are both monad morphisms. (ii) The transpose of the monotonic $\lambda$ is the natural inclusion $\hat{\lambda}: \mathcal{M} \Rightarrow \mathcal{N}$ and hence a monad morphism. (iii) In [13], the EM-algebras $L2 \to 2$ for the lift monad were shown to correspond to $\lambda^{\text{tl}}$ (total correctness) and $\lambda^{\text{pl}}$ (partial correctness) where $t \in \lambda_X^{\text{tl}}(U)$ iff $t \in U$ and $t \in \lambda_X^{\text{pl}}(U)$ iff $t = *$ or $t \in U$.

Finding axioms for pointwise operations from natural algebras requires a bit more work. We will use the observation that an operation $\sigma: (\mathcal{N}X)^n \to \mathcal{N}X$ on neighbourhood functions is isomorphic to an operation $\bar{\sigma} = \psi^{-1} \circ \sigma \circ \psi^n$ on predicate transformers via the bijection $\psi: QX^{\bar{Q}X} \to (Q^{\text{op}}QX)^X$ given in Remark 2. In particular, if $\chi: \mathcal{N}^n \Rightarrow \mathcal{N}$ is a natural operation on $\mathcal{N}$ with pointwise lifting $\chi_X^X: ((\mathcal{N}X)^X)^n \Rightarrow (\mathcal{N}X)^X$ to neighbourhood functions for any set $X$, then $\bar{\chi}_X^X = \psi^{-1} \circ \chi_X^X \circ \psi^n$ is concretely given by

$$x \in \bar{\chi}_X^X(m_1, \dots, m_n)(U) \iff U \in \chi_X^X(\psi(m_1), \dots, \psi(m_n))(x) \quad (5)$$

for all $m_1, \dots, m_n \in \mathcal{Q}X^{\bar{Q}X}$, $x \in X$ and $U \subseteq X$.

**Example 13.** The operation on predicate transformers corresponding to the dual operation $d: \mathcal{N} \Rightarrow \mathcal{N}$ is $\bar{d}(m)(U) = X \setminus m(X \setminus U)$. The operations on predicate transformers corresponding to Boolean operations on $\mathcal{N}$ are $(m_1 \bar{\cup} m_2)(U) = m_1(U) \cup m_2(U)$, $(\bar{\neg}m)(U) = X \setminus m(U)$ and so on.

The axioms for pointwise operations turn operations on labels into operations on predicate transformers. Using the above correspondence, we find the axioms via representations of natural operations on $\mathcal{N}$. For all $\chi: \mathcal{N}^n \Rightarrow \mathcal{N}$ and all $\alpha_1, \dots, \alpha_n \in A$, we will define a rank-1 formula $\varphi(\chi, \alpha_1, \dots, \alpha_n, p)$. We start by showing how to do so for unary operations. Let $\chi: \mathcal{N} \Rightarrow \mathcal{N}$ be a unary natural operation on $\mathcal{N} = \mathcal{Q}^{\text{op}}\mathcal{Q}$. We have the following correspondence via the adjunction $\mathcal{Q} \vdash \mathcal{Q}^{\text{op}}$ from Remark 2:

$$\frac{\chi_X : \mathcal{Q}^{\text{op}}\mathcal{Q}X \to \mathcal{Q}^{\text{op}}\mathcal{Q}X \in \text{Set}}{\hat{\chi}_X : \mathcal{Q}\mathcal{Q}^{\text{op}}\mathcal{Q}X \to \mathcal{Q}X \in \text{Set}^{\text{op}}}$$
Therefore $\chi$ corresponds uniquely to (a predicate lifting) $\hat{\chi} = \lambda^\chi: \mathcal{Q} \Rightarrow \mathcal{QQ}^{\text{op}}\mathcal{Q}$, and by the Yoneda lemma to an element $\check{\chi} = \hat{\chi}_2(id_2) = \hat{\chi}_2(\{1\}) \in \mathcal{QQ}^{\text{op}}\mathcal{Q}(2)$. Note that $\mathcal{QQ}^{\text{op}}\mathcal{Q}(2)$ is the free Boolean algebra on four generators that can be identified with the elements of $\mathcal{Q}(2) = \{\emptyset, \{0\}, \{1\}, 2\}$. Consider the following four natural operations on $\mathcal{Q}^{\text{op}}\mathcal{Q}$ and their Yoneda correspondents:

<table><thead><tr><th></th><th>operation</th><th>$\chi_X: \mathcal{N}X \to \mathcal{N}X, N \in \mathcal{N}X, U \subseteq X$</th><th>$\check{\chi}: \mathcal{QQ}^{\text{op}}\mathcal{Q}(2), N \in \mathcal{QQ}^{\text{op}}\mathcal{Q}(2)$</th></tr></thead><tbody><tr><td>id</td><td>$U \in i_X(N)$</td><td>$\Leftrightarrow U \in N$</td><td>$N \in \check{i} \Leftrightarrow \{1\} \in N$</td></tr><tr><td>compl.</td><td>$U \in c_X(N)$</td><td>$\Leftrightarrow X \setminus U \in N$</td><td>$N \in \check{c} \Leftrightarrow \{0\} \in N$</td></tr><tr><td>zero</td><td>$U \in z_X(N)$</td><td>$\Leftrightarrow \emptyset \in N$</td><td>$N \in \check{z} \Leftrightarrow \emptyset \in N$</td></tr><tr><td>top</td><td>$U \in t_X(N)$</td><td>$\Leftrightarrow X \in N$</td><td>$N \in \check{t} \Leftrightarrow 2 \in N$</td></tr></tbody></table>

Since $\check{i}, \check{c}, \check{z}, \check{t}$ generate all of $\mathcal{QQ}^{\text{op}}\mathcal{Q}(2)$ it follows that for every unary natural operation $\chi: \mathcal{QQ}^{\text{op}}\mathcal{Q} \Rightarrow \mathcal{QQ}^{\text{op}}\mathcal{Q}$ the correspondent $\check{\chi}$ is a Boolean combination over $\check{i}, \check{c}, \check{z}, \check{t}$.

For an $n$-ary $\chi: \mathcal{N}^n \Rightarrow \mathcal{N}$, we get as Yoneda correspondent $\check{\chi} \in \mathcal{Q}(\mathcal{N}(2)^n) \cong \mathcal{N}(n \cdot \mathcal{Q}(2))$ where $n \cdot \mathcal{Q}(2)$ is the $n$-fold coproduct of $\mathcal{Q}(2)$. $\mathcal{N}(n \cdot \mathcal{Q}(2))$ is the free Boolean algebra over $n \cdot \mathcal{Q}(2)$, and hence any $n$-ary natural operation on $\mathcal{N}$ corresponds to a Boolean expression over $n$ copies of the generators $\check{i}, \check{c}, \check{z}, \check{t}$. For example, the binary union $\chi = \cup$ has correspondent $\check{\chi} = \check{i}_1 \vee \check{i}_2$, i.e., $(N, K) \in \check{\chi}$ iff $N \in \check{i}_1$ or $K \in \check{i}_2$. This leads to the following definition.

**Definition 14.** Let $\{\check{i}_j, \check{c}_j, \check{z}_j, \check{t}_j | j = 1, \dots, n\}$ be the generators of $\mathcal{N}(n \cdot \mathcal{Q}(2))$. For $\chi: \mathcal{N}^n \Rightarrow \mathcal{N}$ we define $\varphi(\check{\chi}, \alpha_1, \dots, \alpha_n, p)$ inductively as follows:

- $\varphi(\check{i}_j, \alpha_1, \dots, \alpha_n, p) = [\alpha_j]p$ for all $j = 1, \dots, n$.

- $\varphi(\check{c}_j, \alpha_1, \dots, \alpha_n, p) = [\alpha_j]\neg p$ for all $j = 1, \dots, n$.

- $\varphi(\check{z}_j, \alpha_1, \dots, \alpha_n, p) = [\alpha_j]\perp$ for all $j = 1, \dots, n$.

- $\varphi(\check{t}_j, \alpha_1, \dots, \alpha_n, p) = [\alpha_j]\top$ for all $j = 1, \dots, n$.

- $\varphi(\neg\check{\chi}, \alpha_1, \dots, \alpha_n, p) = \neg\varphi(\chi, \alpha_1, \dots, \alpha_n, p)$.

- $\varphi(\check{\chi} \wedge \check{\delta}, \alpha_1, \dots, \alpha_n, p) = \varphi(\chi, \alpha_1, \dots, \alpha_n, p) \wedge \varphi(\delta, \alpha_1, \dots, \alpha_n, p)$.

For example, the dual operation on $\mathcal{N}$ is $\check{d} = \neg\check{c}$ and we have $\varphi(\check{d}, \alpha, p) = \neg\varphi(\check{c}, \alpha, p) = \neg[\alpha]\neg p$. Similarly, for $\check{d}_1 \wedge \neg\check{t}_2$, we get $\varphi(\check{d}_1 \wedge \neg\check{t}_2, \alpha_1, \alpha_2, p) = (\neg[\alpha_1]\neg p) \wedge (\neg([\alpha_2]\top))$.

The following theorem says that whenever $\lambda$ transforms $\theta$-structure on $T$-coalgebras into $\chi$-structure on neighbourhood functions, for some natural $\chi$, then the rank-1 axioms associated with $\chi$ are sound on $\theta$-standard coalgebras.

**Theorem 15.** Let $\theta: T^n \Rightarrow T$ be a natural operation on $T$, and let $\xi: X \to (TX)^A$ be a $\theta$-standard $T^A$-coalgebra. Let $\lambda: \mathcal{Q} \Rightarrow \mathcal{Q} \circ T$ be a predicate lifting for $T$. If there is a natural operation $\chi: \mathcal{N}^n \Rightarrow \mathcal{N}$ such that

$$ \hat{\lambda} \circ \theta = \chi \circ \hat{\lambda}^n \qquad (6) $$

then for all $\alpha_1, \dots, \alpha_n \in A$, the $\theta$-axiom $[\theta(\alpha_1, \dots, \alpha_n)]p \leftrightarrow \varphi(\check{\chi}, \alpha_1, \dots, \alpha_n, p)$ is valid in $\xi$ (where $\theta$ denotes the syntax/term constructor associated with $\theta$). The above statement generalises to natural $\Sigma$-algebras $\theta: \Sigma T \Rightarrow T$ by considering the axioms for the components $\theta_\sigma$ and $\chi_\sigma$ for $\sigma \in \Sigma$.
*Example 16.* Using Theorem 15 we find that

(i) The PDL axiom $[\alpha \cup \beta]p \leftrightarrow [\alpha]p \wedge [\beta]p$ is valid because $\hat{\lambda}^{\square}: \mathcal{P} \Rightarrow \mathcal{N}$ transforms unions into intersections, i.e., $\hat{\lambda}_{X}^{\square}(U_1 \cup U_2) = \hat{\lambda}_{X}^{\square}(U_1) \cap \hat{\lambda}_{X}^{\square}(U_2)$. That is, we can apply Theorem 15 with $\theta = \cup: \mathcal{P}^2 \Rightarrow \mathcal{P}$ and $\chi = \cap: \mathcal{N}^2 \Rightarrow \mathcal{N}$.

(ii) The axiom $[\alpha \cup \beta]p \leftrightarrow [\alpha]p \vee [\beta]p$ is valid in standard GL-models because the transpose of the predicate lifting $\lambda_X(U) = \{N \in \mathcal{M}X \mid U \in N\}$ for the monotonic modality is the natural inclusion $\hat{\lambda}: \mathcal{M} \Rightarrow \mathcal{N}$, i.e., $\theta = \chi = \cup$. Similarly, for the dual axiom $[\alpha^d]p \leftrightarrow \neg[\alpha]\neg p$.

(iii) For the lift monad we find that $\lambda^{\text{tl}}$ turns nil into $\chi_{\text{nil}}$ where $\chi_{\text{nil},X}(N) = \emptyset$ for all $N \in \mathcal{N}X$. Hence, we have the axiom $[\text{nil}]p \leftrightarrow \bot$. Dually, $\lambda^{\text{pl}}$ turns nil into $\chi_{\text{all}}$ where $\chi_{\text{all},X}(N) = \mathcal{P}(X)$ and we get the axiom $[\text{nil}]p \leftrightarrow \top$.

# 5 Completeness

In this section we will prove a generic strong completeness result for our family of coalgebraic dynamic logics.

Our completeness proof makes use of results from coalgebraic modal logic. Therefore we need to recall some terminology: A modal logic $\mathcal{L} = (\Lambda, Ax, Fr)$ consists of a modal signature $\Lambda$, a collection $Ax \subseteq \text{Prop}(\Lambda(\text{Prop}(P)))$ of rank-1 axioms, and a collection $Fr \subseteq \mathcal{F}(\Lambda)$ of frame conditions. For a formula $\varphi \in \mathcal{F}(\Lambda)$, we write $\vdash_{\mathcal{L}} \varphi$ if $\varphi$ can be derived from $Ax \cup Fr$ using propositional reasoning, uniform substitution and the congruence rule: from $\varphi_1 \leftrightarrow \varphi_1, \dots, \varphi_n \leftrightarrow \psi_n$ infer $\Box_{\lambda}(\varphi_1, \dots, \varphi_n) \leftrightarrow \Box_{\lambda}(\psi_1, \dots, \psi_n)$ for any $n$-ary $\Box_{\lambda} \in \Lambda$. A formula $\varphi \in \text{Prop}(\Lambda(\mathcal{P}(X)))$ is one-step derivable, denoted $\vdash_{\mathcal{L}}^{1}$, if $\varphi$ is propositionally entailed by the set $\{\psi\tau \mid \tau: P \to \mathcal{P}(X), \psi \in Ax\}$. A set $\Phi \subseteq \text{Prop}(\Lambda(\mathcal{P}(X)))$ is called one-step $\mathcal{L}$-consistent if there are no formulas $\varphi_1, \dots, \varphi_n \in \Phi$ such that $\vdash_{\mathcal{L}}^{1} \neg(\varphi_1 \wedge \dots \wedge \varphi_n)$. Let $T$ be a Set-functor and assume a predicate lifting $\lambda$ is given for each $\Box_{\lambda} \in \Lambda$. For a formula $\varphi \in \text{Prop}(\Lambda(\mathcal{P}(X)))$ the one-step semantics $[[\varphi]]_1 \subseteq TX$ is defined by putting $[[\Box_{\lambda}(U_1, \dots, U_n)]_1 = \lambda_X(U_1, \dots, U_n)$ and by inductively extending this definition to Boolean combinations of boxed formulas. We say that $\mathcal{L}$ is separating if $t \in TX$ is uniquely determined by the set $\{\Phi \in \Lambda(\mathcal{P}(X)) \mid t \in [[\Phi]]_1\}$. Finally, $\mathcal{L}$ is called one-step sound if for any one-step derivable formula $\varphi \in \text{Prop}(\Lambda(\mathcal{P}(X)))$ we have $[[\varphi]]_1 = TX$, i.e., if any such formula $\varphi$ is one-step valid. $\mathcal{L}$ is called strongly one-step complete over finite sets if for every finite set $X$ and every one-step consistent set $\Phi \subseteq \text{Prop}(\Lambda(\mathcal{P}(X)))$ is one-step satisfiable.

Throughout the section we assume the following are given: a pointed monad $T$ on Set, a single, unary predicate lifting $\lambda: Q \Rightarrow Q \circ T$ for $T$ whose transpose $\hat{\lambda}$ is a monad morphism, a countable set $P$ of atomic propositions, a set $A_0$ of atomic actions, and $\theta: \Sigma T \Rightarrow T$, a natural $\Sigma$-algebra on $T$. To ensure soundness, we also assume that there is a natural algebra $\chi: \Sigma \mathcal{N} \Rightarrow \mathcal{N}$ such that $\hat{\lambda} \circ \theta = \chi \circ \hat{\lambda}^n$ (cf. Theorem 15). We let $\Lambda = \{[\alpha] \mid \alpha \in A(P, A_0, \Sigma)\}$.

Let us now clarify which logics we are considering. Firstly, we assume we have a separating, one-step sound and strongly one-step complete rank-1 axiomatisation $Ax(T, \square)$ over $T$-coalgebras in the basic modal language $\mathcal{F}(\{\square\})$.
The “underlying” logic ({λ}, Ax(T, □), ∅) will be denoted by L<sub>b</sub>. Given an action α ∈ A, we denote by Ax(T, □)α the set of rank-1 axioms over the labelled modal language F({[α] | α ∈ A}) obtained by replacing all occurrences of □ by [α], and we let Ax(T, □)A = ⋃<sub>α∈A</sub> Ax(T, □)α be all labelled instances of rank-1 axioms in Ax(T, □).

**Definition 17 (Dynamic logic).** We define

$$
\begin{align*}
\mathrm{Ax} &= \mathrm{Ax}(T, \Box)_A \cup \{\varphi(\sigma, \alpha_1, \dots, \alpha_n, p) \mid \sigma \in \Sigma, \alpha_i \in A\} \\
\mathrm{Fr} &= \{[\alpha; \beta]p \leftrightarrow [\alpha][\beta]p \mid \alpha, \beta \in A(P, A_0, \Sigma), p \in P\} \\
\mathcal{L}(\theta) &= (\Lambda, \mathrm{Ax}, \emptyset), \\
\mathcal{L}(\theta, ;) &= (\Lambda, \mathrm{Ax}, \mathrm{Fr}).
\end{align*}
$$

We refer to $\mathcal{L}(\theta)$ and $\mathcal{L}(\theta, ;)$ as $(P, A_0, \theta)$-dynamic logics.

We are now going to prove completeness of both $\mathcal{L}(\theta)$ and $\mathcal{L}(\theta, ;)$ with respect to $\theta$-standard and $\theta, ;$-standard models, respectively. In order to facilitate our proof we show that $\theta$-standard models can be characterised as those models that are based on $T_{\mathrm{st}}^A$-coalgebras for a suitable subfunctor $T_{\mathrm{st}}^A$ of $T^A$. This is done using the following definition of $\theta$-standard that can be seen as a “point-wise” version of Definition 7.

**Definition 18.** We say a function $f : A \to TX$ is $\theta$-standard if $f$ is a $\Sigma$-algebra morphism (from $\delta : \Sigma A \to A$ to $\theta_X : \Sigma TX \to TX$ where $\delta$ is as in Def. 7):

$$f \circ \delta = \theta_X \circ \Sigma f \qquad (7)$$

Furthermore we let $T_{\mathrm{st}}^A X = \{f : A \to TX \mid f \text{ is } \theta\text{-standard}\}$. It is easy to check that $T_{\mathrm{st}}^A$ can be extended to a subfunctor of $T^A$.

**Lemma 19.** A coalgebra $\xi : X \to (TX)^A$ is $\theta$-standard iff $\xi$ is a $T_{\mathrm{st}}^A$-coalgebra.

Let us now start with our completeness proof. We are first going to check that $\mathcal{L}(\theta)$ is one-step sound over $\theta$-standard models.

**Proposition 20.** The logic $\mathcal{L}(\theta)$ is one-step sound for $T_{\mathrm{st}}^A$.

**Proposition 21.** The logic $\mathcal{L}(\theta)$ is strongly one-step complete for $T_{\mathrm{st}}^A$.

The property of a functor preserving inverse limits of surjective $\omega$-cochains is from [31] is one of the main conditions for the existence of quasi-canonical models in Proposition 24 below.<fnref n="5" /> Please consult loc.cit. for the definition.

**Proposition 22.** If $T$ weakly preserves inverse limits of surjective $\omega$-cochains, then so does the functor $T_{\mathrm{st}}^A$.

Using the results from [31], Propositions 21 and 22 imply that $\mathcal{L}(\theta)$ is sound and strongly complete with respect to $T_{\mathrm{st}}^A$-coalgebras. This is achieved by proving the existence of so-called quasi-canonical models.

<footnote n="5">⁵ The condition in [31] is motivated by a stronger condition used in [19, Thm. 9.4].</footnote>
**Definition 23.** A quasi-canonical $T_{\text{st}}^A$-model for a dynamic modal logic $\mathcal{L} =$ ($\Lambda$, $Ax$, $Fr$) is a $T_{\text{st}}^A$-model ($S, \xi : S \to T_{\text{st}}^A S, V$) that satisfies all axioms $Ax$ and frame conditions $Fr$ and such that

- $S$ is the set of maximal $\mathcal{L}$-consistent sets of formulas,

- $V(p) = \{\Delta \in S | p \in \Delta\}$ and

- for all $\Gamma \in S$, $\alpha \in A$ and all formulas $\varphi$ we have:

$$ \xi(\Gamma)(\alpha) \in \lambda(\hat{\varphi}) \quad \text{iff} \quad [\alpha]\varphi \in \Gamma, \text{ where } \hat{\varphi} = \{\Gamma \in S | \varphi \in \Gamma\}. $$

**Proposition 24.** The logic $\mathcal{L}(\theta)$ has a quasi-canonical model. Consequently, $\mathcal{L}(\theta)$ is sound and strongly complete with respect to the class of all $\theta$-standard models.

Next, we prove that $\mathcal{L}(\theta, ;)$ is complete with respect to all $\theta, ;$-standard dynamic models. Therefore we need to ensure that the frame is well-behaved regarding action composition. (Tests will be discussed in section 6.) In other words, we want to ensure the validity of the sequential composition axioms on the quasi-canonical frame. From a coalgebraic perspective this is a non-trivial task as one cannot deal with axioms of rank greater than 1 in a generic coalgebraic way. In particular, we cannot assume that a quasi-canonical model is $;$-standard, but we now describe how we can modify a quasi-canonical model into an equivalent $;$-standard quasi-canonical model.

**Definition 25.** Let $(X, \xi, V)$ be a $T_{\text{st}}^A$-model. We say two elements $t$ and $t'$ of $TX$ are equivalent with respect to boxed atoms (notation: $t \sim_{\square} t'$) if for all formulas $\varphi$ we have

$$ t \in \lambda_X (\llbracket \varphi \rrbracket_{(X, \xi, V)}) \quad \text{iff} \quad t' \in \lambda_X (\llbracket \varphi \rrbracket_{(X, \xi, V)}). $$

The next lemma can easily be proven by structural induction on the formula.

**Lemma 26.** Let $(X, \xi, V)$ be a $T_{\text{st}}^A$-model and let $\sim_{\square}$ be its associated boxed atom equivalence. If $\xi' : X \to T_{\text{st}}^A X$ is a coalgebra structure such that for all $x \in X$ and all $\alpha \in A$ we have $\xi(x)(\alpha) \sim_{\square} \xi'(x)(\alpha)$, then for all formulas $\varphi$ we have $\llbracket \varphi \rrbracket_{(X, \xi, V)} = \llbracket \varphi \rrbracket_{(X, \xi', V)}$.

We are ready to prove the main result of this section.

**Theorem 27.** The logic $\mathcal{L}(\theta, ;)$ is sound and strongly complete with respect to all $T_{\text{st}}^A$-models that are based on a $;$-standard $T_{\text{st}}^A$-coalgebra.

# 6 Tests

We will now incorporate axioms for tests into our axiomatisation of $\mathcal{L}(\theta, ;)$ and prove soundness and completeness with respect to dynamic models.

When choosing the axioms for tests there are two obvious choices, depending on our choice of underlying modality. This can be best seen at the example
$T = \mathcal{P}$: Taking the Kripke $\diamond$ as basic modality, the axiom for tests will be
$[\psi?]\varphi \leftrightarrow \psi \wedge \varphi$. Taking the Kripke $\square$, the axiom for tests will be $[\psi?]\varphi \leftrightarrow \psi \rightarrow \varphi$.

In order to obtain an axiomatisation that is generic in the functor and cho-
sen modality, we need a definition for when a modal operator is “box-like” or
“diamond”-like. Apart from Def. 8 (semantics of tests), this is the only time we
need that the monad is pointed, cf. Remark 9.

**Definition 28.** Let $\lambda$ be a predicate lifting for a pointed set monad $\mathbb{T}$. We say $\lambda$ is “box-like” if for all sets $X$ and all $U \subseteq X$ we have that the distinguished element $\perp \in TX$ is in the $\lambda$-lifting of $U$, i.e., $\perp \in \lambda_X(U)$. Likewise we call $\lambda$ “diamond-like” if for all sets $X$ and all $U \subseteq X$ we have $\perp \notin \lambda_X(U)$.

Any modality for a pointed monad falls into one of the above categories: For
example, the (monotonic) neighbourhood modality is diamond-like.

**Lemma 29.** Let $\lambda$ be a predicate lifting for a pointed set monad $\mathbb{T}$. Then $\lambda$ is either box-like or diamond-like.

This allows us to add test axioms to $\mathcal{L}(\theta, ;)$.

**Definition 30.** If $\lambda$ is box-like, then we define the dynamic logic $\mathcal{L}(\theta, ;, ?)$ by adding the frame condition $[?\psi]p \leftrightarrow (\psi \rightarrow p)$ to $\text{Fr in } \mathcal{L}(\theta, ;)$. If $\lambda$ is diamond-like, then we define $\mathcal{L}(\theta, ;, ?)$ by adding the frame condition $[?\psi]p \leftrightarrow (\psi \wedge p)$ to $\text{Fr in } \mathcal{L}(\theta, ;)$.

Our soundness and completeness results relative to $\theta, ;$-regular models can
now be extended to $\mathcal{L}(\theta, ;, ?)$ relative to the dynamic semantics.

**Theorem 31.** *The logic* $\mathcal{L}(\theta, ;, ?)$ *is sound and strongly complete with respect to the dynamic semantics (cf. Def. 8).*

As special instances we obtain the following results (of which (i) and (ii) were
already known, but to our knowledge item (iii) is a modest new addition).

**Corollary 32.** (i) Iteration-free PDL is sound and strongly complete with respect to $\cup$-dynamic $\mathcal{P}$-models. (ii) Iteration-free Game Logic is sound and strongly complete with respect to $\cup,^d$-dynamic $\mathcal{M}$-models. (iii) Let $\mathcal{L}_l = (\lambda^l, \Lambda, \emptyset)$ be the “underlying logic” for the lift monad $L$ where $\Lambda x = \{\Box(p \wedge q) \leftrightarrow \Box p \wedge \Box q, \Box(\neg p) \leftrightarrow \Box \neg \leftrightarrow \neg \Box p\}$. Then the dynamic logic $\mathcal{L}_l(\emptyset, ;, ?)$ (over $\mathcal{L}_l$) is sound and strongly complete with respect to dynamic $L$-models.

# 7 Discussion and Conclusion

We have presented a framework for iteration-free coalgebraic dynamic modal
logic where programs are modelled as *T*-coalgebras for a monad *T*, and program
constructs are modelled via natural operations on *T*. We have proved a generic
strong completeness result relative to a chosen set $\theta$ of natural operations. We
note that our notion of natural operation is more general than the notion of
algebraic operation [27] which is used in the context of computational effects. For example, it can be checked that dual is not an algebraic operation for M. We also note that the fact that intersection is not natural on P can be seen as an explanation of why PDL with intersection is difficult to axiomatise [1].

We leave it as future work to incorporate iteration into our framework. From PDL we know that dynamic modal logics with iteration cannot be strongly complete (due to non-compactness). Moreover, the fact that the completeness of GL remains an open problem tells us that a general weak completeness theorem is highly non-trivial. In any case, we will need to assume that the monad in question is order-enriched, perhaps along the lines of [13,6].

We note that our notion of pointed monad is weaker than requiring that the Kleisli category is enriched over the category of pointed sets, or over pointed CPOs. For example, it can be checked that the Kleisli category of the pointed monad $\mathcal{M}$ has neither form of enrichment.

A limitation of our framework is that it is unsuitable for designing dynamic modal logics for probabilistic or weighted systems. For probabilistic systems that are coalgebras for the distribution monad $\mathcal{D}_\omega$, there is no monad morphism $\mathcal{D}_\omega \Rightarrow \mathcal{N}$, since there is no EM-algebra $\mathcal{D}_\omega 2 \to 2$, as $2 = \{0, 1\}$ is not closed under convex sums. Similarly, for the weighted semiring monad $S_\omega(X) = \{f: X \to S \mid f \text{ has finite support}\}$ (where $S$ is a semiring), $2$ is not closed under $S$-linear combinations if e.g., $S = \mathbb{N}$. Dynamic logics for such quantitative systems seem to require a multi-valued setting where the truth object is $T(1)$ (instead of $2$).

Such a multi-valued approach to weakest preconditions for non-deterministic, probabilistic and quantum computation has recently been investigated in a categorical setting via so-called state-and-effect-triangles [14,15], see also [13,6]. Weakest preconditions are closely related to dynamic modal logic, e.g., the weakest precondition for $\varphi$ with respect to program $\alpha$ is expressed in PDL as $[\alpha]\varphi$. Also in [13,15], as in our Lemma 10, it is noted that weakest preconditions/predicate liftings must be monad morphisms in order to obtain compositionality for sequential composition. An important difference with our work is that [13,15] focus on semantics, and no syntax or axiomatisation is investigated. We would like to investigate further the connections between our work and the multi-valued predicate transformer approach of [13,15].

## References

1. Balbiani, P., Vakarelov, D.: Iteration-free PDL with intersection: a complete axiomatisation. Fundamenta Informaticae 45, 173–194 (2001)

2. Berwanger, D.: Game Logic is strong enough for parity games. Studia Logica 75(2), 205–219 (2003)

3. Chellas, B.: Modal Logic - An Introduction. Cambridge University Press (1980)

4. Cirstea, C., Kurz, A., Pattinson, D., Schröder, L., Venema, Y.: Modal logics are coalgebraic. In: Abramsky, S. (ed.) Visions of Computer Science 2008 (2008)

5. Fischer, M., Ladner, R.: Propositional dynamic logic of regular programs. J. of Computer and System Sciences 18, 194–211 (1979)
6. Goncharov, S., Schröder, L.: A relatively complete generic Hoare logic for order-enriched effects. In: Proceedings of LICS 2013. pp. 273–282. IEEE (2013)

7. Gumm, H.P.: Universal Coalgebras and their Logics (2009)

8. Hansen, H.H.: Monotonic modal logic (Master’s thesis). Research Report PP-2003-24, Inst. for Logic, Language and Computation. University of Amsterdam (2003)

9. Hansen, H.H., Kupke, C.: A coalgebraic perspective on monotone modal logic. In: Proceedings of CMCS 2004. ENTCS, vol. 106, pp. 121–143. Elsevier (2004)

10. Hansen, H., Kupke, C., Leal, R.: Strong completeness for iteration-free coalgebraic dynamic logics. Tech. rep., ICIS, Radboud University Nijmegen (2014), https://pms.cs.ru.nl/iris-diglib/src/icis_tech_reports.php, to appear

11. Hansen, H., Kupke, C., Pacuit, E.: Neighbourhood structures: bisimilarity and basic model theory. Logical Meth. in Comp. Sci. 5(2:2) (2009)

12. Harel, D., Kozen, D., Tiuryn, J.: Dynamic Logic. The MIT Press (2000)

13. Hasuo, I.: Generic weakest precondition semantics from monads enriched with order. In: Proceedings of CMCS 2014. LNCS, vol. 8446. Springer (2014)

14. Jacobs, B.: New directions in categorical logic, for classical, probabilistic and quantum logic. Logical Meth. in Comp. Sci. (2014), to appear

15. Jaobs, B.: Dijkstra monads in monadic computation. In: Bonsangue, M. (ed.) Proceedings of CMCS 2014. LNCS, vol. 8446. Springer (2014)

16. Johnstone, P.: Stone Spaces. Cambridge University Press (1982)

17. Kelly, G.M., Power, A.J.: Adjunctions whose counits are coequalizers, and presentations of finitary enriched monads. J. Pure and Appl. Alg. 89, 163–179 (1993)

18. Kupke, C., Pattinson, D.: Coalgebraic semantics of modal logics: an overview. Theor. Comp. Sci. 412(38), 5070–5094 (2011)

19. Kurz, A., Rosický, J.: Strongly complete logics for coalgebras. Logical Meth. in Comp. Sci. 8(3:14) (2012)

20. Linton, F.: Some aspects of equational categories. In: Eilenberg, S., Harrison, D., MacLane, S., Röhrl, H. (eds.) Proceedings of the Conference on Categorical Algebra, pp. 84–94. Springer (1966)

21. MacLane, S.: Categories for the Working Mathematician. Springer, 2nd edn. (1998)

22. Manes, E.G.: Algebraic Theories. Springer, Berlin (1976)

23. Markowsky, G.: Free completely distributive lattices. Proc. Amer. Math. Soc. 74(2), 227–228 (1979)

24. Moggi, E.: Notions of computation and monads. Information and Computation 93(1) (1991)

25. Parikh, R.: The logic of games and its applications. In: Topics in the Theory of Computation. No. 14 in Annals of Discrete Mathematics, Elsevier (1985)

26. Pauly, M., Parikh, R.: Game Logic: An overview. Studia Logica 75(2), 165–182 (2003)

27. Plotkin, G.D., Power, A.J.: Semantics for algebraic operations. In: Proceedings of MFPS XVII. ENTCS, vol. 45 (2001)

28. Rutten, J.: Universal coalgebra: A theory of systems. Theor. Comp. Sci. 249, 3–80 (2000)

29. Schröder, L.: Expressivity of coalgebraic modal logic: The limits and beyond. Theor. Comp. Sci. 390, 230–247 (2008)

30. Schröder, L., Pattinson, D.: PSPACE bounds for rank-1 modal logics. ACM Transactions on Computational Logics 10(2:13), 1–33 (2009)

31. Schröder, L., Pattinson, D.: Strong completeness of coalgebraic modal logics. In: Proceedings of STACS 2009. pp. 673–684 (2009)