Bandits.ETC.pullCount_of_ge
For n โฅ K * m, the number of pulls of each arm a at time n is equal to m plus
n - K * m if arm a is the best arm after the exploration phase.
Bandits.ETC.pullCount_of_ge.{u_1} {K : โ} {hK : 0 < K} {m : โ} {ฮฝ : ProbabilityTheory.Kernel (Fin K) โ} [ProbabilityTheory.IsMarkovKernel ฮฝ] {ฮฉ : Type u_1} {mฮฉ : MeasurableSpace ฮฉ} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsProbabilityMeasure P] {A : โ โ ฮฉ โ Fin K} {R : โ โ ฮฉ โ โ} (h : Learning.IsAlgEnvSeq A R (etcAlgorithm hK m) (Learning.stationaryEnv ฮฝ) P) (a : Fin K) (hm : m โ 0) {n : โ} (hn : K * m โค n) : Learning.pullCount A a n =แต[P] fun ฯ => m + (n - K * m) * Set.indicator {ฯ' | A (K * m) ฯ' = a} (fun x => 1) ฯBandits.ETC.pullCount_of_ge.{u_1} {K : โ} {hK : 0 < K} {m : โ} {ฮฝ : ProbabilityTheory.Kernel (Fin K) โ} [ProbabilityTheory.IsMarkovKernel ฮฝ] {ฮฉ : Type u_1} {mฮฉ : MeasurableSpace ฮฉ} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsProbabilityMeasure P] {A : โ โ ฮฉ โ Fin K} {R : โ โ ฮฉ โ โ} (h : Learning.IsAlgEnvSeq A R (etcAlgorithm hK m) (Learning.stationaryEnv ฮฝ) P) (a : Fin K) (hm : m โ 0) {n : โ} (hn : K * m โค n) : Learning.pullCount A a n =แต[P] fun ฯ => m + (n - K * m) * Set.indicator {ฯ' | A (K * m) ฯ' = a} (fun x => 1) ฯ
Code
lemma pullCount_of_ge (h : IsAlgEnvSeq A R (etcAlgorithm hK m) (stationaryEnv ฮฝ) P)
(a : Fin K) (hm : m โ 0) {n : โ} (hn : K * m โค n) :
pullCount A a n
=แต[P] fun ฯ โฆ m + (n - K * m) * {ฯ' | A (K * m) ฯ' = a}.indicator (fun _ โฆ 1) ฯProof
by
have h_ae n : K * m โค n โ pullCount A a (n + 1)
=แต[P] fun ฯ โฆ pullCount A a n ฯ + {ฯ' | A (K * m) ฯ' = a}.indicator (fun _ โฆ 1) ฯ :=
pullCount_add_one_of_ge h a hm
simp_rw [Filter.EventuallyEq, โ ae_all_iff] at h_ae
have h_ae_Km : pullCount A a (K * m) =แต[P] fun _ โฆ m := pullCount_mul h a
filter_upwards [h_ae_Km, h_ae] with ฯ h_Km h_ae
induction n, hn using Nat.le_induction with
| base => simp [h_Km]
| succ n hmn h_ind =>
rw [h_ae n hmn, h_ind, add_assoc, โ add_one_mul]
congr
grindActions: Source ยท Open Issue
Meaning last changed in v4.34.0-rc2-14-gf86702d (2026-08-25), the 5th recorded change.
Self-contained, with its dependencies inlined and proofs replaced by sorry: download the raw file ยท open it in the Lean web editor.
Dependency graph
Audit surface: 17 project declarations, 117 external constants
โ Proved: no sorry anywhere in its closure
This is the tool's own reading of one build's recorded axioms, and it is not robust against an author who wants it to pass. Checking meant to be relied on should go through Comparator, which replays the proof through the kernel from an export against an explicit list of permitted axioms.