Expected time saved per hit:
ProvedSpecActions.expected_saving_per_hitLet be the speculator's latency and the real API call's latency, independent. When a guess is correct the block of two consecutive steps finishes at instead of , so the time saved is . Its expectation is
for all . The statement is the iterated integral against the two exponential densities; since the asserted value is strictly positive, a proof must establish integrability rather than appeal to the convention that a non-integrable integral is zero.
import Definitions.Def_SpecActions_model
import Definitions.Def_SpecActions_model
import Mathlib.Analysis.SpecialFunctions.Integrals.Basic
import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic
namespace SpecActions
theorem expected_saving_per_hit (α β : ℝ) (hα : 0 < α) (hβ : 0 < β) :
∫ b in Set.Ioi (0:ℝ),
(∫ a in (0:ℝ)..b, (b - a) * (α * Real.exp (-α * a)))
* (β * Real.exp (-β * b))
= α / (β * (α + β)) := by sorry
end SpecActions
Read-back
What the Lean code literally says, in plain math · claude-opus-5
Read-back — SpecActions.expected_saving_per_hit.
The declaration asserts a single equality between two real numbers, parametrized by two real numbers and that are supplied explicitly, together with two hypotheses, namely and . No further assumption is made: in particular no ordering between and is imposed (they may be equal, and either may be the larger), and no integrability hypothesis is assumed. Under those two positivity hypotheses the claim is
Reading the two integrals precisely: the outer one is the Lebesgue (Bochner) integral of a real-valued function of the variable over the open half-line — the point is excluded, and the ambient measure is Lebesgue measure on ; the integrand at a given is the product of two factors, the first being the inner integral evaluated at that same , the second being . The inner one is an oriented interval integral in the variable from the lower limit to the upper limit , i.e. when and when ; because the outer variable ranges only over strictly positive reals, only the first case is ever reached inside this statement, so the inner integral is the ordinary integral of over , on which the factor is non-negative. The exponents are and respectively, and the multiplicative prefactors and sit inside the respective integrands.
Two conventions are silently in force and are not excluded by any hypothesis. First, both the interval integral and the outer set integral are defined to be whenever the integrand fails to be integrable; the equality asserted is the equality of the resulting real numbers under whichever case actually obtains, since nothing in the statement requires either integrand to be integrable. Second, division on the reals is total, so the right-hand side would still denote a real number even if its denominator vanished; here the hypotheses and force and , hence , so no junk value of division is invoked and the right-hand side is the genuine quotient .
The hypotheses are simultaneously satisfiable (for instance ), so the claim is not vacuous. The statement is purely an identity of real numbers about exponential-type integrands: it introduces no probability space, no random variables, no distributions, and no notion of expectation, latency, saving, or hit, and it uses none of the definitions from the accompanying bundle — the only notions appearing are the real exponential function, the interval integral, the Lebesgue integral over , and field operations on . Nothing is asserted for non-positive or .
Confirmed by the mission captain (proposal self-audit).