b

DiscoverSearch
About
My stuff
Implementing Dynamic Answer Set Programming
2020·arXiv
Abstract
Abstract

We introduce an implementation of an extension of Answer Set Programming (ASP) with language constructs from dynamic (and temporal) logic that provides an expressive computational framework for modeling dynamic applications. Starting from logical foundations, provided by dynamic and temporal equilibrium logics over finite linear traces, we develop a translation of dynamic formulas into temporal logic programs. This provides us with a normal form result establishing the strong equivalence of formulas in different logics. Our translation relies on the introduction of auxiliary atoms to guarantee polynomial space complexity and to provide an embedding that is doomed to be impossible over the same language. Finally, the reduction of dynamic formulas to temporal logic programs allows us to extend ASP with both approaches in a uniform way and to implement both extensions via temporal ASP solvers such as telingo.

Humans are not bothered at all when it comes to choosing a way home among a plethora of alternatives. Similarly, in reasoning about action or planning, the underlying specifications admit an abundance of feasible plans. Among them, we usually find only a few reasonable alternatives while the majority bear an increasing number of redundancies, leading to infinite solutions in the worst case. Popular ways to counterbalance this are to extend the specification by objectives, like shortest plans, and/or imposing limits on the plan length. Both are often implemented with optimization procedures and/or incremental reasoning methods (extending insufficient plan lengths). However, computing a valid plan with such techniques usually involves solving numerous sub-problems of nearly the same scale as the actual problem — not to mention that solving somehow optimal plans is often particularly hard (due to phase transition phenomena). This rules out such techniques when it comes to highly demanding dynamic problems, as we witnessed in applications to robotic intra-logistics [14].

This motivates our approach to pair action theories with control theories in order to restrict our attention to plans selected by the control theory among all feasible ones induced by the action theory. This approach was pioneered by Levesque et al. in [20] by combining action theories in the Situation Calculus with control programs expressed in Golog. The rough idea is that a plan induced by an action theory must be compatible with a run of the associated Golog program. Although Golog’s design was inspired by Dynamic Logic [17], its semantics is given by a reduction to first-order logic. Unlike this, we developed in [3, 6] the foundations of an approach integrating Answer Set Programming (ASP [21]) with (linear) Dynamic Logic. More precisely, we are interested in the combination of the logic of Here-and-There (HT [19]) with linear Dynamic Logic over finite traces (LDLf[11]), called Dynamic logic of Here-and-There (DHTf) and particularly its non-monotonic extension, Dynamic Equilibrium Logic (DELf[6]). We review both logics in Section 2. ASP as such is known to constitute a fragment of Equilibrium Logic [22].

In what follows, our focus lies on implementing temporal and dynamic ASP via a reduction to regular ASP. This aligns with the above discussion insofar as temporal logic programs, featuring one step operators, are well-suited for providing action theories, while dynamic formulas allow for imposing compatibilities with path expressions, that amount to regular expressions over primitive actions.4 To this end, in this paper, we present the following contributions:

(i) we develop a three-valued characterization of  DHTf;(ii) we establish a normal form for  DHTfshowing that dynamic formulas can be reduced to (so-called) temporal logic programs; (iii) we use this reduction to implement a solver accepting dynamic formulas in  DELf.

For (i), we extend the three-valued characterization from [16] to dynamic formulas, something that allows for greatly simplifying proofs and has thus benefits well beyond this paper. Also, it is, to the best of our knowledge, the first time this type of construction is used to capture dynamic logics and thus path expressions. This three-valued definition also allows for establishing (ii), which shows that any dynamic formula can be equivalently reduced to a syntactic fragment called temporal logic programs. This translation relies on the introduction of auxiliary atoms (in a Tseitin-style [25]) for, first, guaranteeing that its result is of polynomial size wrt the input formula, and, second, surmounting the fact that translations of dynamic into temporal formulas are usually impossible without extending the language. We explain both issues in more detail in Section 3. Finally, the great benefit of this reduction is that we can use it for (iii), that is, implementing dynamic formulas in  DELf, since temporal logic programs can be processed by an existing solver for temporal ASP, viz. telingo [8]. We describe the resulting implementation in Section 4 and show the potential impact of pairing action and control theories via an empirical analysis of an elevator scenario borrowed from [20].

We start from the syntax of Linear Dynamic Logic (LDL) defined in [11]. Given a set A of propositional variables (called alphabet), dynamic formulas  ϕ andpath expressions  ρare mutually defined by the pair of grammar rules:

image

This syntax is similar to the one of Dynamic Logic (DL [17]) but differs in the construction of atomic path expressions: while DL uses a different alphabet for atomic actions, in LDL there is a unique alphabet A (atomic propositions) and the only atomic path expression is the constant  τ ̸∈ A(read as “step”) that we also write as  ⊤ (seebelow), overloading the constant truth symbol. As we show further below, the above language allows us to capture several derived operators, like the Boolean and temporal ones:

image

All connectives are defined in terms of the dynamic operators  ⟨·⟩ and[·]. This involves the Booleans’  ∧, ∨, and →, among which the defi-nition of  →is most noteworthy since it hints at the implicative nature of  [·]. Negation  ¬is then expressed via implication, as usual in HT. Then,  ⟨·⟩ and [·]also allow defining the future temporal operators F, ◦, �◦, ✸, □, U, R, standing for final, next, weak next, eventually, always, until, and release, and their past-oriented counterparts:  I, •,�•, ♦, ■, S, T. The weak one-step operators,  �◦ and �•, are of particular interest when dealing with finite traces, since their behavior differs from their genuine counterparts only at the ends of a trace. In fact, �◦ϕcan also be expressed as  ◦ϕ ∨ F (and �• as •ϕ ∨ I). A formula is propositional, if all its connectives are Boolean, and temporal, if it includes only Boolean and temporal ones. As usual, a (dynamic) theory is a set of (dynamic) formulas. Following the definition of linear DL (LDL) in [11], we sometimes use a propositional formula  φas a path expression actually standing for  (φ?; τ). This means that the reading of  ⊤as a path expression amounts to  (⊤?; τ) which isjust equivalent to  τ, as we see below. Another abbreviation is the sequence of n repetitions of some expression  ρ defined as ρ0 def= ⊤?and  ρn+1 def= ρ; ρn. For instance,  ρ3 = ρ; ρ; ρ; ⊤?which amounts to ρ; ρ; ρ, as we see below.

image

the semantics, we start by defining a trace of length  λover alphabet A as a sequence  ⟨Hi⟩i∈[0..λ) of sets Hi ⊆ A. A trace is infinite if λ = ω and finiteotherwise, that is,  λ = nfor some natural number n ∈ N. Given traces  H = ⟨Hi⟩i∈[0..λ) and H′ = ⟨H′i⟩i∈[0..λ) bothof length  λ, we write H ≤ H′ if Hi ⊆ H′i for each i ∈ [0..λ);accordingly,  H < H′ iff both H ≤ H′ and H ̸= H′.

Although DHT shares the same syntax as LDL, its semantics relies on traces whose states are pairs of sets of atoms. A Here-and- There trace (for short HT-trace) of length  λover alphabet A is a sequence of pairs  ⟨Hi, Ti⟩i∈[0..λ) such that Hi ⊆ Ti ⊆ A for anyi ∈ [0..λ). As before, an HT-trace is infinite if  λ = ω and finiteotherwise. The intuition of using these two sets stems from HT and Equilibrium Logic: atoms in  Hiare those that can be proved; atoms not in  Tiare those for which there is no proof; and, finally, atoms in  Ti \ Hiare assumed to hold, but have not been proved. We often represent an HT-trace as a pair of traces  ⟨H, T⟩ of length λ whereH = ⟨Hi⟩i∈[0..λ) and T = ⟨Ti⟩i∈[0..λ) and H ≤ T. The particular type of HT-traces that satisfy H = T are called total. Given any HT-trace M = ⟨H, T⟩, we define DHTsatisfaction of formulas, namely,  M, k |= ϕ, in terms of an accessibility relation for path expressions  ∥ρ∥M ⊆ N2 whose extent depends again on |= by double, structural induction.

Definition 1 (DHT satisfaction [6]) An  HT-trace M = ⟨H, T⟩ oflength  λover alphabet A satisfies a dynamic formula  ϕat time point k ∈ [0..λ), written M, k |= ϕ, if the following conditions hold:

image

where, for any  HT-trace M, ∥ρ∥M ⊆ N2 is a relation on pairs of time points inductively defined as follows.

image

We see that  ⟨ρ⟩ ϕ and [ρ] ϕquantify over time points i that are reachable via path expression  ρfrom the current point k, that is,

image

dynamic theory  Γ if M, 0 |= ϕ for all ϕ ∈ Γ. We write DHT(Γ, λ)to stand for the set of DHT models of length  λof a theory  Γ, and de-fine  DHT(Γ) def=�ωλ=0 DHT(Γ, λ), that is, the whole set of models of  Γof any length. When  Γ = {ϕ}we just write  DHT(ϕ, λ) andDHT(ϕ).

A formula  ϕ is a tautology (or is valid), written |= ϕ, iff M, k |=ϕ for any HT-trace M and any k ∈ [0..λ). We call the logic induced by the set of all tautologies (Linear) Dynamic logic of Here-and-There (DHT for short). Two formulas  ϕ, ψare said to be equivalent, written  ϕ ≡ ψ, whenever M, k |= ϕ iff M, k |= ψ for anyHT-trace M and any k ∈ [0..λ). This allows us to replace  ϕ byψand vice versa in any context, and is the same as requiring that ϕ ↔ ψis a tautology. Note that this relation,  ϕ ≡ ψ, is stronger than coincidence of models, viz.  DHT(ϕ) = DHT(ψ). For instance, DHT(•⊤) = DHT(⟨⊤−⟩ ⊤) = ∅because models are checked at the initial situation k = 0 and there is no previous situation at that point, so  DHT(•⊤) = DHT(⊥). However, in general,  •⊤ ̸≡ ⊥since  •⊤is satisfied for any k > 0 (for instance  ◦•⊤ ̸≡ ◦⊥ but◦•⊤ ≡ ⊤instead). As with formulas, we say that path expressions ρ1, ρ2 areequivalent, written  ρ1 = ρ2, whenever ∥ρ1∥M = ∥ρ2∥M

for any HT-trace M. The following equivalences of path expressions allow us to push the converse operator inside, until it is only applied to  τ.

Proposition 1 ([6]) For all path expressions  ρ1, ρ2 and ρand for all formulas  ϕ, the following equivalences hold:

image

We say that  ϕ is inconverse normal form if all occurrences of the converse operator in  ϕare applied to  τ.

We now introduce non-monotonicity by selecting a particular set of traces that we call temporal equilibrium models. First, given an arbitrary set S of HT-traces, we define the ones in equilibrium as follows.

Definition 2 (Temporal Equilibrium/Stable models [6]) Let S be some set of HT-traces. A total  HT-trace ⟨T, T⟩ ∈ S is an equilib-rium trace of S iff there is no other  ⟨H, T⟩ ∈ S such that H < T.

If  ⟨T, T⟩is such an equilibrium trace, we also say that trace T is a stable trace of S. We further talk about temporal equilibrium or temporal stable models of a theory  Γ when S = DHT(Γ), respectively.

We write  DEL(Γ, λ) and DEL(Γ)to stand for the temporal equilibrium models of  DHT(Γ, λ) and DHT(Γ)respectively. Note that stable traces in  DEL(Γ) are also LDL-models of Γand, thus, DEL is stronger than LDL. Besides, as the ordering relation among traces is only defined for a fixed  λ, it is easy to see the following result:

Proposition 2 ([6]) The set of temporal equilibrium models of  Γ canbe partitioned by the trace length  λ, that is, �ωλ=0 DEL(Γ, λ) =DEL(Γ).

(Linear) Dynamic Equilibrium Logic (DEL) is the non-monotonic logic induced by temporal equilibrium models of dynamic theories. We obtain the variants  DELω and DELfby applying the corresponding restriction to infinite or finite traces, respectively.

To illustrate non-monotonicity, take the formula:

image

whose reading is “keep sending an sos (s) while no help (h) is perceived.” Intuitively,  [(¬h)∗]behaves as a conditional referring to any future state after  n ≥ 0repetitions of  (¬h?; ⊤). Then, ¬h → schecks whether h fails one more time at k = n: if so, it makes s true again. Without additional information, this formula has a unique temporal stable model per each length  λsatisfying  ✷(¬h∧s), that is,h is never concluded, and so, we repeat s all over the trace. Suppose we add now the formula  ⟨⊤5⟩ h, that is, hbecomes true after five transitions. Then, there is a unique temporal stable model for each λ > 5satisfying:

image

Clearly,  ✷(¬h ∧ s)is not entailed any more (under temporal equilibrium models) showing that DEL is non-monotonic.

To conclude this section, we provide an alternative three-valued characterization of DHT that is particularly useful for formal elaborations involving auxiliary atoms. This alternative characterization relies on the idea of temporal three-valued interpretation in [4] for the case of TEL and is inspired, in its turn, in the characterization of HT in terms of G¨odel’s  G3logic [16]. Under this orientation, we deal with three truth values {0, 1, 2} standing for: 2 (or proved true) meaning satisfaction “here”; 0 (or assumed false) meaning falsity “there”; and 1 (potentially true) that are formulas assumed true but not proved. Given an  HT-trace M = ⟨H, T⟩we define its associated truth valuations as a pair of mutually recursive functions m(k, ϕ) and m(k, i, ρ)that assign a truth value in the set {0, 1, 2} to formula  ϕat time point  k ∈ [0..λ)or to the pair (k, i) for path expression  ρ, respectively. The valuation of formulas follows the next rules:

image

whereas the function for path expressions is defined as follows:

image

This results in the following three-valued characterisation of HT-traces in  DELf. 5

Theorem 1 Let  ⟨H, T⟩ be a HT-trace of length  λ, mits associated valuation and  k ∈ [0..λ):

1.  ⟨H, T⟩, k |= ϕ iff m(k, ϕ) = 22.  ⟨T, T⟩, k |= ϕ iff m(k, ϕ) ̸= 0

3.  (k, j) ∈ ∥ρ∥⟨H,T⟩ iff m(k, j, ρ) = 24.  (k, j) ∈ ∥ρ∥⟨T,T⟩ iff m(k, j, ρ) ̸= 0

In this section, we elaborate upon a reduction of arbitrary dynamic formulas6 into a syntactic subclass called temporal logic programs [9]. A temporal logic program is a conjunction of temporal formulas with a restricted syntax that, when interpreted under temporal stable models, have a close relation to rules from disjunctive logic programming. Temporal logic programs were proved in [9] to constitute a normal form for  TELf(if we allow for auxiliary atoms) and used later on as a basic syntax for the temporal ASP system telingo [8]. We proceed next to describe their syntax.

Given a set of propositional variables A, we define the set of temporal literals as  {a, ¬a, •a, ¬•a, | a ∈ A}.A temporal logic program is a set formed by three different types of rules:

5An extended version of the paper with the proofs is available at

image

where  B = b1 ∧ · · · ∧ bn (with n ≥ 0) and A = a1 ∨ · · · ∨ am(with  m ≥ 0) and bi and ajare temporal literals in the case of dynamic rules and regular literals (i.e.  {a, ¬a | a ∈ A}) in the case of initial and final rules. We also allow for global rules of the form □ (B → A)that stand for the conjunction of an initial rule  B → Aand a dynamic rule  �◦□ (B → A).

Theorem 2 (Normal form) Every dynamic formula  γcan be converted into a temporal program being  DHTf-equivalent to  γ.

To prove the above theorem, we provide a sound transformation from any dynamic formula  γinto a temporal logic program  π(γ). As a first step, we assume that  γis already in converse normal form: this can be achieved by repeatedly applying the equivalences in Proposition 1. The reduction of  γinto temporal program  π(γ)uses an extended alphabet  A+ ⊇ Athat additionally contains new atoms  ℓϕ(aka label) for formulas  ϕ over Athat are either subformulas of  γor elaborations of them. This set of formulas is called the Fisher-Ladner closure [12] of  γand formally defined below.

Definition 3 (Fisher-Ladner closure [12]) The Fisher-Ladner closure  FL(γ)of a dynamic formula  γ(in converse normal form) is a set of dynamic formulas inductively defined as follows:

image

Any set satisfying these conditions is called closed.

Proposition 3 For any dynamic formula  γ, its closure  FL(γ) is fi-nite.

Thus, given the dynamic formula  γon alphabet A to be translated, we define the extended alphabet  A+ def= A ∪ {ℓµ | µ ∈ FL(γ)}. Forconvenience, we simply use  ℓϕdef= ϕ if ϕ is ⊤, ⊥or an atom  a ∈ A.

As happened with the normal form reduction for  TELfin [9], the translation is done in two phases: we first obtain a temporal theory containing double implications, and then we unfold them into temporal rules. We start by defining the temporal theory  σ(γ) that in-troduces new labels  ℓµfor each formula  µ ∈ FL(γ). This theory contains the formula  ℓγand, per each label  ℓµ, a set of formulas  η(µ)fixing the label’s truth value. Formally:

image

Table 1 shows the definitions  η(µ) for each µin the closure  FL(γ)depending on the outer modality in the formula.

image

Table 1. Normal form translation

As an example, take the dynamic formula  γ = ⟨(p?; ⊤)∗⟩ q(which corresponds to the temporal formula p U q). In the first step, we get

image

where we just used q as its label  ℓq, and αstands for ⟨p?; ⊤⟩ ⟨(p?; ⊤)∗⟩ qwhich belongs to  FL(γ). The truth of  ℓα isdetermined by  η(α)which, in the table, is first unfolded into η(⟨p?⟩ ⟨⊤⟩ ⟨(p?; ⊤)∗⟩ q)leading to:

image

with  β = ⟨⊤⟩ ⟨(p?; ⊤)∗⟩ q also in FL(γ). Notice now that  β con-tains  γas a subformula, so it can be written as:  β = ⟨⊤⟩ γ. Thenη(β)just corresponds to the pair of formulas:

image

and the whole translation amounts to  σ(γ) = {ℓγ} ∪ {(2) − (6)}.

As a second example, consider the formula  γ = [(⊤; ⊤)∗] p mean-ing that p holds in all even time points (this formula is well-known not to be LTL representable). The formulas obtained for  η(γ) are:

image

with  β = [⊤] [(⊤; ⊤)∗)] p. Since βis actually  [⊤] γ, we get η(β):

image

As we have seen, in the general case, formulas in  η(µ)are not temporal rules, since they sometimes contain double implications. However, they all have the forms  ϕ, □ϕ, �◦□ϕ or □(F → ϕ), for someinner propositional formula  ϕformed with temporal literals. For instance, in (2), the inner  ϕcorresponds to the propositional formula ℓγ ↔ p ∨ℓα. As first shown in [7] propositional formulas in HT can be reduced to conjunctions of disjunctive rules. In this way, we can apply HT transformations (as those in [10]) and THT axioms [1] to eventually obtain a temporal logic program. In the case of (2), the inner double implication is unfolded into three rules that, after applying property  □(α ∧ β) ↔ □α ∧ □β, eventually lead to:

image

Given an  HT-trace ⟨H, T⟩def= ⟨Hi, Ti⟩λi=0, we define its restriction to alphabet  A as ⟨H, T⟩|Adef= ⟨Hi∩A, Ti∩A⟩λi=0. Similarly, for any set S of HT-traces we write  S|Ato stand for  {⟨H, T⟩|A | ⟨H, T⟩ ∈S} as expected.

The following lemma shows that  ℓµ and µare equivalent:

Lemma 1 Let  γbe a dynamic formula over  A and let ⟨H, T⟩ be aDHTf model of σ(γ)being associated with the three-valuation m.

image

Theorem 3 For any dynamic formula  γand any length  λ, we have

image

for any arbitrary dynamic formula  γ′ over A.

Proposition 4 Translation  σ(γ)has a polynomial size with respect to the size of  γ.

with dynamic formulas over finite traces. More precisely, the current version supports negated occurrences of dynamic formula, as in integrity constraints; it is available at https://github.com/potassco/telingo/releases/tag/v2.0.0.

To this end, telingo provides (theory) atoms of form ‘&del{ϕ}’that encapsulate arbitrary dynamic formulas  ϕ. Their syntax is given in Table 2; it is supplied as a theory grammar to the underlying ASP system clingo [13].8 The one of the dynamic operators  [ρ] and ⟨ρ⟩follows that of  □ and ✸, respectively, by extending ‘>*’ and ‘>?’by prepending path expressions  ρseparated by a dot, viz. ‘ρ . >*’and ‘ρ . >?’ . For instance, the dynamic formula  ⟨(p?; ⊤)∗⟩ q fromSection 3 is expressed as

image

The current restriction to negated dynamic formulas allows for an easier algorithmic treatment since formulas in the scope of negation are interpreted as in  LDLf(just as negated formulas in HT can be treated as in classical logic). Although this restriction will be lifted in

image

3{wait; up; down; serve} = 1 :- not &final. 4:- up, at(X), not floor(X+1). 5:- down, at(X), not floor(X-1).

image

12:- called(X), &final.

14ready :- called(X), at(X).

16#program initial.

18:- not &del{ *( (*up + *down) ;; ?ready ;; serve) 19;; *wait .>? &final }.

image

a next release, it already supports an agreeable modeling methodol- ogy for dynamic domain separating action and control theories. The idea is to model the actual action theory with temporal rules, fixing static and dynamic laws, while the control theory, enforcing certain (sub)trajectories, is expressed by integrity constraints using dynamic formulas. This is similar to the pairing of action theories in situation calculus and Golog programs [20].

Let us illustrate this with the example in Listing 1 that aims at modeling a simple elevator. This example is borrowed from [20]. The temporal program in Lines 1-14 constitutes the action theory; it is expressed in  TELf. All its rules in the scope of the program declaration headed by always are thought of as being preceded by  □, that is,they are added as global rules (see beginning of Section 3). Line 3 tells us that exactly one of the four actions wait, up, down, or serve, occurs at any time before the end of the trace. The next two lines check the preconditions of action up and down. Lines 7-9 provide effect and inertia axioms for the fluent at, which reflects the current floor of the elevator. Line 10 expresses that a call at a floor persists unless the floor was served. Line 12 gives the actual goal condition, requiring that no call remains unserved in the final state. Line 14 indicates that the elevator is ready to serve, whenever it is at a floor that it was called to.9

The integrity constraint in Line 18-19 represents the following dynamic formula:

image

The purpose of this constraint is to eliminate fruitless wandering of the elevator. More precisely, it provides a simple control theory stipulating that the elevator must pick one direction, either up or down, and move in this direction until it reaches a floor to which it was called, and serve this floor; this process is repeated an arbitrary number of times; finally, the elevator may have to wait until the end of the trace. Note that (13) is posed as an initial temporal rule, as indicated by the program directive in Line 16. Hence, its path expression must be matched by a trajectory from the initial to the final state, enforced by F in (13) and &final in Line 19 in Listing 1, respectively.

For computation, programs as in Listing 1 are treated according to the translation introduced in Section 3. That is, at the outset, all dynamic formulas are transformed into temporal rules. Each dynamic formula  γis recursively rewritten using translation  ηuntil the for-

image

Table 2. Past and future temporal operators in telingo and their  DELf and TELfcounterparts

mula is free of any dynamic constructs. This is accomplished via clingo’s functionalities for manipulating abstract syntax trees. Then, telingo’s API allows us to turn the obtained equivalences among temporal formulas directly into a regular logic program. This involves the extension of predicates with time variables as well as the introduction of variables and rules reflecting the successive lengthening of finite traces (cf. [8]; temporal rules are treated analogously). This is needed to be able to solve temporal logic programs incrementally. That is, traces of increasing length are investigated by incrementally extending the underlying logic program. Once a model is found, the search stops and the corresponding traces are provided as output. This amounts to computing a nonempty set  DEL(P, λ) ofstable traces for the smallest  λ ≥ 0and some temporal program P at hand.

Finally, let us examine the impact of the dynamic formula in Listing 1 on the trajectories induced by the action theory as well as solver performance. Although we believe that (13) allows us to significantly reduce the number of trajectories induced by the action theory in lines 1-14, its impact on search is less clear cut because it comes with an augmentation of the number of constraints in the solver.

To analyze this, we consider the following simple elevator problems: We look at n = 5, 7, 9, 11 floors, respectively, and initially place a call at the ground and top floor while the elevator sits on the middle floor. The goal is to have all floors served at the end of a trace (cf. Line 12). This can be expressed by the following facts.

image

We run each instance with different horizons, beginning with the minimum lengths of satisfiable traces, viz.  ⌊3n + 1⌋/2, and gradually extending this by 1 to 4 to introduce more room for redundancies. Our experiments were run with telingo 2-α (based on clingo 5.4.1)and obtained without imposing any time or memory restrictions. Our results are summarized in Table 3. Each entry, a/c, contrasts statistics obtained from the pure action theory in Line 1-14, viz. a, with the combination of action and control theory in Line 1-19, c.

For each setting, we give the number of traces, number of choices during search, and the number of constraints in the solver (after all translations, preprocessing etc.). First of all, we notice that the addition of (13) yields exactly two valid traces, no matter what setting is considered. In the first trace, the elevator goes first up all the way and then straight down, and vice versa in the second trace. Both traces are actually minimal as witnessed throughout the first column. This is because the elevator is placed at the mid floor, otherwise one would be shorter than the other. Next, we observe how drastically the number of trajectories and the underlying search increases for the action theories with each extension of the horizon. For instance, for 11 floors and an horizon of 19 (11+5+4) the mere action theory admits 200900 valid traces, among which only two are conformant with (13). Looking at the underlying search, it is amazing how radically (13) trims the search, in that only nine choices are needed to find the two traces. This is also astonishing since its addition led to an increase from 7042 to 9026 constraints in the solver. Similar yet less extreme observations can be made in all remaining settings.

To get an idea on runtime, we conducted the same experiment on the larger instance with 71 floors (λ=107), since the ones obtained for 5 to 11 floors are negligible. Finding the first model without the dynamic constraint takes 19.4 sec, including 17.8 sec of solving, while adding the dynamic constraint yields a runtime of only 2.2 sec with 0.01 sec of solving. As with filtering traces, it seems that the dynamic constraint greatly contributes to guiding the solver.

Clearly, our empirical analysis is rather limited and can only indicate the potential impact of dynamic formulas on reducing search efforts for finite traces. Nonetheless, we observe that adding the dynamic formula in (13) not only (sometimes drastically) reduces the number of feasible traces but also significantly cuts down the number of choices despite its non-negligible increase of the resulting problem.

We have elaborated upon the computational foundations of the Dynamic logic of Here-and-There and its equilibrium traces, viz.  DHTfand  DELf[6], in order to design and implement an expressive ASP system for modeling and solving dynamic domains. Our approach was motivated by the methodology of separating action and control theories, similar to what is done in Situation Calculus and Golog [20].

To this end, we carved out a normal form for dynamic formulas in  DELfthat consists of its fragment corresponding to temporal logic programs. The translation of dynamic formulas into normal form heavily relies on the introduction of auxiliary variables. This allows us to keep the size of the resulting temporal program polynomial in that of the original formula. And moreover it allows us to overcome the common intranslatability of dynamic into temporal formulas when keeping the same language. Our proof of the normal form result relies on a novel characterization of  DELfin terms of a three-valued logic.

image

Table 3. Summary of experimental results in the elevator domain

The reduction of dynamic formulas to temporal logic programs enabled us to implement dynamic expression on top of the temporal ASP solver telingo. Since it constitutes a true extension of the ASP system clingo, we obtain a full-fledged modeling language extended by temporal and dynamic constructs. We provided a limited empirical analysis demonstrating the potential impact of using dynamic formulas to select traces among the ones induced by an associated temporal logic program. This is how we see the interaction of control and action theories in our framework.

To the best of our knowledge, telingo provides the first ASP system augmented with constructs from dynamic and temporal logics. Encodings for bounded model checking in LTL over infinite traces were given in [18]. This was extended to certain action theories expressed with dynamic operators in [15]. A key feature of these encodings is to capture loops inducing infinite traces. This is avoided in [5], where infinite traces in TEL are captured by B¨uchi automata via model checking. Encodings of Golog in ASP were proposed in [24, 23]. This amounts to directly implementing a filter on traces, as done in Listing 1, without any logical underpinnings. In [6], we provided a different translation from converse-free dynamic formulas in  DELfto propositional formulas in HT, which themselves can be translated into an equivalent disjunctive logic program (cf. [10]). More precisely, a dynamic formula  γis translated in [6] into a logic program  (γ)i. This translation differs from the current one,  σ(γ),in several aspects. First, the target language is different: while  σ(γ)produces a temporal logic program,  (γ)idirectly obtains a propositional logic program corresponding to some fixed time point i. This is because  σ(γ)is thought for using telingo as a backend, along with its incremental solving mode, whereas  (γ)iwas thought for the direct use of a specific trace length. Thus, the advantage of  (γ)i isthat it does not pass through temporal expressions from telingo as an intermediate step. On the other hand, its disadvantages are that γcannot contain the converse operator and that  (γ)ican be exponential, since it makes use of distributivity for normalization both of path expressions and of formulas into logic programs. Note that σis applicable to any arbitrary dynamic formula  γand takes polynomial time and space. Its main disadvantage is that, in the general case, the resulting temporal logic program may not be amenable for incremental ASP computation. To do so, an extra condition is required: (non-constraint) temporal rules must additionally be present-centered, that is, conditions may refer to the past or present of head expressions, but not to their future. In the general case,  σ(γ) maynot satisfy this requirement: for instance, one of the directions of (10) yields the rule  �◦□(•ℓα ← ℓβ), so the head  •ℓαdepends on a condition  ℓβin its future. Fortunately, in the case of negated formulas  σ(¬ γ) = σ(⊥ ← γ), as the ones currently implemented in telingo, this limitation does not apply, since we can exclusively use constraints for the translation. Our future work aims at a full integration of dynamic formulas into ASP and thus telingo. In particular, we will study the more general case in which dynamic expressions can be used in non-constraint rules. As we did for temporal theories and the so-called past-future form (see [6]), we plan to identify a similar syntactic condition for a dynamic formula  γso the resulting temporal program  σ(γ)is guaranteed to be present-centered. It will be interesting to experiment with encodings deriving dynamic formulas rather than merely testing them.

This work was partially supported by Ministry of Science and Innovation, Spain (grant TIC2017-84453-P), Xunta de Galicia, Spain (grants GPC ED431B 2019/03 and 2016-2019 ED431G/01, CITIC Research Center).

[1] P. Balbiani and M. Di´eguez, ‘Temporal here and there’, in Proceedings of the Fifteenth European Conference on Logics in Artificial Intelligence (JELIA’16), pp. 81–96. Springer, (2016).

[2] Proceedings of the Fifteenth International Conference on Logic Programming and Nonmonotonic Reasoning (LPNMR’19). Springer, 2019.

[3] A. Bosser, P. Cabalar, M. Di´eguez, and T. Schaub, ‘Introducing temporal stable models for linear dynamic logic’, in Proceedings of the Sixteenth International Conference on Principles of Knowledge Representation and Reasoning (KR’18), pp. 12–21. AAAI Press, (2018).

[4] P. Cabalar, ‘A normal form for linear temporal equilibrium logic’, in Proceedings of the Twelfth European Conference on Logics in Artificial Intelligence (JELIA’10), pp. 64–76. Springer, (2010).

[5] P. Cabalar and M. Di´eguez, ‘STELP — a tool for temporal answer set programming’, in Proceedings of the Eleventh International Conference on Logic Programming and Nonmonotonic Reasoning (LPNMR’11), pp. 370–375. Springer, (2011).

[6] P. Cabalar, M. Di´eguez, and T. Schaub, ‘Towards dynamic answer set programming over finite traces’, In [2], pp. 148–162.

[7] P. Cabalar and P. Ferraris, ‘Propositional theories are strongly equivalent to logic programs’, Theory and Practice of Logic Programming, 7(6), 745–759, (2007).

[8] P. Cabalar, R. Kaminski, P. Morkisch, and T. Schaub, ‘telingo = ASP + time’, In [2], pp. 256–269.

[9] P. Cabalar, R. Kaminski, T. Schaub, and A. Schuhmann, ‘Temporal answer set programming on finite traces’, Theory and Practice of Logic Programming, 18(3-4), 406–420, (2018).

[10] P. Cabalar, D. Pearce, and A. Valverde, ‘Reducing propositional theories in equilibrium logic to logic programs’, in Proceedings of the Twelfth Portuguese Conference on Artificial Intelligence (EPIA’05), pp. 4–17. Springer, (2005).

[11] G. De Giacomo and M. Vardi, ‘Linear temporal logic and linear dynamic logic on finite traces’, in Proceedings of the Twenty-third International Joint Conference on Artificial Intelligence (IJCAI’13), pp. 854–860. IJCAI/AAAI Press, (2013).

[12] M. Fischer and R. Ladner, ‘Propositional dynamic logic of regular programs’, Journal of Computer and System Sciences, 18(2), 194–211, (1979).

[13] M. Gebser, R. Kaminski, B. Kaufmann, M. Ostrowski, T. Schaub, and P. Wanko, ‘Theory solving made easy with clingo 5’, in Technical Communications of the Thirty-second International Conference on Logic Programming (ICLP’16), OASIcs, pp. 2:1–2:15. (2016).

[14] M. Gebser, P. Obermeier, T. Otto, T. Schaub, O. Sabuncu, V. Nguyen, and T. Son, ‘Experimenting with robotic intra-logistics domains’, Theory and Practice of Logic Programming, 18(3-4), 502–519, (2018).

[15] L. Giordano, A. Martelli, and D. Theseider Dupr´e, ‘Reasoning about actions with temporal answer sets’, Theory and Practice of Logic Programming, 13(2), 201–225, (2013).

[16] K. G¨odel, ‘Zum intuitionistischen Aussagenkalk¨ul’, Anzeiger der Akademie der Wissenschaften in Wien, 65–66, (1932).

[17] D. Harel, J. Tiuryn, and D. Kozen, Dynamic Logic, MIT Press, 2000.

[18] K. Heljanko and I. Niemel¨a, ‘Bounded LTL model checking with stable models’, Theory and Practice of Logic Programming, 3(4-5), 519–550, (2003).

[19] A. Heyting, ‘Die formalen Regeln der intuitionistischen Logik’, in Sitzungsberichte der Preussischen Akademie der Wissenschaften, 42– 56, Deutsche Akademie der Wissenschaften zu Berlin, (1930).

[20] H. Levesque, R. Reiter, Y. Lesp´erance, F. Lin, and R. Scherl, ‘GOLOG: A logic programming language for dynamic domains.’, Journal of Logic Programming, 31(1-3), 59–83, (1997).

[21] V. Lifschitz, Answer Set Programming, Springer, 2019.

[22] D. Pearce, ‘Equilibrium logic’, Annals of Mathematics and Artificial Intelligence, 47(1-2), 3–41, (2006).

[23] M. Ryan, ‘Efficiently implementing GOLOG with answer set programming’, in Proceedings of the Twenty-Eighth National Conference on Artificial Intelligence (AAAI’14), pp. 2352–2357. AAAI Press, (2014).

[24] T. Son, C. Baral, T. Nam, and S. McIlraith, ‘Domain-dependent knowledge in answer set planning’, ACM Transactions on Computational Logic, 7(4), 613–657, (2006).

[25] G. Tseitin, ‘On the complexity of derivation in the propositional calculus’, Zapiski nauchnykh seminarov LOMI, 8, 234–259, (1968).

Proposition 5 The valuations of derived formulas and path expressions correspond to:

image

Proof of Proposition 1. By induction on the complexity of the formula. For the cases of  ⊤ and ⊥, note that

• ⟨H, T⟩, k |= ⊤, ⟨T, T⟩, k |= ⊤ and m(k, ⊤) = 2 ̸= 0.• ⟨H, T⟩, k ̸|= ⊥, ⟨T, T⟩, k ̸|= ⊥ and m(k, ⊥) = 0.

For the case of a propositional variable p, it is easy to check that

image

For the modal operators, we need to proceed by double induction.

Case  ϕ = ⟨ρ⟩ ψ:

– Item 1: From left to right, if  ⟨H, T⟩, k |= ⟨ρ⟩ ψ,so  (k, j) ∈ ∥ρ∥⟨H,T⟩ and ⟨H, T⟩, j |= ψ. By in-duction we get m(j, ψ) = 2 and m(k, j, ρ) =2. Therefore,  min{m(k, j, ρ), m(j, ψ)} = 2. Hence,max{min{m(k, j, ρ), m(j, ψ)} | 0 ≤ j < λ} = 2. By thesatisfaction relation we get  m(k, ⟨ρ⟩ ψ) = 2.

Conversely, if  m(k, ⟨ρ⟩ ψ) = 2then, by definition, there exists 0 ≤ j < λ such that min{m(k, j, ρ), m(j, ψ)} = 2. There-fore, both  m(k, j, ρ) = 2 and m(j, ψ) = 2. By induction, ⟨H, T⟩, j |= ψ and (k, j) ∈ ∥ρ∥⟨H,T⟩. By the satisfaction relation, Therefore,  ⟨H, T⟩, k |= ⟨ρ⟩ ψ.

– Item 2: From left to right, if  ⟨T, T⟩, k |= ⟨ρ⟩ ψ, thenthere exists  (k, j) ∈ ∥ρ∥⟨T,T⟩ and ⟨T, T⟩, j |= ψ.By induction we get  m(j, ψ) ̸= 0 and m(k, j, ρ) ̸=0 Therefore, min{m(k, j, ρ), m(j, ψ)} ̸= 0. Hence,max{min{m(k, j, ρ), m(j, ψ)} | 0 ≤ j < λ} ̸= 0. By the(three-valued) satisfaction relation we get  m(k, ⟨ρ⟩ ψ) ̸= 0.

From right to left, if  m(k, ⟨ρ⟩ ψ) ̸= 0then there exists  0 ≤j < λ such that min{m(k, j, ρ), m(j, ψ)} ̸= 0. From this we conclude that  m(j, ψ) ̸= 0 and m(k, j, ρ) ̸= 0. By induction ⟨T, T⟩, j |= ψ and (k, j) ∈ ∥ρ∥⟨T,T⟩. By the satisfaction relation we get  ⟨T, T⟩, k |= ⟨ρ⟩ ψ.

Case  ϕ = [ρ] ψ:

– Item 1: From left to right, assume by contradiction that m(k, [ρ] ψ) ̸= 2. This means thatmin{imp(m(k, j, ρ), m(j, ψ)) | 0 ≤ j < λ} ̸= 2. Therefore there exists  0 ≤ j < λsuch that imp(m(k, j, ρ), m(j, ψ)) ̸=2. By definition,  m(k, j, ρ) > m(j, ψ) ̸= 2. We consider all cases:

If  m(j, ψ) = 1 ̸= 0 then m(k, j, ρ) = 2. By induction on ψ and ρwe get that  ⟨H, T⟩, j ̸|= ψ and (k, j) ∈ ∥ρ∥⟨H,T⟩.From the satisfaction relation we get  ⟨H, T⟩, k ̸|= [ρ] ψ: acontradiction.

 m(j, ψ) = 0 then m(k, j, ρ) ∈ {1, 2} (so m(k, j, ρ) ̸= 0).By induction hypothesis  (k, j) ∈ ∥ρ∥⟨T,T⟩ and ⟨T, T⟩, j ̸|=ψ. Therefore,  ⟨T, T⟩, k ̸|= [ρ] ψ.’

From right to left, let us assume by contradiction that ⟨H, T⟩, k ̸|= [ρ] ψand let us consider the following cases:

There exists  (k, j) ∈ ∥ρ∥⟨H,T⟩ and ⟨H, T⟩, j ̸|= ψ. Byinduction  m(k, j, ρ) = 2 and m(j, ψ) ̸= 2. Therefore, imp(m(k, j, ρ), m(j, ψ)) = m(j, ψ) ̸= 2. By definition, min{imp(m(k, j, ρ), m(j, ψ)) | 0 ≤ j < λ} ̸= 2. There-fore  m(k, [ρ] ψ) ̸= 2: a contradiction.

There exists  (k, j) ∈ ∥ρ∥⟨T,T⟩ and ⟨T, T⟩, j ̸|= ψ. Byinduction  m(k, j, ρ) ̸= 0 and m(j, ψ) = 0. Therefore, imp(m(k, j, ρ), m(j, ψ)) = m(j, ψ) = 0. From this it follows that  min{imp(m(k, j, ρ), m(j, ψ)) | 0 ≤ j < λ} = 0.By the satisfaction relation we get  m(k, [ρ] ψ) = 0 ̸= 2: acontradiction.

image

– Item 2: From left to right, assume by contradiction that m(k, [ρ] ψ) = 0. Therefore  min{imp(m(k, j, ρ), m(j, ψ)) |0 ≤ j < λ} = 0. This means that there exists  0 ≤ j < λsuch that imp(m(k, j, ρ), m(j, ψ)) = m(j, ψ) = 0. Hence,m(k, j, ρ) ̸= 0 and m(j, ψ) = 0. By induction on  ρ and ψ we

conclude that  ⟨T, T⟩, j ̸|= ψ and (k, j) ∈ ∥ρ∥⟨T,T⟩. By thesatisfaction relation it follows  ⟨T, T⟩, k ̸|= [ρ] ψ: a contradiction.

From right to left, assume by contradiction that  ⟨T, T⟩, k ̸|=[ρ] ψ. Therefore, there exists  (k, j) ∈ ∥ρ∥⟨T,T⟩ and⟨T, T⟩, j ̸|= ψ. By induction,  m(k, j, ρ) ̸= 0 and m(j, ψ) =0. This means that imp(m(k, j, ρ), m(j, ψ)) = m(j, ψ) = 0.As a consequence,  min{imp(m(k, j, ρ), m(j, ψ)) | 0 ≤ j <λ} = 0, so m(k, [ρ] ψ) = 0: a contradiction.

In order to prove items 3 and 4 we proceed by induction on  ρ.

image

– Item 3: from left to right, if  (k, j) ∈ ∥τ∥⟨H,T⟩ then j = k +1.Therefore,  m(k, j, τ) = 2. Conversely, if  m(k, j, τ) = 2 thenj = k + 1. By definition,  (k, j) ∈ ∥τ∥⟨H,T⟩.

– Item 4: from left to right, if  (k, j) ∈ ∥τ∥⟨T,T⟩ then j = k + 1.Therefore,  m(k, j, τ) = 2 ̸= 0. Conversely, if  m(k, j, τ) ̸= 0then j = k + 1. By definition  (k, j) ∈ ∥τ∥⟨T,T⟩.

image

– Item 3: from left to right, if  (k, j) ∈ ∥ϕ?∥⟨H,T⟩ thenj = k and ⟨H, T⟩, k |= ϕ. By induction on  ϕ it fol-lows that  m(k, ϕ) = 2 so m(k, j, ϕ?) = 2. Conversely, if m(k, j, ϕ?) = 2 then j = k and m(k, ϕ) = 2. By induction on  ϕ we get ⟨H, T⟩, k |= ϕ so (k, j) ∈ ∥ϕ?∥⟨H,T⟩.

– Item 4: from left to right, if  (k, j) ∈ ∥ϕ?∥⟨T,T⟩ then j =k and ⟨T, T⟩, k |= ϕ. By induction on  ϕ, m(k, ϕ) ̸= 0 som(k, j, ϕ?) ̸= 0. Conversely, if  m(k, j, ϕ?) ̸= 0 then j = kand  m(k, ϕ) ̸= 0. By induction on  ϕ we get ⟨T, T⟩, k |= ϕso  (k, j) ∈ ∥ϕ?∥⟨T,T⟩.

image

– Item 3: from left to right, if  (k, j) ∈ ∥ρ1 + ρ2∥⟨H,T⟩then either  (k, j) ∈ ∥ρ1∥⟨H,T⟩ or (k, j) ∈ ∥ρ2∥⟨H,T⟩.By induction on ρ1 and ρ2 we get that eitherm(k, j, ρ1) = 2 or m(k, j, ρ2) = 2. There-fore max{m(k, j, ρ1), m(k, j, ρ2)} = 2, som(k, j, ρ1 + ρ2) = 2. Conversely, if  m(k, j, ρ1 + ρ2) = 2then max{m(k, j, ρ1), m(k, j, ρ2)} = 2, so eitherm(k, j, ρ1) = 2 or m(k, j, ρ2) = 2. By induction hypothesis we get that either  (k, j) ∈ ∥ρ1∥⟨H,T⟩ or (k, j) ∈ ∥ρ2∥⟨H,T⟩,so  (k, j) ∈ ∥ρ1 + ρ2∥⟨H,T⟩.

– Item 4: from left to right, if  (k, j) ∈ ∥ρ1 + ρ2∥⟨T,T⟩then either  (k, j) ∈ ∥ρ1∥⟨T,T⟩ or (k, j) ∈ ∥ρ2∥⟨T,T⟩.By induction on ρ1 and ρ2 we get that eitherm(k, j, ρ1) ̸= 0 or m(k, j, ρ2) ̸= 0. There-fore max{m(k, j, ρ1), m(k, j, ρ2)} ̸= 0, som(k, j, ρ1 + ρ2) ̸= 0. Conversely, if  m(k, j, ρ1 + ρ2) ̸= 0then max{m(k, j, ρ1), m(k, j, ρ2)} ̸= 0, so eitherm(k, j, ρ1) ̸= 0 or m(k, j, ρ2) ̸= 0. By induction on  ρ1 and ρ2we get that either  (k, j) ∈ ∥ρ1∥⟨T,T⟩ or(k, j) ∈ ∥ρ2∥⟨T,T⟩, so (k, j) ∈ ∥ρ1 + ρ2∥⟨T,T⟩.

image

– Item 3: from left to right, if  (k, j) ∈ ∥ρ1; ρ2∥⟨H,T⟩ then thereexists  i ∈ [0..λ) such that (k, i) ∈ ∥ρ1∥⟨H,T⟩ and (i, j) ∈∥ρ2∥⟨H,T⟩. By induction we get that  m(k, i, ρ1) = 2 andm(i, j, ρ2) = 2. Therefore  min{m(k, i, ρ1), m(i, j, ρ2)} =

2. By definition  m(k, j, ρ1; ρ2) = 2. Conversely, if m(k, j, ρ1; ρ2) = 2then there exists  i ∈ [0..λ) suchthat  min{m(k, i, ρ1), m(i, j, ρ2)} = 2. This means that m(k, i, ρ1) = 2 and m(i, j, ρ2) = 2. By induction hypothesis  (k, i) ∈ ∥ρ1∥⟨H,T⟩ and (i, j) ∈ ∥ρ2∥⟨H,T⟩. By definition (k, j) ∈ ∥ρ1; ρ2∥⟨H,T⟩.

– Item 4: from left to right, if  (k, j) ∈ ∥ρ1; ρ2∥⟨T,T⟩ then thereexists  i ∈ [0..λ) such that (k, i) ∈ ∥ρ1∥⟨T,T⟩ and (i, j) ∈∥ρ2∥⟨T,T⟩. By induction we get that  m(k, i, ρ1) ̸= 0 andm(i, j, ρ2) ̸= 0. Therefore  min{m(k, i, ρ1), m(i, j, ρ2)} ̸=0. By definition  m(k, j, ρ1; ρ2) ̸= 0. Conversely, if m(k, j, ρ1; ρ2) ̸= 0then there exists  i ∈ [0..λ) suchthat  min{m(k, i, ρ1), m(i, j, ρ2)} ̸= 0. This means that m(k, i, ρ1) ̸= 0 and m(i, j, ρ2) ̸= 0. By induction hypothesis  (k, i) ∈ ∥ρ1∥⟨T,T⟩ and (i, j) ∈ ∥ρ2∥⟨T,T⟩. By definition (k, j) ∈ ∥ρ1; ρ2∥⟨T,T⟩.

 ρ = ρn: We proceed by induction on n in its turn. For n = 0 we have that  (k, j) ∈ ∥ρ0∥⟨H,T⟩ iff k = j iff m(k, j, ρ0) = 2.Suppose proved it up to  n ≥ 0. Then, (k, j) ∈ ∥ρn+1∥⟨H,T⟩ isequivalent to:

image

by structural induction for  ρand induction on n this is equivalent to:

image

The case for  (k, j) ∈ ∥ρ∗∥⟨T,T⟩ iff m(k, j, ρ∗) ̸= 0is analogous.

QED

Proposition 6 The following expressions are  DHTf-valid

image

Proof of Lemma 3. Take the  DHTf-trace ⟨H′, T′⟩whose three valued interpretation  m′ satisfies:

image

for any formula  ϕ over Aand for all  i ∈ [k..λ). When ϕis an atom a ∈ A then m′(k, a) = m′(k, ℓa) = m(k, a), which implies that both valuations coincide for atoms, and so,  ⟨H′, T′⟩|A = ⟨H, T⟩. Itremains to be shown that  ⟨H′, T′⟩ |= σ(Γ), which is equivalent to

image

The first satisfaction relation follows directly from the definition of  ⟨H′, T′⟩ since m′(0, ℓγ) = 2 iff m(0, γ) = 2and we had that ⟨H, T⟩is a model of  Γ. For the second part, we consider the following cases depending on the structure of the subformula  µ:

1. For  µ = ⟨τ⟩ ϕwe have two formulas in  η(µ)

For the formula  �◦□(•ℓµ ↔ ℓϕ), the equivalence must be satis-fied for any  k ∈ [1..λ) ( λ = 1being trivial). Then,

image

For the second formula,  □(F → ¬ℓµ)we get the following

image

Note on the other side that,  0 = m(λ − 1, ⟨τ⟩ ϕ) = m(λ −1, µ) = m′(λ − 1, ℓµ). Therefore,  m′(λ − 1, ¬ℓµ) = 2.

2. For  µ = [τ] ϕwe have two formulas in  η(µ). For the formula �◦□(•ℓµ ↔ ℓϕ)we refer the reader to the case of  ⟨τ⟩ ϕ. For thesecond formula,  □(F → ℓµ), we present the proof below:

image

3. For  µ = ⟨τ−⟩ ϕ: we have two formulas in  η(µ):

- For the formula  �◦□(ℓµ ↔ •ℓϕ)note that the prefix  �◦□ meansthat the double implication must be satisfied for any  k ∈ [1..λ)and, moreover, that this is trivially true when  λ = 1. So, wehave to prove  m′(k, ℓµ) = m′(k, •ℓϕ) for all k = 1..n andmay assume n > 0. The proof can be obtained as follows:

image

- For satisfying the formula  ¬ℓµ, this is the same than requiring m′(0, ℓµ) = 0and this follows from

image

4. For  µ = [τ−] ϕwe have two formulas in  η(µ). For the formula �◦□(ℓµ ↔ •ℓϕ)we refer the reader to the case of  ⟨τ−⟩ ϕ. Forthe second formula,  ℓµ, note that  m′(0, ℓµ) = m(0, µ) = 2 bydefinition.

5. For  µ = ⟨ψ?⟩ ϕ we have η(µ) = □(ℓµ ↔ ℓϕ ∧ ℓψ) and so,⟨H′, T′⟩ |= η(µ)amounts to proving  m′(k, ℓµ) = m′(k, ℓϕ ∧ℓψ) for all k ∈ [0..λ). In this case we have that

image

6. For  µ = [ψ?] ϕwe have that  η(µ) = □(ℓµ ↔ (ℓψ → ℓϕ))and so,  ⟨H′, T′⟩ |= η(µ)amounts to proving  m′(k, ℓµ) =m′(k, ℓψ → ℓϕ) for all k ∈ [0..λ). In this case we have

image

7. For  µ = ⟨ρ1 + ρ2⟩ ϕ we have η(µ) = □(ℓµ ↔ ℓα ∨ ℓβ) (with

image

8. For  µ = [ρ1 + ρ2] ϕ we have η(µ) = □(ℓµ ↔ ℓα ∧ ℓβ) (withα = [ρ1] ϕ and β = [ρ2] ϕ) and so, ⟨H′, T′⟩ |= η(µ)amounts to proving  m′(k, ℓµ) = m′(k, ℓα ∧ ℓβ) for all k ∈ [0..λ). In thiscase we have

image

9. For  µ = ⟨ρ1; ρ2⟩ ϕ, ⟨H′, T′⟩ |= η(µ)amounts to proving

image

10. For  µ = [ρ1; ρ2] ϕ, ⟨H′, T′⟩ |= η(µ)amounts to proving m′(k, ℓµ) = m′(k, ℓα), for k ∈ [0..λ), with α = [ρ1] [ρ2] ϕ:

image

For the formula  □(ℓµ ↔ ℓϕ ∨ ℓα, where α = ⟨ρ⟩ ⟨ρ∗⟩ µ, itamounts to show that  m′(k, ℓµ) = m′(k, ℓϕ ∨ ℓα) for all k ∈[0..λ):

image

For the formula  □(F → (ℓµ ↔ ℓϕ))the proof amounts to prove that  m′(λ − 1, ℓµ) = m′(λ − 1, ℓϕ). We show this below.

image

For the formula  □(ℓµ ↔ ℓα ∧ ℓβ, where α = [ρ] [ρ∗] µ, itamounts to show that  m′(k, ℓµ) = m′(k, ℓϕ ∧ ℓα) for all k ∈[0..λ):

image

For the formula  □(F → (ℓµ ↔ ℓϕ)), we refer the reader to the previous case (but using (19) instead).

QED Proof of Lemma 1. We proceed by structural induction on  µ.

image

- If  k = λ − 1we use the second formula in  η(µ). It follows that

image

- If  0 ≤ k < λ − 1we can apply the first formula in  η(µ) thatguarantees  m(j, •ℓµ) = m(j, ℓϕ) for all j = 1..λ − 1. Inparticular, we can take j = k and so:

image

3. If  µ = [τ] ϕ, we consider two cases

 k = λ − 1: on one side we take the second formula of  η(µ)to conclude that  m(λ − 1, ℓµ) = 2and, by definition,  m(λ −1, µ) = 2.

if  0 ≤ k < λ − 1we refer the reader to the previous case.

4. If  µ = ⟨τ−⟩ ϕwe divide into two cases:

image

5.  µ = [τ−] ϕwe distinguish two cases

- k = 0 we use the second formula in  η(µ)to conclude that 2 = m′(0, ℓµ) = m(0, µ)

image

6. If  µ = ⟨ψ?⟩ ϕ. Note that, by definition,  ϕ, ψ ∈ FL(µ). Moreover, it follows that

image

7. If  µ = [ψ?] ϕ. Note that, by definition,  ϕ, ψ ∈ FL(µ). Moreover, it follows that

image

8. If  µ = ⟨ρ1 + ρ2⟩ ϕ, let us take  α = ⟨ρ1⟩ ϕ and β = ⟨ρ2⟩ ϕ

image

We can apply the induction hypothesis on  α and β since α, β ∈FL(µ). Therefore we obtain

image

9. If  µ = [ρ1 + ρ2] ϕ, let us take  α = [ρ1] ϕ and β = [ρ2] ϕ.

image

We can apply the induction hypothesis on  α and β since α, β ∈FL(µ). Therefore we obtain

image

10. If  µ = ⟨ρ1; ρ2⟩ ϕ, let us consider  α = ⟨ρ1⟩ ⟨ρ2⟩ ϕ. Note that α ∈ FL(µ). For this proof we will assume that  η(µ) = {✷(ℓµ ↔ℓα)}, which is equivalent to the assumption  η(µ) = η(α) (that is,the translation to  µcan be directly replaced by the one of  α).

image

11. If  µ = [ρ1; ρ2] ϕ, let us consider  α = [ρ1] [ρ2] ϕ. Note that  α ∈FL(µ). For this proof we will assume that  η(µ) = {✷(ℓµ ↔ℓα)}, which is equivalent to the assumption  η(µ) = η(α) (that is,the translation to  µcan be directly replaced by the one of  α).

image

12. For  µ = ⟨ρ∗⟩ ϕ, we distinguish two different cases depending on k

if  k = λ − 1we use the second formula in  η(µ)to conclude

image

if  0 ≤ k < λ − 1, let us take  α = ⟨ρ⟩ ⟨ρ∗⟩ ϕ. By defini-tion  α, ϕ ∈ FL(µ). Therefore,  m(k, ℓϕ) = m(k, ϕ) andm(k, ℓα) = m(k, α). With this we can use the first formula in η(µ)as follows:

image

13. For  µ = [ρ∗] ϕ, we distinguish two different cases depending on k

if  k = λ − 1we use the second formula in  η(µ)to conclude

image

if  0 ≤ k < λ − 1, let us take  α = [ρ] [ρ∗] ϕ. By defini-tion  α, ϕ ∈ FL(µ). Therefore,  m(k, ℓϕ) = m(k, ϕ) andm(k, ℓα) = m(k, α). With this we can use the first formula in η(µ)as follows:

image

QED


Designed for Accessibility and to further Open Science