MindFormal v1.0.0One Mind

MindFormal.Chapters.Ch16.MarketMarks

theorem MindFormal.MarketReplay.paidPrice_measurable {A : Type u_1} {Price : Type u_2} {N : A → ℕ} [Finite Price] (price : Price → ℝ) (accept : (a : A) → Fin (N a) → Bool) (offer : Bilateral.Offer A Price) :
Measurable fun (p : Bilateral.Ledger A × ((a : A) → FiniteActionHistory (Fin (N a)))) => Bilateral.paidPrice price offer p.1 accept p.2

A fixed offer's paid-price test is measurable on the actual entering ledger and finite native records, with no independent acceptance flags.

noncomputable def MindFormal.MarketReplay.paidMark {A : Type u_1} {Price : Type u_2} {M : Type u_3} {N : A → ℕ} (price : Price → ℝ) (accept : (a : A) → Fin (N a) → Bool) (m : Memory M A N Price) (h : (a : A) → FiniteActionHistory (Fin (N a))) :
Option Price

The market's paid mark: an offered phase reads the actual bilateral price; every idle phase has no mark. Refusals, absent acts and infeasible offers are already absence in the existing paid-price read.

Equations
Instances For
    theorem MindFormal.MarketReplay.paidMark_measurable {A : Type u_1} {Price : Type u_2} {M : Type u_3} {N : A → ℕ} [Finite A] [MeasurableSpace A] [MeasurableSingletonClass A] [Finite Price] [MeasurableSpace Price] [MeasurableSingletonClass Price] [MeasurableSpace M] (price : Price → ℝ) (accept : (a : A) → Fin (N a) → Bool) :
    Measurable fun (p : Memory M A N Price × ((a : A) → FiniteActionHistory (Fin (N a)))) => paidMark price accept p.1 p.2

    The paid mark is jointly measurable in full memory and native records.

    theorem MindFormal.MarketReplay.paidMark_idle {A : Type u_1} {Price : Type u_2} {M : Type u_3} {N : A → ℕ} (price : Price → ℝ) (accept : (a : A) → Fin (N a) → Bool) (m : Memory M A N Price) (h : (a : A) → FiniteActionHistory (Fin (N a))) {t : NNReal} (hi : m.2.2.1 = Sum.inr t) :
    paidMark price accept m h = none

    Idle steps carry no paid-price mark.

    theorem MindFormal.MarkedMass.option_accepted {Price : Type u_1} [Fintype Price] (M : MarkedMass (Option Price)) :
    M.accepted Option.isSome = ∑ p : Price, M.mass (some p)

    With an optional paid price, accepted mass is precisely the sum of the present-price masses; the absent mark contributes zero.

    theorem MindFormal.MarkedMass.option_price_some {Price : Type u_1} [Fintype Price] [DecidableEq Price] (M : MarkedMass (Option Price)) (p : Price) :
    M.price Option.isSome id (some p) = M.mass (some p) / ∑ q : Price, M.mass (some q)

    The price distribution on the grid is the normalized paid-price mass.

    No accepted probability is assigned to the absent mark.

    theorem MindFormal.MarkedMass.option_mass_eq_accepted {Price : Type u_1} [Fintype Price] [DecidableEq Price] (M : MarkedMass (Option Price)) (p : Price) :
    M.mass (some p) = M.accepted fun (r : Option Price) => decide (r = some p)

    The single-price accepted flag selects exactly its joint mass.

    theorem MindFormal.MarkedMass.option_price_normalized {Price : Type u_1} [Fintype Price] [DecidableEq Price] (M : MarkedMass (Option Price)) (hp : 0 < M.accepted Option.isSome) :
    (∀ (p : Price), 0 ≤ M.price Option.isSome id (some p)) ∧ ∑ p : Price, M.price Option.isSome id (some p) = 1

    Positive accepted mass gives a probability on the price grid itself, by the existing finite-mark normalization, excluding the absent marker.