MindFormal v1.0.0One Mind

MindFormal.Tools.NativeTimes

Native events as stopping times. A guard process G t ω i has one coordinate a candidate, with continuous paths, each coordinate adapted. The native event after a release time σ is the first time at or after σ at which some candidate's guard is nonnegative, the first candidate to reach its bar, or ⊤ if none ever does. When σ is a stopping time, so is the event: it is at most s exactly when some guard is nonnegative at some time of [σ, s], and by continuity that is read on the rational grid of [0, s]: for each k, at a grid time at or after σ the guard exceeds -1/(k+1), so its maximum on [σ, s] is nonnegative. A stopping time delayed by a pause is one too, so the successive events of a native schedule, each search released one pause after the previous event, are all stopping times. Guards that agree up to an event give the same event.

noncomputable def MindFormal.nativeTime {Ω : Type u_1} {ι : Type u_2} (G : NNReal → Ω → ι → ℝ) (σ : Ω → WithTop NNReal) (ω : Ω) :

The native event after σ: the first time at or after σ at which some guard is nonnegative, or ⊤ if none ever is.

Equations
Instances For
    theorem MindFormal.isClosed_native {Ω : Type u_1} {ι : Type u_2} [Finite ι] {G : NNReal → Ω → ι → ℝ} {σ : Ω → WithTop NNReal} {ω : Ω} (hc : ∀ (i : ι), Continuous fun (t : NNReal) => G t ω i) :
    IsClosed {t : NNReal | σ ω ≤ ↑t ∧ ∃ (i : ι), 0 ≤ G t ω i}

    The times at or after σ at which some guard is nonnegative form a closed set.

    theorem MindFormal.nativeTime_le_iff {Ω : Type u_1} {ι : Type u_2} [Finite ι] {G : NNReal → Ω → ι → ℝ} {σ : Ω → WithTop NNReal} {ω : Ω} (hc : ∀ (i : ι), Continuous fun (t : NNReal) => G t ω i) (s : NNReal) :
    nativeTime G σ ω ≤ ↑s ↔ ∃ t ≤ s, σ ω ≤ ↑t ∧ ∃ (i : ι), 0 ≤ G t ω i

    For continuous guards, the native event after σ is at most s exactly when some guard is nonnegative at some time of [σ, s].

    theorem MindFormal.exists_native_iff_grid {φ : NNReal → ℝ} (hφ : Continuous φ) (x : WithTop NNReal) (s : NNReal) :
    (∃ t ≤ s, x ≤ ↑t ∧ 0 ≤ φ t) ↔ x ≤ ↑s ∧ ∀ (k : ℕ), ∃ (q : ℚ), x ≤ ↑(rationalGridTime s q) ∧ -(1 / (↑k + 1)) < φ (rationalGridTime s q)

    A continuous path is nonnegative at some time of [x, s] exactly when, for each k, it exceeds -1/(k+1) at a time of the rational grid of [0, s] at or after x.

    theorem MindFormal.isStoppingTime_nativeTime {Ω : Type u_1} {ι : Type u_2} [mΩ : MeasurableSpace Ω] {ℱ : MeasureTheory.Filtration NNReal mΩ} [Finite ι] {G : NNReal → Ω → ι → ℝ} (hG : ∀ (i : ι), MeasureTheory.StronglyAdapted ℱ fun (t : NNReal) (ω : Ω) => G t ω i) (hc : ∀ (ω : Ω) (i : ι), Continuous fun (t : NNReal) => G t ω i) {σ : Ω → WithTop NNReal} (hσ : MeasureTheory.IsStoppingTime ℱ σ) :

    The native event after a stopping time is a stopping time, for guards with continuous paths and adapted coordinates.

    theorem MindFormal.isStoppingTime_add_const {Ω : Type u_1} [mΩ : MeasurableSpace Ω] {ℱ : MeasureTheory.Filtration NNReal mΩ} {τ : Ω → WithTop NNReal} (hτ : MeasureTheory.IsStoppingTime ℱ τ) (p : NNReal) :
    MeasureTheory.IsStoppingTime ℱ fun (ω : Ω) => τ ω + ↑p

    A stopping time delayed by a pause is a stopping time.

    def MindFormal.nativeEvent {Ω : Type u_1} {ι : Type u_2} (G : NNReal → Ω → ι → ℝ) (pause : NNReal) :
    ℕ → Ω → WithTop NNReal

    The native schedule: event 0 is the first after time 0, and event n + 1 the first after event n and one pause.

    Equations
    Instances For
      theorem MindFormal.isStoppingTime_nativeEvent {Ω : Type u_1} {ι : Type u_2} [mΩ : MeasurableSpace Ω] {ℱ : MeasureTheory.Filtration NNReal mΩ} [Finite ι] {G : NNReal → Ω → ι → ℝ} (hG : ∀ (i : ι), MeasureTheory.StronglyAdapted ℱ fun (t : NNReal) (ω : Ω) => G t ω i) (hc : ∀ (ω : Ω) (i : ι), Continuous fun (t : NNReal) => G t ω i) (pause : NNReal) (n : ℕ) :

      Every event of a native schedule is a stopping time, for guards with continuous paths and adapted coordinates.

      theorem MindFormal.eq_of_le_coe_iff {a b : WithTop NNReal} (h : ∀ (s : NNReal), a ≤ ↑s ↔ b ≤ ↑s) :
      a = b

      Two times that are below the same finite times are equal.

      theorem MindFormal.nativeTime_congr {Ω : Type u_1} {ι : Type u_2} [Finite ι] {G G' : NNReal → Ω → ι → ℝ} {σ : Ω → WithTop NNReal} {ω : Ω} (hc : ∀ (i : ι), Continuous fun (t : NNReal) => G t ω i) (hc' : ∀ (i : ι), Continuous fun (t : NNReal) => G' t ω i) (h : ∀ (t : NNReal), ↑t ≤ nativeTime G σ ω → G t ω = G' t ω) :
      nativeTime G' σ ω = nativeTime G σ ω

      Guards that agree up to an event give the same event.