MindFormal v1.0.0One Mind

MindFormal.Chapters.Ch07.HeldPracticeRace

LI4.2--3: derive the query curve from I on a verified held target, then test the existing full native race. Other coordinates are unrestricted.

theorem MindFormal.HeldPracticeRace.deadline {N n : ℕ} {T : Type u_1} {Λ : Type u_2} [Fintype T] [Fintype Λ] (G : PhysicalGlobalData N n T Λ) {H : ℝ} (hH : 0 ≤ H) (i : Fin N) (hout : G.reads.outputs i = true) (mono : MonotoneOn (fun (t : ℝ) => PracticeSequence.score G t i) (Set.Icc 0 H)) (rivals : ∀ t ∈ Set.Icc 0 H, ∀ (j : Fin N), j ≠ i → G.reads.outputs j = true → G.reads.actionBar ≤ PracticeSequence.score G t j → PracticeSequence.score G t j < PracticeSequence.score G t i) :
theorem MindFormal.HeldPracticeRace.query_curve {N n : ℕ} {T : Type u_1} {Λ : Type u_2} [Fintype T] [Fintype Λ] {d : MindDriftData (Fin N) n T Λ} {H : NNReal} (R : LearningReference d H) (G : PhysicalGlobalData N n T Λ) (i : Fin N) {V Tq : ℝ} (path : ∀ t ∈ Set.Icc 0 ↑H, G.realPath t = R.realPath t) (read : ∀ (s : PhysicalState N n T Λ), (G.reads.scores false) s i = mindActivity (↑s) i + V) (initial : mindActivity (↑(R.realPath 0)) i = 0) (held : ∀ s ∈ Set.Ioc 0 ↑H, R.target i s = Tq) (t : ℝ) :
t ∈ Set.Icc 0 ↑H → PracticeSequence.score G t i = V + (1 - Real.exp (-d.activity.ν * t)) * Tq
theorem MindFormal.HeldPracticeRace.context {N n : ℕ} {T : Type u_1} {Λ : Type u_2} [Fintype T] [Fintype Λ] {d : MindDriftData (Fin N) n T Λ} {H : NNReal} (R : LearningReference d H) (G : PhysicalGlobalData N n T Λ) (i : Fin N) {V base Q x Gload g omega : ℝ} (hH : 0 < ↑H) (hn : 0 < d.activity.ν) (hG : 0 < Gload) (hg : 0 ≤ g) (hchi : 0 < omega - V) (hbranch : g + (omega - V) / (1 - Real.exp (-d.activity.ν * ↑H)) < 1) (hbar : G.reads.actionBar = omega) (hout : G.reads.outputs i = true) (path : ∀ t ∈ Set.Icc 0 ↑H, G.realPath t = R.realPath t) (read : ∀ (s : PhysicalState N n T Λ), (G.reads.scores false) s i = mindActivity (↑s) i + V) (initial : mindActivity (↑(R.realPath 0)) i = 0) (held : ∀ s ∈ Set.Ioc 0 ↑H, R.target i s = PracticeThresholds.target (base - Q * x) Gload g) (rivals : ∀ t ∈ Set.Icc 0 ↑H, ∀ (j : Fin N), j ≠ i → G.reads.outputs j = true → omega ≤ PracticeSequence.score G t j → PracticeSequence.score G t j < PracticeSequence.score G t i) :
(∀ t ∈ Set.Icc 0 ↑H, PracticeSequence.score G t i = V + (1 - Real.exp (-d.activity.ν * t)) * PracticeThresholds.target (base - Q * x) Gload g) ∧ ((∃ t ∈ Set.Icc 0 ↑H, ((G.native (↑H) false).search 0).event = some (t, i)) ↔ PracticeThresholds.required Gload g ((omega - V) / (1 - Real.exp (-d.activity.ν * ↑H))) ≤ base - Q * x)
theorem MindFormal.HeldPracticeRace.fading {N n : ℕ} {T : Type u_1} {Λ : Type u_2} [Fintype T] [Fintype Λ] {d : MindDriftData (Fin N) n T Λ} {H : NNReal} (R : LearningReference d H) (k : Fin N) {t : ℝ} (ht : 0 ≤ t) (hH : t ≤ ↑H) (zero_target : ∀ s ∈ Set.Ioc 0 t, R.target k s = 0) :

Zero target is a hold on I's target, not on II, III, gain or other I rows.

theorem MindFormal.HeldPracticeRace.delay {base req Q x0 nu : ℝ} (hQ : 0 < Q * x0) (hn : 0 < nu) (hreq : 0 < base - req) (hentry : base - req < Q * x0) :
have cut := 1 / nu * Real.log (Q * x0 / (base - req)); 0 < cut ∧ (∀ (d : ℝ), req ≤ base - Q * (x0 * Real.exp (-nu * d)) ↔ cut ≤ d) ∧ ∀ (d : ℝ), base ≤ req → ¬req ≤ base - Q * (x0 * Real.exp (-nu * d))
theorem MindFormal.HeldPracticeRace.context_delay {N n : ℕ} {T : Type u_1} {Λ : Type u_2} [Fintype T] [Fintype Λ] {d : MindDriftData (Fin N) n T Λ} {H : NNReal} (pauseH : ℝ → NNReal) (B : (delay : ℝ) → LearningReference d (pauseH delay)) (R : ℝ → LearningReference d H) (G : ℝ → PhysicalGlobalData N n T Λ) (i context : Fin N) {V base Q x0 Gload g omega : ℝ} (hH : 0 < ↑H) (hn : 0 < d.activity.ν) (hG : 0 < Gload) (hg : 0 ≤ g) (hQ : 0 < Q * x0) (hdelay : ∀ delay ∈ Set.Ici 0, delay ≤ ↑(pauseH delay)) (context_initial : ∀ delay ∈ Set.Ici 0, mindActivity (↑((B delay).realPath 0)) context = x0) (context_zero : ∀ delay ∈ Set.Ici 0, ∀ s ∈ Set.Ioc 0 delay, (B delay).target context s = 0) (hchi : 0 < omega - V) (hbranch : g + (omega - V) / (1 - Real.exp (-d.activity.ν * ↑H)) < 1) (hbar : ∀ delay ∈ Set.Ici 0, (G delay).reads.actionBar = omega) (hout : ∀ delay ∈ Set.Ici 0, (G delay).reads.outputs i = true) (path : ∀ delay ∈ Set.Ici 0, ∀ t ∈ Set.Icc 0 ↑H, (G delay).realPath t = (R delay).realPath t) (read : ∀ delay ∈ Set.Ici 0, ∀ (s : PhysicalState N n T Λ), ((G delay).reads.scores false) s i = mindActivity (↑s) i + V) (initial : ∀ delay ∈ Set.Ici 0, mindActivity (↑((R delay).realPath 0)) i = 0) (held : ∀ delay ∈ Set.Ici 0, ∀ s ∈ Set.Ioc 0 ↑H, (R delay).target i s = PracticeThresholds.target (base - Q * mindActivity (↑((B delay).realPath delay)) context) Gload g) (rivals : ∀ delay ∈ Set.Ici 0, ∀ t ∈ Set.Icc 0 ↑H, ∀ (j : Fin N), j ≠ i → (G delay).reads.outputs j = true → omega ≤ PracticeSequence.score (G delay) t j → PracticeSequence.score (G delay) t j < PracticeSequence.score (G delay) t i) :
have req := PracticeThresholds.required Gload g ((omega - V) / (1 - Real.exp (-d.activity.ν * ↑H))); have cut := 1 / d.activity.ν * Real.log (Q * x0 / (base - req)); (∀ delay ∈ Set.Ici 0, (∃ t ∈ Set.Icc 0 ↑H, (((G delay).native (↑H) false).search 0).event = some (t, i)) ↔ req ≤ base - Q * (x0 * Real.exp (-d.activity.ν * delay))) ∧ (req < base → ∀ delay ∈ Set.Ici 0, (∃ t ∈ Set.Icc 0 ↑H, (((G delay).native (↑H) false).search 0).event = some (t, i)) ↔ cut ≤ delay) ∧ (0 < base - req → base - req < Q * x0 → 0 < cut) ∧ (base ≤ req → ∀ delay ∈ Set.Ici 0, ¬∃ t ∈ Set.Icc 0 ↑H, (((G delay).native (↑H) false).search 0).event = some (t, i))