Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 3.8, pp. 15:13–15:14 (repaired) — bounded until: characterizations of r_α^{D̂ᵢ} and s_α^{D̂ᵢ}, and p_α^{D̂ᵢ} is regular and equals α^(D̄,τ̄,i)

Proved
MFOTLMon.Monitor.lemma_3_8

by mikedeng1 · Oct 8, 2026 · Mathlib 0df444a (Lean v4.33.1)

mfotlmonitoringp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1temporal-logic

Let α=β U[b,b′) γ\alpha=\beta\,\mathsf U_{[b,b')}\,\gammaα=βU[b,b′)​γ with b′∈Nb'\in\mathbb Nb′∈N, where β\betaβ and γ\gammaγ have the same vector xˉ=(x1,…,xn)\bar x=(x_1,\dots,x_n)xˉ=(x1​,…,xn​) of free variables, let ℓi\ell_iℓi​ be the lookahead offset, and let rαD^ir_\alpha^{\hat{\mathcal D}_i}rαD^i​​, sαD^is_\alpha^{\hat{\mathcal D}_i}sαD^i​​, pαD^ip_\alpha^{\hat{\mathcal D}_i}pαD^i​​ be given by the (repaired) construction of §3.4.4. Assume the input structures are automatic with respect to the fixed representation and interpret a binary predicate ≺\prec≺ as <<<, and that the relations pφD^kp_\varphi^{\hat{\mathcal D}_k}pφD^k​​ are regular and pφD^k=φ(Dˉ,τˉ,k)p_\varphi^{\hat{\mathcal D}_k}=\varphi^{(\bar{\mathcal D},\bar\tau,k)}pφD^k​​=φ(Dˉ,τˉ,k) for all k≤i+ℓik\le i+\ell_ik≤i+ℓi​ and φ∈tsub(β)∪tsub(γ)\varphi\in\mathit{tsub}(\beta)\cup\mathit{tsub}(\gamma)φ∈tsub(β)∪tsub(γ). Then:

  1. rαD^ir_\alpha^{\hat{\mathcal D}_i}rαD^i​​ is regular and, for all aˉ∈Nn\bar a\in\mathbb N^naˉ∈Nn and j∈Nj\in\mathbb Nj∈N,
(aˉ,j)∈rαD^i  ⟺  j≤ℓi and aˉ∈β(Dˉ,τˉ,i+k) for all j≤k≤ℓi;(\bar a,j)\in r_\alpha^{\hat{\mathcal D}_i}\iff j\le\ell_i\ \text{and}\ \bar a\in\beta^{(\bar{\mathcal D},\bar\tau,i+k)}\text{ for all }j\le k\le\ell_i;(aˉ,j)∈rαD^i​​⟺j≤ℓi​ and aˉ∈β(Dˉ,τˉ,i+k) for all j≤k≤ℓi​;
  1. sαD^is_\alpha^{\hat{\mathcal D}_i}sαD^i​​ is regular and, for all aˉ∈Nn\bar a\in\mathbb N^naˉ∈Nn and j,j′,t∈Nj,j',t\in\mathbb Nj,j′,t∈N,
(aˉ,j,j′,t)∈sαD^i  ⟺  j≤j′, t=τi+j′−τi∈[b,b′), aˉ∈γ(Dˉ,τˉ,i+j′), aˉ∈β(Dˉ,τˉ,i+k) for all j≤k<j′;(\bar a,j,j',t)\in s_\alpha^{\hat{\mathcal D}_i}\iff j\le j',\ t=\tau_{i+j'}-\tau_i\in[b,b'),\ \bar a\in\gamma^{(\bar{\mathcal D},\bar\tau,i+j')},\ \bar a\in\beta^{(\bar{\mathcal D},\bar\tau,i+k)}\text{ for all }j\le k<j';(aˉ,j,j′,t)∈sαD^i​​⟺j≤j′, t=τi+j′​−τi​∈[b,b′), aˉ∈γ(Dˉ,τˉ,i+j′), aˉ∈β(Dˉ,τˉ,i+k) for all j≤k<j′;
  1. pαD^ip_\alpha^{\hat{\mathcal D}_i}pαD^i​​ is regular and pαD^i=α(Dˉ,τˉ,i)p_\alpha^{\hat{\mathcal D}_i}=\alpha^{(\bar{\mathcal D},\bar\tau,i)}pαD^i​​=α(Dˉ,τˉ,i).

This is the correctness of the incremental construction for the bounded until operator, the only future operator with an unbounded number of time points to wait for.

Formalization Note. The statement is repaired with respect to the page in three places. The construction carries repairs R1 and R2 (see the Constructions definition): the printed construction is not correct, already in the paper's own example of §3.5. In part 1 the page writes "aˉ∈N\bar a\in\mathbb Naˉ∈N", read here as Nn\mathbb N^nNn; and the page has no bound on jjj, so that for j>ℓij>\ell_ij>ℓi​ its right-hand side holds vacuously while the relation contains no such pair; the bound j≤ℓij\le\ell_ij≤ℓi​ is added to the right-hand side. Tuples are lists aˉ+ ⁣ ⁣+[j]\bar a\mathbin{+\!\!+}[j]aˉ++[j], aˉ+ ⁣ ⁣+[j,j′,t]\bar a\mathbin{+\!\!+}[j,j',t]aˉ++[j,j′,t]. b′b'b′ is the finite upper bound of III (hypothesis I.hi = b').

Preamble
import Mathlib
import Definitions.Def_MFOTLMon_Monitor_Constructions
Formal statement
namespace MFOTLMon.Monitor

/-- Lemma 3.8 (pp. 15:13–15:14, repaired), `α = β U_{[b,b′)} γ` with `b′ ∈ ℕ` and
`free(β) = free(γ)` (WLOG of §3.4). Let `ℓᵢ` be the lookahead offset. Assume that the relations
`p_φ^{D̂ₖ}` (here `P φ k`) are regular and equal `φ^{(D̄,τ̄,k)}` for all `k ≤ i + ℓᵢ` and
`φ ∈ tsub(β) ∪ tsub(γ)`. Then, for the repaired §3.4.4 construction (`untilRS`, `untilP`):
(i) `r_α^{D̂ᵢ}` is regular and, for all `ā ∈ ℕⁿ` and `j ∈ ℕ`, `(ā, j) ∈ r_α^{D̂ᵢ}` iff `j ≤ ℓᵢ` and
`ā ∈ β^{(D̄,τ̄,i+k)}` for all `j ≤ k ≤ ℓᵢ`;
(ii) `s_α^{D̂ᵢ}` is regular and, for all `ā ∈ ℕⁿ` and `j, j′, t ∈ ℕ`, `(ā, j, j′, t) ∈ s_α^{D̂ᵢ}` iff
`j ≤ j′`, `t = τ_{i+j′} − τᵢ ∈ [b, b′)`, `ā ∈ γ^{(D̄,τ̄,i+j′)}` and `ā ∈ β^{(D̄,τ̄,i+k)}` for all
`j ≤ k < j′`;
(iii) `p_α^{D̂ᵢ}` is regular and `p_α^{D̂ᵢ} = α^{(D̄,τ̄,i)}`. -/
theorem lemma_3_8 {S : Signature} {Γ : Type} [Fintype Γ] (rep : DomainRep Γ) (D : TempStruct S)
    (hD : IsAutomatic rep D) (hlt : HasOrderPred D) (I : Interval) (b' : ℕ) (hb' : I.hi = b')
    (β γ : Formula S) (hfree : free β = free γ) (P : Formula S → ℕ → Set (List ℕ)) (i : ℕ) :
    let B : ℕ → Set (List ℕ) := fun j => hatSet (D.rel j) D.const (fun ψ => P ψ j) β
    let G : ℕ → Set (List ℕ) := fun j => hatSet (D.rel j) D.const (fun ψ => P ψ j) γ
    let n := (freeList (Formula.until I β γ)).length
    let ℓ := lookahead D b' i
    let RS := untilRS D I B G i
    (∀ k, k ≤ i + ℓ → ∀ φ ∈ tsub β ++ tsub γ, RegularRel rep (freeList φ).length (P φ k) ∧
      P φ k = satSet D φ k) →
    (RegularRel rep (n + 1) RS.1 ∧
      ∀ a : List ℕ, a.length = n → ∀ j : ℕ,
        (a ++ [j] ∈ RS.1 ↔ j ≤ ℓ ∧ ∀ k, j ≤ k → k ≤ ℓ → a ∈ satSet D β (i + k))) ∧
    (RegularRel rep (n + 3) RS.2 ∧
      ∀ a : List ℕ, a.length = n → ∀ j j' t : ℕ,
        (a ++ [j, j', t] ∈ RS.2 ↔
          j ≤ j' ∧ t = D.τ (i + j') - D.τ i ∧ I.Mem t ∧ a ∈ satSet D γ (i + j') ∧
            ∀ k, j ≤ k → k < j' → a ∈ satSet D β (i + k))) ∧
    (RegularRel rep n (untilP RS.2) ∧ untilP RS.2 = satSet D (Formula.until I β γ) i) := by sorry

end MFOTLMon.Monitor
Source
Basin, Klaedtke, Müller, Zălinescu, Monitoring metric first-order temporal properties, J. ACM 62(2), Article 15 (2015), pp. 15:13–15:14, Lemma 3.8 (construction of §3.4.4, repaired; Printed slips 1–4)
Human review
  • Endorsed by Shuze Chen · Oct 8, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 8, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me