MindFormal v1.0.0One Mind

MindFormal.Chapters.Ch17.NumericalComparisons

theorem MindFormal.NumericalCode.quadratic_comparison {ν H a₀ b₀ old goal χ common : ℝ} (hν : 0 < ν) (hH : 0 ≤ H) (h₀ : 0 < b₀) (hχ : 0 < χ) (a b : ℝ → ℝ) (ha : IntervalIntegrable a MeasureTheory.volume 0 H) (hb : IntervalIntegrable b MeasureTheory.volume 0 H) (positive : ∀ t ∈ Set.Icc 0 H, 0 ≤ b t) :
have q₀ := Real.exp (-ν * H) * b₀; have q₁ := ν * ∫ (t : ℝ) in 0..H, Real.exp (-ν * (H - t)) * b t; have c := center q₀ q₁ old goal; have intercept := χ * (expConv ν a₀ a H - q₀ * q₁ / (q₀ + q₁) * (old - goal) ^ 2) + common; 0 ≤ weight q₀ q₁ ∧ weight q₀ q₁ < 1 ∧ c - old = weight q₀ q₁ * (goal - old) ∧ |c - old| ≤ |goal - old| ∧ 0 < χ * (q₀ + q₁) ∧ (∀ (z : ℝ), χ * expConv ν (a₀ - b₀ * (z - old) ^ 2) (fun (t : ℝ) => a t - b t * (z - goal) ^ 2) H + common = intercept - χ * (q₀ + q₁) * (z - c) ^ 2) ∧ ∀ (z w : ℝ), intercept - χ * (q₀ + q₁) * (z - c) ^ 2 ≤ intercept - χ * (q₀ + q₁) * (w - c) ^ 2 ↔ (w - c) ^ 2 ≤ (z - c) ^ 2

G6 includes the integrated profile, complete intercept, shift and exact nearest-coordinate criterion. Only this explicitly named comparison is held.

theorem MindFormal.NumericalCode.timing_comparison {ν H h cue q₀ d old goal : ℝ} (hν : 0 < ν) (hh : 0 < h) (hc : 0 < cue) (h₀ : 0 < q₀) (hd : 0 ≤ d) (hwindow : d + h ≤ H) (b : ℝ → ℝ) (display : ∀ t ∈ Set.Ioc 0 H, b t = (Set.Ioc d (d + h)).indicator (fun (x : ℝ) => cue) t) :
ν * ∫ (t : ℝ) in 0..H, Real.exp (-ν * (H - t)) * b t = delayedCurvature ν H h cue d ∧ (have γ := weight q₀ (delayedCurvature ν H h cue d); HasDerivAt (fun (d : ℝ) => weight q₀ (delayedCurvature ν H h cue d)) (ν * γ * (1 - γ)) d ∧ 0 < ν * γ * (1 - γ) ∧ HasDerivAt (fun (d : ℝ) => center q₀ (delayedCurvature ν H h cue d) old goal) (ν * γ * (1 - γ) * (goal - old)) d) ∧ (∀ (d₀ d₁ : ℝ), d₀ < d₁ → delayedCurvature ν H h cue d₀ < delayedCurvature ν H h cue d₁ ∧ weight q₀ (delayedCurvature ν H h cue d₀) < weight q₀ (delayedCurvature ν H h cue d₁)) ∧ ∀ (early late c₀ c₁ r₀ r₁ : ℝ), |early - c₀| ≤ r₀ → |late - c₁| ≤ r₁ → c₀ + r₀ < c₁ - r₁ → early < late

G8 includes the rectangular integral, both derivatives, the finite later weight comparison and the disjoint-band test for actual selected coordinates.