Proposition 2.3 -- the coupon collector's expected time
OpenMarkovMixing.coupon_expectationThe expected number of independent uniform draws needed to collect all coupon types is
where is encoded by the tail-sum and is the fraction of draw sequences of length that miss some type.
import Definitions.Def_mm_classical
namespace MarkovMixing
/-- **Proposition 2.3** (LPW): the expected number of uniform draws needed to
collect all `n` coupon types is `n ∑_{k=1}^n 1/k`. -/
theorem coupon_expectation (n : ℕ) (hn : 1 ≤ n) :
couponExpTime n = n * ∑ k ∈ Finset.Icc 1 n, (1 : ℝ) / k := by
sorry
end MarkovMixing
Read-back
What the Lean code literally says, in plain math · claude-fable-5
For every natural number with , the statement asserts the equality of real numbers
where the right-hand side is the natural number (cast to ) times the sum of over the integers in the closed interval (each cast to before taking the reciprocal), and abbreviates the custom quantity couponExpTime n, defined as the infinite series
i.e. (couponMissProb n t) is the number of functions from a -element set to an -element set that fail to be surjective, cast to and divided by the real number . Two conventions of the encoding are worth noting: the infinite sum is Lean's tsum, which equals the limit of the series when the family is summable and is defined to be when it is not summable, so the statement as written equates the right-hand side with in any case where the series fails to converge; and for the counting set consists of the single empty function, which is not surjective onto a nonempty codomain, so for (while avoids division by zero; the hypothesis also rules out the degenerate denominator case with ). No probability-theory structure is involved: the "expected time" is this explicitly defined series of counting ratios, not an expectation with respect to any formal probability measure, and the theorem claims exactly the equality displayed above, for every .
Confirmed by the mission captain (proposal self-audit).