LeanMachineLearning

Learning.RoundRobin.pullCount_mul๐Ÿ”—

Lemma

At time K * m, the number of times each action is chosen is equal to m.

๐Ÿ”—theorem
Learning.RoundRobin.pullCount_mul.{u_1, u_2} {๐“จ : Type u_1} {m๐“จ : MeasurableSpace ๐“จ} {K : โ„•} {hK : 0 < K} {ฮฝ : ProbabilityTheory.Kernel (Fin K) ๐“จ} [ProbabilityTheory.IsMarkovKernel ฮฝ] {ฮฉ : Type u_2} {mฮฉ : MeasurableSpace ฮฉ} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsProbabilityMeasure P] {A : โ„• โ†’ ฮฉ โ†’ Fin K} {Y : โ„• โ†’ ฮฉ โ†’ ๐“จ} (m : โ„•) (h : IsAlgEnvSeqUntil A Y (roundRobinAlgorithm hK) (stationaryEnv ฮฝ) P (K * m - 1)) (a : Fin K) : pullCount A a (K * m) =แต[P] fun x => m
Learning.RoundRobin.pullCount_mul.{u_1, u_2} {๐“จ : Type u_1} {m๐“จ : MeasurableSpace ๐“จ} {K : โ„•} {hK : 0 < K} {ฮฝ : ProbabilityTheory.Kernel (Fin K) ๐“จ} [ProbabilityTheory.IsMarkovKernel ฮฝ] {ฮฉ : Type u_2} {mฮฉ : MeasurableSpace ฮฉ} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsProbabilityMeasure P] {A : โ„• โ†’ ฮฉ โ†’ Fin K} {Y : โ„• โ†’ ฮฉ โ†’ ๐“จ} (m : โ„•) (h : IsAlgEnvSeqUntil A Y (roundRobinAlgorithm hK) (stationaryEnv ฮฝ) P (K * m - 1)) (a : Fin K) : pullCount A a (K * m) =แต[P] fun x => m

Code

lemma pullCount_mul (m : โ„•)
    (h : IsAlgEnvSeqUntil A Y (roundRobinAlgorithm hK) (stationaryEnv ฮฝ) P (K * m - 1))
    (a : Fin K) :
    pullCount A a (K * m) =แต[P] fun _ โ†ฆ m
Proof
by
  rw [Filter.EventuallyEq]
  simp_rw [pullCount_eq_sum]
  have h_arm (n : range (K * m)) : A n =แต[P] fun _ โ†ฆ โŸจn % K, Nat.mod_lt _ hKโŸฉ :=
    action_ae_eq n (h.mono (by have := n.2; simp only [mem_range] at this; grind))
  simp_rw [Filter.EventuallyEq, โ† ae_all_iff] at h_arm
  filter_upwards [h_arm] with ฯ‰ h_arm
  have h_arm' {i : โ„•} (hi : i โˆˆ range (K * m)) : A i ฯ‰ = โŸจi % K, Nat.mod_lt _ hKโŸฉ := h_arm โŸจi, hiโŸฉ
  calc (โˆ‘ s โˆˆ range (K * m), if A s ฯ‰ = a then 1 else 0)
  _ = (โˆ‘ s โˆˆ range (K * m), if โŸจs % K, Nat.mod_lt _ hKโŸฉ = a then 1 else 0) :=
    sum_congr rfl fun s hs โ†ฆ by rw [h_arm' hs]
  _ = m := sum_mod_range_mul hK m a

Actions: Source ยท Open Issue

Meaning last changed in v4.34.0-rc2-1-g439785b (2026-08-23), the 4th 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: 10 project declarations, 68 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.