theorem
MindFormal.DescribedChoice.cash_instrument_price_native
{Ω : Type u_1}
[MeasurableSpace Ω]
{N n : ℕ}
{T : Type u_2}
{Λ : Type u_3}
{J : Type u_4}
[Fintype T]
[Fintype Λ]
[Fintype J]
(E : StateExperiment Ω N n T Λ J)
(M : ℕ)
(endTime : NNReal)
(hend : endTime ≤ E.horizon)
(H : Fin M → NNReal)
(cap : ℕ → NNReal)
(hcap0 : cap 0 = 0)
(hcap : ∀ (k : Fin M), cap ↑k + H k ≤ endTime)
(hstep : ∀ (k : Fin M), cap ↑k + H k ≤ cap (↑k + 1))
(R : (k : Fin M) → Ω → FrozenReference E.mind.drift (H k))
(A : Fin M → Set Ω)
(hA : ∀ (k : Fin M), MeasurableSet (A k))
(ε : Fin M → ℝ)
(hε : ∀ (k : Fin M), 1 - ε k ≤ E.ground.μ.real (A k))
(d0 b L residual inputBill room : Fin M → ℝ)
(range : Fin M → NNReal)
(hrange : ∀ (k : Fin M), 0 < range k)
(hd0 : ∀ (k : Fin M), 0 ≤ d0 k)
(hb : ∀ (k : Fin M), 0 < b k)
(hL : ∀ (k : Fin M), 0 ≤ L k)
(hresidual : ∀ (k : Fin M), 0 ≤ residual k)
(hinputBill : ∀ (k : Fin M), 0 ≤ inputBill k)
(hinitial : ∀ (h : 0 < M), ∀ ω ∈ A ⟨0, h⟩, ‖(E.supportHistory ω).state 0 - ↑(R ⟨0, h⟩ ω).start‖ ≤ d0 ⟨0, h⟩)
(hcarry :
∀ (k : Fin M) (hk : ↑k + 1 < M),
∀ ω ∈ A ⟨↑k + 1, hk⟩,
∀ (t : ↑(HorizonTime ↑(H k))),
↑(queryCutValue E (↑k + 1) ω) = ↑(queryCutValue E (↑k) ω) + ↑t →
∀ (x : PhysicalState N n T Λ),
‖↑x - (R k ω).path t‖ ≤ errorSize (d0 k) (b k) (residual k) (inputBill k) (L k) (H k) →
‖↑x - ↑(R ⟨↑k + 1, hk⟩ ω).start‖ ≤ d0 ⟨↑k + 1, hk⟩)
(m : Fin M → Ω → ℝ → ℝ)
(hm : ∀ (k : Fin M), ∀ ω ∈ A k, IntervalIntegrable (m k ω) MeasureTheory.volume 0 ↑(H k))
(hbudget :
∀ (k : Fin M), ∀ ω ∈ A k, ∀ (t : ↑(HorizonTime ↑(H k))), ∫ (s : ℝ) in 0..↑t, m k ω s ≤ residual k + inputBill k)
(hlocal :
∀ (k : Fin M),
∀ ω ∈ A k,
∀ (hist : FiniteActionHistory (Fin N)),
ChronologicalHistory hist →
∀ (t : ↑(HorizonTime ↑(H k))) (x : PhysicalState N n T Λ),
‖↑x - (R k ω).path t‖ ≤ room k →
∀ (q : Fin N → ℝ),
(∀ (i : Fin N), q i ∈ {0, 1}) →
‖assembledDrift E.mind.drift (strictPastInput E.world.world (↑(queryCutValue E (↑k) ω) + ↑t) hist ω) q
↑x - frozenForcing E.mind.drift ⋯ (R k ω).input (R k ω).mode (R k ω).path ↑t‖ ≤ L k * ‖↑x - (R k ω).path t‖ + m k ω ↑t)
(hgeometry :
∀ (k : Fin M),
∀ ω ∈ A k, ∀ (t : ↑(HorizonTime ↑(H k))), room k + ‖(R k ω).path t - ↑(R k ω).start‖ + d0 k < ↑(range k))
(G : Fin M → innovationIndex N n T → ℝ)
(hV : ∀ (k : Fin M) (i : innovationIndex N n T), 0 < G k i)
(hloading :
∀ (k : Fin M),
∀ ω ∈ A k,
∀ (s0 : PhysicalState N n T Λ),
‖↑s0 - ↑(R k ω).start‖ ≤ d0 k →
∀ (x : NNReal → PhysicalState N n T Λ) (hist : NNReal → FiniteActionHistory (Fin N)),
(∀ (s : NNReal), ChronologicalHistory (hist s)) →
∀ (q : NNReal → Fin N → ℝ),
(∀ (s : NNReal) (i : Fin N), q s i ∈ {0, 1}) →
∀ (i : innovationIndex N n T),
∫⁻ (s : NNReal) in Set.Ioc 0 E.horizon, if ↑(queryCutValue E (↑k) ω) < ↑s ∧ ↑s ≤ ↑(queryCutValue E (↑k) ω) + ↑(H k) ∧ ‖↑(x s) - ↑s0‖ ≤ ↑(range k) then
∑ j : J,
‖E.mind.amplitude (↑(x s), strictPastInput E.world.world (↑s) (hist s) ω, q s)
(innovationRow i) j‖ₑ ^ 2
else 0 ∂MathFin.ItoIntegralL2.timeMeasure ≤ ENNReal.ofReal (G k i))
(hroom : ∀ (k : Fin M), errorSize (d0 k) (b k) (residual k) (inputBill k) (L k) (H k) < room k)
(LO : Fin M → ℝ)
(hLO : ∀ (k : Fin M), 0 ≤ LO k)
(hread :
∀ (k : Fin M),
∀ ω ∈ A k,
∀ (t : ↑(HorizonTime ↑(H k))) (x : PhysicalState N n T Λ),
‖↑x - (R k ω).path t‖ ≤ room k →
∀ (i : Fin N),
|(E.mind.reads.scores false) x i - referenceScore E (R k ω) t i| ≤ LO k * ‖↑x - (R k ω).path t‖)
{C : Type u_5}
(port : Fin M → Fin 2 ↪ Fin N)
(cell : Fin M → C)
(amount : Fin M → Ω → ℝ)
(F : C → Ω → ℝ → ℝ)
(Q : C → Ω → ℝ)
(e : C → ℝ)
(χ : Fin M → Ω → ℝ)
(hχ : ∀ (k : Fin M) (ω : Ω), 0 < χ k ω)
(hports : ∀ (k : Fin M) (i : Fin 2), E.mind.reads.outputs ((port k) i) = true)
(hcontrast :
∀ (k : Fin M),
∀ ω ∈ A k,
∀ (t : ↑(HorizonTime ↑(H k))),
referenceScore E (R k ω) t ((port k) 0) - referenceScore E (R k ω) t ((port k) 1) = χ k ω * (Q (cell k) ω - F (cell k) ω (amount k ω)))
(hband :
∀ (k : Fin M),
∀ ω ∈ A k, 2 * (LO k * errorSize (d0 k) (b k) (residual k) (inputBill k) (L k) (H k)) ≤ χ k ω * e (cell k))
(hdeadline :
∀ (k : Fin M),
∀ ω ∈ A k,
E.mind.reads.actionBar ≤ max (referenceScore E (R k ω) ⟨↑(H k), ⋯⟩ ((port k) 0)) (referenceScore E (R k ω) ⟨↑(H k), ⋯⟩ ((port k) 1)) - LO k * errorSize (d0 k) (b k) (residual k) (inputBill k) (L k) (H k))
(hoffmenu :
∀ (k : Fin M),
∀ ω ∈ A k,
∀ (t : ↑(HorizonTime ↑(H k))) (i : Fin N),
i ≠ (port k) 0 →
i ≠ (port k) 1 →
E.mind.reads.outputs i = true →
referenceScore E (R k ω) t i + LO k * errorSize (d0 k) (b k) (residual k) (inputBill k) (L k) (H k) < E.mind.reads.actionBar)
(heligible : ∀ (k : Fin M), queryPause E ↑k ≤ ↑(H k))
(B : Set Ω)
(hB : MeasurableSet B)
(εinstrument : ℝ)
(hBprob : 1 - εinstrument ≤ E.ground.μ.real B)
(decode : C → Ω → (Fin M → Fin N ⊕ Unit) → Option ℝ)
(lo hi : C → Ω → ℝ)
(grid tolerance : C → ℝ)
(represented : C → Ω → Set ℝ)
(hleft : ∀ (k : Fin M) (ω : Ω), amount k ω < lo (cell k) ω → F (cell k) ω (amount k ω) < Q (cell k) ω - e (cell k))
(hright : ∀ (k : Fin M) (ω : Ω), hi (cell k) ω < amount k ω → Q (cell k) ω + e (cell k) < F (cell k) ω (amount k ω))
(hsound :
∀ ω ∈ B,
∀ (word : Fin M → Fin N ⊕ Unit) (c : C) (r : ℝ),
decode c ω word = some r →
∃ (a : Fin M) (b : Fin M),
cell a = c ∧ cell b = c ∧ amount a ω ≤ amount b ω ∧ (word a = Sum.inl ((port a) 0)) ≠ (word b = Sum.inl ((port b) 0)) ∧ amount b ω - amount a ω + tolerance c ≤ grid c ∧ r ∈ Set.Icc (amount a ω - tolerance c) (amount b ω + tolerance c) ∧ r ∈ represented c ω)
(htotal :
∀ ω ∈ B,
∀ (word : Fin M → Fin N ⊕ Unit) (c : C),
(∃ (a : Fin M) (b : Fin M),
cell a = c ∧ cell b = c ∧ amount a ω ≤ amount b ω ∧ word a = Sum.inl ((port a) 0) ∧ word b = Sum.inl ((port b) 1)) →
∃ (r : ℝ), decode c ω word = some r)
(sign : C → ℝ)
(hsign : ∀ (c : C), |sign c| = 1)
(root slope : C → Ω → ℝ)
:
∃ (good : Set Ω),
MeasurableSet good ∧ good ⊆ B ∧ 1 - min 1 (∑ k : Fin M, min 1 (ε k + excursionBill (b k) (G k) (H k))) - εinstrument ≤ E.ground.μ.real good ∧ ∀ ω ∈ good,
(∀ (k : Fin M),
(∃ (t : ℝ) (j : Fin 2), E.supportRecord endTime false (↑k) ω = (t, Sum.inl ((port k) j))) ∧ (F (cell k) ω (amount k ω) < Q (cell k) ω - e (cell k) →
(E.supportRecord endTime false (↑k) ω).2 = Sum.inl ((port k) 0)) ∧ (Q (cell k) ω + e (cell k) < F (cell k) ω (amount k ω) →
(E.supportRecord endTime false (↑k) ω).2 = Sum.inl ((port k) 1))) ∧ (∀ (c : C) (r : ℝ),
(decode c ω fun (k : Fin M) => (E.supportRecord endTime false (↑k) ω).2) = some r →
r ∈ Set.Icc (lo c ω - grid c) (hi c ω + grid c) ∩ represented c ω ∧ (lo c ω = root c ω - e c / slope c ω ∧ hi c ω = root c ω + e c / slope c ω →
|sign c * r - sign c * root c ω| ≤ e c / slope c ω + grid c)) ∧ ∀ (c : C),
(∃ (a : Fin M) (b : Fin M),
cell a = c ∧ cell b = c ∧ amount a ω ≤ amount b ω ∧ F c ω (amount a ω) < Q c ω - e c ∧ Q c ω + e c < F c ω (amount b ω)) →
∃ (r : ℝ), (decode c ω fun (k : Fin M) => (E.supportRecord endTime false (↑k) ω).2) = some r
FF1.4 and the four signed directions for a finite family. The external decoder is specified only by its finite switch and tolerance semantics, on arbitrary words; its native accuracy is proved. A returned amount is enclosed even for a nonmonotone complete comparator with multiple roots. Without a represented bracket the optional output retains censoring.
theorem
MindFormal.DescribedChoice.cash_instrument_native
{Ω : Type u_1}
[MeasurableSpace Ω]
{N n : ℕ}
{T : Type u_2}
{Λ : Type u_3}
{J : Type u_4}
[Fintype T]
[Fintype Λ]
[Fintype J]
(E : StateExperiment Ω N n T Λ J)
(M : ℕ)
(endTime : NNReal)
(hend : endTime ≤ E.horizon)
(H : Fin M → NNReal)
(cap : ℕ → NNReal)
(hcap0 : cap 0 = 0)
(hcap : ∀ (k : Fin M), cap ↑k + H k ≤ endTime)
(hstep : ∀ (k : Fin M), cap ↑k + H k ≤ cap (↑k + 1))
(R : (k : Fin M) → Ω → FrozenReference E.mind.drift (H k))
(A : Fin M → Set Ω)
(hA : ∀ (k : Fin M), MeasurableSet (A k))
(ε : Fin M → ℝ)
(hε : ∀ (k : Fin M), 1 - ε k ≤ E.ground.μ.real (A k))
(d0 b L residual inputBill room : Fin M → ℝ)
(range : Fin M → NNReal)
(hrange : ∀ (k : Fin M), 0 < range k)
(hd0 : ∀ (k : Fin M), 0 ≤ d0 k)
(hb : ∀ (k : Fin M), 0 < b k)
(hL : ∀ (k : Fin M), 0 ≤ L k)
(hresidual : ∀ (k : Fin M), 0 ≤ residual k)
(hinputBill : ∀ (k : Fin M), 0 ≤ inputBill k)
(hinitial : ∀ (h : 0 < M), ∀ ω ∈ A ⟨0, h⟩, ‖(E.supportHistory ω).state 0 - ↑(R ⟨0, h⟩ ω).start‖ ≤ d0 ⟨0, h⟩)
(hcarry :
∀ (k : Fin M) (hk : ↑k + 1 < M),
∀ ω ∈ A ⟨↑k + 1, hk⟩,
∀ (t : ↑(HorizonTime ↑(H k))),
↑(queryCutValue E (↑k + 1) ω) = ↑(queryCutValue E (↑k) ω) + ↑t →
∀ (x : PhysicalState N n T Λ),
‖↑x - (R k ω).path t‖ ≤ errorSize (d0 k) (b k) (residual k) (inputBill k) (L k) (H k) →
‖↑x - ↑(R ⟨↑k + 1, hk⟩ ω).start‖ ≤ d0 ⟨↑k + 1, hk⟩)
(m : Fin M → Ω → ℝ → ℝ)
(hm : ∀ (k : Fin M), ∀ ω ∈ A k, IntervalIntegrable (m k ω) MeasureTheory.volume 0 ↑(H k))
(hbudget :
∀ (k : Fin M), ∀ ω ∈ A k, ∀ (t : ↑(HorizonTime ↑(H k))), ∫ (s : ℝ) in 0..↑t, m k ω s ≤ residual k + inputBill k)
(hlocal :
∀ (k : Fin M),
∀ ω ∈ A k,
∀ (hist : FiniteActionHistory (Fin N)),
ChronologicalHistory hist →
∀ (t : ↑(HorizonTime ↑(H k))) (x : PhysicalState N n T Λ),
‖↑x - (R k ω).path t‖ ≤ room k →
∀ (q : Fin N → ℝ),
(∀ (i : Fin N), q i ∈ {0, 1}) →
‖assembledDrift E.mind.drift (strictPastInput E.world.world (↑(queryCutValue E (↑k) ω) + ↑t) hist ω) q
↑x - frozenForcing E.mind.drift ⋯ (R k ω).input (R k ω).mode (R k ω).path ↑t‖ ≤ L k * ‖↑x - (R k ω).path t‖ + m k ω ↑t)
(hgeometry :
∀ (k : Fin M),
∀ ω ∈ A k, ∀ (t : ↑(HorizonTime ↑(H k))), room k + ‖(R k ω).path t - ↑(R k ω).start‖ + d0 k < ↑(range k))
(G : Fin M → innovationIndex N n T → ℝ)
(hV : ∀ (k : Fin M) (i : innovationIndex N n T), 0 < G k i)
(hloading :
∀ (k : Fin M),
∀ ω ∈ A k,
∀ (s0 : PhysicalState N n T Λ),
‖↑s0 - ↑(R k ω).start‖ ≤ d0 k →
∀ (x : NNReal → PhysicalState N n T Λ) (hist : NNReal → FiniteActionHistory (Fin N)),
(∀ (s : NNReal), ChronologicalHistory (hist s)) →
∀ (q : NNReal → Fin N → ℝ),
(∀ (s : NNReal) (i : Fin N), q s i ∈ {0, 1}) →
∀ (i : innovationIndex N n T),
∫⁻ (s : NNReal) in Set.Ioc 0 E.horizon, if ↑(queryCutValue E (↑k) ω) < ↑s ∧ ↑s ≤ ↑(queryCutValue E (↑k) ω) + ↑(H k) ∧ ‖↑(x s) - ↑s0‖ ≤ ↑(range k) then
∑ j : J,
‖E.mind.amplitude (↑(x s), strictPastInput E.world.world (↑s) (hist s) ω, q s)
(innovationRow i) j‖ₑ ^ 2
else 0 ∂MathFin.ItoIntegralL2.timeMeasure ≤ ENNReal.ofReal (G k i))
(hroom : ∀ (k : Fin M), errorSize (d0 k) (b k) (residual k) (inputBill k) (L k) (H k) < room k)
(LO : Fin M → ℝ)
(hLO : ∀ (k : Fin M), 0 ≤ LO k)
(hread :
∀ (k : Fin M),
∀ ω ∈ A k,
∀ (t : ↑(HorizonTime ↑(H k))) (x : PhysicalState N n T Λ),
‖↑x - (R k ω).path t‖ ≤ room k →
∀ (i : Fin N),
|(E.mind.reads.scores false) x i - referenceScore E (R k ω) t i| ≤ LO k * ‖↑x - (R k ω).path t‖)
{C : Type u_5}
(port : Fin M → Fin 2 ↪ Fin N)
(cell : Fin M → C)
(amount : Fin M → Ω → ℝ)
(F : C → Ω → ℝ → ℝ)
(Q : C → Ω → ℝ)
(e : C → ℝ)
(χ : Fin M → Ω → ℝ)
(hχ : ∀ (k : Fin M) (ω : Ω), 0 < χ k ω)
(hports : ∀ (k : Fin M) (i : Fin 2), E.mind.reads.outputs ((port k) i) = true)
(hcontrast :
∀ (k : Fin M),
∀ ω ∈ A k,
∀ (t : ↑(HorizonTime ↑(H k))),
referenceScore E (R k ω) t ((port k) 0) - referenceScore E (R k ω) t ((port k) 1) = χ k ω * (Q (cell k) ω - F (cell k) ω (amount k ω)))
(hband :
∀ (k : Fin M),
∀ ω ∈ A k, 2 * (LO k * errorSize (d0 k) (b k) (residual k) (inputBill k) (L k) (H k)) ≤ χ k ω * e (cell k))
(hdeadline :
∀ (k : Fin M),
∀ ω ∈ A k,
E.mind.reads.actionBar ≤ max (referenceScore E (R k ω) ⟨↑(H k), ⋯⟩ ((port k) 0)) (referenceScore E (R k ω) ⟨↑(H k), ⋯⟩ ((port k) 1)) - LO k * errorSize (d0 k) (b k) (residual k) (inputBill k) (L k) (H k))
(hoffmenu :
∀ (k : Fin M),
∀ ω ∈ A k,
∀ (t : ↑(HorizonTime ↑(H k))) (i : Fin N),
i ≠ (port k) 0 →
i ≠ (port k) 1 →
E.mind.reads.outputs i = true →
referenceScore E (R k ω) t i + LO k * errorSize (d0 k) (b k) (residual k) (inputBill k) (L k) (H k) < E.mind.reads.actionBar)
(heligible : ∀ (k : Fin M), queryPause E ↑k ≤ ↑(H k))
(B : Set Ω)
(hB : MeasurableSet B)
(εinstrument : ℝ)
(hBprob : 1 - εinstrument ≤ E.ground.μ.real B)
(decode : C → Ω → (Fin M → Fin N ⊕ Unit) → Option ℝ)
(lo hi : C → Ω → ℝ)
(grid tolerance : C → ℝ)
(represented : C → Ω → Set ℝ)
(hleft : ∀ (k : Fin M) (ω : Ω), amount k ω < lo (cell k) ω → F (cell k) ω (amount k ω) < Q (cell k) ω - e (cell k))
(hright : ∀ (k : Fin M) (ω : Ω), hi (cell k) ω < amount k ω → Q (cell k) ω + e (cell k) < F (cell k) ω (amount k ω))
(hsound :
∀ ω ∈ B,
∀ (word : Fin M → Fin N ⊕ Unit) (c : C) (r : ℝ),
decode c ω word = some r →
∃ (a : Fin M) (b : Fin M),
cell a = c ∧ cell b = c ∧ amount a ω ≤ amount b ω ∧ (word a = Sum.inl ((port a) 0)) ≠ (word b = Sum.inl ((port b) 0)) ∧ amount b ω - amount a ω + tolerance c ≤ grid c ∧ r ∈ Set.Icc (amount a ω - tolerance c) (amount b ω + tolerance c) ∧ r ∈ represented c ω)
(htotal :
∀ ω ∈ B,
∀ (word : Fin M → Fin N ⊕ Unit) (c : C),
(∃ (a : Fin M) (b : Fin M),
cell a = c ∧ cell b = c ∧ amount a ω ≤ amount b ω ∧ word a = Sum.inl ((port a) 0) ∧ word b = Sum.inl ((port b) 1)) →
∃ (r : ℝ), decode c ω word = some r)
(sign : C → ℝ)
(hsign : ∀ (c : C), |sign c| = 1)
(root slope mean : C → Ω → ℝ)
(seeking : C → Bool)
(hdirection :
∀ (c : C) (ω : Ω),
∀ r ∈ Set.Icc (lo c ω - grid c) (hi c ω + grid c) ∩ represented c ω,
(seeking c = true → mean c ω < sign c * r) ∧ (seeking c = false → sign c * r < mean c ω))
:
∃ (good : Set Ω),
MeasurableSet good ∧ good ⊆ B ∧ 1 - min 1 (∑ k : Fin M, min 1 (ε k + excursionBill (b k) (G k) (H k))) - εinstrument ≤ E.ground.μ.real good ∧ ∀ ω ∈ good,
(∀ (k : Fin M),
(∃ (t : ℝ) (j : Fin 2), E.supportRecord endTime false (↑k) ω = (t, Sum.inl ((port k) j))) ∧ (F (cell k) ω (amount k ω) < Q (cell k) ω - e (cell k) →
(E.supportRecord endTime false (↑k) ω).2 = Sum.inl ((port k) 0)) ∧ (Q (cell k) ω + e (cell k) < F (cell k) ω (amount k ω) →
(E.supportRecord endTime false (↑k) ω).2 = Sum.inl ((port k) 1))) ∧ (∀ (c : C) (r : ℝ),
(decode c ω fun (k : Fin M) => (E.supportRecord endTime false (↑k) ω).2) = some r →
r ∈ Set.Icc (lo c ω - grid c) (hi c ω + grid c) ∩ represented c ω ∧ (lo c ω = root c ω - e c / slope c ω ∧ hi c ω = root c ω + e c / slope c ω →
|sign c * r - sign c * root c ω| ≤ e c / slope c ω + grid c) ∧ (seeking c = true → mean c ω < sign c * r) ∧ (seeking c = false → sign c * r < mean c ω)) ∧ ∀ (c : C),
(∃ (a : Fin M) (b : Fin M),
cell a = c ∧ cell b = c ∧ amount a ω ≤ amount b ω ∧ F c ω (amount a ω) < Q c ω - e c ∧ Q c ω + e c < F c ω (amount b ω)) →
∃ (r : ℝ), (decode c ω fun (k : Fin M) => (E.supportRecord endTime false (↑k) ω).2) = some r
L55: the native price/inverse-interval certificate uses only price controls. The side of a mean is applied separately by the original directional wrapper.