MindFormal v1.0.0One Mind

MindFormal.Chapters.Ch08.TwoTraceCredit

VH3.2's held activity/trace switch and its complete leading credit. Both value coordinates remain live in the remainder calculation.

noncomputable def MindFormal.twoTraceShape (lam t : ℝ) :

The shared two-trace retention shape.

Equations
Instances For
    theorem MindFormal.twoTraceShape_deriv (lam t : ℝ) :
    HasDerivAt (twoTraceShape lam) (-lam ^ 2 * t * Real.exp (-lam * t)) t
    theorem MindFormal.two_trace_comparison (a b lam t : ℝ) :
    (a * Real.exp (-lam * 0) = a ∧ b * (1 - Real.exp (-lam * 0)) = 0 ∧ a * twoTraceShape lam 0 = a ∧ b * (1 - twoTraceShape lam 0) = 0) ∧ HasDerivAt (fun (s : ℝ) => a * Real.exp (-lam * s)) (lam * (0 - a * Real.exp (-lam * t))) t ∧ HasDerivAt (fun (s : ℝ) => b * (1 - Real.exp (-lam * s))) (lam * (b - b * (1 - Real.exp (-lam * t)))) t ∧ HasDerivAt (fun (s : ℝ) => a * twoTraceShape lam s) (lam * (a * Real.exp (-lam * t) - a * twoTraceShape lam t)) t ∧ HasDerivAt (fun (s : ℝ) => b * (1 - twoTraceShape lam s)) (lam * (b * (1 - Real.exp (-lam * t)) - b * (1 - twoTraceShape lam t))) t

    C2 is a verified activity and D4 continuation, with the printed entrance and targets, without a reset between pulses.

    theorem MindFormal.two_trace_leading_integrals {a b lam : ℝ} (hlam : 0 < lam) :
    (MeasureTheory.IntegrableOn (fun (t : ℝ) => a * twoTraceShape lam t * (b * lam ^ 2 * t * Real.exp (-lam * t))) (Set.Ioi 0) MeasureTheory.volume ∧ MeasureTheory.IntegrableOn (fun (t : ℝ) => a * twoTraceShape lam t * (b * (1 - twoTraceShape lam t))) (Set.Ioi 0) MeasureTheory.volume) ∧ ∫ (t : ℝ) in Set.Ioi 0, a * twoTraceShape lam t * (b * lam ^ 2 * t * Real.exp (-lam * t)) = a * b / 2 ∧ ∫ (t : ℝ) in Set.Ioi 0, a * twoTraceShape lam t * (b * (1 - twoTraceShape lam t)) = 3 * a * b / (4 * lam)

    The two improper integrals which determine the leading credit are computed from exponential moments; no leading coefficient is supplied.

    theorem MindFormal.twoTraceShape_bounds {lam t : ℝ} (hlam : 0 ≤ lam) (ht : 0 ≤ t) :

    The trace retention stays between zero and one after the switch.

    noncomputable def MindFormal.twoTracePresence (a b lam t : ℝ) :

    The two-dimensional complete comparison presence and its derivative.

    Equations
    Instances For
      noncomputable def MindFormal.twoTraceVelocity (a b lam t : ℝ) :
      Equations
      Instances For
        theorem MindFormal.two_trace_norms (a b : ℝ) {lam t : ℝ} (hlam : 0 ≤ lam) (ht : 0 ≤ t) :
        ‖twoTracePresence a b lam t‖ ≤ √(a ^ 2 + b ^ 2) ∧ ‖twoTraceVelocity a b lam t‖ = √(a ^ 2 + b ^ 2) * (lam ^ 2 * t * Real.exp (-lam * t))

        The exact S0 bounds used in the printed remainder, retaining both traces.

        theorem MindFormal.two_trace_value_bound {a b lam eta tau V : ℝ} (hlam : 0 < lam) (heta : 0 ≤ eta) (htau : 0 < tau) (hV : 0 ≤ V) (v : ℝ → EuclideanSpace ℝ (Fin 2)) (v0 : v 0 = !₂[0, V]) (equation : ∀ t ∈ Set.Ici 0, HasDerivAt v ((eta * (inner ℝ (twoTraceVelocity a b lam t) (v t) - inner ℝ (twoTracePresence a b lam t) (v t) / tau)) • twoTracePresence a b lam t) t) (t : ℝ) :
        t ∈ Set.Ici 0 → ‖v t‖ ≤ V * Real.exp (eta * (a ^ 2 + b ^ 2))

        Energy estimate for the complete homogeneous III comparison. The negative discount term is retained; neither value is frozen.

        theorem MindFormal.homogeneous_forecast_bound {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace ℝ E] (C D v : E) {tau : ℝ} (ht : 0 < tau) :
        |inner ℝ D v - inner ℝ C v / tau| ≤ (‖D‖ + ‖C‖ / tau) * ‖v‖

        Cauchy--Schwarz bound on the complete discounted forecast.

        theorem MindFormal.homogeneous_credit_speed {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace ℝ E] (C D v : E) {eta tau : ℝ} (he : 0 ≤ eta) (ht : 0 < tau) :
        ‖(eta * (inner ℝ D v - inner ℝ C v / tau)) • C‖ ≤ eta * ‖C‖ * (‖D‖ + ‖C‖ / tau) * ‖v‖

        The complete homogeneous writer's speed retains discount and every continuing cross-coordinate forecast.

        theorem MindFormal.two_trace_displacement {a b lam eta tau V : ℝ} (hlam : 0 < lam) (heta : 0 ≤ eta) (htau : 0 < tau) (hV : 0 ≤ V) (v : ℝ → EuclideanSpace ℝ (Fin 2)) (v0 : v 0 = !₂[0, V]) (equation : ∀ t ∈ Set.Ici 0, HasDerivAt v ((eta * (inner ℝ (twoTraceVelocity a b lam t) (v t) - inner ℝ (twoTracePresence a b lam t) (v t) / tau)) • twoTracePresence a b lam t) t) (t : ℝ) :
        t ∈ Set.Ici 0 → ‖v t - v 0‖ ≤ eta * V * Real.exp (eta * (a ^ 2 + b ^ 2)) * (a ^ 2 + b ^ 2) * (1 + t / tau)

        Integrating the full writer yields the first-order displacement used inside C3's second-order correction, on every finite interval.

        noncomputable def MindFormal.twoTraceErrorShape (lam tau t : ℝ) :

        The exact scalar majorant left by the full two-coordinate writer.

        Equations
        Instances For
          theorem MindFormal.two_trace_error_integral {lam tau : ℝ} (hlam : 0 < lam) (htau : 0 < tau) :
          MeasureTheory.IntegrableOn (twoTraceErrorShape lam tau) (Set.Ioi 0) MeasureTheory.volume ∧ ∫ (t : ℝ) in Set.Ioi 0, twoTraceErrorShape lam tau t = 1 / 2 + 21 / (8 * (lam * tau)) + 3 / (lam * tau) ^ 2

          Evaluation of the entire C3 majorant, including every discount term.

          noncomputable def MindFormal.twoTraceCredit (a b lam eta tau : ℝ) (v : ℝ → EuclideanSpace ℝ (Fin 2)) (t : ℝ) :

          The instantaneous precursor credit is a coordinate of complete III.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            theorem MindFormal.two_trace_leading_credit {a b lam eta tau V : ℝ} (hlam : 0 < lam) (htau : 0 < tau) :
            MeasureTheory.IntegrableOn (twoTraceCredit a b lam eta tau fun (x : ℝ) => !₂[0, V]) (Set.Ioi 0) MeasureTheory.volume ∧ ∫ (t : ℝ) in Set.Ioi 0, twoTraceCredit a b lam eta tau (fun (x : ℝ) => !₂[0, V]) t = eta * a * b * V * (2 * lam * tau - 3) / (4 * lam * tau)

            The first bank coordinate frozen only inside the leading integral produces the stated coefficient; the actual writer is never frozen.

            theorem MindFormal.two_trace_remainder_pointwise {a b lam eta tau V : ℝ} (ha : 0 < a) (hlam : 0 < lam) (heta : 0 ≤ eta) (htau : 0 < tau) (hV : 0 ≤ V) (v : ℝ → EuclideanSpace ℝ (Fin 2)) (v0 : v 0 = !₂[0, V]) (equation : ∀ t ∈ Set.Ici 0, HasDerivAt v ((eta * (inner ℝ (twoTraceVelocity a b lam t) (v t) - inner ℝ (twoTracePresence a b lam t) (v t) / tau)) • twoTracePresence a b lam t) t) (t : ℝ) :
            t ∈ Set.Ici 0 → |twoTraceCredit a b lam eta tau v t - twoTraceCredit a b lam eta tau (fun (x : ℝ) => !₂[0, V]) t| ≤ eta ^ 2 * V * Real.exp (eta * (a ^ 2 + b ^ 2)) * (a ^ 2 + b ^ 2) * a * √(a ^ 2 + b ^ 2) * twoTraceErrorShape lam tau t

            Pointwise C3 correction from continuing learning, with the printed second-order coefficient and no value coordinate held.

            theorem MindFormal.two_trace_coordinate_integral {a b lam eta tau V H : ℝ} (v : ℝ → EuclideanSpace ℝ (Fin 2)) (v0 : v 0 = !₂[0, V]) (equation : ∀ t ∈ Set.Ici 0, HasDerivAt v ((eta * (inner ℝ (twoTraceVelocity a b lam t) (v t) - inner ℝ (twoTracePresence a b lam t) (v t) / tau)) • twoTracePresence a b lam t) t) (hH : 0 ≤ H) :
            (v H).ofLp 0 = ∫ (t : ℝ) in 0..H, twoTraceCredit a b lam eta tau v t

            The precursor's finite endpoint is the integral of the complete III credit. This is reused for both improper and finite error estimates.

            theorem MindFormal.two_trace_full_remainder {a b lam eta tau V : ℝ} (ha : 0 < a) (hlam : 0 < lam) (heta : 0 ≤ eta) (htau : 0 < tau) (hV : 0 ≤ V) (v : ℝ → EuclideanSpace ℝ (Fin 2)) (v0 : v 0 = !₂[0, V]) (equation : ∀ t ∈ Set.Ici 0, HasDerivAt v ((eta * (inner ℝ (twoTraceVelocity a b lam t) (v t) - inner ℝ (twoTracePresence a b lam t) (v t) / tau)) • twoTracePresence a b lam t) t) :
            ∃ (remainder : ℝ), Filter.Tendsto (fun (t : ℝ) => (v t).ofLp 0) Filter.atTop (nhds (eta * a * b * V * (2 * lam * tau - 3) / (4 * lam * tau) + remainder)) ∧ |remainder| ≤ eta ^ 2 * V * Real.exp (eta * (a ^ 2 + b ^ 2)) * (a ^ 2 + b ^ 2) * a * √(a ^ 2 + b ^ 2) * (1 / 2 + 21 / (8 * (lam * tau)) + 3 / (lam * tau) ^ 2)

            C3 for the full continuing writer: the precursor limit exists and its difference from the computed leading credit has the explicit bound.

            theorem MindFormal.two_trace_numeric_controls :
            have S := (1 / 10) ^ 2 + (1 / 10) ^ 2; have B := fun (χ : ℝ) => (1 / 1000) ^ 2 * Real.exp (1 / 1000 * S) * S * (1 / 10) * √S * (1 / 2 + 21 / (8 * χ) + 3 / χ ^ 2); 1 / 1000 * (1 / 10) * (1 / 10) * (2 * 2 - 3) / (4 * 2) = 1 / 800000 ∧ B 2 < 73 / 100000000000 ∧ B 2 < 1 / 800000 ∧ 1 / 1000 * (1 / 10) * (1 / 10) * (2 * 1 - 3) / (4 * 1) = -1 / 400000 ∧ B 1 < 18 / 10000000000 ∧ B 1 < 1 / 400000

            The source's two numerical remainder controls, with rational bounds on the exponential and square root checked rather than rounded.

            theorem MindFormal.two_trace_tail_integrals {lam H : ℝ} (hlam : 0 < lam) (hH : 0 ≤ H) :
            ∫ (t : ℝ) in Set.Ioi H, twoTraceShape lam t * (lam ^ 2 * t * Real.exp (-lam * t)) = 1 / 2 * (1 + lam * H) ^ 2 * Real.exp (-2 * lam * H) ∧ ∫ (t : ℝ) in Set.Ioi H, twoTraceShape lam t = (lam * H + 2) * Real.exp (-lam * H) / lam

            Exact tail primitives for the leading credit.

            theorem MindFormal.two_trace_leading_tail {a b lam eta tau V H : ℝ} (ha : 0 ≤ a) (hb : 0 ≤ b) (hlam : 0 < lam) (heta : 0 ≤ eta) (htau : 0 < tau) (hV : 0 ≤ V) (hH : 0 ≤ H) :
            |eta * a * b * V * (2 * lam * tau - 3) / (4 * lam * tau) - ∫ (t : ℝ) in 0..H, twoTraceCredit a b lam eta tau (fun (x : ℝ) => !₂[0, V]) t| ≤ eta * a * b * V * (1 / 2 * (1 + lam * H) ^ 2 * Real.exp (-2 * lam * H) + (lam * H + 2) * Real.exp (-lam * H) / (lam * tau))

            The printed leading tail, with the absolute value taken only after both products in the original writer have been integrated.

            theorem MindFormal.two_trace_finite_remainder {a b lam eta tau V H : ℝ} (ha : 0 < a) (hlam : 0 < lam) (heta : 0 ≤ eta) (htau : 0 < tau) (hV : 0 ≤ V) (v : ℝ → EuclideanSpace ℝ (Fin 2)) (v0 : v 0 = !₂[0, V]) (equation : ∀ t ∈ Set.Ici 0, HasDerivAt v ((eta * (inner ℝ (twoTraceVelocity a b lam t) (v t) - inner ℝ (twoTracePresence a b lam t) (v t) / tau)) • twoTracePresence a b lam t) t) (hH : 0 ≤ H) :
            |(v H).ofLp 0 - ∫ (t : ℝ) in 0..H, twoTraceCredit a b lam eta tau (fun (x : ℝ) => !₂[0, V]) t| ≤ eta ^ 2 * V * Real.exp (eta * (a ^ 2 + b ^ 2)) * (a ^ 2 + b ^ 2) * a * √(a ^ 2 + b ^ 2) * (1 / 2 + 21 / (8 * (lam * tau)) + 3 / (lam * tau) ^ 2)

            C3's same all-time analytic remainder bounds every finite precursor endpoint relative to its leading finite integral.

            theorem MindFormal.two_trace_twenty_tail {χ : ℝ} (hχ : 1 ≤ χ) :
            1 / 100000 * (1 / 2 * 21 ^ 2 * Real.exp (-40) + 22 * Real.exp (-20) / χ) < 5 / 10000000000000

            At twenty trace times the printed leading tail is below 5e-13 V for both chi=1 and chi=2 (indeed for every chi at least one).

            theorem MindFormal.two_trace_finite_signs {a b lam eta tau V H : ℝ} (ha : 0 < a) (hb : 0 ≤ b) (hlam : 0 < lam) (heta : 0 ≤ eta) (htau : 0 < tau) (hV : 0 ≤ V) (v : ℝ → EuclideanSpace ℝ (Fin 2)) (v0 : v 0 = !₂[0, V]) (equation : ∀ t ∈ Set.Ici 0, HasDerivAt v ((eta * (inner ℝ (twoTraceVelocity a b lam t) (v t) - inner ℝ (twoTracePresence a b lam t) (v t) / tau)) • twoTracePresence a b lam t) t) (hH : 0 ≤ H) :
            have leading := eta * a * b * V * (2 * lam * tau - 3) / (4 * lam * tau); have B := eta ^ 2 * V * Real.exp (eta * (a ^ 2 + b ^ 2)) * (a ^ 2 + b ^ 2) * a * √(a ^ 2 + b ^ 2) * (1 / 2 + 21 / (8 * (lam * tau)) + 3 / (lam * tau) ^ 2); have tail := eta * a * b * V * (1 / 2 * (1 + lam * H) ^ 2 * Real.exp (-2 * lam * H) + (lam * H + 2) * Real.exp (-lam * H) / (lam * tau)); |(v H).ofLp 0 - leading| ≤ B + tail ∧ (B + tail < leading → 0 < (v H).ofLp 0) ∧ (leading < -(B + tail) → (v H).ofLp 0 < 0)

            Generic finite sign controls: the exact C3 remainder and the leading finite tail are subtracted before any native error is admitted.

            theorem MindFormal.two_trace_numeric_signs {lam tau V : ℝ} (hlam : 0 < lam) (htau : 0 < tau) (hV : 0 < V) (choice : lam * tau = 1 ∨ lam * tau = 2) (v : ℝ → EuclideanSpace ℝ (Fin 2)) (v0 : v 0 = !₂[0, V]) (equation : ∀ t ∈ Set.Ici 0, HasDerivAt v ((1 / 1000 * (inner ℝ (twoTraceVelocity (1 / 10) (1 / 10) lam t) (v t) - inner ℝ (twoTracePresence (1 / 10) (1 / 10) lam t) (v t) / tau)) • twoTracePresence (1 / 10) (1 / 10) lam t) t) :
            ∃ (limit : ℝ), Filter.Tendsto (fun (t : ℝ) => (v t).ofLp 0) Filter.atTop (nhds limit) ∧ (lam * tau = 2 → 0 < limit ∧ V / 10000000 < (v (20 / lam)).ofLp 0) ∧ (lam * tau = 1 → limit < 0 ∧ (v (20 / lam)).ofLp 0 < -V / 10000000)

            Both printed controls have strict finite margins even after the analytic remainder and twenty-trace-time tail; their limits have the same opposite signs. No limit assertion is made about a noisy native path.