(15), p. 14 — random-index weak law of large numbers for the rewards of one arm
ProvedFragileBandit.CauchyTail.random_index_wllnWeak law of large numbers along a random number of plays. Let be any environment, any algorithm and an arm whose number of plays tends to infinity in probability:
Let be measurable and -integrable, and let be the successive rewards of arm . Then for every ,
In the paper this is the step "by (14) and the WLLN" giving (15), with and ; the same step gives on p. 38 and on p. 46. The difficulty is that the policy is adaptive, so the number of terms is a random time depending on the rewards themselves.
Formalization Note The sample average is the sum of over the rounds in which arm was played, divided by ; when Lean's division gives , an event whose probability vanishes under the hypothesis.
Differences from the source:
- generalization: (15): φ = log dP^{µ1}/dP^{µ̃1} under ν̃, with N_1(T)/log T → 1/d_P(µ̃1, µ2) in probability (14) → any environment, algorithm and arm j with N_j(T) → ∞ in probability, and any measurable Q_j-integrable φ; reason: (14) implies N_1(T) → ∞ in probability, and φ = log dP^{µ1}/dP^{µ̃1} is measurable and P^{µ̃1}-integrable with integral −d_P(µ̃1, µ1), so (15) is the special case
- encoding: (1/N_j(T)) Σ_{s=1}^{N_j(T)} φ(X_j(s)) → (Σ over rounds t ≤ T with A(t) = j of φ(Y(t))) / N_j(T), with value 0 when N_j(T) = 0; reason: the rewards of the rounds in which j is played are X_j(1), …, X_j(N_j(T)); the N_j(T) = 0 event has vanishing probability
- encoding: P_νπ on ([K] × ℝ)^∞ (p. 7), events about N_i(T) → banditMeasure ν π T on the histories of the first T rounds (published BanditPolicy), N_i(T) = armPullCount i h; reason: the infinite-horizon law restricted to the first T rounds is exactly banditMeasure ν π T, and N_i(T) depends only on those rounds
import Mathlib import Definitions.Def_FragileBandit_CauchyTail_Setting
namespace FragileBandit.CauchyTail
open MeasureTheory ProbabilityTheory Filter BanditAlgorithm
open scoped ENNReal Topology
/-- Random-index weak law of large numbers ((15), p. 14; "the WLLN for sample means", pp. 38 and 46):
if the number of plays `N_j(T)` of arm `j` tends to infinity in `P_νπ`-probability, then for every
`Q_j`-integrable `φ` the average of `φ` over the rewards of arm `j` up to time `T`,
`(1/N_j(T)) ∑_{s ≤ N_j(T)} φ(X_j(s))`, converges in `P_νπ`-probability to `∫ φ dQ_j`. -/
theorem random_index_wlln {K : ℕ} (ν : StochasticBandit K) (π : BanditPolicy K) (j : Fin K)
(φ : ℝ → ℝ) (hφm : Measurable φ) (hφ : Integrable φ (ν.P j))
(hN : ∀ m : ℕ, Tendsto (fun T : ℕ => banditMeasure ν π T {h | armPullCount j h ≤ m})
atTop (𝓝 0)) :
∀ δ : ℝ, 0 < δ → Tendsto (fun T : ℕ => banditMeasure ν π T
{h | δ < |(∑ t ∈ Finset.univ.filter (fun t : Fin T => (h t).1 = j), φ (h t).2) /
(armPullCount j h : ℝ) - ∫ y, φ y ∂(ν.P j)|}) atTop (𝓝 0) := by sorry
end FragileBandit.CauchyTail
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.