MindFormal v1.0.0One Mind

MindFormal.Chapters.Ch04.Cooperative

04.24 (P4)–(P5) and 04.33 (TC2): the two-coordinate cooperative comparison in its exact matrix-exponential form. The comparison matrix H=[[-μ₁,γ₁],[γ₂,-μ₂]] has positive off-diagonal entries, so e^{Hτ} is entrywise nonnegative; for paths in integral form whose integrands satisfy the lower drift inequalities with base costs ε, (X,U)(t)≥e^{Ht}(X,U)(0)-∫₀^t e^{Hτ}ε dτ. The activity coordinate of a continuing reference is shown to be in integral form, so the comparison applies to the reference's examined activity and cue link.

noncomputable def MindFormal.coopDisc (μ₁ μ₂ γ₁ γ₂ : ℝ) :

04.24 (P4a): the comparison matrix's discriminant √((μ₁-μ₂)²+4γ₁γ₂).

Equations
Instances For
    noncomputable def MindFormal.coopMinus (μ₁ μ₂ γ₁ γ₂ : ℝ) :

    04.24 (P4a): the comparison matrix's smaller eigenvalue.

    Equations
    Instances For
      noncomputable def MindFormal.coopExp11 (μ₁ μ₂ γ₁ γ₂ τ : ℝ) :

      04.24 (P4a): entry (1,1) of e^{Hτ}.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        noncomputable def MindFormal.coopExp12 (μ₁ μ₂ γ₁ γ₂ τ : ℝ) :

        04.24 (P4a): entry (1,2) of e^{Hτ}.

        Equations
        Instances For
          noncomputable def MindFormal.coopExp21 (μ₁ μ₂ γ₁ γ₂ τ : ℝ) :

          04.24 (P4a): entry (2,1) of e^{Hτ}.

          Equations
          Instances For
            noncomputable def MindFormal.coopExp22 (μ₁ μ₂ γ₁ γ₂ τ : ℝ) :

            04.24 (P4a): entry (2,2) of e^{Hτ}.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              theorem MindFormal.coop_roots {μ₁ μ₂ γ₁ γ₂ : ℝ} (hγ₁ : 0 < γ₁) (hγ₂ : 0 < γ₂) :
              0 < coopDisc μ₁ μ₂ γ₁ γ₂ ∧ growthRate μ₁ μ₂ γ₁ γ₂ - coopMinus μ₁ μ₂ γ₁ γ₂ = coopDisc μ₁ μ₂ γ₁ γ₂ ∧ (μ₁ + growthRate μ₁ μ₂ γ₁ γ₂) * (μ₂ + growthRate μ₁ μ₂ γ₁ γ₂) = γ₁ * γ₂ ∧ (μ₁ + coopMinus μ₁ μ₂ γ₁ γ₂) * (μ₂ + coopMinus μ₁ μ₂ γ₁ γ₂) = γ₁ * γ₂ ∧ 0 ≤ growthRate μ₁ μ₂ γ₁ γ₂ + μ₂ ∧ 0 ≤ growthRate μ₁ μ₂ γ₁ γ₂ + μ₁ ∧ coopMinus μ₁ μ₂ γ₁ γ₂ + μ₂ ≤ 0 ∧ coopMinus μ₁ μ₂ γ₁ γ₂ + μ₁ ≤ 0

              04.24 (P4a): the eigenvalue facts: Δ>0, λ₊+λ₋=-(μ₁+μ₂), λ₊-λ₋=Δ, both roots of (μ₁+λ)(μ₂+λ)=γ₁γ₂, and λ₊+μ₂, λ₊+μ₁ ≥ 0 ≥ λ₋+μ₂, λ₋+μ₁.

              theorem MindFormal.expPair_hasDerivAt (A B p q Δ τ : ℝ) :
              HasDerivAt (fun (τ : ℝ) => (A * Real.exp (p * τ) - B * Real.exp (q * τ)) / Δ) ((A * p * Real.exp (p * τ) - B * q * Real.exp (q * τ)) / Δ) τ

              04.24 (P4a): a two-exponential combination (Ae^{pτ}-Be^{qτ})/Δ has derivative (Ape^{pτ}-Bqe^{qτ})/Δ.

              theorem MindFormal.coopExp_hasDerivAt {μ₁ μ₂ γ₁ γ₂ : ℝ} (hγ₁ : 0 < γ₁) (hγ₂ : 0 < γ₂) (τ : ℝ) :
              HasDerivAt (coopExp11 μ₁ μ₂ γ₁ γ₂) (-μ₁ * coopExp11 μ₁ μ₂ γ₁ γ₂ τ + γ₂ * coopExp12 μ₁ μ₂ γ₁ γ₂ τ) τ ∧ HasDerivAt (coopExp12 μ₁ μ₂ γ₁ γ₂) (γ₁ * coopExp11 μ₁ μ₂ γ₁ γ₂ τ - μ₂ * coopExp12 μ₁ μ₂ γ₁ γ₂ τ) τ ∧ HasDerivAt (coopExp21 μ₁ μ₂ γ₁ γ₂) (-μ₁ * coopExp21 μ₁ μ₂ γ₁ γ₂ τ + γ₂ * coopExp22 μ₁ μ₂ γ₁ γ₂ τ) τ ∧ HasDerivAt (coopExp22 μ₁ μ₂ γ₁ γ₂) (γ₁ * coopExp21 μ₁ μ₂ γ₁ γ₂ τ - μ₂ * coopExp22 μ₁ μ₂ γ₁ γ₂ τ) τ

              04.24 (P4a): the entries solve E'=EH: e₁₁'=-μ₁e₁₁+γ₂e₁₂, e₁₂'=γ₁e₁₁-μ₂e₁₂, e₂₁'=-μ₁e₂₁+γ₂e₂₂, e₂₂'=γ₁e₂₁-μ₂e₂₂.

              theorem MindFormal.coopExp_nonneg {μ₁ μ₂ γ₁ γ₂ : ℝ} (hγ₁ : 0 < γ₁) (hγ₂ : 0 < γ₂) {τ : ℝ} (hτ : 0 ≤ τ) :
              0 ≤ coopExp11 μ₁ μ₂ γ₁ γ₂ τ ∧ 0 ≤ coopExp12 μ₁ μ₂ γ₁ γ₂ τ ∧ 0 ≤ coopExp21 μ₁ μ₂ γ₁ γ₂ τ ∧ 0 ≤ coopExp22 μ₁ μ₂ γ₁ γ₂ τ

              04.24 (P4a): e^{Hτ} is entrywise nonnegative for τ≥0 (positive off-diagonal entries).

              theorem MindFormal.coopExp_zero {μ₁ μ₂ γ₁ γ₂ : ℝ} (hγ₁ : 0 < γ₁) (hγ₂ : 0 < γ₂) :
              coopExp11 μ₁ μ₂ γ₁ γ₂ 0 = 1 ∧ coopExp12 μ₁ μ₂ γ₁ γ₂ 0 = 0 ∧ coopExp21 μ₁ μ₂ γ₁ γ₂ 0 = 0 ∧ coopExp22 μ₁ μ₂ γ₁ γ₂ 0 = 1

              04.24 (P4a): at τ=0 the entries are those of the identity.

              theorem MindFormal.coopExp_eigen {μ₁ μ₂ γ₁ γ₂ : ℝ} (hγ₁ : 0 < γ₁) (hγ₂ : 0 < γ₂) (τ : ℝ) :
              coopExp11 μ₁ μ₂ γ₁ γ₂ τ * growthDirection μ₁ μ₂ γ₁ γ₂ + coopExp12 μ₁ μ₂ γ₁ γ₂ τ = Real.exp (growthRate μ₁ μ₂ γ₁ γ₂ * τ) * growthDirection μ₁ μ₂ γ₁ γ₂ ∧ coopExp21 μ₁ μ₂ γ₁ γ₂ τ * growthDirection μ₁ μ₂ γ₁ γ₂ + coopExp22 μ₁ μ₂ γ₁ γ₂ τ = Real.exp (growthRate μ₁ μ₂ γ₁ γ₂ * τ)

              04.24 (P5): the printed direction (v,1), v=γ₁/(μ₁+λ₊), is an eigenvector of e^{Hτ} with eigenvalue e^{λ₊τ}.

              theorem MindFormal.integral_by_parts_weight {t0 t1 Z0 : ℝ} (g g' D : ℝ → ℝ) (hg : ∀ (s : ℝ), HasDerivAt g (g' s) s) (hg' : Continuous g') (hD : IntervalIntegrable D MeasureTheory.volume t0 t1) :
              g t1 * (Z0 + ∫ (u : ℝ) in t0..t1, D u) - g t0 * Z0 = ∫ (s : ℝ) in t0..t1, g' s * (Z0 + ∫ (u : ℝ) in t0..s, D u) + g s * D s

              04.24 (P4a): integration by parts of a C¹ weight g against a path in integral form Z(s)=Z₀+∫_{t₀}^s D on [t₀,t₁].

              theorem MindFormal.cooperative_comparison {μ₁ μ₂ γ₁ γ₂ ex ew t0 t1 X0 U0 : ℝ} (hγ₁ : 0 < γ₁) (hγ₂ : 0 < γ₂) (h01 : t0 ≤ t1) (X U DX DU : ℝ → ℝ) (hDX : IntervalIntegrable DX MeasureTheory.volume t0 t1) (hDU : IntervalIntegrable DU MeasureTheory.volume t0 t1) (hXi : ∀ s ∈ Set.Icc t0 t1, X s = X0 + ∫ (u : ℝ) in t0..s, DX u) (hUi : ∀ s ∈ Set.Icc t0 t1, U s = U0 + ∫ (u : ℝ) in t0..s, DU u) (hX : ∀ s ∈ Set.Icc t0 t1, -μ₁ * X s + γ₁ * U s - ex ≤ DX s) (hU : ∀ s ∈ Set.Icc t0 t1, γ₂ * X s - μ₂ * U s - ew ≤ DU s) :
              coopExp11 μ₁ μ₂ γ₁ γ₂ (t1 - t0) * X0 + coopExp12 μ₁ μ₂ γ₁ γ₂ (t1 - t0) * U0 - ∫ (τ : ℝ) in 0..t1 - t0, coopExp11 μ₁ μ₂ γ₁ γ₂ τ * ex + coopExp12 μ₁ μ₂ γ₁ γ₂ τ * ew ≤ X t1 ∧ coopExp21 μ₁ μ₂ γ₁ γ₂ (t1 - t0) * X0 + coopExp22 μ₁ μ₂ γ₁ γ₂ (t1 - t0) * U0 - ∫ (τ : ℝ) in 0..t1 - t0, coopExp21 μ₁ μ₂ γ₁ γ₂ τ * ex + coopExp22 μ₁ μ₂ γ₁ γ₂ τ * ew ≤ U t1

              04.24 (P4a): two-coordinate cooperative comparison on [t₀,t₁]. If X and U are in integral form with integrands DX≥-μ₁X+γ₁U-εx and DU≥γ₂X-μ₂U-εw there (γ₁,γ₂>0), then (X,U)(t₁)≥e^{H(t₁-t₀)}(X,U)(t₀)-∫₀^{t₁-t₀}e^{Hτ}(εx,εw)dτ, entry by entry.

              theorem MindFormal.cooperative_comparison_var {μ₁ μ₂ γ₁ γ₂ t0 t1 X0 U0 : ℝ} (hγ₁ : 0 < γ₁) (hγ₂ : 0 < γ₂) (h01 : t0 ≤ t1) (X U DX DU ex ew : ℝ → ℝ) (hex : IntervalIntegrable ex MeasureTheory.volume t0 t1) (hew : IntervalIntegrable ew MeasureTheory.volume t0 t1) (hDX : IntervalIntegrable DX MeasureTheory.volume t0 t1) (hDU : IntervalIntegrable DU MeasureTheory.volume t0 t1) (hXi : ∀ s ∈ Set.Icc t0 t1, X s = X0 + ∫ (u : ℝ) in t0..s, DX u) (hUi : ∀ s ∈ Set.Icc t0 t1, U s = U0 + ∫ (u : ℝ) in t0..s, DU u) (hX : ∀ s ∈ Set.Icc t0 t1, -μ₁ * X s + γ₁ * U s - ex s ≤ DX s) (hU : ∀ s ∈ Set.Icc t0 t1, γ₂ * X s - μ₂ * U s - ew s ≤ DU s) :
              coopExp11 μ₁ μ₂ γ₁ γ₂ (t1 - t0) * X0 + coopExp12 μ₁ μ₂ γ₁ γ₂ (t1 - t0) * U0 - ∫ (s : ℝ) in t0..t1, coopExp11 μ₁ μ₂ γ₁ γ₂ (t1 - s) * ex s + coopExp12 μ₁ μ₂ γ₁ γ₂ (t1 - s) * ew s ≤ X t1 ∧ coopExp21 μ₁ μ₂ γ₁ γ₂ (t1 - t0) * X0 + coopExp22 μ₁ μ₂ γ₁ γ₂ (t1 - t0) * U0 - ∫ (s : ℝ) in t0..t1, coopExp21 μ₁ μ₂ γ₁ γ₂ (t1 - s) * ex s + coopExp22 μ₁ μ₂ γ₁ γ₂ (t1 - s) * ew s ≤ U t1

              04.24 (P4a): the cooperative comparison with time-varying costs: if the integrands are DX≥-μ₁X+γ₁U-εx(s) and DU≥γ₂X-μ₂U-εw(s) with εx, εw integrable (for instance base costs plus the complete drift costs of intervening modes), then (X,U)(t₁)≥e^{H(t₁-t₀)}(X,U)(t₀)-∫_{t₀}^{t₁}e^{H(t₁-s)}(εx,εw)(s)ds, entry by entry.

              theorem MindFormal.learningRun_activity_change {Ω : Type u_1} [MeasurableSpace Ω] {N n : ℕ} {T : Type u_2} {Λ : Type u_3} {J : Type u_4} [Fintype T] [Fintype Λ] [Fintype J] {𝒩 : NoiseCase Ω (CoordinateIndex (Fin N) n T Λ) J} (C : LearningRun Ω N n T Λ J 𝒩) (z : Ω) (i : Fin N) {t0 t : ℝ} (h0 : 0 ≤ t0) (ht : t0 ≤ t) (hH : t ≤ ↑C.horizon) :
              C.refAct z i t = C.refAct z i t0 + ∫ (s : ℝ) in t0..t, C.refDrift z s (Sum.inr (Sum.inl i))

              04.24 (P4): on the continuing reference of draw z the activity of i over [t₀,t]⊆[0,H] is its value at t₀ plus the integral of its complete I drift ν(T-x): the floor never acts.

              theorem MindFormal.learningRun_growth {Ω : Type u_1} [MeasurableSpace Ω] {N n : ℕ} {T : Type u_2} {Λ : Type u_3} {J : Type u_4} [Fintype T] [Fintype Λ] [Fintype J] {𝒩 : NoiseCase Ω (CoordinateIndex (Fin N) n T Λ) J} (C : LearningRun Ω N n T Λ J 𝒩) (z : Ω) (i j : Fin N) {t0 t1 xs ws μ₁ μ₂ γ₁ γ₂ ex ew : ℝ} (h0 : 0 ≤ t0) (h01 : t0 ≤ t1) (h1 : t1 ≤ ↑C.horizon) (hγ₁ : 0 < γ₁) (hγ₂ : 0 < γ₂) (P4x : ∀ s ∈ Set.Icc t0 t1, -μ₁ * (C.refAct z i s - xs) + γ₁ * (C.refCoordinate z (Sum.inl (i, j)) s - ws) - ex ≤ C.refDrift z s (Sum.inr (Sum.inl i))) (P4w : ∀ s ∈ Set.Icc t0 t1, γ₂ * (C.refAct z i s - xs) - μ₂ * (C.refCoordinate z (Sum.inl (i, j)) s - ws) - ew ≤ C.refDrift z s (Sum.inl (i, j))) :
              coopExp11 μ₁ μ₂ γ₁ γ₂ (t1 - t0) * (C.refAct z i t0 - xs) + coopExp12 μ₁ μ₂ γ₁ γ₂ (t1 - t0) * (C.refCoordinate z (Sum.inl (i, j)) t0 - ws) - ∫ (τ : ℝ) in 0..t1 - t0, coopExp11 μ₁ μ₂ γ₁ γ₂ τ * ex + coopExp12 μ₁ μ₂ γ₁ γ₂ τ * ew ≤ C.refAct z i t1 - xs ∧ coopExp21 μ₁ μ₂ γ₁ γ₂ (t1 - t0) * (C.refAct z i t0 - xs) + coopExp22 μ₁ μ₂ γ₁ γ₂ (t1 - t0) * (C.refCoordinate z (Sum.inl (i, j)) t0 - ws) - ∫ (τ : ℝ) in 0..t1 - t0, coopExp21 μ₁ μ₂ γ₁ γ₂ τ * ex + coopExp22 μ₁ μ₂ γ₁ γ₂ τ * ew ≤ C.refCoordinate z (Sum.inl (i, j)) t1 - ws

              04.24 (P4a), 04.33 (TC2): on the continuing reference of draw z over [t₀,t₁]⊆[0,H], if the examined content i's complete I drift is at least -μ₁X+γ₁U-εx and its cue link (i,j)'s complete II drift at least γ₂X-μ₂U-εw, X=x_i-x*, U=W_ij-W*, then (X,U)(t₁)≥e^{H(t₁-t₀)}(X,U)(t₀)-∫₀^{t₁-t₀}e^{Hτ}ε dτ entry by entry.