LeanMachineLearning

Bandits.ETC.arm_mul๐Ÿ”—

Lemma

The arm pulled at time K * m is the arm with the highest empirical mean after the exploration phase.

๐Ÿ”—theorem
Bandits.ETC.arm_mul.{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 : โ„• โ†’ ฮฉ โ†’ โ„} [Nonempty (Fin K)] (h : Learning.IsAlgEnvSeq A R (etcAlgorithm hK m) (Learning.stationaryEnv ฮฝ) P) (hm : m โ‰  0) : A (K * m) =แต[P] fun ฯ‰ => argmax (Learning.empMean' (K * m - 1) (Learning.history A R (K * m - 1) ฯ‰))
Bandits.ETC.arm_mul.{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 : โ„• โ†’ ฮฉ โ†’ โ„} [Nonempty (Fin K)] (h : Learning.IsAlgEnvSeq A R (etcAlgorithm hK m) (Learning.stationaryEnv ฮฝ) P) (hm : m โ‰  0) : A (K * m) =แต[P] fun ฯ‰ => argmax (Learning.empMean' (K * m - 1) (Learning.history A R (K * m - 1) ฯ‰))

Code

lemma arm_mul [Nonempty (Fin K)]
    (h : IsAlgEnvSeq A R (etcAlgorithm hK m) (stationaryEnv ฮฝ) P) (hm : m โ‰  0) :
    A (K * m) =แต[P]
      fun ฯ‰ โ†ฆ argmax (empMean' (K * m - 1) (history A R (K * m - 1) ฯ‰))
Proof
by
  have : K * m = (K * m - 1) + 1 := by
    have : 0 < K * m := Nat.mul_pos hK hm.bot_lt
    grind
  rw [this]
  filter_upwards [arm_ae_eq_etcNextArm h (K * m - 1)] with ฯ‰ hn_eq
  rw [hn_eq, nextArm, dite_eq_right (by simp), dite_eq_left rfl]
  exact this โ–ธ rfl

Actions: 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: 16 project declarations, 110 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.