# Towards Systematic Construction of Temporal Logics for Dynamical Systems via Coalgebra

Baltasar Trancón y Widemann

► To cite this version:

Baltasar Trancón y Widemann. Towards Systematic Construction of Temporal Logics for Dynamical Systems via Coalgebra. 12th International Workshop on Coalgebraic Methods in Computer Science (CMCS), Apr 2014, Grenoble, France. pp.211-224, 10.1007/978-3-662-44124-4_12. hal-01408761

HAL Id: hal-01408761

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

Submitted on 5 Dec 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_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Towards Systematic Construction of Temporal Logics for Dynamical Systems via Coalgebra

Baltasar Trancón y Widemann

Ilmenau University of Technology, DE

baltasar.trancon@tu-ilmenau.de

**Abstract.** Temporal logics are an obvious high-level descriptive companion formalism to dynamical systems which model behavior as deterministic evolution of state over time. A wide variety of distinct temporal logics applicable to dynamical systems exists, and each candidate has its own pragmatic justification. Here, a systematic approach to the construction of temporal logics for dynamical systems is proposed: Firstly, it is noted that dynamical systems can be seen as coalgebras in various ways. Secondly, a straightforward standard construction of modal logics out of coalgebras, namely Moss's coalgebraic logic, is applied. Lastly, the resulting systems are characterized with respect to the temporal properties they express.

## 1 Introduction

*Dynamical systems* are the classical constructive formalism for behaviour arising from the deterministic evolution of system state over time [1], dating back to the works of Newton and Laplace. Clearly *temporal logics*, with operators such as ‘next’, ‘always’, ‘eventually’ and ‘for-at-least’, constitute a companion descriptive formalism. However, the relation is not one-to-one: One the one hand, there is a unifying theory underlying the various perspectives on dynamical systems as monoid actions, which uniformly covers discrete and continuous, as well as hybrid systems [6]. But on the other hand, the diversity of temporal logics in literature is immense, see [13], and the choice for a particular system is often justified by ad-hoc pragmatic arguments. The present article explores a potentially systematic approach to the construction of temporal logics for dynamical systems, via the relatively recent mathematical field of *universal coalgebra* which has been shown to be intimately connected to both dynamical systems [11] and modal logics [5]. A different approach, also based on coalgebras and the Stone duality, has been suggested [3] for constructing modal logics of *transition systems*, a close relative of dynamical systems from theoretical computer science.

The method outlined in the remainder of this article, while theoretically simple, touches on many different fields of mathematics: order theory, category theory, algebra, coalgebra, classical modal logics à la Kripke, and coalgebraic logics à la Moss [8]. Thus a significant fraction of this paper is dedicated to reviewing the relevant definitions and propositions from the respective standard literature. This review makes up the sections 2 and 3. The expert reader is encouraged to
skip ahead: Section 4 ties up all the loose ends and gives a novel contribution. There a selection of obvious coalgebraic perspectives on dynamical systems is explored, and the respective logics entailed by applying Moss's construction are characterized.

# 2 Review: Classical Ingredients

This section reviews some basic definitions and propositions.

## 2.1 Order Relations

We assume that the reader is familiar with basic order-theoretic properties of binary relations, namely with *reflexive*, *transitive*, *symmetric* relations, and with *preorders*, *partial orders* and *equivalences*. We give two additional related definitions that are not quite as universal:

**Definition 1 (Non-Branching & Linear Relations).** Let $X$ be a set. A binary relation $R \subseteq X^2$ is called

- *non-branching* if and only if $x R y$ and $x R z$ imply $y R z$ or $z R y$, and

- *linear* if and only if $x R y$ or $y R x$,

respectively, for all $x, y, z \in X$. Clearly, every linear relation is non-branching.

## 2.2 Monoids

We assume that the reader is familiar with the notions of a *monoid* $\mathbb{M} = (M, 0, +)$, and of monoid *generators*. We recall that every monoid induces an ordering relation:

**Definition 2 (Monoid Order).** Let $\mathbb{M} = (M, 0, +)$ be a monoid. For any elements $a, b \in M$, we write $a \leq_M b$ if and only if there is some $c \in M$ such that $a + c = b$. We say that $a \leq_M b$ *via c*. It follows directly from the monoid axioms that $\leq_M$ is reflexive and transitive, and hence a preorder. By extension, $\mathbb{M}$ itself is called *symmetric/non-branching/linear* if and only if $\leq_M$ is symmetric/non-branching/linear, respectively.

Note that being symmetric in this sense is different from being Abelian. In fact, symmetry characterizes a famous subclass of monoids, namely the groups:

**Lemma 1 (Groups).** A monoid $\mathbb{M}$ is a group if and only if it is symmetric. Every symmetric monoid is trivially linear, with the degenerate order ($\leq_M = M^2$), the full relation.

The proof of this simple but non-standard proposition is left as an exercise to the reader.
## 2.3 Dynamical Systems

**Definition 3 (Dynamical System).** Let $\mathbb{T} = (T, 0, +)$ be a monoid called *time* (durations). A dynamical system is an enriched structure $\mathbb{S} = (\mathbb{T}, S, \Phi)$ with

- a set $S$ called **state space**, and

- a map $\Phi : S \times T \to S$ called **dynamics**,

such that

$$ \Phi(s, 0) = s $$

$$ \Phi(\Phi(s, t), u) = \Phi(s, t + u) $$

In other words, $\Phi$ is a right monoid action of $\mathbb{T}$ on $S$. $\mathbb{S}$ is called

- **linear-time** if and only if $\mathbb{T}$ is linear, otherwise **nonlinear-time**, and

- **invertible** if and only if $\mathbb{T}$ is symmetric.

**Corollary 1.** There are no invertible nonlinear-time dynamical systems.

Dynamical systems are a fundamental model class of many natural and social sciences. In comparison with their younger counterparts in computer science, automata and transition systems, dynamical systems are typically

- behaviourally weaker; deterministic, non-pointed (without distinguished initial states) and total (without spontaneous termination), but

- structurally stronger; with additional features of time (density, completeness) and state space (topology, metric, differential geometry, measures).

Automata-like constructions can be emulated by dynamical systems; see Example 1 below.

**Definition 4 (Step, Trajectory & Orbit).** From the dynamics map $\Phi$ we may derive three forms of secondary maps:

$$ \Phi^t : S \to S \\ \Phi^t(s) = \Phi(s, t) $$

$$ \Phi_s : T \to S \\ \Phi_s(t) = \Phi(s, t) $$

$$ \Phi^\circ : S \to \mathcal{P}S \\ \Phi^\circ(s) = \mathrm{Img}(\Phi_s) \\ = \{\Phi(s, t) \mid t \in T\} $$

- $\Phi^t$ is called the **step of duration t**, or just the t-step.

- $\Phi_s$ is called the **trajectory of initial state s**.

- $\Phi^\circ(s)$ is called the **orbit of state s**.

**Lemma 2 (Homomorphic Steps).** The dynamical systems with time $\mathbb{T}$ are precisely those systems $(\mathbb{T}, S, \Phi)$ such that the step construction is a monoid homomorphism from $\mathbb{T}$ into the monoid of maps of type $S \to S$ with right composition.

$$ \Phi^0 = \mathrm{id}_S $$

$$ \Phi^{t+u} = \Phi^u \circ \Phi^t $$
**Corollary 2 (Generating Steps).** If $G \subseteq T$ generates the monoid $T$, then $\Phi$ is determined uniquely by the collection of steps $(\Phi^t)_{t \in G}$.

**Example 1 (Instances of Time).**

- The time monoid $(\mathbb{N}, 0, +)$ yields standard non-invertible, linear-time, discrete-time dynamical systems. The step $\Phi^1$ is generating. Trajectories are (one-sided) infinite sequences.

- The time monoid $(\mathbb{Z}, 0, +)$ yields standard invertible, hence linear-time, discrete-time dynamical systems. The step $\Phi^1$ is generating and must be invertible. Trajectories are two-sided infinite sequences.

- The time monoid $(\mathbb{R}_+, 0, +)$ yields standard non-invertible, linear-time, continuous-time dynamical systems. No finite step generator collection exists. Trajectories are one-sided parametric curves.

- The time monoid $(\mathbb{R}, 0, +)$ yields standard invertible, hence linear-time, continuous-time dynamical systems. No finite step generator exists; classically definitions are given as solutions to ordinary differential equations. Trajectories are two-sided parametric curves.

- The free “time” monoid $(\Sigma^*, \varepsilon, \cdot)$ over some finite alphabet $\Sigma$ yields total semiautomata, or deterministic finitely-labelled transition systems. The steps $\{\Phi^a | a \in \Sigma\}$ (columns of the transition table) are generating. Trajectories are big-step transition functions of total automata, mapping input words to final states.

□

## 2.4 Propositional Modal Logics

We assume that the reader is familiar with the syntax and semantics of classical propositional logics and their presentation solely in terms of the connectives $\neg$ and $\to$. For the modal extensions, see [2] or some other textbook.

**Definition 5 (Syntax of Propositional Modal Logics).** The modal extension of classical propositional logics adds two unary connectives $\Box$ and $\Diamond$, taking $\Box$ as primitive and defining

$$ \Diamond A = \neg\Box\neg A $$

**Definition 6 (Semantics of Propositional Modal Logics).** A normal modal extension of classical propositional logics adds at least the deduction rule of necessitation or generalization, and the axiom of distribution:

$$ A \vdash \Box A $$

$$ \Box(A \to B) \to (\Box A \to \Box B) $$

**Example 2.** Important normal modal logics are obtained by adding certain axioms:

- $\Box A \to A$ added to the minimal system results in the logic $T$.

- $\Box A \to \Box\Box A$ added to $T$ results in the logic $S4$.

- $\Box(\Box A \to B) \lor \Box(\Box B \to A)$ added to $S4$ results in the logic $S4.3$.

- $\Diamond A \to \Box\Diamond A$ added to $S4$ or $S4.3$ results in the logic $S5$.

□
## 2.5 Kripke Semantics

**Definition 7 (Kripke Frame).** A Kripke frame is a structure $(W, R)$ with a set $W$ of *worlds* and a binary relation $R$ on $W$ called *accessibility*.

**Definition 8 (Kripke Model).** Let $(W, R)$ be a Kripke frame. A Kripke model (of propositional modal logic) is an extended structure $(W, R, \Vdash)$, where $\Vdash$ is a relation between $W$ and the language Form of logical formulas, such that:

$$w \Vdash \neg A \quad \iff \quad w \not\Vdash A$$

$$w \Vdash A \to B \quad \iff \quad w \Vdash A \text{ implies } w \Vdash B$$

$$w \Vdash \Box A \quad \iff \quad v \Vdash A \text{ whenever } w R v$$

We say that $w$ satisfies $A$ in $(W, R, \Vdash)$ if and only if $w \Vdash A$.

**Lemma 3.** The satisfaction relation $\Vdash$ of a Kripke model is determined uniquely by the satisfaction of atomic propositions.

**Definition 9 (Validity).** A formula $A$ is called valid in

- a Kripke model $(W, R, \Vdash)$ if and only if it is satisfied in all worlds $w \in W$,

- a Kripke frame $(W, R)$ if and only if it is valid in all Kripke models $(W, R, \Vdash)$,

- a class $C$ of Kripke frames if and only if it is valid in all members of $C$.

**Definition 10 (Soundness/Completeness).** A propositional modal logic $L$ is called, with respect to a class $C$ of Kripke frames,

- *sound* if and only if provability in $L$ implies validity in $C$, and

- *complete* if and only if validity in $C$ implies provability in $L$.

**Theorem 1.** The modal logics S4/S4.3/S5 are sound and complete for the classes of Kripke frames $(W, R)$ where $R$ is an arbitrary/non-branching/symmetric preorder, respectively.

**Definition 11 (Finite Frame Property).** A propositional modal logic $L$ is said to have the *finite frame property*, if and only if it is complete for a class of finite Kripke frames.

**Theorem 2.** The modal logics S4/S4.3/S5 have the finite frame property, for the finite-frame subclasses of the respective classes given in Theorem 1.

# 3 Review: Non-Classical Ingredients

This section briefly reviews some definitions and propositions from categorial coalgebra and coalgebraic logics. See [11] and [7, 8], respectively, for full details.
## 3.1 Category Theory

We assume that the reader is familiar with basic endofunctors on the category Set, in particular the identical functor Id, the constant functor $\text{Const}(C)$ for any object C, the covariant Hom-functors and the covariant powerset functor $\mathcal{P}$. All functors considered in the following are tacitly Set-endofunctors.

**Definition 12 (Monotonic, Standard & Finitary Functors).** As usual, a functor is called

- **monotonic** if and only if it preserves inclusions,

- **standard** if and only if it preserves inclusions and weak pullbacks, and

- **finitary** if and only if it is determined completely by its action on finite sets.

A standard, infinitary functor $F$ has a finitary restriction $F_\omega$ defined by

$$F_\omega X = \bigcup \{FY \mid Y \subseteq X \wedge Y \text{ finite}\} \qquad F_\omega(h : X \to Y) = Fh|_{F_\omega X}$$

Relation liftings for functors are conventionally defined in terms of span diagrams, but a pointwise notation will be more convenient for the following discussions:

**Definition 13 (Relation Lifting).** Let $F$ be a functor. Every relation $R \subseteq X \times Y$ has a lifting $F[R] \subseteq FX \times FY$ defined as the set of pairs $(\hat{x}, \hat{y})$ for which there is some $\hat{r} \in FR$ such that $(F\pi_1)(\hat{r}) = \hat{x}$ and $(F\pi_2)(\hat{r}) = \hat{y}$.

*Example 3.* The liftings for some basic functors are as follows:

- The identical functor lift a relation to itself: $x \text{ Id}[R] y$ if and only if $x R y$.

- A constant functor lifts to the identical relation: $c \text{ Const}(C)[R] d$ if and only if $c = d$.

- $Y \mathcal{P}[R] Z$ if and only if for all $y \in Y$ there is a $z \in Z$, and vice versa, such that $y R z$.

- $f \text{ Hom}(C, -)[R] g$ if and only if $f(c) R g(c)$ for all $c \in C$.

□

## 3.2 Universal Coalgebra

We assume that the reader is familiar with the notion of F-coalgebras for a functor $F$, their associated homomorphisms, F-bisimulations and F-bisimilarity.

**Definition 14 (Parallel Coalgebra Composition).** Coalgebras with the same carrier can be combined in parallel: Let $(X, f)$ be an F-coalgebra and $(X, g)$ be a G-coalgebra. Then $(X, \langle f, g \rangle)$ is an $(F \times G)$-coalgebra, where

$$\langle f, g \rangle(x) = (f(x), g(x))$$
## 3.3 Moss's Coalgebraic Logic

The idea of Moss's coalgebraic logic [8] is to replace Kripke frames by $F$-coalgebras for some functor $F$, and to derive a universal and natural modality from $F$ itself:

**Definition 15 (Moss's Coalgebraic Logic, Abstractly).** Fix a standard functor $F$. Extend the syntax of propositional logic by a pseudo-unary connective $\nabla$ that, unlike the classical modalities like $\Box$, applies not to a single formula $A \in \text{Form}$ but to an expression of type either $\hat{A} \in F(\text{Form})$ or $\hat{A} \in F_\omega(\text{Form})$. For infinitary $F$ where the choice makes a difference, the cases are called **infinitary** and **finitary** $F$-coalgebraic logics, respectively. A Moss model is a structure $(X, f, \Vdash)$ where $(X, f)$ is an $F$-coalgebra and $\Vdash$ is a relation between coalgebra states and formulas, such that

$$x \Vdash \neg A \iff x \Vdash \neg A \qquad x \Vdash A \to B \iff x \Vdash A \text{ implies } x \Vdash B$$

as for Kripke models, but

$$x \Vdash \nabla \hat{A} \iff f(x) F[\nabla] \hat{A}$$

Moss's coalgebraic logic as presented here specifies satisfaction only up to atomic propositions, in analogy to Kripke frames. In Moss's original presentation, the specification is unique, in analogy to Kripke models:

**Definition 16 (Moss's Coalgebraic Logic, Concretely).** Let $(X, f)$ be an $F$-coalgebra. Let $s: X \to \mathcal{P}(\text{Prop})$ be the map that assigns to each state $x \in X$ the desired set of valid atomic propositions. Then $(X, s)$ is a $\text{Const}(\mathcal{P}(\text{Prop}))$-coalgebra. For the parallel composite coalgebra $(X, g = \langle f, s \rangle)$, a unique Moss model is specified by the additional clause

$$x \Vdash A \iff A \in s(x) \qquad (A \in \text{Prop})$$

The following two propositions state that traditional Kripke frames are essentially equivalent to the special case $F = \mathcal{P}$:

**Lemma 4.** $\mathcal{P}$-coalgebras $(X, f)$ are in one-to-one correspondence to relations $R$ on $X$ by putting $x R y$ if and only if $y \in f(x)$.

**Theorem 3.** The Kripke modalities $\Box$, $\Diamond$ and the Moss modality $\nabla$ for finitary $\mathcal{P}$-coalgebraic logics are equivalent. For infinitary $\mathcal{P}$-coalgebraic logics, they are also equivalent in the presence of infinitary conjunction and disjunction; otherwise $\nabla$ is generally more expressive.

$$\begin{align*}
w \Vdash_K \Box A &\iff w \Vdash_M \nabla\{A\} \lor \nabla\emptyset & w \Vdash_K \Diamond A &\iff w \Vdash_M \nabla\{A, \top\} \\
w \Vdash_M \nabla \hat{A} &\iff w \Vdash_K \Box (\nabla \hat{A}) \land \Diamond \hat{A} & \text{where } \Diamond \hat{A} &= \{\Diamond B \mid B \in \hat{A}\}
\end{align*}$$

where $\Vdash_K/\Vdash_M$ denote satisfaction à la Kripke/Moss, respectively.
In general, the infinitary version of the operator $\nabla$ is better matched with a
logic where conjunction and disjunction are also infinitary. While an uncommon
topic classically, infinitary logics are an important topic in modal logic because
of their connection to bisimulations; they always satisfy the Henessy–Milner
property:

**Theorem 4 (Expressivity).** In any fully ($\wedge, \vee, \nabla$)-infinitary $F$-coalgebraic logic, two states $s, t \in S$ satisfy the same set of formulas if and only if they are bisimilar.

Generally finitary logics are nicer to work with, and of course more likely to
be decidable. See example 5 below for popular temporal operators that are not
finitary in this framework.

# 4 Constructions

This section gives novel theoretical results by investigating the ramifications of
the following recipe:

1. Identify some generic $F$-coalgebraic view on dynamical systems;

2. use Moss's construction to obtain logics with $\nabla_F$ modality, depending on the functor $F$;

3. relate $\nabla_F$ to established temporal logic operators.

Note that all of the following constructions have the state space $S$ of a fixed
dynamical system as the carrier of some coalgebra for various standard functors.
Hence the associated logical languages can coexist naturally in a single system,
by the parallel composition given in Definition 14.

## 4.1 Step Logics

**Definition 17 (Step Coalgebra).** Let $\mathcal{S} = (\mathbb{T}, S, \Phi)$ be a dynamical system. For any element $t \in T$, the Id-coalgebra $(S, \Phi^t)$ is called the *t-step coalgebra* of $\mathcal{S}$.

**Definition 18 (Multistep Coalgebra).** Let $\mathcal{S} = (\mathbb{T}, S, \Phi)$ be a dynamical system. For any subset $U \subseteq T$, the $\text{Hom}(U, -)$-coalgebra $(S, s \mapsto \Phi_s \circ \text{in})$, given the inclusion map in : $U \to T$, is called the *U-multistep coalgebra* of $\mathcal{S}$.

**Lemma 5.** The $\nabla$ modality of step coalgebras amounts to

- for the t-step:

$$s \Vdash \nabla A \iff \Phi(s, t) \Vdash A$$

- for the U-multistep:

$$s \Vdash \nabla \hat{A} \iff \Phi(s, t) \Vdash \hat{A}(t) \text{ for all } t \in U$$
The functors for t-steps and finite U-multisteps are finitary; hence no additional distinction between finitary and infinitary logics arises.

**Definition 19 (Step Modality).** We define the temporal modality $\bigcirc$, with the intuitive meaning next, in terms of $\nabla$.

$$ \bigcirc A = \nabla A \qquad \bigcirc_t A = \nabla u \mapsto \begin{cases} A & (t = u) \\ \top & (t \neq u) \end{cases} $$

*Example 4.* (Multi-)Step coalgebras are of particular interest for finite generators, since they specify the dynamics uniquely and concisely. The following are generating in the sense of Example 1:

- For time $(\mathbb{N}, 0, +)$, the 1-step coalgebra maps every state to its successor. The resulting temporal logic has $\bigcirc$ as the next operator of traditional unidirectional discrete-time temporal logic.

- For time $(\mathbb{Z}, 0, +)$, the $(\pm 1)$-multistep coalgebra maps every state to its successor/predecessor, respectively. The resulting temporal logic has $\bigcirc_{\pm 1}$ as the next/precviously operators of traditional bidirectional discrete-time temporal logic, respectively.

- For “time” $(\Sigma^*, \varepsilon, \cdot)$, the $\Sigma$-multistep coalgebra maps every automaton state to its response function (row of the transition table). The resulting logic has $(\bigcirc_a)_{a \in \Sigma}$ as the generating cases of Pratt’s necessity operators $[a]$ in dynamic logic [10], where they are extended to the free Kleene algebra over $\Sigma$.

Interesting infinite, non-generating examples include:

- For time $(\mathbb{R}, 0, +)$ and $\delta > 0$, let $U$ denote the open interval $(-\delta, \delta)$. The $U$-multistep coalgebra maps every state to its temporal $\delta$-neighbourhood. $\square$

Step generators benefit from Moss’s Expressivity Theorem 4:

**Corollary 3.** *The modality $\nabla$ and the family of modalities $(\bigcirc_t)_{t \in U}$ for generating $U$ are straightforwardly equivalent if $U$ is finite, and equivalent in the presence of infinitary conjunction otherwise.*

$$ x \Vdash \nabla \hat{A} \iff x \Vdash \bigwedge_{t \in U} \bigcirc_t \hat{A}(t) $$

The following construction is the multistep limit case $U = T$.

## 4.2 Trajectory Logics

**Definition 20 (Trajectory Coalgebra).** Let $\mathcal{S} = (\mathbb{T}, S, \Phi)$ be a dynamical system. The $\text{Hom}(\mathbb{T}, -)$-coalgebra $(S, s \mapsto \Phi_s)$ is called the **trajectory coalgebra** of $\mathcal{S}$.
**Lemma 6.** The $\nabla$ modality of trajectory coalgebras amounts to

$$s \Vdash \nabla \hat{A} \iff \Phi(s, t) \Vdash \hat{A}(t) \text{ for all } t \in T$$

The $\nabla$ trajectory modality is a surprisingly powerful logical operator, with the severe disadvantage that there is no canonical syntactic representation. The following examples are but a small subset of useful special cases:

**Example 5.** Arguments of the $\nabla$ trajectory modality are maps of type $T \to Form$. Various intensional notations for such maps, or time-dependent formulas, give rise to well-known temporal operators. Note that all following examples work for finitary $\nabla$.

- Consider discrete time $(\mathbb{N}, 0, +)$ or $(\mathbb{Z}, 0, +)$. Define a *zip* operator

$$A \iff B = \nabla t \mapsto \begin{cases} A & t \text{ even} \\ B & t \text{ odd} \end{cases}$$

Then a dynamic system is bipartite, with characteristic formula $A$, if and only if $(A \iff \neg A) \lor (\neg A \iff A)$ is valid in the Moss model associated with its trajectories.

- Consider automaton time $(\Sigma^*, \varepsilon, \cdot)$. Define a *consumption* operator

$$eat(L, A, B) = \nabla t \mapsto \begin{cases} A & t \in L \\ B & t \notin L \end{cases}$$

for languages $L \subseteq \Sigma^*$ and formulas $A, B$. Now let $A$ be a formula characterizing accepting states. Then an automaton, as a dynamical system, accepts at least/exactly the language $L \subseteq \Sigma^*$ if and only if $eat(L, A, \top)/eat(L, A, \neg A)$, respectively, is valid for its initial state(s) in the Moss model associated with its trajectories.

- Consider time with a linear antisymmetric order $<$. Define a *change* operator

$$chg(t, A, B, C) = \nabla u \mapsto \begin{cases} A & u < t \\ B & u = t \\ C & u > t \end{cases}$$

for time duration $t$ and formulas $A, B, C$. Then minimum/maximum-duration operators can be defined directly, in two variants differing in the inclusion of boundary cases:

$$\min t. A = chg(t, A, \top, \top)$$

$$\max t. A = chg(t, \top, \top, \neg A)$$

$$\min' t. A = chg(t, A, A, \top)$$

$$\max' t. A = chg(t, \top, \neg A, \neg A)$$

Imprecise operators such as *until* can be expressed as infinitary disjunctions:

$$A \cup B = \bigvee_{t \in T} chg(t, A, B, \top)$$
## 4.3 Orbit Logics

The following construction shifts the coalgebraic focus from trajectories to orbits which are images of trajectories, hence abstracting from durations. The result is a family of qualitative temporal logics that can be expressed naturally in the classical modal operators, uniformly for all kinds of time structure:

**Definition 21 (Orbit Coalgebra).** Let $\mathcal{S} = (\mathcal{T}, S, \Phi)$ be a dynamical system. The $\mathcal{P}$-coalgebra $(S, \Phi^\circ)$ is called the **orbit coalgebra** of $\mathcal{S}$. We say that in $\mathcal{S}$, $y$ is **reachable** from $x$, written $x \rightsquigarrow_S y$, if and only if $y \in \Phi^\circ(x)$. More precisely, we say $x \rightsquigarrow_S y$ **via** $t$, if and only if $y = \Phi^t(x)$.

Clearly, $x \rightsquigarrow_S y$ if and only if there is some witness $t \in T$ such that $x \rightsquigarrow_S y$ via $t$.

**Lemma 7.** For dynamical systems $\mathcal{S}$, the reachability relation $\rightsquigarrow_S$ is

1. always a preorder,

2. additionally non-branching, but not generally linear, if $\mathcal{S}$ is linear-time, and

3. additionally symmetric if $\mathcal{S}$ is invertible.

*Proof.*

1. Reflexivity and transitivity follow directly from the monoid axioms: $x \rightsquigarrow_S x$ via 0, and if $x \rightsquigarrow_S y$ via $t$ and $y \rightsquigarrow_S z$ via $u$, then $x \rightsquigarrow_S z$ via $t+u$.

2. Assume that $x \rightsquigarrow_S y$ via $t$ and $x \rightsquigarrow_S z$ via $u$. By linearity of $\mathcal{T}$ assume, without loss of generality, that $t \leq_T u$ via $v$. Then $y \rightsquigarrow_S z$ via $v$.

3. For symmetric $\mathcal{T}$, if $x \rightsquigarrow_S y$ via $t$, then $y \rightsquigarrow_S x$ via $-t$. $\square$

The caveat in case 2 of this proposition is necessary:

*Example 6 (Nonlinear Linear-Time Dynamical System).* Set $T = \{0\}$, giving rise to the singleton monoid which is trivially linear. This fixes $\Phi$ completely as $\Phi(s,t) = \Phi(s,0) = s$, giving rise to a “still-life” structure of time. Then neither $x \rightsquigarrow_S y$ nor $y \rightsquigarrow_S x$ for $x \neq y$.

**Definition 22 (Orbital Frame).** A Kripke frame is called **orbital** if and only if it corresponds, in the sense of Lemma 4, to the orbit coalgebra of some dynamical system. An orbital frame is called linear-time/invertible if and only if it corresponds to the orbit coalgebra of some linear-time/invertible dynamical system, respectively.

Using this definition, Lemma 7 extends to Kripke frames:

**Lemma 8.** For any orbital Kripke frame $\mathcal{F} = (W, R)$, the relation $R$ is

1. always a preorder,

2. additionally non-branching if $\mathcal{F}$ is linear-time,

3. additionally symmetric if $\mathcal{F}$ is invertible.
This statement has a partial, finitary converse, which is by far the most
technical result of the present paper:

**Lemma 9.** *A finite Kripke frame (W, R) is*

1. always orbital if R is a preorder,

2. additionally linear-time if R is non-branching,

3. additionally invertible if R is symmetric.

*Proof.* Construct a dynamical system $\mathbb{S} = (\mathbb{T}, S, \Phi)$ with $(\rightsquigarrow_{\mathbb{S}}) = R$. In any case, clearly $S = W$. Proceed in reverse order and increasing flexibility of cases. For the latter two, consider the partition of $W$ into *strongly connected components* (sccs) of the preorder $R$: nonempty, maximal subsets $C \subseteq W$ such that $x R y$ for all $x, y \in C$. We write $x \sim y$ if and only if $x, y$ are in the same scc, that is $x R y$ and $y R x$.

3. Set $\mathbb{T} = (\mathbb{Z}, 0, +)$. By symmetry of $R$ there are no related pairs across sccs. For each scc $C$ choose an arbitrary cyclic permutation. Set $\Phi^1$ to their union. Then

$-x \rightsquigarrow_{\mathbb{S}} y$ via some $i < k$, where $k$ is the size of the scc containing both, if $x R y$, and

- otherwise $x \not\rightsquigarrow_{\mathbb{S}} y$.

2. Set $\mathbb{T} = (\mathbb{N}, 0, +)$. We say that $y$ is a *successor* of $x$, writing $x \ll y$, if and only if $x R y$ but not $y R x$. Clearly, $x R y$ if and only if either $x \sim y$ or $x \ll y$, exclusively. We say that $x$ is *transient* if it has successors. Since $W$ is finite and $R$ is non-branching, every transient $x$ has a unique scc of least successors, from which we may choose one, say $x'$, and all elements reachable from $x$ are successors. Set $\Phi^1(x) = x'$. For non-transient $x$, all elements reachable from $x$ are in the same scc. Proceed as above. Then

$-x \rightsquigarrow_{\mathbb{S}} y$ via some $i < k$, where $k$ is the number of successors of $x$, if $x \ll y$,

$-x \rightsquigarrow_{\mathbb{S}} y$ via some $i < k$, where $k$ is the size of the scc containing both, if $x \sim y$, and

- otherwise $x \not\rightsquigarrow_{\mathbb{S}} y$.

1. There are in general no least successors, and there may be non-successors reachable from transient elements. A more basic construction is needed: Set $\mathbb{T} = (\mathbb{N}^*, \varepsilon, \cdot)$, the free monoid over $\mathbb{N}$. For each $x \in W$ choose some infinite sequence $y = (y_0, y_1, \dots) \in W^\omega$ such that $x R z$ if and only if $z = y_i$ for some $i$. This is always possible by invocation of countable choice, since the set $\{z \mid x R z\}$ is finite and nonempty. For the generating steps $\{\Phi^n \mid n \in \mathbb{N}\}$, set $\Phi^n(x) = y_n$. Then

$-x \rightsquigarrow_{\mathbb{S}} y$ via $1$, if $x R y$, and

- otherwise $x \not\rightsquigarrow_{\mathbb{S}} y$.

□

**Theorem 5.** *The modal logics S4/S4.3/S5 are sound and complete for arbitrary/linear-time/invertible orbital frames, respectively.*
*Proof.* S4/S4.3/S5 are sound for the class of Kripke frames $(W, R)$ where $R$ is an arbitrary/non-branching/symmetric preorder, respectively. By Lemma 8, they are also sound for the subclasses of arbitrary/linear-time/invertible orbital frames, respectively.

Conversely, S4/4.3/S5 are complete for the class of Kripke frames $(W, R)$ where $R$ is an arbitrary/non-branching/symmetric preorder, respectively, and have the finite frame property. By Lemma 9, they are also complete for the subclasses of arbitrary/linear-time/invertible orbital frames, respectively. □

*Example 7.* The operators □ and ◇ are well-suited to express “long-term” behavioral properties of dynamical systems. For instance, let $A$ be the characteristic formula of a subset $U \subseteq S$ of the state space. Then $U$ is a stationary solution of a dynamical system if and only if $A \to \Box A$ is valid in the Moss model associated with its orbits. □

# 5 Conclusion and Outlook

Many operators discussed in the temporal logic literature can be subsumed under a common framework by viewing them as instances of Moss's modality $∇$, for some coalgebraic presentation of the underlying dynamical system models. As a rule of thumb,

- step coalgebras go with discrete time,

- trajectory coalgebras go with quantitative operators for either discrete or dense time, and

- orbit coalgebras go with arbitrary time and qualitative operators, in particular the classical modal operators and the framework of normal modal logics.

The examples given in this article are of course only a small selection to prove the viability of the approach. There is considerable potential for generalization. The trajectory modality is an extremely expressive tool, and it is likely that many other temporal operators can be shown to coincide with particular intensional notations for it. Besides, coalgebraic perspectives on dynamical systems other than the three detailed above could be considered. An interesting open problem and direction for future research is the integration of measure-theoretic temporal operators, for instance in duration calculus [4], into the framework.

Coalgebraic modal logics from predicate liftings [9] are an alternative to Moss's logic, with somewhat different properties. A study of the predicate liftings arising from the functorial perspective on dynamical systems is expected to provide some interesting additional insights.

Recently, some progress has been made in the use of non-standard analysis to clarify the relationship of discrete-time and continuous-time systems, in a way that is compatible with a coalgebraic perspective [12]. That approach might also be helpful in bridging the gap between our trajectory and orbit logics.
References

1. G. D. Birkhoff. *Dynamical Systems*. American Mathematical Society, 1927.

2. P. Blackburn, J. van Benthem, and F. Wolter, eds. *Handbook of Modal Logic*. eBook. Elsevier, 2006. ISBN: 9780080466668. URL: http://cgi.csc.liv.ac.uk/~frank/MLHandbook/.

3. M. M. Bonsangue and A. Kurz. "Duality for Logics of Transition Systems". In: *FoSSaCS*. Ed. by V. Sassone. Vol. 3441. Lecture Notes in Computer Science. Springer, 2005, pp. 455-469. ISBN: 3-540-25388-2. DOI: 10.1007/978-3-540-31982-5_29.

4. Z. Chaochen, C. A. R. Hoare, and A. P. Ravn. "A Calculus of Durations". In: *Information Processing Letters* 40.5 (1991), pp. 269-276.

5. C. Cîrstea et al. "Modal Logics are Coalgebraic". In: *BCS Int. Acad. Conf*. Ed. by E. Gelenbe, S. Abramsky, and V. Sassone. British Computer Society, 2008, pp. 128-140.

6. B. Jacobs. "Object-oriented hybrid systems of coalgebras plus monoid actions". In: *Theoretical Computer Science* 239.1 (2000), pp. 41-95. ISSN: 0304-3975. DOI: 10.1016/S0304-3975(99)00213-3.

7. C. Kupke and D. Pattinson. "Coalgebraic semantics of modal logics: An overview". In: *Theor. Comput. Sci.* 412.38 (2011), pp. 5070-5094. DOI: 10.1016/j.tcs.2011.04.023.

8. L. S. Moss. "Coalgebraic Logic". In: *Ann. Pure Appl. Logic* 96.1-3 (1999), pp. 277-317. DOI: 10.1016/S0168-0072(98)00042-6.

9. D. Pattinson. "Expressivity Results in the Modal Logic of Coalgebras". PhD thesis. Universität München, 2001.

10. V. Pratt. "Semantical Considerations on Floyd-Hoare Logic". In: *Proc. 17th Annual IEEE Symposium on Foundations of Computer Science*. IEEE Computer Society, 1976, pp. 109-121. DOI: 10.1109/SFCS.1976.27.

11. J. Rutten. "Universal coalgebra: a theory of systems". In: *Theoretical Computer Science* 249.1 (2000), pp. 3-80. DOI: 10.1016/S0304-3975(00)00056-6.

12. K. Suenaga, H. Sekine, and I. Hasuo. "Hyperstream processing systems: nonstandard modeling of continuous-time signals". In: *POPL*. Ed. by R. Giacobazzi and R. Cousot. ACM, 2013, pp. 417-430. DOI: 10.1145/2429069.2429120.

13. Y. Venema. "Temporal Logic". In: *The Blackwell Guide to Philosophical Logic*. Ed. by L. Goble. Blackwell, 2001. Chap. 10. ISBN: 9780631206934. DOI: 10.1111/b.9780631206934.2001.00013.x.