MindFormal v1.0.0One Mind

MindFormal.Tools.A1043LongRunAttention.Reference

Paper 2, long-run attention, (21)–(25): the fixed-target, zero-innovation reference of an item refreshed by visits. Visits begin at the times of a set V of nonnegative times at least ρ apart; each holds attention for the pause ρ. The reference solves x̄' = ν(T̂ − x̄) from x₀, T̂ = T_off + (T_att − T_off)q, q the visits' pulse. With T_off < x_need ≤ T_att and x₀ ≥ T_off, it stays at or above x_need through H exactly when it does so at 0, at every visit up to H and at H: the entering activity, the initial wait, every completed gap (through the gap recursion z' = e^{−νd}(z + Γ)) and the terminal interval decide retention.

noncomputable def MindFormal.A1043LongRunAttention.visitPulse (ρ : ℝ) (V : Set ℝ) (t : ℝ) :

The visits' pulse: 1 during [υ, υ + ρ) after each visit υ ∈ V, else 0.

Equations
Instances For
    noncomputable def MindFormal.A1043LongRunAttention.refRet (ν Toff Tatt x₀ : ℝ) (q : ℝ → ℝ) (t : ℝ) :

    The reference along a pulse q.

    Equations
    Instances For
      theorem MindFormal.A1043LongRunAttention.separated_countable {ρ : ℝ} (hρ : 0 < ρ) {V : Set ℝ} (hV : ∀ υ ∈ V, ∀ υ' ∈ V, υ ≠ υ' → ρ ≤ |υ - υ'|) :

      Visits at least ρ > 0 apart form a countable set.

      theorem MindFormal.A1043LongRunAttention.target_integrable {ρ : ℝ} {V : Set ℝ} (hV : V.Countable) (Toff Tatt a b : ℝ) :
      IntervalIntegrable (fun (u : ℝ) => Toff + (Tatt - Toff) * visitPulse ρ V u) MeasureTheory.volume a b
      theorem MindFormal.A1043LongRunAttention.expConv_const_on {ν x c t : ℝ} (hν : 0 < ν) (ht : 0 ≤ t) (T : ℝ → ℝ) (hT : ∀ s ∈ Set.Ioo 0 t, T s = c) :
      expConv ν x T t = c + (x - c) * Real.exp (-ν * t)

      A constant target on an open interval gives the held-target curve at its end.

      theorem MindFormal.A1043LongRunAttention.held_between {c x s : ℝ} (hs : 0 ≤ s) (hs1 : s ≤ 1) :
      min x c ≤ c + (x - c) * s

      The held-target curve stays between its start and its target.

      theorem MindFormal.A1043LongRunAttention.refRet_restart {ν ρ Toff Tatt x₀ : ℝ} {V : Set ℝ} (hV : V.Countable) {a s : ℝ} :
      refRet ν Toff Tatt x₀ (visitPulse ρ V) (a + s) = expConv ν (refRet ν Toff Tatt x₀ (visitPulse ρ V) a) (fun (u : ℝ) => Toff + (Tatt - Toff) * visitPulse ρ V (a + u)) s

      The reference restarted at a time a ≥ 0.

      theorem MindFormal.A1043LongRunAttention.refRet_attended {ν ρ Toff Tatt x₀ : ℝ} {V : Set ℝ} (hν : 0 < ν) (hV : V.Countable) {υ s : ℝ} (hυ : υ ∈ V) (hs : 0 ≤ s) (hsρ : s ≤ ρ) :
      refRet ν Toff Tatt x₀ (visitPulse ρ V) (υ + s) = Tatt + (refRet ν Toff Tatt x₀ (visitPulse ρ V) υ - Tatt) * Real.exp (-ν * s)

      During a visit's pulse the reference moves toward T_att.

      theorem MindFormal.A1043LongRunAttention.refRet_off {ν ρ Toff Tatt x₀ : ℝ} {V : Set ℝ} (hν : 0 < ν) (hV : V.Countable) {a s : ℝ} (hs : 0 ≤ s) (hoff : ∀ u ∈ Set.Ioo a (a + s), visitPulse ρ V u = 0) :
      refRet ν Toff Tatt x₀ (visitPulse ρ V) (a + s) = Toff + (refRet ν Toff Tatt x₀ (visitPulse ρ V) a - Toff) * Real.exp (-ν * s)

      Off every pulse the reference decays toward T_off.

      theorem MindFormal.A1043LongRunAttention.refRet_ge_off {ν ρ Toff Tatt x₀ : ℝ} {V : Set ℝ} (hν : 0 < ν) (hV : V.Countable) (hTo : Toff ≤ Tatt) (hx : Toff ≤ x₀) {t : ℝ} (ht : 0 ≤ t) :
      Toff ≤ refRet ν Toff Tatt x₀ (visitPulse ρ V) t

      The reference stays at or above T_off when it starts there.

      theorem MindFormal.A1043LongRunAttention.refRet_gap {ν ρ Toff Tatt x₀ : ℝ} {V : Set ℝ} (hν : 0 < ν) (hρ : 0 < ρ) (hV : V.Countable) (hsep : ∀ υ ∈ V, ∀ υ' ∈ V, υ ≠ υ' → ρ ≤ |υ - υ'|) {υ υ' : ℝ} (hυ : υ ∈ V) (hυ' : υ' ∈ V) (hlt : υ < υ') (hnone : ∀ w ∈ V, w ∉ Set.Ioo υ υ') :
      refRet ν Toff Tatt x₀ (visitPulse ρ V) υ' - Toff = Real.exp (-ν * (υ' - υ)) * (refRet ν Toff Tatt x₀ (visitPulse ρ V) υ - Toff + (Tatt - Toff) * (Real.exp (ν * ρ) - 1))

      The gap recursion (23). For consecutive visits υ < υ' (none strictly between), at distance d = υ' − υ ≥ ρ, the surplus over T_off obeys z' = e^{−νd}(z + Γ) with Γ = (T_att − T_off)(e^{νρ} − 1).

      theorem MindFormal.A1043LongRunAttention.refRet_first {ν ρ Toff Tatt x₀ : ℝ} {V : Set ℝ} (hν : 0 < ν) (hV : V.Countable) (hV0 : ∀ υ ∈ V, 0 ≤ υ) {υ₁ : ℝ} (h₁ : 0 ≤ υ₁) (hnone : ∀ w ∈ V, w ∉ Set.Ico 0 υ₁) :
      refRet ν Toff Tatt x₀ (visitPulse ρ V) υ₁ - Toff = (x₀ - Toff) * Real.exp (-ν * υ₁)

      The initial wait (24). Before the first visit υ₁ (no visit in [0, υ₁)), the surplus decays from the entering one: x̄(υ₁) − T_off = (x₀ − T_off)e^{−νυ₁}.

      theorem MindFormal.A1043LongRunAttention.refRet_on_ge {ν ρ Toff Tatt x₀ : ℝ} {V : Set ℝ} (hν : 0 < ν) (hV : V.Countable) {υ t : ℝ} (hυ : υ ∈ V) (hυt : υ ≤ t) (htρ : t < υ + ρ) :
      min (refRet ν Toff Tatt x₀ (visitPulse ρ V) υ) Tatt ≤ refRet ν Toff Tatt x₀ (visitPulse ρ V) t

      During a pulse the reference is at least the smaller of its value at the visit and T_att.

      theorem MindFormal.A1043LongRunAttention.refRet_off_ge {ν ρ Toff Tatt x₀ : ℝ} {V : Set ℝ} (hν : 0 < ν) (hV : V.Countable) (hTo : Toff ≤ Tatt) (hx : Toff ≤ x₀) {t w : ℝ} (ht : 0 ≤ t) (htw : t ≤ w) (hoff : ∀ u ∈ Set.Ioo t w, visitPulse ρ V u = 0) :
      refRet ν Toff Tatt x₀ (visitPulse ρ V) w ≤ refRet ν Toff Tatt x₀ (visitPulse ρ V) t

      Off every pulse up to the next visit w (or the horizon), the reference only decays.

      theorem MindFormal.A1043LongRunAttention.separated_finite {ρ : ℝ} {V : Set ℝ} (hρ : 0 < ρ) (hsep : ∀ υ ∈ V, ∀ υ' ∈ V, υ ≠ υ' → ρ ≤ |υ - υ'|) (a b : ℝ) :
      {w : ℝ | w ∈ V ∧ a ≤ w ∧ w ≤ b}.Finite

      Visits inside a bounded window, at least ρ apart, are finitely many.

      theorem MindFormal.A1043LongRunAttention.refRet_retained_iff {ν ρ Toff Tatt x₀ : ℝ} {V : Set ℝ} (hν : 0 < ν) (hρ : 0 < ρ) (hsep : ∀ υ ∈ V, ∀ υ' ∈ V, υ ≠ υ' → ρ ≤ |υ - υ'|) (hV0 : ∀ υ ∈ V, 0 ≤ υ) (hTo : Toff ≤ Tatt) (hx : Toff ≤ x₀) {xneed H : ℝ} (hneed : xneed ≤ Tatt) (hH : 0 ≤ H) :
      (∀ t ∈ Set.Icc 0 H, xneed ≤ refRet ν Toff Tatt x₀ (visitPulse ρ V) t) ↔ (∀ υ ∈ V, υ ∈ Set.Icc 0 H → xneed ≤ refRet ν Toff Tatt x₀ (visitPulse ρ V) υ) ∧ xneed ≤ refRet ν Toff Tatt x₀ (visitPulse ρ V) H

      Retention is decided at the visits and the horizon (the endpoint test). For visits at least ρ apart at nonnegative times, T_off ≤ x₀, T_off ≤ T_att and x_need ≤ T_att, the reference stays at or above x_need on [0, H] exactly when it does so at every visit up to H and at H.

      theorem MindFormal.A1043LongRunAttention.decay_test {ν : ℝ} (hν : 0 < ν) {z zneed d : ℝ} (hz : 0 < z) (hneed : 0 < zneed) :
      zneed ≤ Real.exp (-ν * d) * z ↔ d ≤ ν⁻¹ * Real.log (z / zneed)

      The gap and initial-wait tests (23)–(24). With z_need > 0 and z > 0, a surplus z decays over a gap d to e^{−νd}z ≥ z_need exactly when d ≤ ν⁻¹ log(z/z_need).