MindFormal v1.0.0One Mind

MindFormal.Run.GroupsWorld.NativeTrade

Finite native one-good protocols and their certified survivor bounds. Opportunity certificates contain actual race inequalities and funding; execution and no reversal are proved by the mechanical ledger.

structure MindFormal.GroupsWorld.NativeTradeProtocol {Ω : Type u_1} {J : Type u_2} [mΩ : MeasurableSpace Ω] {N n : Bool → ℕ} {V : Bool → Type u_3} {Λ : Bool → Type u_4} [(a : Bool) → Fintype (V a)] [(a : Bool) → Fintype (Λ a)] {μ : MeasureTheory.Measure Ω} {ℱ : MeasureTheory.Filtration NNReal mΩ} (r : ObservedContinuation μ ℱ Bool N n V Λ J) :
Type u_1
Instances For
    def MindFormal.GroupsWorld.NativeTradeProtocol.state {Ω : Type u_1} {J : Type u_2} [mΩ : MeasurableSpace Ω] {N n : Bool → ℕ} {V : Bool → Type u_3} {Λ : Bool → Type u_4} [(a : Bool) → Fintype (V a)] [(a : Bool) → Fintype (Λ a)] {μ : MeasureTheory.Measure Ω} {ℱ : MeasureTheory.Filtration NNReal mΩ} {r : ObservedContinuation μ ℱ Bool N n V Λ J} (P : NativeTradeProtocol r) :
    ℕ → Ω → GoodHolding
    Equations
    Instances For
      noncomputable def MindFormal.GroupsWorld.NativeTradeProtocol.owner {Ω : Type u_1} {J : Type u_2} [mΩ : MeasurableSpace Ω] {N n : Bool → ℕ} {V : Bool → Type u_3} {Λ : Bool → Type u_4} [(a : Bool) → Fintype (V a)] [(a : Bool) → Fintype (Λ a)] {μ : MeasureTheory.Measure Ω} {ℱ : MeasureTheory.Filtration NNReal mΩ} {r : ObservedContinuation μ ℱ Bool N n V Λ J} (P : NativeTradeProtocol r) (k : ℕ) (ω : Ω) :
      Equations
      Instances For
        theorem MindFormal.GroupsWorld.NativeTradeProtocol.state_funded {Ω : Type u_1} {J : Type u_2} [mΩ : MeasurableSpace Ω] {N n : Bool → ℕ} {V : Bool → Type u_3} {Λ : Bool → Type u_4} [(a : Bool) → Fintype (V a)] [(a : Bool) → Fintype (Λ a)] {μ : MeasureTheory.Measure Ω} {ℱ : MeasureTheory.Filtration NNReal mΩ} {r : ObservedContinuation μ ℱ Bool N n V Λ J} (P : NativeTradeProtocol r) (k : ℕ) (ω : Ω) (a : Bool) :
        0 ≤ (P.state k ω).cash a
        def MindFormal.GroupsWorld.NativeTradeProtocol.Certified {Ω : Type u_1} {J : Type u_2} [mΩ : MeasurableSpace Ω] {N n : Bool → ℕ} {V : Bool → Type u_3} {Λ : Bool → Type u_4} [(a : Bool) → Fintype (V a)] [(a : Bool) → Fintype (Λ a)] {μ : MeasureTheory.Measure Ω} {ℱ : MeasureTheory.Filtration NNReal mΩ} {r : ObservedContinuation μ ℱ Bool N n V Λ J} (P : NativeTradeProtocol r) (failed : ℕ → Set Ω) :

        Both the guard-barrier and actual first-refusal alternatives are native certificates, including all past writes and returned inputs.

        Equations
        Instances For
          theorem MindFormal.GroupsWorld.NativeTradeProtocol.certified_no_reversal {Ω : Type u_1} {J : Type u_2} [mΩ : MeasurableSpace Ω] {N n : Bool → ℕ} {V : Bool → Type u_3} {Λ : Bool → Type u_4} [(a : Bool) → Fintype (V a)] [(a : Bool) → Fintype (Λ a)] {μ : MeasureTheory.Measure Ω} {ℱ : MeasureTheory.Filtration NNReal mΩ} {r : ObservedContinuation μ ℱ Bool N n V Λ J} (P : NativeTradeProtocol r) {failed : ℕ → Set Ω} (h : P.Certified failed) (k : ℕ) (ω : Ω) (hf : ω ∉ failed (k + 1)) (ht : P.owner k ω = true) :
          P.owner (k + 1) ω = true
          theorem MindFormal.GroupsWorld.NativeTradeProtocol.certified_prefix_no_reversal {Ω : Type u_1} {J : Type u_2} [mΩ : MeasurableSpace Ω] {N n : Bool → ℕ} {V : Bool → Type u_3} {Λ : Bool → Type u_4} [(a : Bool) → Fintype (V a)] [(a : Bool) → Fintype (Λ a)] {μ : MeasureTheory.Measure Ω} {ℱ : MeasureTheory.Filtration NNReal mΩ} {r : ObservedContinuation μ ℱ Bool N n V Λ J} (P : NativeTradeProtocol r) {failed : ℕ → Set Ω} (h : P.Certified failed) (k : ℕ) (ω : Ω) (hf : ω ∉ failed (k + 1)) (ht : P.owner k ω = true) (t : NNReal) :
          (TradeTicket.run r (P.cut (k + 1) ω) ω (List.filter (fun (o : TradeTicket N) => decide (o.time ≤ t)) (P.book k ω)) (P.state k ω)).owner = true

          This applies to every intermediate physical-time prefix, rather than only comparing the two ownerships at block endpoints.

          theorem MindFormal.GroupsWorld.NativeTradeProtocol.certified_execution {Ω : Type u_1} {J : Type u_2} [mΩ : MeasurableSpace Ω] {N n : Bool → ℕ} {V : Bool → Type u_3} {Λ : Bool → Type u_4} [(a : Bool) → Fintype (V a)] [(a : Bool) → Fintype (Λ a)] {μ : MeasureTheory.Measure Ω} {ℱ : MeasureTheory.Filtration NNReal mΩ} {r : ObservedContinuation μ ℱ Bool N n V Λ J} (P : NativeTradeProtocol r) {failed : ℕ → Set Ω} (h : P.Certified failed) (k : ℕ) (ω : Ω) (hf : ω ∉ failed (k + 1)) (ho : Nonempty (TradeTicket.Opportunity r (P.cut (k + 1) ω) ω (P.book k ω) (P.state k ω))) :
          P.owner (k + 1) ω = true
          theorem MindFormal.GroupsWorld.NativeTradeProtocol.target_owner_bound {Ω : Type u_1} {J : Type u_2} [mΩ : MeasurableSpace Ω] {N n : Bool → ℕ} {V : Bool → Type u_3} {Λ : Bool → Type u_4} [(a : Bool) → Fintype (V a)] [(a : Bool) → Fintype (Λ a)] {μ : MeasureTheory.Measure Ω} [MeasureTheory.IsProbabilityMeasure μ] {ℱ : MeasureTheory.Filtration NNReal mΩ} {r : ObservedContinuation μ ℱ Bool N n V Λ J} (P : NativeTradeProtocol r) {X : Type u_5} {Mark : Type u_6} [MeasurableSpace X] [MeasurableSpace Mark] [StandardBorelSpace Mark] [Nonempty Mark] (c : r.InputCoding) (enter : ℕ → Ω → X) (marks : ℕ → Ω → Mark) (success : ℕ → Set (OfferRecord Bool N n V Λ Mark)) (entryBefore deadlineClosed : Bool) (failed : ℕ → Set Ω) (p : ℕ → ℝ) (he : ∀ (k : ℕ), Measurable (enter k)) (hm : ∀ (k : ℕ), Measurable (marks k)) (hS : ∀ (k : ℕ), MeasurableSet (success k)) (hE : ∀ (k : ℕ), MeasurableSet (certifiedSurvivor P.owner failed true k)) (hfail : Monotone failed) (hcert : P.Certified failed) (hop : ∀ (k : ℕ), ∀ ω ∉ failed (k + 1), r.offerRecord (P.cut k) (fun (ω : Ω) => ↑(P.cut (k + 1) ω)) (marks k) entryBefore deadlineClosed ω ∈ success k → Nonempty (TradeTicket.Opportunity r (P.cut (k + 1) ω) ω (P.book k ω) (P.state k ω))) (hp : ∀ (k : ℕ), 0 ≤ p k ∧ p k ≤ 1) (hh : ∀ (k : ℕ), ∀ᵐ (ω : Ω) ∂μ, ω ∈ certifiedSurvivor P.owner failed true k → p k ≤ ((r.offerKernel c (enter k) (P.cut k) (fun (ω : Ω) => ↑(P.cut (k + 1) ω)) (marks k) entryBefore deadlineClosed) (enter k ω)).real (success k)) (m : ℕ) {epsilon : ℝ} (hf : μ.real (failed m) ≤ epsilon) :
          μ.real {ω : Ω | P.owner m ω ≠ true} ≤ ∏ k ∈ Finset.range m, (1 - p k) + epsilon

          The success set is read from the actual finite offer record. A certificate supplies native margins on that event, never an executed owner.

          theorem MindFormal.GroupsWorld.NativeTradeProtocol.initial_target_bound {Ω : Type u_1} {J : Type u_2} [mΩ : MeasurableSpace Ω] {N n : Bool → ℕ} {V : Bool → Type u_3} {Λ : Bool → Type u_4} [(a : Bool) → Fintype (V a)] [(a : Bool) → Fintype (Λ a)] {μ : MeasureTheory.Measure Ω} [MeasureTheory.IsProbabilityMeasure μ] {ℱ : MeasureTheory.Filtration NNReal mΩ} {r : ObservedContinuation μ ℱ Bool N n V Λ J} (P : NativeTradeProtocol r) (failed : ℕ → Set Ω) (hfail : Monotone failed) (hcert : P.Certified failed) (hi : ∀ (ω : Ω), (P.initial ω).owner = true) (m : ℕ) {epsilon : ℝ} (hf : μ.real (failed m) ≤ epsilon) :
          μ.real {ω : Ω | P.owner m ω ≠ true} ≤ epsilon