MindFormal v1.0.0One Mind

MindFormal.Run.A595Trade.PriceWaiting

noncomputable def MindFormal.A595Trade.Protocol.missingCost {Ω : Type u_1} {J : Type u_2} [mΩ : MeasurableSpace Ω] {N : ℕ} {M n : Fin N → ℕ} {V : Fin N → Type u_3} {Λ : Fin N → Type u_4} [(a : Fin N) → Fintype (V a)] [(a : Fin N) → Fintype (Λ a)] {μ : MeasureTheory.Measure Ω} {ℱ : MeasureTheory.Filtration NNReal mΩ} {r : GroupsWorld.ObservedContinuation μ ℱ (Fin N) M n V Λ J} (P : Protocol r) (K m : ℕ) (ω : Ω) :
Equations
Instances For
    theorem MindFormal.A595Trade.Protocol.missingCost_zero {Ω : Type u_1} {J : Type u_2} [mΩ : MeasurableSpace Ω] {N : ℕ} {M n : Fin N → ℕ} {V : Fin N → Type u_3} {Λ : Fin N → Type u_4} [(a : Fin N) → Fintype (V a)] [(a : Fin N) → Fintype (Λ a)] {μ : MeasureTheory.Measure Ω} {ℱ : MeasureTheory.Filtration NNReal mΩ} {r : GroupsWorld.ObservedContinuation μ ℱ (Fin N) M n V Λ J} (P : Protocol r) {K : ℕ} (hK : K ≤ N) (ω : Ω) (hc : (P.initial ω).holders.card = K) (m : ℕ) :
    P.missingCost K m ω = 0 ↔ P.holdings m ω = top N K
    theorem MindFormal.A595Trade.Protocol.missingCost_step {Ω : Type u_1} {J : Type u_2} [mΩ : MeasurableSpace Ω] {N : ℕ} {M n : Fin N → ℕ} {V : Fin N → Type u_3} {Λ : Fin N → Type u_4} [(a : Fin N) → Fintype (V a)] [(a : Fin N) → Fintype (Λ a)] {μ : MeasureTheory.Measure Ω} {ℱ : MeasureTheory.Filtration NNReal mΩ} {r : GroupsWorld.ObservedContinuation μ ℱ (Fin N) M n V Λ J} (P : Protocol r) {K : ℕ} (m : ℕ) (ω : Ω) (hd : ∀ o ∈ P.book m ω, ∀ (z : Ledger N), o.Legal (P.histories m ω) z → ↑o.seller ∉ top N K ∧ ↑o.buyer ∈ top N K) :
    P.missingCost K (m + 1) ω ≤ P.missingCost K m ω ∧ (P.missingCost K (m + 1) ω < P.missingCost K m ω ↔ P.holdings (m + 1) ω ≠ P.holdings m ω)
    theorem MindFormal.A595Trade.Protocol.price_trials {Ω : Type u_1} {J : Type u_2} [mΩ : MeasurableSpace Ω] {N : ℕ} {M n : Fin N → ℕ} {V : Fin N → Type u_3} {Λ : Fin N → Type u_4} [(a : Fin N) → Fintype (V a)] [(a : Fin N) → Fintype (Λ a)] {μ : MeasureTheory.Measure Ω} {ℱ : MeasureTheory.Filtration NNReal mΩ} {r : GroupsWorld.ObservedContinuation μ ℱ (Fin N) M n V Λ J} (P : Protocol r) {K : ℕ} (hK : K ≤ N) (hc : ∀ (ω : Ω), (P.initial ω).holders.card = K) (failed : ℕ → Set Ω) (hd : ∀ (j : ℕ), ∀ ω ∉ failed (j + 1), ∀ o ∈ P.book j ω, ∀ (z : Ledger N), o.Legal (P.histories j ω) z → ↑o.seller ∉ top N K ∧ ↑o.buyer ∈ top N K) (j : ℕ) :
    costTrials (P.missingCost K) failed j = terminatedTrials N K P.holdings failed j
    theorem MindFormal.A595Trade.Protocol.price_finite {Ω : Type u_1} {J : Type u_2} [mΩ : MeasurableSpace Ω] {N : ℕ} {M n : Fin N → ℕ} {V : Fin N → Type u_3} {Λ : Fin N → Type u_4} [(a : Fin N) → Fintype (V a)] [(a : Fin N) → Fintype (Λ a)] {μ : MeasureTheory.Measure Ω} [MeasureTheory.IsProbabilityMeasure μ] {ℱ : MeasureTheory.Filtration NNReal mΩ} {r : GroupsWorld.ObservedContinuation μ ℱ (Fin N) M n V Λ J} (P : Protocol r) {K Q : ℕ} (hK : K ≤ N) (hc : ∀ (ω : Ω), (P.initial ω).holders.card = K) (failed : ℕ → Set Ω) (hf : Monotone failed) (hd : ∀ (j : ℕ), ∀ ω ∉ failed (j + 1), ∀ o ∈ P.book j ω, ∀ (z : Ledger N), o.Legal (P.histories j ω) z → ↑o.seller ∉ top N K ∧ ↑o.buyer ∈ top N K) (hQ : ∀ (ω : Ω), P.missingCost K 0 ω = Q) (past : ℕ → MeasurableSpace Ω) (hsub : ∀ (j : ℕ), past j ≤ mΩ) (hm : Monotone past) (hknown : ∀ (j : ℕ), MeasurableSet (terminatedTrials N K P.holdings failed j)) (hstop : ∀ (j : ℕ), MeasurableSet {ω : Ω | P.holdings j ω = top N K ∨ ω ∈ failed j}) (p : ℕ → ℝ) (hp : ∀ (j : ℕ), 0 ≤ p j ∧ p j ≤ 1) (hl : ∀ (j : ℕ), ∀ᵐ (ω : Ω) ∂μ, P.holdings j ω ≠ top N K → ω ∉ failed j → p j ≤ μ[(terminatedTrials N K P.holdings failed j).indicator 1 | past j] ω) (m : ℕ) {ε : ℝ} (hfail : μ.real (failed m) ≤ ε) :
    μ.real {ω : Ω | P.holdings m ω ≠ top N K} ≤ min 1 (bernoulliTail p m Q + ε)
    theorem MindFormal.A595Trade.Protocol.price_expected {Ω : Type u_1} {J : Type u_2} [mΩ : MeasurableSpace Ω] {N : ℕ} {M n : Fin N → ℕ} {V : Fin N → Type u_3} {Λ : Fin N → Type u_4} [(a : Fin N) → Fintype (V a)] [(a : Fin N) → Fintype (Λ a)] {μ : MeasureTheory.Measure Ω} [MeasureTheory.IsProbabilityMeasure μ] {ℱ : MeasureTheory.Filtration NNReal mΩ} {r : GroupsWorld.ObservedContinuation μ ℱ (Fin N) M n V Λ J} (P : Protocol r) {K Q : ℕ} (hK : K ≤ N) (hc : ∀ (ω : Ω), (P.initial ω).holders.card = K) (hd : ∀ (j : ℕ) (ω : Ω), ∀ o ∈ P.book j ω, ∀ (z : Ledger N), o.Legal (P.histories j ω) z → ↑o.seller ∉ top N K ∧ ↑o.buyer ∈ top N K) (hQ : ∀ᵐ (ω : Ω) ∂μ, P.missingCost K 0 ω = Q) (past : ℕ → MeasurableSpace Ω) (hsub : ∀ (j : ℕ), past j ≤ mΩ) (hu : ∀ (j : ℕ), MeasurableSet {ω : Ω | P.holdings j ω ≠ top N K}) (hm : ∀ (j : ℕ), MeasurableSet {ω : Ω | P.holdings (j + 1) ω ≠ P.holdings j ω}) {p : ℝ} (hp : 0 < p) (hl : ∀ (j : ℕ), ∀ᵐ (ω : Ω) ∂μ, P.holdings j ω ≠ top N K → p ≤ μ[{ω : Ω | P.holdings (j + 1) ω ≠ P.holdings j ω}.indicator 1 | past j] ω) :
    ∫⁻ (ω : Ω), SparseAgreement.extendedWait (fun (j : ℕ) => {ω : Ω | P.holdings j ω ≠ top N K}) ω ∂μ ≤ ENNReal.ofReal (↑Q / p)