theorem
MindFormal.LeadConfidence.paired_own_gap
{Ω : Type u_1}
[MeasurableSpace Ω]
{N n : ℕ}
{T : Type u_2}
{Λ : Type u_3}
{J : Type u_4}
[Fintype T]
[Fintype Λ]
[Fintype J]
[DecidableEq J]
(Eh : StateExperiment Ω N n T Λ J)
{Hh : NNReal}
(hHh : Hh ≤ Eh.horizon)
(favh rivh : Fin N)
(jh : J)
(υh : ℝ)
(Rh hh : NNReal)
(hHRh : Hh ≤ Rh)
(hhh : 0 < hh)
(hfrh : favh ≠ rivh)
(hυh : υh ≠ 0)
{ah Xh Xrh Wh vh : ℝ}
(haxh : ah ≤ Xh)
(hxrh : Xh ≤ Xrh)
(Fwh : WriterIndex N n T → ℝ)
(bh Vh : InnovationIndex N n T → ℝ)
(hFh : ∀ (c : WriterIndex N n T), 0 ≤ Fwh c)
(hbh : ∀ (c : InnovationIndex N n T), 0 ≤ bh c)
(hVh : ∀ (c : InnovationIndex N n T), 0 ≤ Vh c)
(hposh : ∀ (c : InnovationIndex N n T), Vh c ≠ 0 → 0 < bh c)
(caph : Set Ω)
(hcapmh : MeasurableSet caph)
{εh : ℝ}
(hcaph : 1 - εh ≤ Eh.ground.μ.real caph)
(readh :
∀ ω ∈ caph,
∀ t ∈ Set.Icc 0 ↑Hh,
∀ i ∈ {favh, rivh},
0 ≤ ((Eh.supportHistory ω).reads.guards false) ((Eh.supportHistory ω).realPath t) i ↔ ah ≤ mindActivity ((Eh.supportHistory ω).state t) i)
(starth : ∀ ω ∈ caph, ∀ i ∈ {favh, rivh}, mindActivity ((Eh.supportHistory ω).state 0) i < ah)
(rstarth : ∀ ω ∈ caph, ∀ (i : Fin N) (l : Λ), mindTrace ((Eh.supportHistory ω).state 0) i l ≤ Xrh)
(xcaph :
∀ ω ∈ caph,
∀ i ∉ {favh, rivh},
max (mindActivity ((Eh.supportHistory ω).state 0) i) (1 - Eh.mind.activity.g) + 2 * bh (Sum.inr i) ≤ Xh)
(coeffh :
∀ ω ∈ caph,
∀ t ≤ Hh,
∀ (s : MindState (Fin N) n T Λ),
InCorridorBox 0 Xh Xrh Wh vh s →
∀ (c : WriterIndex N n T),
|assembledDrift (Eh.supportHistory ω).data ((Eh.supportHistory ω).input ↑t) ((Eh.supportHistory ω).pulse ↑t)
s (writerCoord c)| ≤ Fwh c)
(closeh :
∀ ω ∈ caph,
∀ (c : WriterIndex N n T),
|(Eh.supportHistory ω).state 0 (writerCoord c)| + Fwh c * ↑Hh + bh (Sum.inl c) < writerCap Wh vh c)
(Zbarh dZh : Fin N → ℝ)
(hbarh : ∀ (i : Fin N), 0 ≤ Zbarh i)
(supportsh :
∀ ω ∈ caph,
∀ t ≤ Hh,
∀ (s : MindState (Fin N) n T Λ),
InCorridorBox 0 Xh Xrh Wh vh s →
∀ (i : Fin N),
|assembledInputs (Eh.supportHistory ω).data ((Eh.supportHistory ω).input ↑t)
((Eh.supportHistory ω).pulse ↑t) s i - Zbarh i| ≤ dZh i)
(budgeth :
∀ ω ∈ caph,
∀ (c : InnovationIndex N n T),
Transactions.comparisonBracket Eh (Transactions.coordinateRead (innovationCoord c))
(fun (k : J) => ItoFiltration.constRow Eh.horizon (contrastLoading favh rivh jh υh c k))
(fun (ω : Ω) =>
min ((Eh.supportHistory ω).hitTime false 0) (writerExit Eh.supportHistory writerCoord (writerCap Wh vh) ω))
Hh ω ≤ ENNReal.ofReal (Vh c))
{Sh dh Lh d₀h dTh bresh dreph delayh : ℝ}
(hLh : Lh = 2 * ah - Sh)
(heh : 0 ≤ d₀h)
(hTh : 0 ≤ dTh)
(hresh : 0 ≤ bresh)
(hdreph : 0 ≤ dreph)
(interiorh : 2 * (d₀h + dTh + 2 * bresh) < Lh)
(marginh : Lh + 4 * (d₀h + dTh + 2 * bresh) < Sh)
(enterh : ∀ ω ∈ caph, ∀ i ∈ {favh, rivh}, |mindActivity ((Eh.supportHistory ω).state 0) i - Sh / 2| ≤ d₀h)
(referenceh :
normalizedTarget Eh.mind.activity.σ Eh.mind.activity.g Zbarh favh = (Sh + dh) / 2 ∧ normalizedTarget Eh.mind.activity.σ Eh.mind.activity.g Zbarh rivh = (Sh - dh) / 2)
(targetBillh :
comparisonTargetError Eh.mind.activity.σ Zbarh dZh favh ≤ dTh ∧ comparisonTargetError Eh.mind.activity.σ Zbarh dZh rivh ≤ dTh)
(residualBillh : bh (Sum.inr favh) ≤ bresh ∧ bh (Sum.inr rivh) ≤ bresh)
(excludeh :
∀ ω ∈ caph,
∀ (s : PhysicalState N n T Λ),
InCorridorBox 0 Xh Xrh Wh vh ↑s →
(∀ i ∉ {favh, rivh},
mindActivity (↑s) i ≤ max (mindActivity ((Eh.supportHistory ω).state 0) i)
(normalizedTarget Eh.mind.activity.σ Eh.mind.activity.g Zbarh i + comparisonTargetError Eh.mind.activity.σ Zbarh dZh i) + 2 * bh (Sum.inr i)) →
∀ i ∉ {favh, rivh}, ((Eh.supportHistory ω).reads.guards false) s i < 0)
(sloth : Ω → ℕ)
(ellh : Fin N → ℝ)
(bandh : Set (Fin N))
(Ih : Set ℝ)
(Fh : ℝ → ℝ)
(LFh : NNReal)
(liph : LipschitzOnWith LFh Fh (Set.Ici 0))
(scaleh : Fh Lh ∈ Set.Icc (1 / 2) 1)
(rangeh : ∀ k ∈ bandh, ellh k ∈ Set.Icc (1 / 2) 1)
(binh :
Set.Icc (Fh Lh - (2 * ↑LFh * (d₀h + dTh + 2 * bresh) + dreph))
(Fh Lh + (2 * ↑LFh * (d₀h + dTh + 2 * bresh) + dreph)) ⊆
Ih)
(reporth :
∀ ω ∈ caph,
∀ (t : ℝ) (w : Fin N),
(((Eh.supportHistory ω).native (↑Hh) false).search 0).event = some (t, w) →
w ∈ {favh, rivh} →
∃ (tr : ℝ) (k : Fin N),
Eh.supportRecord Rh false (sloth ω) ω = (tr, Sum.inl k) ∧ k ∈ bandh ∧ t ≤ tr ∧ tr ≤ t + delayh ∧ |ellh k - Fh
|mindActivity ((Eh.supportHistory ω).state t) favh - mindActivity ((Eh.supportHistory ω).state t) rivh|| ≤ dreph)
(slot_measurableh : Measurable sloth)
(bin_measurableh : MeasurableSet Ih)
(pricedh :
min 1 (εh + ∑ c : InnovationIndex N n T, Transactions.bracketPrice (bh c) (Vh c)) + ScalarExit.blockBill Eh.mind.activity.ν dh υh (Lh + 2 * (d₀h + dTh + 2 * bresh)) Hh hh < 1)
(Ee : StateExperiment Ω N n T Λ J)
{He : NNReal}
(hHe : He ≤ Ee.horizon)
(fave rive : Fin N)
(je : J)
(υe : ℝ)
(Re he : NNReal)
(hHRe : He ≤ Re)
(hhe : 0 < he)
(hfre : fave ≠ rive)
(hυe : υe ≠ 0)
{ae Xe Xre We ve : ℝ}
(haxe : ae ≤ Xe)
(hxre : Xe ≤ Xre)
(Fwe : WriterIndex N n T → ℝ)
(be Ve : InnovationIndex N n T → ℝ)
(hFe : ∀ (c : WriterIndex N n T), 0 ≤ Fwe c)
(hbe : ∀ (c : InnovationIndex N n T), 0 ≤ be c)
(hVe : ∀ (c : InnovationIndex N n T), 0 ≤ Ve c)
(hpose : ∀ (c : InnovationIndex N n T), Ve c ≠ 0 → 0 < be c)
(cape : Set Ω)
(hcapme : MeasurableSet cape)
{εe : ℝ}
(hcape : 1 - εe ≤ Ee.ground.μ.real cape)
(reade :
∀ ω ∈ cape,
∀ t ∈ Set.Icc 0 ↑He,
∀ i ∈ {fave, rive},
0 ≤ ((Ee.supportHistory ω).reads.guards false) ((Ee.supportHistory ω).realPath t) i ↔ ae ≤ mindActivity ((Ee.supportHistory ω).state t) i)
(starte : ∀ ω ∈ cape, ∀ i ∈ {fave, rive}, mindActivity ((Ee.supportHistory ω).state 0) i < ae)
(rstarte : ∀ ω ∈ cape, ∀ (i : Fin N) (l : Λ), mindTrace ((Ee.supportHistory ω).state 0) i l ≤ Xre)
(xcape :
∀ ω ∈ cape,
∀ i ∉ {fave, rive},
max (mindActivity ((Ee.supportHistory ω).state 0) i) (1 - Ee.mind.activity.g) + 2 * be (Sum.inr i) ≤ Xe)
(coeffe :
∀ ω ∈ cape,
∀ t ≤ He,
∀ (s : MindState (Fin N) n T Λ),
InCorridorBox 0 Xe Xre We ve s →
∀ (c : WriterIndex N n T),
|assembledDrift (Ee.supportHistory ω).data ((Ee.supportHistory ω).input ↑t) ((Ee.supportHistory ω).pulse ↑t)
s (writerCoord c)| ≤ Fwe c)
(closee :
∀ ω ∈ cape,
∀ (c : WriterIndex N n T),
|(Ee.supportHistory ω).state 0 (writerCoord c)| + Fwe c * ↑He + be (Sum.inl c) < writerCap We ve c)
(Zbare dZe : Fin N → ℝ)
(hbare : ∀ (i : Fin N), 0 ≤ Zbare i)
(supportse :
∀ ω ∈ cape,
∀ t ≤ He,
∀ (s : MindState (Fin N) n T Λ),
InCorridorBox 0 Xe Xre We ve s →
∀ (i : Fin N),
|assembledInputs (Ee.supportHistory ω).data ((Ee.supportHistory ω).input ↑t)
((Ee.supportHistory ω).pulse ↑t) s i - Zbare i| ≤ dZe i)
(budgete :
∀ ω ∈ cape,
∀ (c : InnovationIndex N n T),
Transactions.comparisonBracket Ee (Transactions.coordinateRead (innovationCoord c))
(fun (k : J) => ItoFiltration.constRow Ee.horizon (contrastLoading fave rive je υe c k))
(fun (ω : Ω) =>
min ((Ee.supportHistory ω).hitTime false 0) (writerExit Ee.supportHistory writerCoord (writerCap We ve) ω))
He ω ≤ ENNReal.ofReal (Ve c))
{Se de Le d₀e dTe brese drepe delaye : ℝ}
(hLe : Le = 2 * ae - Se)
(hee : 0 ≤ d₀e)
(hTe : 0 ≤ dTe)
(hrese : 0 ≤ brese)
(hdrepe : 0 ≤ drepe)
(interiore : 2 * (d₀e + dTe + 2 * brese) < Le)
(margine : Le + 4 * (d₀e + dTe + 2 * brese) < Se)
(entere : ∀ ω ∈ cape, ∀ i ∈ {fave, rive}, |mindActivity ((Ee.supportHistory ω).state 0) i - Se / 2| ≤ d₀e)
(referencee :
normalizedTarget Ee.mind.activity.σ Ee.mind.activity.g Zbare fave = (Se + de) / 2 ∧ normalizedTarget Ee.mind.activity.σ Ee.mind.activity.g Zbare rive = (Se - de) / 2)
(targetBille :
comparisonTargetError Ee.mind.activity.σ Zbare dZe fave ≤ dTe ∧ comparisonTargetError Ee.mind.activity.σ Zbare dZe rive ≤ dTe)
(residualBille : be (Sum.inr fave) ≤ brese ∧ be (Sum.inr rive) ≤ brese)
(excludee :
∀ ω ∈ cape,
∀ (s : PhysicalState N n T Λ),
InCorridorBox 0 Xe Xre We ve ↑s →
(∀ i ∉ {fave, rive},
mindActivity (↑s) i ≤ max (mindActivity ((Ee.supportHistory ω).state 0) i)
(normalizedTarget Ee.mind.activity.σ Ee.mind.activity.g Zbare i + comparisonTargetError Ee.mind.activity.σ Zbare dZe i) + 2 * be (Sum.inr i)) →
∀ i ∉ {fave, rive}, ((Ee.supportHistory ω).reads.guards false) s i < 0)
(slote : Ω → ℕ)
(elle : Fin N → ℝ)
(bande : Set (Fin N))
(Ie : Set ℝ)
(Fe : ℝ → ℝ)
(LFe : NNReal)
(lipe : LipschitzOnWith LFe Fe (Set.Ici 0))
(scalee : Fe Le ∈ Set.Icc (1 / 2) 1)
(rangee : ∀ k ∈ bande, elle k ∈ Set.Icc (1 / 2) 1)
(bine :
Set.Icc (Fe Le - (2 * ↑LFe * (d₀e + dTe + 2 * brese) + drepe))
(Fe Le + (2 * ↑LFe * (d₀e + dTe + 2 * brese) + drepe)) ⊆
Ie)
(reporte :
∀ ω ∈ cape,
∀ (t : ℝ) (w : Fin N),
(((Ee.supportHistory ω).native (↑He) false).search 0).event = some (t, w) →
w ∈ {fave, rive} →
∃ (tr : ℝ) (k : Fin N),
Ee.supportRecord Re false (slote ω) ω = (tr, Sum.inl k) ∧ k ∈ bande ∧ t ≤ tr ∧ tr ≤ t + delaye ∧ |elle k - Fe
|mindActivity ((Ee.supportHistory ω).state t) fave - mindActivity ((Ee.supportHistory ω).state t) rive|| ≤ drepe)
(slot_measurablee : Measurable slote)
(bin_measurablee : MeasurableSet Ie)
(pricede :
min 1 (εe + ∑ c : InnovationIndex N n T, Transactions.bracketPrice (be c) (Ve c)) + ScalarExit.blockBill Ee.mind.activity.ν de υe (Le + 2 * (d₀e + dTe + 2 * brese)) He he < 1)
:
have εtotalh :=
min 1 (εh + ∑ c : InnovationIndex N n T, Transactions.bracketPrice (bh c) (Vh c)) + ScalarExit.blockBill Eh.mind.activity.ν dh υh (Lh + 2 * (d₀h + dTh + 2 * bresh)) Hh hh;
have πph :=
min 1
((ScalarExit.probability (Eh.mind.activity.ν / (4 * υh ^ 2)) dh (-Lh - 2 * (d₀h + dTh + 2 * bresh))
(Lh - 2 * (d₀h + dTh + 2 * bresh)) 0 + εtotalh) / (1 - εtotalh));
have Dh :=
Judgment.feeCompleted Eh Rh (fun (x : Ω) => favh) (fun (x : Ω) => rivh) (fun (x : Ω) => 0) sloth bandh delayh ∩ Judgment.feeRating Eh Rh sloth ellh ⁻¹' Ih;
have Ch :=
{ω : Ω | (Judgment.feeAnswerRecord Eh Rh (fun (x : Ω) => favh) (fun (x : Ω) => rivh) (fun (x : Ω) => 0) ω).2 = Sum.inl favh};
have Qh := Judgment.feeRating Eh Rh sloth ellh;
have DQh := (2 * ↑LFh * (d₀h + dTh + 2 * bresh) + dreph + εtotalh / 2) / (1 - εtotalh);
have εtotale :=
min 1 (εe + ∑ c : InnovationIndex N n T, Transactions.bracketPrice (be c) (Ve c)) + ScalarExit.blockBill Ee.mind.activity.ν de υe (Le + 2 * (d₀e + dTe + 2 * brese)) He he;
have πme :=
max 0
(ScalarExit.probability (Ee.mind.activity.ν / (4 * υe ^ 2)) de (-Le + 2 * (d₀e + dTe + 2 * brese))
(Le + 2 * (d₀e + dTe + 2 * brese)) 0 - εtotale);
have De :=
Judgment.feeCompleted Ee Re (fun (x : Ω) => fave) (fun (x : Ω) => rive) (fun (x : Ω) => 0) slote bande delaye ∩ Judgment.feeRating Ee Re slote elle ⁻¹' Ie;
have Ce :=
{ω : Ω | (Judgment.feeAnswerRecord Ee Re (fun (x : Ω) => fave) (fun (x : Ω) => rive) (fun (x : Ω) => 0) ω).2 = Sum.inl fave};
have Qe := Judgment.feeRating Ee Re slote elle;
have DQe := (2 * ↑LFe * (d₀e + dTe + 2 * brese) + drepe + εtotale / 2) / (1 - εtotale);
∀ (m : ℝ),
Fh Lh = Fe Le →
m ≤ πme - πph - DQe - DQh →
0 < Eh.ground.μ.real Dh ∧ 0 < Ee.ground.μ.real De ∧ m ≤ (∫ (ω : Ω) in Dh, Qh ω ∂Eh.ground.μ) / Eh.ground.μ.real Dh - Eh.ground.μ.real (Dh ∩ Ch) / Eh.ground.μ.real Dh - ((∫ (ω : Ω) in De, Qe ω ∂Ee.ground.μ) / Ee.ground.μ.real De - Ee.ground.μ.real (De ∩ Ce) / Ee.ground.μ.real De)
OC1.17 on two original completed experiments. Both interval bounds are proved from their complete coefficient certificates before the strict margin is applied; the actual accuracy or mean gap is never a premise.