Metric dynamic equilibrium logic

In temporal extensions of Answer Set Programming (ASP) based on linear-time, the behaviour of dynamic systems is captured by sequences of states. While this representation reﬂects their relative order, it abstracts away the speciﬁc times associated with each state. In many applications, however, timing constraints are important like, for instance, when planning and scheduling go hand in hand. We address this by developing a metric extension of linear-time Dynamic Equilibrium Logic, in which dynamic operators are constrained by intervals over integers. The resulting Metric Dynamic Equilibrium Logic provides the foundation of an ASP-based approach for specifying qualitative and quantitative dynamic constraints. As such, it constitutes the most general among a whole spectrum of temporal extensions of Equilibrium Logic. In detail, we show that it encompasses Temporal, Dynamic, Metric and regular Equilibrium Logic, as well as its classic counterparts once the law of the excluded middle is added.


Introduction
Reasoning about action and change, or more generally reasoning about dynamic systems, is not only central to knowledge representation and reasoning but at the heart of computer science (Fisher, Gabbay, & Vila, 2005).In practice, this often requires both qualitative as well as quantitative dynamic constraints.For instance, when planning and scheduling go hand in hand, actions may have durations and their effects may need to meet deadlines.
CONTACT Arvid Becker.Email: arvid.becker@uni-potsdam.de arXiv:2401.10781v1[cs.AI] 19 Jan 2024 A commonality of dynamic and temporal logics is that they abstract from specific time points when capturing temporal relationships.For instance, in temporal logic, we can use the formula □(use → ♢clean) to express that at any time a machine has to be eventually cleaned after being used.Nothing can be said about the delay between using and cleaning the machine.
A key design decision was to base both logics, TEL and DEL, on the same linear-time semantics embodied by sequences of states.We continued to maintain the same lineartime semantics when elaborating upon a first "light-weight" metric temporal extension of HT (Cabalar, Diéguez, Schaub, & Schuhmann, 2020).The "light-weightiness" is due to treating time as a state counter by identifying the next time with the next state.For instance, this allows us to refine our example by expressing that, if the machine is used, it has to be cleaned within the next 3 states, viz.□(use → ♢ (1..3) clean).Although this permits the restriction of temporal operators to subsequences of states, no fine-grained timing constraints are expressible.
In (Cabalar, Diéguez, Schaub, & Schuhmann, 2022), we filled this gap in the context of temporal logic by associating each state with its time, as done in Metric Temporal Logic (MTL (Koymans, 1990)).This resulted in a non-monotonic metric temporal extension of HT, referred to as MEL.It allows us to measure time differences between events.For instance, in our example, we may thus express that whenever the machine is used, it has to be cleaned within 60 to 120 time units, by writing: □(use → ♢ (60..120) clean) . (1) Unlike the non-metric version, this stipulates that once use is true in a state, clean must be true in some future state whose associated time is at least 60 and at most 120 time units after the time of use.The choice of time domain is crucial, and might even lead to undecidability in the continuous case (that is, using real numbers).We rather adapt a discrete approach that offers a sequence of snapshots of a dynamic system.
In this paper, we combine the aforementioned temporal, dynamic, and (time-based) metric extensions of the logic of Here-and-There and its non-monotonic extension Equilibrium logic within a single logical setting by extending the dynamic variants with time-based metrics.This results in the Metric Dynamic logic of Here-and-There (MDHT) and its non-monotonic extension of Metric Dynamic Equilibrium Logic (MDEL).In this setting, we can express the statement in (1) as As detailed below, we may thus formulate temporal, metric, as well as Boolean operators in terms of metric dynamic ones.This already hints at the great expressive power of MDHT and MDEL.
The main contribution of the paper is the definition of MDHT itself.Its syntax and semantics were carefully designed to cover both the dynamic operators and the metric intervals, that constituted different and independent extensions, in a way that their combination could also provide other meaningful representational choices.In this way, for instance, we propose intervals that may use negative positions (something uncommon in the literature) not only to accommodate past time operators in a more natural way, but also to offer more flexibility to treat relative time windows for a given expression.The main results prove that the previous temporal approaches, TEL, DEL and MEL, are now fragments of the more general formalism MDEL.
The rest of the paper is organized as follows.We start by defining the syntax, semantics, and some properties of MDHT in Section 2 and define MDEL in Section 3. We then show in Section 4 how an existing (monotonic) metric dynamic logic (Basin, Krstic, & Traytel, 2017) as well as the various aforementioned extensions can be captured in MDHT.We conclude with a brief summary in Section 5.

Metric Dynamic Logic of Here-and-There
We start by providing some notation for intervals used in the rest of the paper.Given m ∈ Z ∪ {−ω} and n ∈ Z ∪ {ω}, we let (m..n) stand for the set {i For simplicity, in what follows, we refrain from distinguishing intervals and integers from their syntactic representation.

Syntax
Given a set A of propositional variables (called alphabet), a metric dynamic formula φ and a path expression ρ are mutually defined by the following pair of grammar rules: where p ∈ A is an atom and I is an interval of the form (m..n) with m ∈ Z ∪ {−ω} and n ∈ Z ∪ {ω}.This syntax combines aspects from metric (Koymans, 1990) and dynamic logic (Pratt, 1976).The metric component manifests itself in the interval attached to the two dynamic modal operators.Apart from this, the syntax is similar to the one of Dynamic Logic (DL; Harel et al. 2000) but differs in the construction of (atomic) path expressions: While DL uses a separate alphabet for "atomic actions", we follow the approach of De Giacomo and Vardi in LDL (2013) and use a single alphabet A along with a single atomic path expression given by the (transition) constant τ ̸ ∈ A (read as "step").Thus, each path expression ρ is a regular expression formed with the constant τ plus the test construct φ? that may refer to propositional atoms in alphabet A.
As regards syntactic metric aspects, we allow subindex intervals I to use some forms of closed ends so that we let [m. and (m..n] for (m..n+1) if n ̸ = ω.Also, we sometimes use the subindices ' ≤ n' and ' ≥ m' as abbreviations of intervals (−ω..n] and [m..ω), respectively, whenever m ̸ = −ω and n ̸ = ω.On the other hand, when I = (−ω..ω), we simply omit the subindex I so that: More generally, we refer to interval-free formulas as dynamic formulas.Finally, we define the inversion of an interval as (m..n) − def = (−n..−m).Note that I = (I − ) − and i ∈ I iff −i ∈ I − for any interval I.
As usual, a metric dynamic theory is a (possibly infinite) set of metric dynamic formulas.We sometimes drop the adjectives and simply use the terms formula and theory, whenever it is clear from context.
As we show below, the above language allows us to capture several derived operators, like the Boolean ones: All Boolean connectives ∧, ∨, and → are defined in terms of the essentially dynamic operators [•] and ⟨•⟩ without any reference to a restricted underlying interval1 .Among them, the definition of → is most noteworthy since it hints at the implicative nature of [•] .Negation ¬ is then expressed via implication, as usual in HT.
A formula is propositional, if all its connectives are Boolean.A formula is said to be conditional if it contains some occurrence of an atom p ∈ A inside an operator of form [•] • ; it is called unconditional otherwise.Note that formulas with atoms in implication antecedents or negated formulas are also conditional, since they are derived from [•] • .For instance, [p?] ⊥ is conditional, and is actually the same as p → ⊥ and ¬p.
As with LDL, we sometimes use a propositional formula ϕ as a path expression and let it stand for (ϕ?; τ).Accordingly, we use the following abbreviations: This also means that the reading of ⊤ as a path expression amounts to (⊤?; τ) which is just equivalent to τ.Another abbreviation is the sequence of n repetitions of some expression ρ defined as ρ 0 def = ⊤? and ρ n+1 def = ρ; ρ n .For instance, ρ 3 unfolds to ρ; ρ; ρ; ⊤? and amounts to ρ; ρ; ρ.
Example 1.As soon as an accident (a) happens onboard, a boat starts sending an SOS (s) during the next 10 minutes, while no help (h) reply is received.When the rescue station receives an SOS, it sends back a help reply no later than 2 minutes.However, the rescue station has only begun working at minute t = 50.If an accident happened at time instant t = 40, would the boat receive a help reply and, if so, when?
A possible formalization of the example could be: Negation in (7) acts as a default: we send the SOS while no evidence about help is derived.That formula also combines path expressions from LDL with metric information.

Semantics
The traditional semantics of linear-time logics, like LTL (Pnueli, 1977), LDL (De Giacomo & Vardi, 2013), and MTL (Koymans, 1990), rely on the concept of a trace, a (possibly infinite) sequence of states, each of which is represented by a set of atoms.More precisely, a trace T of length λ over alphabet A is a sequence T = (T i ) i∈[0..λ) of sets T i ⊆ A. We sometimes use the notation |T| def = λ to stand for the length of the trace.We say that T is infinite if |T| = ω and finite if |T| ∈ N. To represent traces, we write a sequence of sets of atoms concatenated with '•'.For instance, the finite trace {a} • ∅ • {a} • ∅ has length 4 and makes a true at even time steps and false at odd ones.For infinite traces, we sometimes use ω-regular expressions like, for instance, in the infinite trace ({a} • ∅) ω where all even positions make a true and all odd positions make it false.
At each state T i in a trace, an atom a can only be true, viz. a ∈ T i , or false, a ̸ ∈ T i .Temporal logics based on the logic of Here-and-There, like THT (Aguado et al., 2023(Aguado et al., , 2013)), DHT (Bosser et al., 2018;Cabalar, Diéguez, & Schaub, 2019), and MHT (Cabalar, Diéguez, et al., 2020;Cabalar, Diéguez, Schaub, & Schuhmann, 2021;Cabalar et al., 2022), weaken such truth assignments, following the same intuitions as the (non-temporal) logic of HT: An atom can have one of three truth-values in each state, namely, false, assumed (or true by default) or proven (or certainly true).Anything proved has to be assumed, but the opposite does not necessarily hold.Following this idea, a state at time step i is represented as a pair of sets of atoms ⟨H i , T i ⟩ with H i ⊆ T i ⊆ A where H i (standing for "here") contains the proven atoms, whereas T i (standing for "there") contains the assumed atoms.On the other hand, false atoms are just the ones not assumed, captured by A \ T i .Accordingly, a Here-and-There trace For convenience, we usually represent the HT-trace as the pair ⟨H, T⟩ of traces we also denote its length as Note that the two traces H, T must satisfy a kind of order relation, since H i ⊆ T i for each time step i.Formally, we define the ordering H ≤ T between two traces of the same length λ as H i ⊆ T i for each i ∈ [0..λ).Furthermore, we define H < T whenever both H ≤ T and H ̸ = T. Thus, an HT-trace can also be defined as any pair ⟨H, T⟩ of traces such that H ≤ T. The particular type of HT-traces satisfying H = T are called total.
In metric logics, each state is further associated with a time point.For this, we use a function τ that assigns to each state index i ∈ [0..λ) a time point τ (i) ∈ N representing the number of time units (seconds, milliseconds, etc, depending on the chosen granularity) elapsed since time point τ (0) = 0 chosen as the beginning of the trace.All this leads to the concept of a timed HT-trace.
Given any timed HT-trace, satisfaction of formulas is defined as follows.
Definition 2 (MDHT satisfaction).A timed HT-trace M = ⟨H, T, τ ⟩ of length λ over alphabet A satisfies a metric dynamic formula φ at time step k ∈ [0..λ), written M, k |= φ, if the following conditions hold: ( where, for any timed HT-trace M, ∥ρ∥ M ⊆ N 2 is a relation on pairs of time steps inductively defined as follows. (5 This definition accommodates traces of arbitrary length λ, including both infinite (λ = ω) and finite (λ ∈ N) ones.The most significant feature introduced by the HT part of this semantics is the treatment of the always operator [ρ] I φ, which is analogous to the handling of implication3 in the propositional intermediate logic of HT.It requires that φ is satisfied in "both dimensions" H (here) and T (there) of the trace, using ⟨T, T, τ ⟩ in addition to ⟨H, T, τ ⟩ as with the other connectives.
A formula φ is a tautology (or is valid), written |= φ, iff M, k |= φ for any timed HTtrace M and any k ∈ [0..λ).MDHT is the logic induced by the set of all such tautologies.For two formulas φ, ψ we write is the set of all MDHT models of Γ of any length.We may obtain fragments of any metric dynamic logic by imposing restrictions on the timed traces used for defining tautologies and models.We indicate the restriction to finite (resp.infinite) traces by using subscript f (resp.ω).That is, MDHT f stands for the restriction of MDHT to traces of any finite length λ ∈ N and MDHT ω corresponds to the restriction to traces of infinite length λ = ω.
As we saw, Boolean operators are actually derived.This allows us to simplify the number of cases to be checked in proofs by structural induction.Yet, interpreting derived operators by unfolding their definitions can become, in general, a bit cumbersome.
The following proposition provides a direct semantic characterization for Boolean connectives and it can be easily deduced from their definitions as derived operators: Proposition 1 (Satisfaction of Boolean formulas).Let M = ⟨H, T, τ ⟩ be a timed HT-trace of length λ over A. Given the respective definitions of the Boolean operators, we get the following satisfaction conditions: We prove next that a pair of basic properties from HT are maintained in the current extension of MDHT.
Proposition 2 (Persistence).Let ⟨H, T, τ ⟩ be a timed HT-trace of length λ over A and let φ be a formula over A.
Then, for any k ∈ [0..λ), Persistence is a property known from intuitionistic logic; it expresses that accessible worlds satisfy the same or more formulas than the current world, where T is "accessible" from H in HT.This also explains the semantics of [•] • , which behaves as a kind of intuitionistic implication (used to define '→' as a derived operator) and so, it must hold for all accessible worlds, viz.⟨H, T, τ ⟩ and ⟨T, T, τ ⟩.

Metric Dynamic Equilibrium Logic
Given a set of models in MDHT, we define the ones in equilibrium as follows.
Definition 3 (S-Equilibrium/S-Stability).Let S be some set of timed HT-traces.A total timed HT-trace of the form ⟨T, T, τ ⟩ is said to be in equilibrium in S iff ⟨T, T, τ ⟩ ∈ S and there is no other ⟨H, T, τ ⟩ ∈ S such that H < T. When this happens, the timed trace ⟨T, τ ⟩ is said to be stable in S.
When S = MDHT(Γ), the timed HT-traces in equilibrium are called the metric dynamic equilibrium models of Γ, and denoted as MDEL(Γ).Similarly, MDEL(Γ, λ) denotes the HT-traces in equilibrium for MDHT(Γ, λ).Since the ordering relation among traces is only defined for a fixed λ, the following can be easily observed: Proposition 3. The set of metric dynamic equilibrium models of a theory Γ can be partitioned by the trace length λ, that is, ω λ=0 MDEL(Γ, λ) = MDEL(Γ).
Metric Dynamic Equilibrium Logic (MDEL) is the (non-monotonic) logic induced by metric dynamic equilibrium models.We can also define the variants MDEL ω and MDEL f by applying the corresponding restriction to infinite and finite traces, respectively.
Example 2 (Example 1 continued).Back to our example, suppose we have the theory Γ consisting of the formulas (7)-( 9) and let us informally analyze the obtained metric dynamic equilibrium models, or equilibrium models for short.Let us consider first the possible untimed traces, forgetting the metric subindices by now.In other words, consider the temporal equilibrium models of: Formula (12) forces us to include at least an atom a in some state at time step i.Other total models ⟨T, T, τ ⟩ may include more occurrences of a in other states, but they are not in equilibrium, since we can always form a smaller model ⟨H, T, τ ⟩ where those additional a's are removed in H.This is because, apart from (12), atom a only occurs in the antecedent of the implication in (10).Now, after some analysis (see (Cabalar, Diéguez, & Schaub, 2019)), it can be seen that ( 10) is equivalent to the conjunction of temporal rules of the form: As an illustration of their behavior, these rules have a direct correspondence to the ASP program: s(T+1) :-a(T), not h(T), step(T+1).s(T+2) :-a(T), not h(T), not h(T+1), step(T+2).s(T+3) :-a(T), not h(T), not h(T+1), not h(T+2), step(T+3).s(T+4) :-a(T), not h(T), not h(T+1), not h(T+2), not h(T+3), step(T+4).... where we use a time argument for all atoms and a predicate step to describe the existing time points from 0 to |T| − 1.Since a only holds at state i, the first possible justified occurrence of s could only appear from i + 1 on.This means that any occurrence of s up to i can be removed in a smaller H because, apart from (10), s only occurs in the antecedent of (11).But this allows us to conclude that there is no evidence for h at i, since (11) has a false antecedent at that state.In other words, any equilibrium model begins with a prefix ∅ * • {a}.Implication (13) at i forces the existence of a state i + 1 where s must hold, but then, (11) allows us to conclude ♢h at i + 1.By a similar reason as we followed for (12), we conclude that h is true at exactly one state j ≥ i + 1.Since all the states between i + 1 and j − 1 satisfy ¬h, the boat keeps sending an SOS due to (10).To sum up, the possible temporal equilibrium models have one of the forms: where, we use T * to mean any (possibly empty) sequence of repetitions of state T .The first case corresponds to finite-length stable models where the accident just happens at the end of the trace.In the second case, when the boat receives the help reply, it still sends a last SOS since in the previous state, h was false yet.Now, let us see what happens when we consider the metric information.Formula (9) fixes the time point τ (i) = 40 for the state i at which a is made true.Implication (7) is weaker now, since it is only applicable if the states in which we send the SOS are 10 minutes ago from the accident at i. Further than that, the boat stops sending messages.One new possible outcome, for instance, is that there is no transition at all within the next 10 minutes, and so, no SOS is ever emitted.This leads to equilibrium models of the form ∅ * • {a} (when the accident is at the last step) or the form for the state i where a occurs, with τ (i) = 40 and τ (i + 1) > 50.If, on the contrary, there is at least one transition in the next 10 minutes, we must note now that (8) is only effective now at points j where τ (j) ≥ 50.So, the rescue station does not attend to any signal before t = 50.A second possibility is, therefore, that the boat sends one or more SOS calls, but at transitions that do not reach moment t = 50.This would correspond to equilibrium models of the form where, j > i, τ (i) = 40 and τ (j) < 50 and the SOS calls are never attended.Finally, it may be the case that the last SOS call within the 10 minutes interval happens exactly at t = 50, when the rescue station begins operating.If so, a help reply must be sent within the next 2 minutes.This final group of equilibrium models would have either the form: with τ (i) = 40 and τ (j) = 50, meaning that the help is immediate, or perhaps: where τ (i) = 40, τ (j) = 50 and τ (k) ≤ 52.

Relationships
In this section we show that MDHT constitutes an umbrella where different logics for temporal ASP, most of them previously introduced in the literature, can be simply identified as fragments.

Metric Dynamic Logic
An interesting subset of MDHT is the one formed by total timed traces ⟨T, T, τ ⟩.In the non-metric version of temporal and dynamic HT, viz.THT and DHT, the restriction to total models corresponds to Linear Temporal and Dynamic Logic (LTL and LDL (De Giacomo & Vardi, 2013;Pnueli, 1977)).In our case, the restriction to total traces defines a metric version of LDL, that we simply call Metric Dynamic Logic (MDL for short). 4or simplicity, we refrain from an explicit introduction of the semantics of MDL, since it just corresponds to MDHT on total traces ⟨T, T, τ ⟩, as stated below.Proposition 4. For any total timed HT-trace ⟨T, T, τ ⟩ of length λ, any formula φ and any path expression ρ, we have that (2) ∥ρ∥ ⟨T,T,τ ⟩ = ∥ρ∥ ⟨T,τ ⟩ .
Accordingly, any total timed HT-trace ⟨T, T, τ ⟩ can be seen as the timed trace ⟨T, τ ⟩.In fact, under total models, the satisfaction of dynamic operators ⟨ This gives rise to the following result.
Proposition 5. Let φ and ψ be unconditional,5 metric dynamic formulas.Then, Moreover, the first item (along with Proposition 2) implies that any MDHT tautology is also an MDL tautology, so the former constitutes a weaker logic.To show that, in fact, MDHT is strictly weaker, note that it does not satisfy some classical tautologies like the excluded middle φ ∨ ¬φ, while MDL is a proper extension of classical logic.In fact, the addition of the axiom schema □(a ∨ ¬a) for each atom a ∈ A in the alphabet (EM) forces total models and so, makes MDHT collapse to MDL.Propositions 2 and 4 imply that φ is MDHT satisfiable iff it is MDL satisfiable.
In this context, it may also be interesting to recall item (v) in Proposition 1, showing that the satisfaction of negated formulas amounts to checking the formulas' dissatisfaction in the total trace obtained from the 'there' world, namely, ⟨H, In other words, the satisfaction of negated formulas amounts to that in MDL.
In fact, the metric dynamic logic defined in (Basin et al., 2017) corresponds to a fragment of MDHT when restricting ourselves to total traces.Metric dynamic formulas are defined in (Basin et al., 2017) over intervals of natural numbers using negation, disjunction as well as a future-and past-oriented eventually operator.The latter can be expressed in MDHT by applying the converse operator to the path expression and by inverting the interval, viz.⟨ρ − ⟩ I − φ.
In the next result, we use φ − to denote the result of replacing accordingly in formula φ each subformula with such a past-oriented eventually operator.
Corollary 1.Let φ be a metric dynamic formula restricted to the fragment used in (Basin et al., 2017), ⟨T, τ ⟩ a timed trace and k ≥ 0.

The Dynamic Logic of Here-and-There and Dynamic Equilibrium Logic
We consider now the (non-metric) linear dynamic extension of HT introduced in (Cabalar, Diéguez, & Schaub, 2019) known as DHT.A formula is called dynamic, if all its intervals equal (−ω..ω), in which case we also drop all intervals.
Proposition 6 (DHT-satisfaction of dynamic formulas).Let M = ⟨H, T, τ ⟩ be a timed HT-trace of length λ over A. Given the respective definitions of derived operators, we get the following satisfaction conditions: ( where ∥ρ∥ M is defined as in Definition 2. Note that, for the syntactic fragment dynamic formulas, the time function τ is never used and can be dropped.As a consequence: Since the models selection of MDEL for dynamic and temporal formulas respectively collapse to the model selection of DEL and TEL, we can directly conclude: Corollary 4. Let φ be a dynamic (resp.temporal) formula.A total timed trace ⟨T, T, τ ⟩ is a metric dynamic equilibrium model of φ under MDEL definition iff it is a dynamic (resp.temporal) equilibrium logic of φ under DEL (resp.TEL) definition.

The Metric Logic of Here-and-There and Metric Equilibrium Logic
Similar to the expression of Boolean operators in terms of (metric) dynamic formulas, we can also express metric and temporal formulas.
Given an interval I, operators [•] I and ⟨•⟩ I allow us also to define future metric operators F, • I , • I , ♢ I , □ I , U I , standing for final, next, weak next, eventually, always, until, and their past-oriented counterparts: I, • I , • I , ♦ I , ■ I , S I .
This syntax essentially coincides with the metric (timed) extension of HT presented in (Cabalar et al., 2022) called MHT.A formula is called metric, if it includes only Boolean and metric operators.A metric formula is called temporal, if furthermore all its intervals equal (−ω..ω), in which case we drop them once more.
Note that initial and final only depend on the state of the trace and not on the actual time that this state is mapped to.Hence, they are not indexed by any interval.
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, • I φ can also be expressed as However, it can no longer be defined in terms of final, as done in (Cabalar et al., 2018) with non-metric •φ ≡ •φ ∨ F (the same applies to weak previous and initial ).
The MDHT definition of R I and T I is not as immediate as for the other MHT operators, since they cannot be directly defined in terms of the remaining connectives.In LTL, it is well-known that the formulas φ R ψ (resp.φ T ψ) and ¬ (¬φ U ¬ψ) (resp.¬ (¬φ S ¬ψ)) are equivalent.Consequently, φ R ψ corresponds to the LDL expression [(¬φ?; τ) * ] ψ while φ T ψ corresponds to [(¬φ?; τ − ) * ] ψ.When we move to DHT, those previous equivalences do not hold any more because of the constructive behavior of the negation but, yet, release and trigger can still be defined as derived operators thanks to the equivalences (Bosser et al., 2018): Unfortunately, once we add the intervals, it is easy to see that: To put a counter example for the R I equivalence (the one for T I follows a similar reasoning), consider the timed HT-trace ⟨H, T, τ ⟩ of length λ = 3, where In (Becker, Cabalar, Diéguez, Schaub, & Schuhmann, 2023) it is shown that R I (resp.T I ) can be defined in terms of the unary timed operators and the (untimed) R (resp.T), which are MDHT-definable.
From the unary normalform it is quite forward to get the respective MDHT translation, since R and T are definable according to (Bosser et al., 2018).
Finally, note that the converse operator ρ − is essential for expressing all metric past operators, whose addition in temporal logic is exponentially more succinct than using only future operators (Aguado, Cabalar, Diéguez, Pérez, & Vidal, 2017).
Proposition 7 (MHT-satisfaction of metric temporal logic).Let M = ⟨H, T, τ ⟩ be a timed HT-trace of length λ over A. Given the respective definitions of the metric temporal operators, we get the following satisfaction conditions of MHT: Corollary 5. Let φ be a metric formula, M a timed HT-trace and k ≥ 0.
Since the models selection of MDEL for this syntactic fragment collapses to the model selection of MEL, we can directly conclude: Corollary 6.Let φ be a metric formula.A total timed trace ⟨T, T, τ ⟩ is a metric dynamic equilibrium model of φ (under MDEL definition) iff it is a metric equilibrium model of φ (under MEL definition).

Conclusions
An important first step towards a logical formalization of temporal ASP systems was initiated with the linear-time temporal extension of Equilibrium Logic and its monotonic basis, the logic of Here-and-There (HT), respectively called Temporal Equilibrium Logic (TEL) and Temporal Here-and-There (THT) (Aguado et al., 2023).This extension allowed defining temporal stable models for arbitrary theories for the syntax of the well-known Linear-Time Temporal Logic (LTL) (Pnueli, 1977) and gave rise to the implementation of the temporal ASP tool telingo (Cabalar, Diéguez, et al., 2020;Cabalar, Kaminski, et al., 2019).In our previous work, we explored extending the LTL syntax in two different directions.On the one hand, we studied the use of path expressions from Dynamic Logic (Harel et al., 2000), adopting the syntax and principles of Linear Dynamic Logic (LDL) (De Giacomo & Vardi, 2013).This led to the extensions called Dynamic HT (DHT) and Dynamic Equilibrium Logic (DEL) that, despite of allowing a richer syntax and expressiveness, used the same semantic structures as LTL, since a temporal stable model is just a (finite or infinite) trace.On the other hand, in a somehow orthogonal way, we also studied the incorporation in THT of metric information, by extending modal operators with time intervals as in Metric Temporal Logic (MTL) (Koymans, 1990), leading to Metric HT (MHT) and Metric Equilibrium Logic (MEL) (Cabalar et al., 2022).This meant not only a syntax extension with respect to LTL operators, but also a generalization of the semantic structure of a temporal stable model, that had in this case the form of a timed trace, that is, a trace where each state has an associated time point from an external clock.
In this paper, we have presented a unification of both extensions, namely, the use of dynamic operators and path expressions with the extension for metric intervals and timed traces.The new formalism, we call Metric Dynamic Here-and-There (MDHT) and its non-monotonic version Metric Dynamic Equilibrium Logic (MDEL), acts as an umbrella for all the mentioned previous logics, that become now fragments of the new approach.One interesting feature is that, as happens with DHT, both future and past operators are accommodated into the two standard dynamic modalities, [•] I and ⟨•⟩ I that have now a metric interval I as a subindex.This is achieved by a combination of the converse operator ρ − in path expressions with the use of negative values in the interval I. To put an example, the usual encoding of the (non-metric) past temporal formula ♦p in LDL is ⟨(τ * ) − ⟩ p, using the converse operator.If we add a metric interval, as in ♦ [2..9] p, then the encoding into MDHT also reverses the interval ends (switching their roles and their signs) leading to ⟨(τ * ) − ⟩ [−9..−2] p.This extension of intervals with negative numbers has been mostly thought for encoding standard past temporal operators, but also offers new expressive flexibility.For instance, we can now deal with quite complex and compact formulas like: meaning that it is always true that if there was some point in the past where p held in the middle of an alternation of a and b that occurred between 5 minutes before and five minutes after p, then q must hold now.
For future work, we plan to study different properties of the new formalism, such as strong equivalence, reduction to normal forms, translations of MDHT and MDEL respectively into First and Second Order Logic, or encodings into logic programming.Another important topic is exploring the relation with ASP with Constraint Solving (Baselice, Bonatti, & Gelfond, 2005), and exploiting its use for implementation purposes.

Proof. (Proposition 2)
We proceed by induction on the well-founded subexpression relation taking into account the following considerations: for any arbitrary subexpression γ of an expression φ: (A) Persistence holds if γ is a formula and (B) ∥γ∥ ⟨H,T,τ ⟩ ⊆ ∥γ∥ ⟨T,T,τ ⟩ holds if γ is a path expression.
First we show (A) by assuming that the induction hypothesis (A) and (B) hold for proper subexpressions of φ.
To finish the proof of the property (B) we need to prove (B1), which is done by induction on N.

Proof. (Proposition 4)
Proof by induction on the well-founded subexpression relation.As a remark, note that under the assumption of total traces, the law of excluded middle is satisfied and this makes that MDHT formulas to be satisfied as in MDL.

Proof. (Proposition 5)
By induction on the well-founded subexpression relation.Note that the absence of implications implies that the world 'here' is the only one used in the evaluation of a formula.

Corollary 2 .
Let φ be a dynamic formula and M a timed HT-trace and k ≥ 0.Then, M, k |= φ under DHT satisfaction iff M, k |= φ under MDHT satisfaction.and, since THT can be defined as a fragment of DHT we also obtain: Corollary 3. Let φ be a temporal formula and M a timed HT-trace and k ≥ 0.Then, M, k |= φ under THT satisfaction iff M, k |= φ under MDHT satisfaction.