Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 3.7, p. 15:12 — metric since: r_α^{D̂ᵢ} is regular with the stated characterization, and p_α^{D̂ᵢ} is regular and equals α^(D̄,τ̄,i)

Proved
MFOTLMon.Monitor.lemma_3_7

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

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

Let α=β S[b,b′) γ\alpha=\beta\,\mathsf S_{[b,b')}\,\gammaα=βS[b,b′)​γ, where β\betaβ and γ\gammaγ have the same vector xˉ=(x1,…,xn)\bar x=(x_1,\dots,x_n)xˉ=(x1​,…,xn​) of free variables, and let rαD^ir_\alpha^{\hat{\mathcal D}_i}rαD^i​​ and pαD^ip_\alpha^{\hat{\mathcal D}_i}pαD^i​​ be given by the construction of §3.4.3. Assume the input structures are automatic with respect to the fixed representation and interpret a binary predicate ≺\prec≺ as <<<. Assume that the relations pφD^jp_\varphi^{\hat{\mathcal D}_j}pφD^j​​ are regular and pφD^j=φ(Dˉ,τˉ,j)p_\varphi^{\hat{\mathcal D}_j}=\varphi^{(\bar{\mathcal D},\bar\tau,j)}pφD^j​​=φ(Dˉ,τˉ,j) for all j≤ij\le ij≤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 t∈Nt\in\mathbb Nt∈N,
(aˉ,t)∈rαD^i  ⟺  ∃j≤i: t=τi−τj<b′, aˉ∈γ(Dˉ,τˉ,j), aˉ∈β(Dˉ,τˉ,k) for all j<k≤i;(\bar a,t)\in r_\alpha^{\hat{\mathcal D}_i}\iff \exists j\le i:\ t=\tau_i-\tau_j<b',\ \bar a\in\gamma^{(\bar{\mathcal D},\bar\tau,j)},\ \bar a\in\beta^{(\bar{\mathcal D},\bar\tau,k)}\text{ for all }j<k\le i;(aˉ,t)∈rαD^i​​⟺∃j≤i: t=τi​−τj​<b′, aˉ∈γ(Dˉ,τˉ,j), aˉ∈β(Dˉ,τˉ,k) for all j<k≤i;
  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).

Part 1 says that rαr_\alpharα​ records, for each tuple, the ages of its still-relevant γ\gammaγ-witnesses; part 2 is the correctness of the incremental since construction.

Formalization Note. The pair (aˉ,t)(\bar a,t)(aˉ,t) is the list aˉ+ ⁣ ⁣+[t]\bar a\mathbin{+\!\!+}[t]aˉ++[t]. The same-free-variables hypothesis is the paper's "without loss of generality" assumption of §3.4. The order predicate ≺\prec≺ (§3.1) is a hypothesis because the arithmetic constraint of the construction is defined from it. The construction uses the additive form t=t′+(τi−τi−1)t=t'+(\tau_i-\tau_{i-1})t=t′+(τi​−τi−1​) of the printed constraint.

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

/-- Lemma 3.7 (p. 15:12), `α = β S_{[b,b′)} γ` with `free(β) = free(γ)` (WLOG of §3.4). Assume that
the relations `p_φ^{D̂ⱼ}` (here `P φ j`) are regular and equal `φ^{(D̄,τ̄,j)}` for all `j ≤ i` and
`φ ∈ tsub(β) ∪ tsub(γ)`. Then (i) `r_α^{D̂ᵢ}` is regular and, for all `ā ∈ ℕⁿ` and `t ∈ ℕ`,
`(ā, t) ∈ r_α^{D̂ᵢ}` iff there is `j ≤ i` with `t = τᵢ − τⱼ < b′`, `ā ∈ γ^{(D̄,τ̄,j)}` and
`ā ∈ β^{(D̄,τ̄,k)}` for all `j < k ≤ i`; (ii) `p_α^{D̂ᵢ}` is regular and `p_α^{D̂ᵢ} = α^{(D̄,τ̄,i)}`.
`r_α^{D̂ᵢ}` and `p_α^{D̂ᵢ}` are the §3.4.3 constructions `sinceR`, `sinceP` fed with
`β̂^{D̂ⱼ}`, `γ̂^{D̂ⱼ}`. The order `≺` interpreted as `<` (§3.1) is a hypothesis. -/
theorem lemma_3_7 {S : Signature} {Γ : Type} [Fintype Γ] (rep : DomainRep Γ) (D : TempStruct S)
    (hD : IsAutomatic rep D) (hlt : HasOrderPred D) (I : Interval) (β γ : 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.since I β γ)).length
    (∀ j, j ≤ i → ∀ φ ∈ tsub β ++ tsub γ, RegularRel rep (freeList φ).length (P φ j) ∧
      P φ j = satSet D φ j) →
    (RegularRel rep (n + 1) (sinceR D.τ I B G i) ∧
      ∀ a : List ℕ, a.length = n → ∀ t : ℕ,
        (a ++ [t] ∈ sinceR D.τ I B G i ↔
          ∃ j, j ≤ i ∧ t = D.τ i - D.τ j ∧ (t : ℕ∞) < I.hi ∧ a ∈ satSet D γ j ∧
            ∀ k, j < k → k ≤ i → a ∈ satSet D β k)) ∧
    (RegularRel rep n (sinceP I (sinceR D.τ I B G i)) ∧
      sinceP I (sinceR D.τ I B G i) = satSet D (Formula.since 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), p. 15:12, Lemma 3.7 (construction of §3.4.3)
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