MindFormal v1.0.0One Mind

MindFormal.Chapters.Ch13.ProspectRouting

def MindFormal.Prospect.routingResidual {N : ℕ} {K : Type u_1} [Fintype K] (presence read : Fin N → ℝ) (codes : Finset (Fin N)) (prob : K → ℝ) (standalone : K → Fin N → ℝ) (mass baseline : ℝ) :

PT1.11's complete residual. All contents outside the outcome bank remain.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    theorem MindFormal.Prospect.routing_identity {N : ℕ} {K : Type u_1} [Fintype K] (presence read : Fin N → ℝ) (codes : Finset (Fin N)) (prob V : K → ℝ) (standalone : K → Fin N → ℝ) (mass baseline : ℝ) (h_standalone : ∀ (j : K), ∑ c ∈ codes, standalone j c * read c = V j) :
    ∑ c : Fin N, presence c * read c - baseline - mass * ∑ j : K, prob j * V j = routingResidual presence read codes prob standalone mass baseline
    theorem MindFormal.Prospect.full_routing_iff {N n : ℕ} {K : Type u_1} {T : Type u_2} {Λ : Type u_3} {J : Type u_4} [Fintype K] [Fintype T] (I : EquationInstance N n T Λ J) (s : MindState (Fin N) n T Λ) (projection : T → Fin n → ℝ) (codes : Finset (Fin N)) (prob V : K → ℝ) (standalone : K → Fin N → ℝ) (mass baseline : ℝ) (h_standalone : ∀ (j : K), ∑ c ∈ codes, standalone j c * ∑ a : T, ∑ b : Fin n, projection a b * mindValue s c b a = V j) :
    projectedForecast I projection s = baseline + mass * ∑ j : K, prob j * V j ↔ routingResidual (fun (c : Fin N) => I.presence (mindTrace s c)) (fun (c : Fin N) => ∑ a : T, ∑ b : Fin n, projection a b * mindValue s c b a) codes prob standalone mass baseline = 0

    PT1.11 is a cardinal forecast criterion in both directions, allowing projected cancellation; it does not assume coordinatewise factorization.

    theorem MindFormal.Prospect.finite_prospect_race {N M K : ℕ} (weights : Fin M → Fin N → Fin K → ℝ) (V : Fin K → ℝ) (ν target bar offset χ : ℝ) (deadline : Fin M → ℝ) (hν : 0 < ν) (hT : 0 < target) (hχ : 0 < χ) (hH : ∀ (m : Fin M), 0 ≤ deadline m) (hneed : ∀ (m : Fin M) (i : Fin N), 0 < bar - (offset + χ * ∑ j : Fin K, weights m i j * V j)) :
    have score := fun (m : Fin M) (i : Fin N) => ∑ j : Fin K, weights m i j * V j; have need := fun (m : Fin M) (i : Fin N) => bar - (offset + χ * score m i); (∀ (m : Fin M) (i : Fin N), (∃ t ≤ deadline m, FirstAt (fun (x : Fin N) => referenceActivity ν target 0) (need m) t i) ↔ need m i ≤ referenceActivity ν target 0 (deadline m) ∧ ∀ (j : Fin N), score m j ≤ score m i ∧ (score m j = score m i → i ≤ j)) ∧ (∀ (m : Fin M), (∀ t ∈ Set.Icc 0 (deadline m), ∀ (i : Fin N), referenceActivity ν target 0 t < need m i) ↔ ∀ (i : Fin N), referenceActivity ν target 0 (deadline m) < need m i) ∧ ∀ (m : Fin M) (i j : Fin N), score m j < score m i → need m j < target → passageTime ν target 0 (need m i) < passageTime ν target 0 (need m j)

    PT1.12 across an entire finite menu, with one common positive target, local read and bar. The exact deadline, ties and deferral are retained.

    theorem MindFormal.Prospect.native_score_first_iff {N : ℕ} (f : ℝ → Fin N → ℝ) (bar H : ℝ) (S : NativeSearch (fun (t : ℝ) (i : Fin N) => f t i - bar) f 0 H) (t : ℝ) (i : Fin N) :
    S.event = some (t, i) ↔ t ≤ H ∧ ScoreFirstAt (fun (i : Fin N) (t : ℝ) => f t i) bar t i

    The existing native event and score-first predicate describe the same search, including its deadline. No selection event is assumed.

    theorem MindFormal.Prospect.cumulative_weights (w : ℝ → ℝ) (cum : ℕ → ℝ) (K : ℕ) (hw : Monotone w) (hc : Monotone cum) (h0 : w (cum 0) = 0) :
    (∀ j < K, 0 ≤ w (cum (j + 1)) - w (cum j)) ∧ ∑ j ∈ Finset.range K, (w (cum (j + 1)) - w (cum j)) = w (cum K)

    Cumulative-event increments have nonnegative weights and telescope. The arguments are ordered cumulative probabilities, not separate events.

    theorem MindFormal.Prospect.complete_prospect_comparison {N n M K O : ℕ} {T : Type u_1} {Λ : Type u_2} {J : Type u_3} [Fintype T] [Fintype Λ] (I : EquationInstance N n T Λ J) (port : Fin O ↪o Fin N) (outcomes : Fin M → Fin O → MindState (Fin N) n T Λ) (options : Fin M → MindState (Fin N) n T Λ) (projection : T → Fin n → ℝ) (codes : Finset (Fin N)) (weights : Fin M → Fin O → Fin K → ℝ) (V : Fin K → ℝ) (standalone : Fin K → Fin N → ℝ) (mass baseline offset χ target : ℝ) (u q : Fin M → Fin N → ℝ) (deadline : Fin M → ℝ) (h_standalone : ∀ (m : Fin M) (i : Fin O) (j : Fin K), ∑ c ∈ codes, standalone j c * ∑ a : T, ∑ b : Fin n, projection a b * mindValue (outcomes m i) c b a = V j) (h_routing : ∀ (m : Fin M) (i : Fin O), routingResidual (fun (c : Fin N) => I.presence (mindTrace (outcomes m i) c)) (fun (c : Fin N) => ∑ a : T, ∑ b : Fin n, projection a b * mindValue (outcomes m i) c b a) codes (weights m i) standalone mass baseline = 0) (h_local : ∀ (m : Fin M) (i : Fin O) (x : ℝ), 0 ≤ x → physicalReadReal I.reads.output x (mindValue (options m) (port i)) = x + offset + χ * ∑ j : Fin K, weights m i j * V j) (h_target : ∀ (m : Fin M) (i : Fin O), normalizedTarget I.activity.σ I.activity.g (assembledInputs I.drift (u m) (q m) (options m)) (port i) = target) (hT : 0 < target) (hχ : 0 < χ) (hH : ∀ (m : Fin M), 0 ≤ deadline m) (hneed : ∀ (m : Fin M) (i : Fin O), 0 < I.reads.actionBar - (offset + χ * ∑ j : Fin K, weights m i j * V j)) :
    have score := fun (m : Fin M) (i : Fin O) => ∑ j : Fin K, weights m i j * V j; have need := fun (m : Fin M) (i : Fin O) => I.reads.actionBar - (offset + χ * score m i); have read := fun (m : Fin M) (t : ℝ) (i : Fin O) => referenceActivity I.activity.ν target 0 t + offset + χ * score m i; (∀ (m : Fin M) (i : Fin O), projectedForecast I projection (outcomes m i) = baseline + mass * score m i) ∧ (∀ (m : Fin M) (i : Fin O) (t : ℝ), 0 ≤ t → physicalReadReal I.reads.output (referenceActivity I.activity.ν (normalizedTarget I.activity.σ I.activity.g (assembledInputs I.drift (u m) (q m) (options m)) (port i)) 0 t) (mindValue (options m) (port i)) = read m t i) ∧ (∀ (m : Fin M) (i : Fin O), (∃ t ≤ deadline m, FirstAt (fun (x : Fin O) => referenceActivity I.activity.ν target 0) (need m) t i) ↔ need m i ≤ referenceActivity I.activity.ν target 0 (deadline m) ∧ ∀ (j : Fin O), score m j ≤ score m i ∧ (score m j = score m i → i ≤ j)) ∧ (∀ (m : Fin M), (∀ t ∈ Set.Icc 0 (deadline m), ∀ (i : Fin O), referenceActivity I.activity.ν target 0 t < need m i) ↔ ∀ (i : Fin O), referenceActivity I.activity.ν target 0 (deadline m) < need m i) ∧ (∀ (m : Fin M) (S : NativeSearch (fun (t : ℝ) (i : Fin O) => read m t i - I.reads.actionBar) (read m) 0 (deadline m)) (i : Fin O), (∃ (t : ℝ), S.event = some (t, i)) ↔ need m i ≤ referenceActivity I.activity.ν target 0 (deadline m) ∧ ∀ (j : Fin O), score m j ≤ score m i ∧ (score m j = score m i → i ≤ j)) ∧ (∀ (m : Fin M) (S : NativeSearch (fun (t : ℝ) (i : Fin O) => read m t i - I.reads.actionBar) (read m) 0 (deadline m)), S.event = none ↔ ∀ (i : Fin O), referenceActivity I.activity.ν target 0 (deadline m) < need m i) ∧ (∀ (m : Fin M) (r : ℝ), Nonempty (NativeSearch (fun (t : ℝ) (i : Fin O) => read m t i - I.reads.actionBar) (read m) r (deadline m))) ∧ ∀ (m : Fin M) (r : ℝ) (S : NativeSearch (fun (t : ℝ) (i : Fin O) => read m t i - I.reads.actionBar) (read m) r (deadline m)) (t : ℝ) (i : Fin O), S.event = some (t, i) ↔ r ≤ t ∧ t ≤ deadline m ∧ I.reads.actionBar ≤ read m t i ∧ (∀ (s : ℝ), r ≤ s → s < t → ∀ (j : Fin O), read m s j < I.reads.actionBar) ∧ (∀ (j : Fin O), I.reads.actionBar ≤ read m t j → read m t j ≤ read m t i) ∧ ∀ (j : Fin O), I.reads.actionBar ≤ read m t j → read m t j = read m t i → i ≤ j

    Complete finite PT1.10--12 comparison: independently calibrated outcome banks, zero full routing residual and a separately calibrated local read. The local read, common-target deadline race, deferral and native search's first qualification, maximum and priority are all retained.

    Cumulative mass of an ordered tail (gains) or head (losses). The caller orders gain events from best inward and loss events from worst inward.

    Equations
    Instances For
      theorem MindFormal.Prospect.rank_weight_properties (w : ℝ → ℝ) (p : ℕ → ℝ) (K : ℕ) (hp : ∀ (j : ℕ), 0 ≤ p j) (htotal : cumulativeMass p K ≤ 1) (hw : MonotoneOn w (Set.Icc 0 1)) (hw0 : w 0 = 0) :
      (∀ (j : Fin K), 0 ≤ rankWeight w p j) ∧ ∑ j : Fin K, rankWeight w p j = w (cumulativeMass p K)
      theorem MindFormal.Prospect.cumulative_routing {N n L G : ℕ} {T : Type u_1} {Λ : Type u_2} {J : Type u_3} [Fintype T] (I : EquationInstance N n T Λ J) (s : MindState (Fin N) n T Λ) (projection : T → Fin n → ℝ) (codes : Finset (Fin N)) (pLoss pGain : ℕ → ℝ) (wLoss wGain : ℝ → ℝ) (hpLoss : ∀ (j : ℕ), 0 ≤ pLoss j) (hpGain : ∀ (j : ℕ), 0 ≤ pGain j) (hLoss : cumulativeMass pLoss L ≤ 1) (hGain : cumulativeMass pGain G ≤ 1) (hwLoss : MonotoneOn wLoss (Set.Icc 0 1)) (hwGain : MonotoneOn wGain (Set.Icc 0 1)) (hwLoss0 : wLoss 0 = 0) (hwGain0 : wGain 0 = 0) (V : Fin L ⊕ Fin G → ℝ) (standalone : Fin L ⊕ Fin G → Fin N → ℝ) (mass baseline : ℝ) (h_standalone : ∀ (j : Fin L ⊕ Fin G), ∑ c ∈ codes, standalone j c * ∑ a : T, ∑ b : Fin n, projection a b * mindValue s c b a = V j) :
      have weights := Sum.elim (rankWeight wLoss pLoss) (rankWeight wGain pGain); (∀ (j : Fin L ⊕ Fin G), 0 ≤ weights j) ∧ ∑ j : Fin L, weights (Sum.inl j) = wLoss (cumulativeMass pLoss L) ∧ ∑ j : Fin G, weights (Sum.inr j) = wGain (cumulativeMass pGain G) ∧ (projectedForecast I projection s = baseline + mass * ∑ j : Fin L ⊕ Fin G, weights j * V j ↔ routingResidual (fun (c : Fin N) => I.presence (mindTrace s c)) (fun (c : Fin N) => ∑ a : T, ∑ b : Fin n, projection a b * mindValue s c b a) codes weights standalone mass baseline = 0)

      PT1.10--11 for both signed outcome families at once. Ordered cumulative increments, their total masses, and the full forecast-routing criterion are separate from any acquisition claim. Nothing identifies individual event weights w(p_j) with these rank weights.