MindFormal v1.0.0One Mind

MindFormal.Chapters.Ch06.ResponsiveConsequences.GlobalClocks

noncomputable def MindFormal.ResponsiveConsequences.lossLeft {ι : Type u_1} (reads : Finset ι) (L γ : ι → ℝ) (a : ℝ) :
Equations
Instances For
    noncomputable def MindFormal.ResponsiveConsequences.lossRight {ι : Type u_1} (reads : Finset ι) (L γ : ι → ℝ) (a b : ℝ) :
    Equations
    Instances For
      theorem MindFormal.ResponsiveConsequences.explicit_loss {ι : Type u_1} (segments : Finset ℕ) (reads : ℕ → Finset ι) (a b : ℕ → ℝ) (L γ : ℕ → ι → ℝ) (H : ℝ) (S : ι → ℝ → ℝ) (available : ℝ → Finset ι) (contained : ∀ k ∈ segments, 0 ≤ a k ∧ b k ≤ H) (cover : ∀ t ∈ Set.Ico 0 H, ∃ k ∈ segments, t ∈ Set.Ico (a k) (b k)) (profile : ∀ k ∈ segments, ∀ t ∈ Set.Ico (a k) (b k), available t = reads k ∧ ∀ i ∈ reads k, S i t = L k i + γ k i * (t - a k)) :
      have left := fun (k : ℕ) => lossLeft (reads k) (L k) (γ k) (a k); have right := fun (k : ℕ) => lossRight (reads k) (L k) (γ k) (a k) (b k); have valid := {k ∈ segments | (∀ i ∈ reads k, γ k i = 0 → L k i ≤ 0) ∧ left k ≤ right k ∧ left k < b k}; have candidates := Finset.image left valid ∪ if 0 ≤ H ∧ ∀ i ∈ available H, S i H ≤ 0 then {H} else ∅; have times := {t : ℝ | t ∈ Set.Icc 0 H ∧ ∀ i ∈ available t, S i t ≤ 0}; (∀ (h : candidates.Nonempty), IsLeast times (candidates.min' h)) ∧ (candidates = ∅ ↔ times = ∅)

      SR5: the actual loss is a finite minimum of explicit segment roots and post-event tests. In particular H is tested with its actual post-jump state. Every native/response event is an entering endpoint of its own segment.

      theorem MindFormal.ResponsiveConsequences.strict_affine_candidate (L γ a b : ℝ) (hab : a < b) :
      have c := if 0 < L then a else a - L / γ; have valid := 0 < L ∨ 0 < γ ∧ a - L / γ < b; ((∃ t ∈ Set.Ico a b, 0 < L + γ * (t - a)) ↔ valid) ∧ (valid → IsGLB {t : ℝ | t ∈ Set.Ico a b ∧ 0 < L + γ * (t - a)} c)

      A strict affine return has an explicit infimum even when its first root is not attained. The zero-slope and initially-positive cases are separate.

      theorem MindFormal.ResponsiveConsequences.explicit_return {ι : Type u_1} (segments : Finset ℕ) (reads : ℕ → Finset ι) (a b : ℕ → ℝ) (L γ : ℕ → ι → ℝ) (H : ℝ) (S : ι → ℝ → ℝ) (available : ℝ → Finset ι) (contained : ∀ k ∈ segments, 0 ≤ a k ∧ b k ≤ H) (cover : ∀ t ∈ Set.Ico 0 H, ∃ k ∈ segments, t ∈ Set.Ico (a k) (b k)) (profile : ∀ k ∈ segments, ∀ t ∈ Set.Ico (a k) (b k), available t = reads k ∧ ∀ i ∈ reads k, S i t = L k i + γ k i * (t - a k)) :
      have pairs := segments.biUnion fun (k : ℕ) => Finset.image (fun (i : ι) => (k, i)) (reads k); have valid := {p ∈ pairs | a p.1 < b p.1 ∧ (0 < L p.1 p.2 ∨ 0 < γ p.1 p.2 ∧ a p.1 - L p.1 p.2 / γ p.1 p.2 < b p.1)}; have candidate := fun (p : ℕ × ι) => if 0 < L p.1 p.2 then a p.1 else a p.1 - L p.1 p.2 / γ p.1 p.2; have candidates := Finset.image candidate valid ∪ if 0 ≤ H ∧ ∃ i ∈ available H, 0 < S i H then {H} else ∅; have times := {t : ℝ | t ∈ Set.Icc 0 H ∧ ∃ i ∈ available t, 0 < S i t}; (∀ (h : candidates.Nonempty), IsGLB times (candidates.min' h)) ∧ (candidates = ∅ ↔ times = ∅)

      All finite available reads and all native/response endpoints contribute to the strict-return infimum. A root at a departing endpoint is excluded; the actual post-event reserve at that endpoint is tested by its new piece.