Skip to main content
Log in

Metric propositional neighborhood logic with an equivalence relation

  • Original Article
  • Published:
Acta Informatica Aims and scope Submit manuscript

Abstract

The propositional interval logic of temporal neighborhood (PNL for short) features two modalities that make it possible to access intervals adjacent to the right (modality \(\langle A \rangle \)) and to the left (modality \(\langle \overline{A}\rangle \)) of the current interval. PNL stands at a central position in the realm of interval temporal logics, as it is expressive enough to encode meaningful temporal conditions and decidable (undecidability rules over interval temporal logics, while PNL is NEXPTIME-complete). Moreover, it is expressively complete with respect to the two-variable fragment of first-order logic extended with a linear order \(\text {FO} ^2[<]\). Various extensions of PNL have been studied in the literature, including metric, hybrid, and first-order ones. Here, we study the effects of the addition of an equivalence relation \(\sim \) to Metric PNL (MPNL\({\sim }\)). We first show that the finite satisfiability problem for PNL extended with \(\sim \) is still NEXPTIME-complete. Then, we prove that the same problem for MPNL\({\sim }\) can be reduced to the decidable 0–0 reachability problem for vector addition systems and vice versa (EXPSPACE-hardness immediately follows).

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

Notes

  1. The polynomial reduction from \(\text {FO} ^2[<]\) to PNL is outlined in the “Appendix”.

  2. Unlike the case of MPNL\({\sim }\), the closure of a PNL\({\sim }\) formula \(\varphi \) only consists of the set of all sub-formulas of \(\varphi \) and their negations.

  3. It is worth remarking that \(\mathcal {C}f_{\sim }(\hat{x}) \subseteq [x]_\sim \).

References

  1. Bojańczyk, M.: Weak MSO with the unbounding quantifier. Theory Comput. Syst. 48(3), 554–576 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  2. Bojańczyk, M., David, C., Muscholl, A., Schwentick, T., Segoufin, L.: Two-variable logic on data words. ACM Trans. Comput. Log. 12(4), 27 (2011)

    MathSciNet  MATH  Google Scholar 

  3. Bresolin, D., Monica, D.Della, Goranko, V., Montanari, A., Sciavicco, G.: Metric propositional neighborhood logics on natural numbers. Softw. Syst. Model. 12(2), 245–264 (2013)

    Article  Google Scholar 

  4. Bresolin, D., Goranko, V., Montanari, A., Sciavicco, G.: Propositional interval neighborhood logics: expressiveness, decidability, and undecidable extensions. Ann. Pure Appl. Log. 161(3), 289–304 (2009)

    Article  MathSciNet  MATH  Google Scholar 

  5. Bresolin, D., Montanari, A., Sala, P.: An optimal tableau-based decision algorithm for propositional neighborhood logic. In: Proceedings of the 24th STACS, vol. 4393 of LNCS, pp. 549–560. Springer, (2007)

  6. Bresolin, D., Montanari, A., Sciavicco, G.: An optimal decision procedure for right propositional neighborhood logic. J. Autom. Reason. 38(1–3), 173–199 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  7. Bresolin, Davide, Montanari, Angelo, Sala, Pietro, Sciavicco, Guido: Optimal decision procedures for MPNL over finite structures, the natural numbers, and the integers. Theor. Comput. Sci. 493, 98–115 (2013)

    Article  MathSciNet  MATH  Google Scholar 

  8. Demri, S., Lazic, R.: LTL with the freeze quantifier and register automata. ACM Trans. Comput. Log. 10(3), 16 (2009)

    Article  MathSciNet  MATH  Google Scholar 

  9. Goranko, V., Montanari, A., Sciavicco, G.: Propositional interval neighborhood temporal logics. J. Univers. Comput. Sci. 9(9), 1137–1167 (2003)

    MathSciNet  MATH  Google Scholar 

  10. Grädel, E., Kolaitis, P.G., Vardi, M.Y.: On the decision problem for two-variable first-order logic. Bull. Symb. Log. 3(1), 53–69 (1997)

    Article  MathSciNet  MATH  Google Scholar 

  11. Hopcroft, J.E., Pansiot, J.-J.: On the reachability problem for 5-dimensional vector addition systems. Theor. Comput. Sci. 8(2), 135–159 (1979)

    Article  MathSciNet  MATH  Google Scholar 

  12. Karp, R.M., Miller, R.E.: Parallel program schemata. J. Comput. Syst. Sci. 3(2), 147–195 (1969)

    Article  MathSciNet  MATH  Google Scholar 

  13. Kieronski, E., Michaliszyn, J., Pratt-Hartmann, I., Tendera, L.: Two-variable first-order logic with equivalence closure. In: Proceedings of the 27th LICS, pp. 431–440. IEEE, (2012)

  14. Kieronski, E., Otto, M.: Small substructures and decidability issues for first-order logic with two variables. In: Proceedings of the 20th LICS, pp. 448–457. IEEE, (2005)

  15. Kieronski, E., Tendera, L.: On finite satisfiability of two-variable first-order logic with equivalence relations. In: Proceedings of the 24th LICS, pp. 123–132. IEEE, (2009)

  16. Kosaraju, S.R.: Decidability of reachability in vector addition systems (preliminary version). In: Proceedings of the 14th STOC, pp. 267–281. ACM, (1982)

  17. Lipton, R.J.: The reachability problem requires exponential space. Technical Report 62, Department of Computer Science, Yale University, (1976)

  18. Montanari, A., Puppis, G., Sala, P., Sciavicco, G.: Decidability of the interval temporal logic \(AB\bar{B}\) on natural numbers. In: Proceedings of the 27th STACS, pp. 597–608, (2010)

  19. Montanari, A., Sala, P.: Adding an equivalence relation to the interval logic \({AB\overline{B}}\): complexity and expressiveness. In: Proceedings of the 28th LICS, pp. 193–202. IEEE, (2013)

  20. Mortimer, M.: On languages with two variables. Z. Math. Log. Grundlagen Math. 21, 135–140 (1975)

    Article  MathSciNet  MATH  Google Scholar 

  21. Otto, M.: Two variable first-order logic over ordered domains. J. Symb. Log. 66(2), 685–702 (2001)

    Article  MathSciNet  MATH  Google Scholar 

  22. Ouaknine, J., Worrell, J.: On the decidability and complexity of metric temporal logic over finite words. Log. Methods Comput. Sci. 3(1), 1–27 (2007)

  23. Scott, D.: A decision method for validity of sentences in two variables. J. Symb. Log. 27(4), 377 (1962)

    Google Scholar 

  24. Venema, Y.: A modal logic for chopping intervals. J. Log. Comput. 1(4), 453–476 (1991)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Pietro Sala.

Appendix

Appendix

The polynomial reduction from \(\text {FO} ^2[<]\) to PNL

In the following, we briefly show how to turn the exponential reduction from \(\text {FO} ^2[<]\) to PNL given in [4] into a polynomial one. We recall that a polynomial reduction from a logic L to a logic \(L'\) is a polynomial-time procedure that receives a formula \(\alpha \) of L as input and returns a formula \(\beta \) of \(L'\) as output such that \(\alpha \) is (finitely) satisfiable if and only if \(\beta \) is (finitely) satisfiable. In our case, the resulting formula \(\beta \equiv \sigma _s(\alpha )\) is obtained by the direct translation of the formula \(\alpha \) by means of the transformation \(\chi \) described in the table below. The final formula used in the reduction will be presented in Theorem 4.

Basic formulas

Non-basic formulas

\(\chi _{x,y}(x=x) \,:=\, \chi _{x,y}(y=y) = \top \)

\(\chi _{x,y}(\lnot \alpha ) \,:=\, \lnot \chi _{x,y}(\alpha )\)

\(\chi _{x,y}(x=y) \,:=\, \chi _{x,y}(y=x) = \pi \)

\(\chi _{x,y}(\phi \vee \psi ) \,:=\, \chi _{x,y}(\phi ) \vee \chi _{x,y}(\psi )\)

\(\chi _{x,y}(y<x) \,:=\,\ \perp \)

\(\chi _{x,y}(\exists x \psi ) \,:=\, \langle A \rangle \chi _{y,x}(\psi )\vee [A]\langle \overline{A}\rangle \chi _{x,y}(\psi )\)

\(\chi _{x,y}(P(x,x)) \,:=\, \langle \overline{A}\rangle (\pi \wedge p^\leqslant \wedge p^\geqslant )\)

\(\chi _{x,y}(\exists y \psi ) \,:=\, \langle \overline{A}\rangle \chi _{y,x}(\psi )\vee [\overline{A}]\langle A \rangle \chi _{x,y}(\psi )\)

\(\chi _{x,y}(P(y,y)) \,:=\, \langle A \rangle (\pi \wedge p^\leqslant \wedge p^\geqslant )\)

 

\(\chi _{x,y}(P(x,y)) \,:=\, p^\leqslant \)

 

\(\chi _{x,y}(P(y,x)) \,:=\, p^\geqslant \)

 

The translation of \(\text {FO} ^2[<]\) formulas into PNL ones.

We now introduce a model transformation \(\zeta \) that univocally translates each model of \(\text {FO} ^2[<]\) into a model of PNL.

Definition 2

Let \(\mathcal {A} = \langle \mathbb {D}, V_{\mathcal {A}} \rangle \) be a relational first-order model on a vocabulary \(\tau \cup \{\leqslant \}\) (without loss of generality, we assume that \(\tau \) contains only symbols with arity 2), where \(\leqslant ^{\mathcal {A}}\) is a linear order on \(\mathbb {D}\). The corresponding interval model \(\zeta (\mathcal {A})\) on \(\mathcal {P}rop = \{ p^\leqslant , p^\geqslant : P \in \tau \}\) is a pair \(\langle \mathbb {I}(\mathbb {D}), V_{\zeta (\mathcal {A})}\rangle \) such that, for any binary relation \(P \in \tau \) and any interval [ab], \([a,b] \in V_{\zeta (\mathcal {A})}(p^\leqslant )\) if and only if \((a,b) \in V_{\mathcal {A}}(P)\) and \([a,b] \in V_{\zeta (\mathcal {A})}(p^\geqslant )\) if and only if \((b,a) \in V_{\mathcal {A}}(P)\).

The next lemma proves the correctness of the transformation \(\chi \) using the model transformation \(\zeta \).

Lemma 7

For every \(\text {FO} ^2[<]\)-formula \(\alpha (x,y)\), every \(\text {FO} ^2[<]\)-model \(\mathcal {A} = \langle \mathbb {D},\) \(V_{\mathcal {A}} \rangle \), and every pair \(a,b \in D\), with \(a\leqslant b\), the following hold: (i) \(\mathcal {A}\vDash \alpha (a,b)\) if and only if \(\zeta (\mathcal {A}),[a,b] \vDash \chi _{x,y}(\alpha )\) and (ii) \(\mathcal {A} \vDash \alpha (b,a)\) if and only if \(\zeta (\mathcal {A}),[a,b] \vDash \chi _{y,x}(\alpha )\).

Proof

The proof is a straightforward induction on the complexity of the formula \(\alpha \). \(\square \)

Let the formula sync be defined as \(sync \equiv \bigwedge _{p^\leqslant ,p^\geqslant } [U](\pi \rightarrow (p^\leqslant \leftrightarrow p^\geqslant )),\) where \([U]\psi \) is the universal modality, which can be defined in PNL as follows:

$$\begin{aligned}{}[U]\varphi::= & {} [A][A][\overline{A}]\varphi \wedge [A][\overline{A}][\overline{A}]\varphi \wedge [\overline{A}][\overline{A}][A]\varphi \wedge [\overline{A}][A][A]\varphi . \end{aligned}$$

The constraint sync will be exploited by the formula \(\sigma _s(\alpha )\) to force each model of its to agree (be synchronized) on the value of every interval point (for every pair of symbols \(p^\leqslant ,p^\geqslant \) in \(\mathcal {P}rop\)). This is needed to prove the right-to-left implication of the next theorem since, otherwise, there could be models of \(\sigma _s(\alpha )\) that would not be mappable to an \(\text {FO} ^2[<]\)-model according to inverse transformation of \(\zeta \).

Theorem 4

For every \(\text {FO} ^2[<]\)-formula \(\alpha \), \(\alpha \) is (finitely) satisfiable if and only if the \(PNL\)-formula

$$\begin{aligned} \sigma _s(\alpha ) \equiv sync \wedge (\chi _{x,y}(\varphi ) \vee \chi _{y,x}(\varphi )) \end{aligned}$$

is (finitely) satisfiable.

Proof

The claim is a direct consequence of Lemma 7. \(\square \)

Note that the above reduction is exponential because of the computational explosion caused by nested quantifiers. To turn it into a polynomial reduction, we can apply first the Scott’s normal form to the formula \(\alpha \) (in polynomial time) to obtain a formula \(\alpha '\), which is equi-satisfiable with \(\alpha \) and whose level of nested quantifiers does not exceed two, and then apply \(\sigma _s\) to \(\alpha '\).

Proposition 1

Let \(\varphi \) be an MPNL\({\sim }\)formula. If \(\mathcal {V}_{\varphi }\) has a 0–0 computation, then \(\varphi \) is satisfiable over the class of finite linear orders.

Proof

Let \(C=(q_0,\overline{0})\rightarrow \cdots \rightarrow (q_n, \overline{0})\) be a 0–0 computation of the VASS \(\mathcal {V}_{\varphi }\), where \(q_0 \in Q_i\) and \(q_n\in Q_f\). According to the definition of \({\varDelta }\), the computation can be splitted in two parts. In the first part (prefix), it alternates between transitions in \({\varDelta }^{M, 1}\) and (sequences of) transitions in \({\varDelta }^{k,k}\) and \({\varDelta }^{k,k+1}\) until it reaches a final state \(q_f=(R, \widetilde{w}, t_{\widetilde{w}}, f_\sim , P_R, M)\) for the first time. Since \([A]\lnot len_1 \in R\) (by definition of final state), no further transitions in \({\varDelta }_{M,1}\) can be fired. In the second part (suffix), the computation is thus forced to remain in \(q_f\) and only two types of transition can be executed. Let \((\widetilde{w}', t_{\widetilde{w}'})\) be the M-th pair in the order \(<_R\). By construction, either a transition \((q_f,\{c_{\widetilde{w}', t_{\widetilde{w}'}}-1, c_{\widetilde{w}', t_{\widetilde{w}'}'}+1\},q_f)\) in \({\varDelta }_{M,M}\) or a transition \((q_f, \{c_{\widetilde{w}_f, t_{{\widetilde{w}}_f}}\}-1, q_f) \in {\varDelta }^f_{M,M}\), for some final pair \((\widetilde{w}_f\), \(t_{{\widetilde{w}}_f})\), can be fired in \(q_f\). Since the computation ends with the values of counters equal to \(\overline{0}\), for each fired transition \((q_f,\{c_{\widetilde{w}', t_{\widetilde{w}'}}-1, c_{\widetilde{w}', t_{\widetilde{w}'}'}+1\},q_f)\), the pair \((\widetilde{w}', t_{\widetilde{w}'}')\) is final. Moreover, for all pairs \((\widetilde{w}, t_{\widetilde{w}})\) such that there exists no transition of the form \((q_f,\{c_{\widetilde{w}, t_{\widetilde{w}}}-1, c_{\widetilde{w}, t_{\widetilde{w}}'}+1\},q_f)\) in \({\varDelta }^f_{M,M}\), either \(c_{\widetilde{w}, t_{\widetilde{w}}}=0\) the first time we reach \(q_f\) or the pair \((\widetilde{w}, t_{\widetilde{w}})\) is final, as only counters relative to final pairs are decreased and counters reach the value \(\overline{0}\) at the end of the computation.

Now, let \(C_{pre}=(q_0,\overline{0})\rightarrow \cdots \rightarrow (q_{m},v_m)\) be the computation prefix and let \((q_{k},v_k)\) be the result of the last application of a transition in \({\varDelta }_{k,k}\) in \(C_{pre}\). We build a LIS \(\mathbf {L}=(\mathbb {D}, \mathcal {L})\) from \(C_{pre}\) by a suitable iterative process. \(\mathbf {L}\) is obtained as the result of a number of iteration steps, being \(\mathbf {L}_i=(\mathbb {D}_i, \mathcal {L}_i)\), where \(\mathcal {L}_i\) is not necessarily defined for all points in \(D_i\), the output of the i-th step. Let \(D^\sim _i\) be a minimal subset of points in \(D_i\) such that for each \(x \in D_i\) there exists \(x'\in D^\sim _i\) with \(x\in [x']_\sim \). Minimality of \(D^\sim _i\) guarantees that in \(D^\sim _i\) there is exactly one witness for each class in \(D_i\).

In order to define an invariant for the iterative construction, we introduce the following functions:

  • \(ff^{\overline{A}}_{\mathbf {L}_i}:D_i\rightarrow 2^{D_i}\), that maps each \(x\in D_i\) into a set of points \(ff^{\overline{A}}_{\mathbf {L}_i}(x)\) such that, for each \(\psi \in \mathbf {req}_{\overline{A}}(x)\), there exists \(x'<x\) in \(ff^{\overline{A}}_{\mathbf {L}_i}(x)\) with \(\psi \in \mathcal {L}([x',x])\);

  • \(f^i_{\mathcal {W}}: D^\sim _i\rightarrow \widetilde{\mathcal {W}}_\varphi \), that maps each \(x \in D^\sim _i\) into its class word \(\widetilde{w}_{[x]_\sim }\);

  • \(f^i_{\mathcal {T}}:D^\sim _i\rightarrow \mathcal {T}\), that maps each \(x \in D^\sim _i\) into its temporary fulfillment at step i;

  • \(f^i_{C_{pre}}:D^\sim _i\rightarrow \mathcal {T}\), that maps each \(x \in D^\sim _i\) into its temporary fulfillment in the computation \(C_{pre}\).

We would like to briefly explain the role of the last two functions, namely, \(f^i_{\mathcal {T}}\) and \(f^i_{C_{pre}}\), that map a given equivalence class (that is, an element of \(D^\sim _i\)) into the LIS \(\mathbf {L}_i\) and the computation \(C_{pre}\), respectively. Intuitively, the execution of a transition in \({\varDelta }_{M,1}\) corresponds to the insertion of a new point x, with \(\mathbf {req}(x)=R\), in \(\mathbf {L}_i\) as the successor of the largest point of \(\mathbb {D}_i\). As we already pointed out, the control of the automaton only provides the labeling for the subset of intervals that end at points belonging to \([x]_\sim \) (the class of x), to the class of the predecessor of x (if any), or to the classes \([x']_\sim \ (\ne \! [x]_\sim )\) which are used to satisfy the \(\overline{A}\) requests in R. As for the points belonging to the remaining classes, it may happen that the automaton executes some, but not all, transitions in \({\varDelta }_{k,k}\), that is, some “active” (that is, executable) transitions in \({\varDelta }_{k,k}\) are possibly not executed (recall that the control of the automaton cannot execute any zero-test operation). However, the fact that not all active transitions are actually executed by the automaton does not introduce any inconsistency in \(\mathbf {L}_i\), as the function \(f_\sim \) guarantees the existence of a consistent labeling of the intervals beginning at these points and ending at x. What happens is simply that the addition of a point x, which turns out to completely invisible to the computation, can force an expansion of the temporary words of some classes in \(\mathbf {L}_i\). It immediately follows that, at each step i, the temporary words in \(\mathbf {L}_i\) are supersets of those in the computation, that is, for all \(x\in D_i\), \(f^i_{C_{pre}}(x) \leqslant f^i_{\mathcal {T}}(x)\). However, this is not a problem, because being the computation successful guarantees that all the temporary words in the automaton will be sooner or later saturated and thus all the requests in the resulting LIS \(\mathbf {L}\) will be satisfied.

Let \(q_i=(R^i, \widetilde{w}^i, t_{{\widetilde{w}}^i}, f^i_\sim , P^i_R, k^i)\). We show that, at each iteration of the construction process, the truth of the following invariant is guaranteed:

  1. 1.

    for all \(x \in D_i\), it holds that \(f^i_{\mathcal {W}}(x)=f^{i+1}_{\mathcal {W}}(x)\) and \(ff_{\mathbf {L}_i}^{\overline{A}}(x)=ff_{\mathbf {L}_{i+1}}^{\overline{A}}(x)\);

  2. 2.

    for all \(x,x'\in D_i\), with \(x'<x\) and \(x \ne \max (D_i)\), \(\mathcal {L}_i([x',x])\) is defined and, for each \(\langle \overline{A}\rangle \psi \in \mathbf {req}_{\overline{A}}(x)\), there exists \(x''\in D_i\) such that \(\psi \in \mathcal {L}([x'',x])\);

  3. 3.

    for all \(x\in D^\sim _i\), it holds that \(f^i_{C_{pre}}(x) \leqslant f^i_{\mathcal {T}}(x) \);

  4. 4.

    for all \((\widetilde{w}, t_{\widetilde{w}})\), it holds that \(|\{ x \in D^{\sim }_i : f^i_{C_{pre}}(x) =t_{\widetilde{w}} \wedge [x]_\sim \cap ff^{\overline{A}}_{\mathbf {L}_i}(\max (D_i)) = \varnothing \}| = c_{\widetilde{w}, t_{\widetilde{w}}}\);

  5. 5.

    for all \(x\in D^\sim _i\), either \(\mathcal {L}_i([x', \max (D^\sim _i)])\) is defined for all \(x' \sim x\) in \(D_i\) or it is not defined for any \(x' \sim x\) in \(D_i\);

  6. 6.

    for all \(x\in D^\sim _i\) such that \([x]_\sim \cap ff^{\overline{A}}_{\mathbf {L}_i}(\max (D_i)) = \varnothing \), if \(\mathcal {L}_i([x, \max (D_i)])\) is defined and \((\widetilde{w}', t_{\widetilde{w}'})\) is the \(k^i\)-th element in the order \(<_{R^i}\), then \((f^i_{\mathcal {W}}(x),f^i_{C_{pre}}(x)) <_{R^i} (\widetilde{w}', t_{\widetilde{w}'})\);

  7. 7.

    for all \(x\in D_i\), with \(x \sim x'\), for some \(x'\in D^\sim _i\) with \(f^i_{\mathcal {W}}(x')=\widetilde{w}\) and \(f^i_{\mathcal {T}}(x')=t_{\widetilde{w}}\), if \(pos_\sim (x)>|\varphi ^2| - |\varphi |\) and \(\widetilde{w}[j]\ne \mathbf {req}(x)\) for all \(j>|t_{\widetilde{w}}|\), then, for all \(x'' \in D_i\), with \(x''>\max (\mathbf {req}(x), [x']_\sim )\), \(\mathcal {L}_i([x,x''])=\mathcal {L}_i([\max (\mathbf {req}(x), [x']_\sim ),x''])\);

  8. 8.

    for all \(R\in \mathcal {R}_\varphi \), it holds that \(f^i_\sim (R)= \#^i_R\), if \(\#^i_R \leqslant 1\), and \(f^i_\sim (R)=+\) otherwise, where \(\#^i_R =|\{ x\in D^\sim _i: \exists x'\sim x (\mathbf {req}(x')=R) \}|\);

  9. 9.

    for all \((\widetilde{w}, t_{\widetilde{w}})\), it holds that \(P^i_R(\widetilde{w}, t_{\widetilde{w}})= CP^i_R(\widetilde{w}, t_{\widetilde{w}})\), if \((\widetilde{w}, t_{\widetilde{w}})\ne (\widetilde{w}^i, t_{\widetilde{w}^i})\), and \(P^i_R(\widetilde{w}, t_{\widetilde{w}})= CP^i_R(\widetilde{w}, t_{\widetilde{w}})+1\) otherwise, where \(CP^i_R(\widetilde{w}, t_{\widetilde{w}})=|\{ [x']_\sim : x'\in ff^{\overline{A}}_{\mathbf {L}_i}(\max (D_i)) \wedge f^i_{\mathcal {W}}(x')= \widetilde{w}\wedge f^i_{C_{pre}}(x')=t_{\widetilde{w}} \}|\).

Let \(q_0=(f_\sim ,R, \widetilde{w}, t_{\widetilde{w}}, \varnothing ,\) 1) be the initial state of the computation. We put \(D_0=\{x_0\}\), \(\mathbf {req}(x_{0})=R\), \(f^0_{\mathcal {W}}(x_{0})=\widetilde{w}\), \(f^0_{C_{pre}}(x_0)=f^0_{\mathcal {T}}(x_0)=t_{\widetilde{w}}\), and \(ff^{\overline{A}}_{\mathbf {L}_0}(x_0)=\varnothing \). It is easy to check that it satisfies the invariant conditions.

Let us now consider the generic step \(i+1\). Let \(q_i=(R^i, \widetilde{w}^i, t_{{\widetilde{w}}^i}, f^i_\sim , P^i_R, k^i)\) and assume that \(\mathbf {L}_i\) satisfies the invariant conditions 1–9. We show how to build \(\mathbf {L}_{i+1}\) in such a way that it satisfies them as well. Let \(((R^i, \widetilde{w}^i, t_{{\widetilde{w}}^i}, f^i_\sim , P^i_R,\) \( k_i),U_{i}, (R^{i+1}, \widetilde{w}^{i+1},\) \(t_{{\widetilde{w}}^{i+1}}, f^{i+1}_\sim , P^{i+1}_R, k_{i+1}))\) be the fired transition. We must distinguish among three cases, depending on its type.

  • Case (i): the fired transition belongs to \({\varDelta }_{M,1}\). We first complete the labeling of the intervals ending in \(\max (D_i)\). Let the labeling \(\mathcal {L}_i([x, \max (D_i)])\), for some \(x \in D_i\), with \(x < \max (D_i)\), be not defined. By condition 5 of the invariant, the labeling \(\mathcal {L}_i([x', \max (D_i)])\) is not defined for all \(x' \sim x\). Let \(\{\overline{x}_1,\ldots ,\overline{x}_m\}\) be the set of all points in \([x]_\sim \) belonging to \(D_i\). By definition of \(f^i_\sim \) and by condition 8 of the invariant (that links it to the current LIS), for each \(1\leqslant j \leqslant m\), there exists an interval tuple \((\mathbf {req}(\overline{x}_j), F_j, \mathbf {req}(\max (D_i)))\), with \(\mathsf {len}_1, \sim \notin F_j\). It is not difficult to check that, for all \(1\leqslant j\leqslant j'\leqslant m\), if \(\mathbf {req}(\overline{x}_{j})=\mathbf {req}(\overline{x}_{j'})\), then we can safely assume \(F_j=F_{j'}\). This guarantees that condition 7 of the invariant is preserved. We define \(\mathcal {L}_{i+1}([\overline{x}_j, \max (D_i)])=F_j\), for all \(1\leqslant j \leqslant m\). We proceed in this way until we define the labeling \(\mathcal {L}_{i+1}([x', \max (D_i)])\) for all \(x'\) for which it was not already defined. Now, we extend \(D_i\) with a new point \(\hat{x}\), that is, we put \(D_{i+1}=D_i \cup \{\hat{x}\}\), with \(\hat{x}> x\) for all \(x\in D_i\). Let \(\mathbf {req}(\hat{x}) = R^{i+1}\). The labeling \(\mathcal {L}_{i+1}\) for the intervals ending in \(\hat{x}\) and beginning at some point belonging to \([{ max}(D_i)]_\sim \) (case 1), \([\hat{x}]_\sim \) (case 2), or the classes of the past far friends of \(\hat{x}\) (case 3) is defined as follows.

    1. 1.

      Let \(n = |t_{\widetilde{w}^i}|\), if \(R^{i}\) is visible in \((\widetilde{w}^{i}, t_{\widetilde{w}^{i}})\); \(n = |t_{\widetilde{w}^i}|+1\), otherwise. By definition of \({\varDelta }_{M,1}\), there exist n interval tuples \((\widetilde{w}^i[1], F^{pre}_1, R^{i+1}), \ldots ,\) \( (\widetilde{w}^i[n-1], F^{pre}_{n-1},\) \(R^{i+1}),\) \( (R^i, F^{pre}_{n}, R^{i+1})\) such that (i) for all \(1\leqslant j\leqslant n\), \(\sim \in F^{pre}_j\) if and only if \(\langle A \rangle (len_1 \wedge \sim ) \in R^i\), (ii) \(len_1 \in F^{pre}_{n}\), and (iii) \(len_1 \notin F^{pre}_j\), for all \(1\leqslant j < n\). By the invariant conditions 4 and 9, it holds that \(f^{i}_{\mathcal {W}}(\max (D_i))=\widetilde{w}^i\) and \(f^{i}_{\mathcal {T}}(\max (D_i))=t_{\widetilde{w}^i}\). Moreover, for all \(x''\in [\max (D_i)]_\sim \), if \(x''\) is meaningful, then there exists \(1\leqslant j\leqslant n\) such that \(j=|\{ x'''\in [\max (D_i)]_\sim : x'''<x'' \wedge \,x'''\text { is meaningful}\}|\) and we put \(\mathcal {L}_{i+1}([x'',\hat{x}])=F^{pre}_j\). If \(x''\) is not meaningful, two cases are possible. If \(\widetilde{w}^{i}[j']\ne \mathbf {req}(x'')\) for all \(j'>|t_{\widetilde{w}^{i}}|\), then the point \(x'''\) that, at the end of the construction, will turn out to be the largest point in \([\max (D_i)]_\sim \) with set of requests equal to \(\mathbf {req}(x'')\) has been already introduced in \(D_i\). Since \(x''\) is not meaningful, it holds that \(x'''>x''\). Then, we put \(\mathcal {L}_{i+1}([x'',\hat{x}])=\mathcal {L}_{i+1}([x''',\hat{x}])\), since we have already defined \(\mathcal {L}_{i+1}\) for meaningful points. On the contrary, if there exists \(j'>|t_{\widetilde{w}^i}|\) such that \(\widetilde{w}^i[j']=\mathbf {req}(x'')\), we can conclude that the above-defined point \(x'''\) has not been introduced yet. Since \(x''\) is not meaningful, there are exactly \(|\varphi |^2-|\varphi |\) meaningful points \(x''' <x''\) in \([\max (D_i)]_\sim \), with \(\mathbf {req}(x''')=\mathbf {req}(x'')\). We take one of these points \(x'''\) and we put \(\mathcal {L}_{i+1}([x'',\hat{x}])=\mathcal {L}_{i+1}([x''',\hat{x}])\), since we have already defined \(\mathcal {L}_{i+1}\) for meaningful points. Finally, being \(\max (D_i)\) meaningful or not, we put \(\mathcal {L}([\max (D_i), \hat{x}])=F^{pre}_{n}\).

    2. 2.

      If \(|t_{\widetilde{w}^{i+1}}|=1\), then \(\hat{x}\) is the first point in its class, and then we skip this step. Similarly, if \(\langle A \rangle (len_1 \wedge \sim ) \in R^i\), then the labeling of the intervals that begin at a point in \([\hat{x}]_\sim \) and end at \(\hat{x}\) has been already defined (case 1), and thus we skip this step as well. Let \(n= |t_{\widetilde{w}^{i+1}}|-1\), if \(R^{i+1}\) is visible in \((\widetilde{w}^{i+1}, t_{\widetilde{w}^{i+1}})\), that is, \(R^{i+1}\) has been added to the temporary word (at step \(i+1\)); \(n= |t_{\widetilde{w}^{i+1}}|\) otherwise, that is, \(R^{i+1}\) has not be added to the temporary word as it is not visible. By case (ii) of condition 1 of the definition of \({\varDelta }_{M,1}\), there exist a temporary fulfillment \(t_{\widetilde{w}^{i+1}}'\) for \(\widetilde{w}^{i+1}\) and n interval tuples \((\widetilde{w}^{i+1}[1], F^{i+1}_1, R^{i+1}), \ldots , (\widetilde{w}^{i+1}\) \([n], F^{i+1}_{n}, R^{i+1})\) such that for each \(1\leqslant j\leqslant n\), \(\lnot { len}_1, \sim \in F^{i+1}_j\) and \(t_{\widetilde{w}^{i+1}}[j]= t_{\widetilde{w}^{i+1}}'[j] \cup \{ \langle A \rangle \psi \in TR(\varphi ): \psi \in F^{i+1}_j \}\). Then, by condition 4 or condition 9 of the invariant, there exists \(x'\) in \(D^\sim _i\) with \(f^i_{\mathcal {W}}(x')=\widetilde{w}^{i+1}\) and \(f^i_{C_{pre}}(x')=t_{\widetilde{w}^{i+1}}'\). More precisely, if there exists a point \(x''\in ff^{\overline{A}}_{\mathbf {L}_i}(\max (D_i))\), with \(f^i_{\mathcal {W}}(x'')=\widetilde{w}^{i+1}\) and \(f^i_{C_{pre}}(x'')=t_{\widetilde{w}^{i+1}}'\), then we take \(x'=x''\) (condition 9 of the invariant); otherwise, the existence of such a point \(x'\) is guaranteed by condition 4 of the invariant. For each \(x''\in [x']_\sim \) if \(x''\) is meaningful, then there exists \(1\leqslant j\leqslant n\) such that \(j=|\{ x'''\in [x']_\sim : x'''<x'' \wedge \text { x'''{} is meaningful }\}|\), and we put \(\mathcal {L}_{i+1}([x'',\hat{x}])=F^{i+1}_j\). If \(x''\) is not meaningful, there are two possible situations (as in case 1). If \(\widetilde{w}^{i+1}[j']\ne \mathbf {req}(x'')\) for all \(j'>|t_{\widetilde{w}^{i+1}}|\), then the point \(x'''\) that, at the end of the construction, will turn out to be the largest point in \([x']_\sim \) with set of requests equal to \(\mathbf {req}(x'')\) has been already introduced in \(D_i\). Since \(x''\) is not meaningful, it holds that \(x'''>x''\). Then, we put \(\mathcal {L}_{i+1}([x'',\hat{x}])=\mathcal {L}_{i+1}([x''',\hat{x}])\), since we have already defined \(\mathcal {L}_{i+1}\) for meaningful points. On the contrary, if there exists \(j'>|t_{\widetilde{w}^{i+1}}|\) such that \(\widetilde{w}^{i+1}[j']=\mathbf {req}(x'')\), we can conclude that the above-defined point \(x'''\) has not been introduced yet. Since \(x''\) is not meaningful, there are exactly \(|\varphi |^2-|\varphi |\) meaningful points \(x''' <x''\) in \([x']_\sim \) with \(\mathbf {req}(x''')=\mathbf {req}(x'')\). We take one of these points \(x'''\) and we put \(\mathcal {L}_{i+1}([x'',x])=\mathcal {L}_{i+1}([x''',x])\), since we have already defined \(\mathcal {L}_{i+1}\) for meaningful points.

    3. 3.

      Let \(n= |t_{\widetilde{w}^{i+1}}|-1\), if \(R^{i+1}\) is visible in \((\widetilde{w}^{i+1}, t_{\widetilde{w}^{i+1}})\), \(n= |t_{\widetilde{w}^{i+1}}|\) otherwise, and let \(n' = |t_{\widetilde{w}^i}|\), if \(R^{i}\) is visible in \((\widetilde{w}^{i}, t_{\widetilde{w}^{i}})\), \(n' = |t_{\widetilde{w}^i}|+1\), otherwise. Moreover, let \(R^{\overline{A}}=\bigcup _{1\leqslant j \leqslant n} \{ \langle \overline{A}\rangle \psi : \psi \in F^{pre}_j \}\), if \(\langle A \rangle (len_1 \wedge {\sim }) \in R^i\), and \(R^{\overline{A}}=\bigcup _{1\leqslant j \leqslant n} \) \( \{ \langle \overline{A}\rangle \psi : \psi \in F^{pre}_j \} \cup \bigcup _{1\leqslant j \leqslant n'} \{ \langle \overline{A}\rangle \psi : \psi \in F^{i+1}_j \}\) otherwise.

      By condition 2 of the definition of \({\varDelta }_{M,1}\), there are \(m \leqslant |\varphi |-1\) pairs \((\widetilde{w}^p_1, t_{\widetilde{w}^p_1}), \ldots , (\widetilde{w}^p_m, t_{\widetilde{w}^p_{m}})\) such that (i) for each \(1\leqslant i'\leqslant m\), there are \(|t_{\widetilde{w}^p_{i'}}|\) interval tuples \((\widetilde{w}^p_{i'}[j], F^p_{i',j},\) \( R^{i+1})\) with \(\mathsf {len}_1, \sim \notin F^p_{{i'},j}\) for each \(1\leqslant j \leqslant |t_{\widetilde{w}^p_{i'}}|\) (consistency conditions), and (ii) for each \(\langle \overline{A}\rangle \psi \in R^{i+1}{\setminus } R^{\overline{A}}\), there are \({i'},j\) such that \(\psi \in F^p_{{i'},j}\) (fulfilling conditions). By the same condition, it also holds that \(P_{R^{i+1}} = \{ (\widetilde{w}^p_j, t_{\widetilde{w}^{p}_{j}}'): 1\leqslant j\leqslant m \}\), if \(\langle A \rangle (len_1 \wedge \sim ) \in R^i\); \(P_{R^{i+1}} =\) \(\{ (\widetilde{w}^p_j, t_{\widetilde{w}^{p}_{j}}'): 1\leqslant j\leqslant m \} \cup \{ (\widetilde{w}^i, t_{{\widetilde{w}}_{pre}}) \}\), with \(|t_{{\widetilde{w}}_{pre}}|= |t_{{\widetilde{w}}^i}|\) and \(t_{{\widetilde{w}}_{pre}}[j'] =\) \(t_{{\widetilde{w}}^i}[j'] \cup \{ \langle A \rangle \psi \in TR(\varphi ): \psi \in F^{pre}_{j'} \}\), for all \(1\leqslant j' \leqslant |t_{{\widetilde{w}}^i}|\), otherwise.

      By condition 4 of the definition of \({\varDelta }_{M,1}\) (definition of U), \(U_i=\{ c_{\widetilde{w}'', t_{\widetilde{w}''}} + P_{R^i}(\widetilde{w}'', t_{\widetilde{w}''}) : c_{\widetilde{w}'', t_{\widetilde{w}''}} \in P_{R^i} \} \cup \{ c_{\widetilde{w}'', t_{\widetilde{w}''}} - P_{R^{i+1}}(\widetilde{w}'', t_{\widetilde{w}''}) : c_{\widetilde{w}'', t_{\widetilde{w}''}} \in P_{R^{i+1}} \} \), if \(\langle A \rangle (len_1 \wedge \sim ) \in R^i\); \(U_i =\{ c_{\widetilde{w}'', t_{\widetilde{w}''}} + P_{R^i}(\widetilde{w}'', t_{\widetilde{w}''}) : c_{\widetilde{w}'', t_{\widetilde{w}''}} \in P_{R^i} \}\,\cup \, \{ c_{\widetilde{w}^i, t_{\widetilde{w}}^i } +1 \} \cup \{ c_{\widetilde{w}'', t_{\widetilde{w}''}} - P_{R^{i+1}}(\widetilde{w}'', t_{\widetilde{w}''}) : c_{\widetilde{w}'', t_{\widetilde{w}''}} \in P_{R^{i+1}} \}\,\cup \, \{ c_{\widetilde{w}^{i+1}, t_{\widetilde{w}}^{i+1} } - 1 \} \) otherwise.

      Since we have already dealt with the class of \(\hat{x}\) and the class of its predecessor, we can restrict our attention to the update \(\{ c_{\widetilde{w}'', t_{\widetilde{w}''}} + P_{R^i}(\widetilde{w}'', t_{\widetilde{w}''}) : c_{\widetilde{w}'', t_{\widetilde{w}''}} \in P_{R^i} \} \cup \{ c_{\widetilde{w}'', t_{\widetilde{w}''}} - P_{R^{i+1}}(\widetilde{w}'', t_{\widetilde{w}''}) : c_{\widetilde{w}'', t_{\widetilde{w}''}} \in P_{R^{i+1}} \}\). By a simple counting argument, which makes use of conditions 4 and 9 of the invariant (that hold for \(\mathbf {L}_i\) by the inductive hypothesis), we can conclude that, for each pair \((\widetilde{w}, t_{\widetilde{w}})\), \(|\{ j: (\widetilde{w}^p_{j},t_{\widetilde{w}^p_{j}})=(\widetilde{w}, t_{\widetilde{w}}) \}| \leqslant |\{x' \in D^{\sim }_i : f^i_{C_{pre}}(x')=t_{\widetilde{w}} \wedge f^{i}_{\mathcal {W}}(x')=\widetilde{w}\}|= c^i_{\widetilde{w}, t_{\widetilde{w}}} + |P_{R^i}(\widetilde{w}, t_{\widetilde{w}})|\).

      Now, we can choose \(\overline{x}_1, \ldots , \overline{x}_m\) distinct points in \(D^\sim _i\) such that, for each \(1\leqslant j\leqslant m\), \(f^i_{\mathcal {W}} (\overline{x}_j)\) \(={\widetilde{w}}_j\), \(f^i_{C_{pre}}(\overline{x}_j)=t_{\widetilde{w}_j}\), \(\overline{x}_j \not \sim \hat{x}\), and \(\overline{x}_j \not \sim \max (D_i)\). In analogy with cases 1 and 2, we can define the labeling of the intervals that begin at points belonging to \([\overline{x}_1]_\sim , \ldots , [\overline{x}_m]_\sim \) iteratively. The labeling procedure consists of two nested loops, the external one is indexed by j, with \(1\leqslant j\leqslant m\), and it ranges over the classes; the internal one is indexed by \(j'\), with \(1 \leqslant j' \leqslant |t_{\widetilde{w}_j}|\), and it ranges over the meaningful elements of \([\overline{x}_j]_\sim \). Let us consider the j-th iteration step of the external loop. At each step \(j'\), we take the \(j'\)-th meaningful point \(x'\in [\overline{x}_j]_\sim \), that is, \(j'=|\{ x''\in [\overline{x}_j]_\sim : x''<x' \wedge \text { x''{} is meaningful}\}|\), and we put \(\mathcal {L}_{i+1}([x',\hat{x}])=F^{p}_{j,j'}\). At the end of the external loop, we only need to define the labeling of the non-meaningful points \(x'\in [\overline{x}_j]_\sim \), for all \(1\leqslant j\leqslant m\). To this end, a single loop on the classes \([\overline{x}_1]_\sim , \ldots , [\overline{x}_m]_\sim \) suffices. Once more, for each non-meaningful point \(x'\in [\overline{x}_j]_\sim \), two cases are possible. If \(\widetilde{w}^j[j']\ne \mathbf {req}(x')\) for all \(j'>|t_{\widetilde{w}^j}|\), then the point \(x''\) that, at the end of the construction, will turn out to be the largest point in \([x_j]_\sim \) with set of requests equal to \(\mathbf {req}(x')\) has been already introduced in \(D_i\). Since \(x'\) is not meaningful, it holds that \(x''>x'\). Then, we put \(\mathcal {L}_{i+1}([x',\hat{x}])=\mathcal {L}_{i+1}([x'',\hat{x}])\), since we have already defined \(\mathcal {L}_{i+1}\) for for the pair \((x'',\hat{x})\). On the contrary, if there exists \(j'>|t_{\widetilde{w}^j}|\) such that \(\widetilde{w}^j[j']=\mathbf {req}(x')\), we can conclude that the above-defined point \(x''\) has not been introduced yet. Since \(x'\) is not meaningful, there are exactly \(|\varphi |^2-|\varphi |\) meaningful points \(x'' <x'\) in \([x_j]_\sim \), with \(\mathbf {req}(x'')=\mathbf {req}(x')\). We take one of these points \(x''\) and we put \(\mathcal {L}_{i+1}([x',\hat{x}])=\mathcal {L}_{i+1}([x'',\hat{x}])\), since we have already defined \(\mathcal {L}_{i+1}\) for the pair \((x'',\hat{x})\).

    It can be easily checked that, at the end of this step, the invariant conditions are satisfied by the LIS \(\mathbf {L}_{i+1}\).

  • Case (ii): the fired transition belongs to \({\varDelta }_{k,k}\), for some \(1\leqslant k \leqslant M\).

    By definition of \({\varDelta }_{k,k}\), \(R^i=R^{i+1},\widetilde{w}^{i}=\widetilde{w}^{i+1}, t_{{\widetilde{w}}^{i}}=t_{{\widetilde{w}}^{i+1}}, f^{i}_\sim =f^{i+1}_\sim , P^{i}_R=P^{i+1}_R\), \(k_i=k_{i+1}\), and \(U_i= \{c_{\widetilde{w}, t_{\widetilde{w}}}-1,c_{\widetilde{w}, t_{\widetilde{w}}'}+1\}\) for some word \(\widetilde{w}\) and some pair of its temporary fulfillments \(t_{\widetilde{w}}\) and \(t_{\widetilde{w}}'\). Moreover, by definition of \(t_{\widetilde{w}} \mathop {\longrightarrow }\limits ^{R} t_{\widetilde{w}'}\), \(t_{\widetilde{w}} \leqslant t_{\widetilde{w}'}\) and, for each \(1\leqslant j \leqslant |t{\widetilde{w}}|\), there is an interval tuple \((\widetilde{w}[j], F_j, R^i)\) such that \({ len}_1, \sim \notin F_j\) and \(t_{\widetilde{w}}'[j]=t_{\widetilde{w}}[j]\cup \{\langle A \rangle \psi \in {\widetilde{w}}[j]: \psi \in F_j \}\). By conditions 4–6 of the invariant, there is \(x\in D^{\sim }_i\) such that (i) for all \(x'\sim x\), \(x' \notin ff_{\mathbf {L}_i}^{\overline{A}}(\max (D_i))\) and the labeling \(\mathcal {L}_i([x', \max (D_i)])\) is undefined, (ii) \(f^i_{\mathcal {W}}(x)=\widetilde{w}\), and (iii) \(f^i_{C_{pre}}(x)=t_{\widetilde{w}}\). Let \(\overline{x}_0<\ldots <\overline{x}_m\) be all the points in \([x]_\sim \). For each \(1\leqslant j\leqslant m\), we proceed as follows:

    1. (i)

      if \(pos_\sim (\overline{x}_j)\leqslant |\varphi |^2-|\varphi |\), then we put \(\mathcal {L}_{i+1}([\overline{x}_j, \max (D_i)])=F_{j'}\) where \(j'\) is the minimal index satisfying \(R^{j'}=\mathbf {req}(\overline{x}_j)\) and \(|\{ j''\leqslant j': \widetilde{w}[j'']= \mathbf {req}(\overline{x}_j) \}|=pos_{\sim }(\overline{x}_j)\);

    2. (ii)

      if \(pos_\sim (\overline{x}_j) \geqslant |\varphi |^2-|\varphi | +1\), \(\widetilde{w}[j'']\ne \mathbf {req}(\overline{x}_j)\), for all \(j''>|t_{\widetilde{w}}|\), and \(\overline{x}_j={ max}(\{\overline{x}_{j'} : \mathbf {req}(\overline{x}_{j'})=\mathbf {req}(\overline{x}_j)\})\), then we put \(\mathcal {L}_{i+1}([\overline{x}_j, \max (D_i)])=F_{j'}\), where \(j'\) is the maximal index for which \(R^{j'}=\mathbf {req}(\overline{x}_j)\);

    3. (iii)

      if \({ pos}_\sim (\overline{x}_j) \geqslant |\varphi |^2-|\varphi | +1\) and there is \(j''>|t_{\widetilde{w}}|\) such that \(\widetilde{w}[j'']= \mathbf {req}(\overline{x}_j)\), then we take any \(\overline{x}_{j'}<\overline{x}_{j} \), with \(pos_\sim (\overline{x}_{j'})\leqslant |\varphi |^2-|\varphi |\) and \(\mathbf {req}(\overline{x}_{j'})\) \(=\mathbf {req}(\overline{x}_{j})\), and we put \(\mathcal {L}_{i+1}([\overline{x}_{j}, \max (D_i)])=\mathcal {L}_{i+1}([\overline{x}_{j'}, \max (D_i)])\) (notice that the labeling \(\mathcal {L}_{i+1}([\overline{x}_{j'}, \max (D_i)])\) has been defined in (i));

    4. (iv)

      if \({ pos}_\sim (\overline{x}_j) \geqslant |\varphi |^2 - |\varphi | +1\), \(\widetilde{w}[j'']\ne \mathbf {req}(\overline{x}_j)\), for all \(j''>|t_{\widetilde{w}}|\), and \(\overline{x}_j \ne { max}(\{\overline{x}_{j'} : \mathbf {req}(\overline{x}_{j'})=\mathbf {req}(\overline{x}_j)\})\), then we take \(\overline{x}_{j''} = { max}(\{\overline{x}_{j'} : \mathbf {req}(\overline{x}_{j'})=\mathbf {req}(\overline{x}_j)\})\), and we put \(\mathcal {L}_{i+1}([\overline{x}_j, \max (D_i)])=\mathcal {L}_{i+1}([\overline{x}_{j''}, \max (D_i)])\) [(notice that the labeling \(\mathcal {L}_{i+1}([\overline{x}_{j''}, \max (D_i)])\) has been defined in (ii)].

    At the end of the procedure, it holds that \(f^{i+1}_{C_{pre}}(x')=f^{i}_{C_{pre}}(x')\) and \(f^{i+1}_{\mathcal {T}}(x')\) \(= f^{i}_{\mathcal {T}}(x')\) for all \(x'\ne x\) in \(D^{\sim }_i\), and thus condition 3 of the invariant is satisfied by these points. It remains to check that such a condition is satisfied by x as well. By definition of \(f^{i}_{C_{pre}}\), it holds that \(f^{i}_{C_{pre}}(x)=t_{\widetilde{w}}\) and \(f^{i+1}_{C_{pre}}(x)=t_{\widetilde{w}}'\). Moreover, by definition of \({\varDelta }_{k,k}\), for each \(1\leqslant j \leqslant |t_{\widetilde{w}}|\), \(t_{\widetilde{w}}'[j]=t_{\widetilde{w}}[j]\cup \{\langle A \rangle \psi \in {\widetilde{w}}[j]: \psi \in F_j \}\). By the above construction, it holds that \(f^{i+1}_{\mathcal {T}}(x)[j]=f^{i}_{\mathcal {T}}(x)[j]\cup \{\langle A \rangle \psi \in {\widetilde{w}}[j]: \psi \in F_j \}\) for all \(1\leqslant j \leqslant |t_{\widetilde{w}}|\). Finally, by condition 3 of the invariant, it holds that \(t_{\widetilde{w}} \leqslant f^{i}_{\mathcal {T}}(x)\) and thus \(t_{\widetilde{w}}'=f^{i+1}_{C_{pre}}(x) \leqslant f^{i+1}_{\mathcal {T}}(x)\). This allows us to conclude that all the conditions of the invariant are satisfied.

  • Case (iii): the fired transition belongs to \({\varDelta }_{k,k+1}\), for some \(1\leqslant k < M\). We simply put \(\mathbf {L}_{i+1}=\mathbf {L}_{i}\), thus leaving everything unchanged.

This basically concludes the proof, because at step \(|C_{pre}|\), by the invariant conditions, it holds that \(\mathbf {L}_{|C_{pre}|}\) is a consistent LIS for which the \(\overline{A}\)-requests of each point are satisfied. Moreover, the A-requests of meaningful points are satisfied thanks to condition 3 of the invariant and to the fact that after step \(|C_{pre}|\) only counters \(c_{(\widetilde{w}, t_{\widetilde{w}})}\), where \((\widetilde{w}, t_{\widetilde{w}})\) is final, are decreased. Finally, the fulfillment of A-requests for the points in \(D^{|C_{pre}|}\), which are not meaningful, is guaranteed by condition 7 of the invariant. \(\square \)

Proposition 2

Let \(\varphi \) be an MPNL\({\sim }\) formula. If \(\varphi \) is satisfiable over the class of finite linear orders, then \(\mathcal {V}_{\varphi }\) has a 0–0 computation.

Proof

Since \(\varphi \) is satisfiable, by Lemma 5, there exists a saturated well-match \((\mathbf {L}, ff_{\mathbf {L}})\), with \(\mathbf {L}=(\mathbb {D}, \mathcal {L})\), for it. We show how to obtain a 0–0 computation \(C= (q_0, \overline{0})\rightarrow \cdots \rightarrow (q_n, \overline{0})\), with \(q_0 \in Q_i\) and \(q_n\in Q_f\), that mimics the behavior of \(\mathbf {L}\). Given a point \(x\in D\), let pre(x) (resp., next(x)) be the immediate predecessor (resp., successor) of x in the finite linear order \(\mathbb {D}\). Moreover, let \(D_{x} = \{x'\in D: x'\leqslant x\}\).

For each \(x \in D\), we define the function

$$\begin{aligned} f^x_\sim (R)= {\left\{ \begin{array}{ll} +&\exists x'<x''\leqslant x\left( \begin{array}{l}\mathbf {req}(x')= \mathbf {req}(x'')=R \wedge x' \not \sim x''\end{array}\right) \\ 1 &{} \exists x'<x \left( \begin{array}{l}\mathbf {req}(x')=R \wedge \forall x''\leqslant x \ (\mathbf {req}(x'')=R\rightarrow x'' \sim x')\end{array}\right) \\ 0 &{} \text {otherwise.}\end{array}\right. } \end{aligned}$$

We build the 0–0 computation C of the VASS \(\mathcal {V}_{\varphi }\) by the following iterative procedure. Let \((q_i,v_i)\) be the i-th configuration of C, with \(q_i=(R^i, \widetilde{w}^i, t_{{\widetilde{w}}_i}, f^i_\sim , P_{R^i},k)\), and let t(i) be the number of transitions in \({\varDelta }_{M,1}\) executed in C, restricted to the steps \(0,\ldots ,i-1\). Now, let \(t(i)=x\), that is, let x be the t(i)-th element in the linear order \(\mathbb {D}\). For each \(0\leqslant i\leqslant n\), we choose a minimal set \({ Out}_i\subseteq D_{t(i)}\) that satisfies the condition: \(\forall x'\in D_{t(i)}( \exists x''\in { Out}_i( x'\sim x'' ) \vee x' \in [x]_\sim \cup [{ pre}(x)]_\sim \cup \bigcup _{x'' \in ff^{\overline{A}}_{\mathbf {L}} (x)}[x'']_\sim )\). The minimality constraint forces \({ Out}_i\cap ([x]_\sim \cup [{ pre}(x)]_\sim \cup \bigcup _{x'' \in ff^{\overline{A}}_{\mathbf {L}}(x)}[x'']_\sim )\) to be empty, which amounts to say that the class of x, the class of the predecessor of x, and the classes of all the past far friends of x are not witnessed in \(Out_i\).

We associate two sets \(\widehat{Out}_i\) and , with and , with each step i and we guarantee the following three invariant conditions:

  1. 1.

    Let \(P=ff^{\overline{A}}_{\mathbf {L}}(x){\setminus } [x]_{\sim }=\{\overline{x}_1,\ldots , \overline{x}_h\}\) (observe that \(h< |\varphi |\)). It holds that \(R^i=\mathbf {req}(x), \widetilde{w}^i=\widetilde{w}_{[x]_\sim }\), \(t_{{\widetilde{w}}^i}=t_{{\widetilde{w}}_{[x]_\sim }}, f^i_\sim =f^x_\sim \), and \(P_{R^i}=\{ (\widetilde{w}_{[\overline{x}_1]_\sim }, t_{{\widetilde{w}}_{[\overline{x}_1]_\sim , x}}),\) \(\ldots , (\widetilde{w}_{[\overline{x}_h]_\sim }, t_{{\widetilde{w}}_{[\overline{x}_h]_\sim , x}}) \}\), if \(x=\min (D)\) or \({ pre}(x)\not \sim x\); \(P_{R^i}=\{ (\widetilde{w}_{[\overline{x}_1]_\sim }, t_{{\widetilde{w}}_{[\overline{x}_1]_\sim , x}}),\) \(\ldots , (\widetilde{w}_{[\overline{x}_h]_\sim },\) \( t_{{\widetilde{w}}_{[\overline{x}_h]_\sim , x}}) \} \cup \{ (\widetilde{w}_{[pre(x)]_\sim }, t_{{\widetilde{w}}_{[pre(x)]_\sim , x}})\}\) otherwise.

  2. 2.

    For all \(x'\in \widehat{Out}_i\), it holds that \(t_{{\widetilde{w}}_{[x']_\sim , pre(x)}}\ne t_{{\widetilde{w}}_{[x']_\sim , x}}\) and \(k\leqslant k'\), where \(k'\) is the position of the pair \((\widetilde{w}_{[x']_\sim }, t_{{\widetilde{w}_{[x']_\sim ,pre(x)}}})\) in the order \(<_{R^i}\).

  3. 3.

    For all pairs \((\widetilde{w}, t_{\widetilde{w}})\), .

We define the initial configuration of the computation C as the pair \((q_0,\overline{0})\), where \(q_0 = (\mathbf {req}(\min (D)),\) \(\widetilde{w}_{[min(D)]_\sim },\) \(t{\widetilde{w}}_{[\min (D)]_\sim , \min (D)}, f^{\min (D)}_\sim , \varnothing ,1)\), and we initialize both \(\widehat{Out}_0\) and to \(\varnothing \). It can be easily checked that it satisfies the invariant conditions.

Let us consider now the step \(i+1\). Let \((q_i, v_i)\), with \(q_i=(R^i, \widetilde{w}^i, t_{{\widetilde{w}}^i}, P_{R^i},\) \( f^i_\sim , k)\), be the current configuration, that satisfies the invariant conditions. We proceed as follows.

  1. 1.

    If \(\widehat{Out}_i = \varnothing \), we directly move to the next step. Otherwise, let \(x'\in \widehat{Out}_i\) be such that \((\widetilde{w}_{[x']_\sim }, t_{{\widetilde{w}_{[x']_\sim , pre(x)}}})\) is the smallest element in \(\{ (\widetilde{w}_{[x'']_\sim }, t{\widetilde{w}_{[x'']_\sim , pre(x)}}): x''\in \widehat{Out}_i \}\) with respect to \(<_{R^i}\). W.l.o.g., we can assume \((\widetilde{w}_{[x']_\sim }, t_{{\widetilde{w}_{[x']_\sim , pre(x)}}})\) to be the k-th element in the order \(<_{R^i}\). As a matter of fact, if it was not the case, by condition 2 of the invariant, it would not be the \(k'\)-th element in the order, for some \(k' < k\) (and thus, \(k' > k\)). We execute a number of transitions in \({\varDelta }_{k, k+1}\) until we reach a state \(q_{i'}=(R^i, \widetilde{w}^i, t_{{\widetilde{w}}^i}, P_{R^{i}}, f^i_\sim , k')\), which coincides with \(q_i\) apart from the replacement of k by \(k'\). Since all these transitions do nothing, the invariant is trivially preserved.

    Since \((\mathbf {L}, ff_{\mathbf {L}})\) is a saturated well-match, \(t_{{\widetilde{w}_{[x']_\sim , pre(x)}}} \mathop {\longrightarrow }\limits ^{R} t_{{\widetilde{w}_{[x']_\sim , x}}}\) and thus the transition \(((R^i, \widetilde{w}^i, t_{{\widetilde{w}}^i}, P_{R^i}, f^i_\sim , k), \{ c_{\widetilde{w}_{[x']_\sim }, t_{{\widetilde{w}_{[x']_\sim , pre(x)}}}} -1, c_{\widetilde{w}_{[x']_\sim }, t_{{\widetilde{w}_{[x']_\sim , x}}}} +1 \}, (R^i, \widetilde{w}^i,\) \(t_{{\widetilde{w}}^i}, P_{R^i}, f^i_\sim , k))\) belongs \({\varDelta }_{k,k}\). We execute such a transition. Condition 1 of the invariant is trivially satisfied by the \(i+1\)-th configuration. To satisfy conditions 2 and 3 of the invariant, it suffices to let \(\widehat{Out}_{i+1}=\widehat{Out}_{i}{\setminus } \{ x' \}\) and . If \(\widehat{Out}_{i+1}\ne \varnothing \), we repeat this step; otherwise, (\(\widehat{Out}_i=\varnothing \)), we move to the next one.

  2. 2.

    If \(t(i)= \max (D)\), we terminate the procedure. Otherwise, (\(t(i) \ne \max (D)\)), we proceed as follows. W.l.o.g., we can assume that \(k=M\). If this was not case, as in step 1, we execute a number of transitions in \({\varDelta }_{k, k+1}\) until we reach a state \(q_{i'}=(R^i, \widetilde{w}^i, t_{{\widetilde{w}}^i}, P_{R^{i}}, f^i_\sim , M)\). Since all these transitions do nothing, the invariant is trivially preserved. Let \(x={ next}(t(i))\).

    We can execute a transition \((q_i,U_i, q_{i+1})\), where \(q_{i+1}=(\mathbf {req}(x), \widetilde{w}_{[x]_\sim } t_{{\widetilde{w}_{[x]_\sim ,x}}},\) \(P_{R^{i+1}}, f^x_\sim ,1)\), with \(P_{R^{i+1}}(\widetilde{w}, t_{\widetilde{w}})= |\{ [x']_\sim : \widetilde{w}=\widetilde{w}_{[x']_\sim }\wedge t_{\widetilde{w}}=t_{{\widetilde{w}}_{[x']_\sim ,x}} \wedge x'\not \sim x \wedge (pre(x) \in [x']_\sim \vee [x']_\sim \cap ff^{\overline{A}}_{\mathbf {L}}(x)\ne \varnothing ) \}|\) for each pair \((\widetilde{w},\) \(t_{\widetilde{w}})\). By the definition of transitions in \({\varDelta }_{M,1}\), the values of \(R^i, \widetilde{w}^i, t_{{\widetilde{w}}^i},P_{R^{i}},\) \(R^{i+1}, \widetilde{w}^{i+1},\) \( t_{{\widetilde{w}}^{i+1}}\), and \(P_{R^{i+1}}\) univocally determine the update U. It is easy to check that condition 1 of the invariant is satisfied. In order to satisfy conditions 2 and 3 of the invariant, we put and , where, by definition, \(Out_{i+1}\) is a minimal set that satisfies the condition \(\forall x'\in D_{t(i+1)}( \exists x''\in Out_{i+1}( x'\sim x'' ) \vee x' \in [x]_\sim \cup [pre(x)]_\sim \cup \bigcup _{x'' \in ff^{\overline{A}}_{\mathbf {L}}(x)}[x'']_\sim )\). Finally, we increment i by 1 and we go back to step 1.

The procedure terminates in a configuration \((q_i, v_i)\), with \(\widehat{Out}_i=\varnothing \) and \(t(i) = \max (D)\). W.l.o.g., we can assume that \(k=M\). Once more, if this was not the case, we execute a number of transitions in \({\varDelta }_{k, k+1}\) until we reach a state \(q_{i'}=(R^i, \widetilde{w}^i, t_{{\widetilde{w}}^i}, P_{R^{i}}, f^i_\sim ,\) M). Since all these transitions do nothing, the invariant is trivially preserved. By condition 3 of the invariant, for each pair \((\widetilde{w}, t_{\widetilde{w}})\), it holds that \(v_i[(\widetilde{w}, t_{\widetilde{w}})]= |\{ [x]_{\sim }: x\in D \wedge \widetilde{w}_{[x]_\sim }=\widetilde{w}\wedge t_{{\widetilde{w}}_{[x]_\sim ,max(D)}}=t_{\widetilde{w}}\}|\). Since \(\mathbf {L}\) is fulfilling, for each \(x\in D\), \((\widetilde{w}_{[x]_\sim }, t_{{\widetilde{w}}_{[x]_\sim ,max(D)}})\) is final. The only components of \(v_i\) that can be greater than 0 are those relative to pairs (class word,temporary fulfilment) which are final. If there is any such pair, we execute suitable transitions in \({\varDelta }^{f}_{M,M}\) until we reach the configuration \((q_i,\overline{0})\). \(\square \)

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Montanari, A., Pazzaglia, M. & Sala, P. Metric propositional neighborhood logic with an equivalence relation. Acta Informatica 53, 621–648 (2016). https://doi.org/10.1007/s00236-016-0256-3

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00236-016-0256-3

Navigation