Proposition 1 — exact expected runtime ratio and limit
ProvedSpecActionsProb.Latency.proposition_1Suppose each of independent branches is correct with probability , the speculator latency has rate , and the real-call latency has rate . All guesses and latencies are mutually independent. Put . For every horizon , the expected runtimes of the Appendix A speculative and sequential executions satisfy
As , this ratio converges to . The result identifies the finite-horizon and limiting latency savings for an execution model built from random calls.
Formalization Note The ratio uses integrals of the random runtimes, not expressions defined to equal those integrals. The restriction makes the denominator positive. Windows use zero-based indices; a hit costs and consumes the following window. The page's and hypotheses are retained. Concurrency without interference and negligible transition and parameter-construction costs are part of the runtime model.
import Mathlib import Definitions.Def_SpecActionsProb_Latency_Model set_option autoImplicit false
namespace SpecActionsProb.Latency
open MeasureTheory ProbabilityTheory
/-- Proposition 1, p. 5: exact finite horizon ratio and its limit for the random runtimes. -/
theorem proposition_1 {Ω : Type*} [MeasurableSpace Ω] (P : Measure Ω) [IsProbabilityMeasure P]
(k : ℕ) (α β p : ℝ) (hβ : 0 < β) (hβα : β < α) (hp0 : 0 < p) (hp1 : p ≤ 1)
(X : Idx k → Ω → ℝ) (hX : IsSpecModel P k α β p X) :
let pk : ℝ := 1 - (1 - p) ^ k
(∀ T : ℕ, 1 ≤ T →
(∫ ω, specRuntime X T ω ∂P) / (∫ ω, seqRuntime X T ω ∂P)
= 1 - 1 / (T : ℝ) * (α / (α + β)) *
(((T : ℝ) - 1) * pk / (1 + pk) + pk ^ 2 / (1 + pk) ^ 2
- pk ^ 2 / (1 + pk) ^ 2 * (-pk) ^ (T - 1))) ∧
Filter.Tendsto (fun T : ℕ => (∫ ω, specRuntime X T ω ∂P) / (∫ ω, seqRuntime X T ω ∂P))
Filter.atTop (nhds (1 - pk / (1 + pk) * (α / (α + β)))) := by sorry
end SpecActionsProb.Latency
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.