LeanMachineLearning

Bandits.UCB.gap_arm_le_two_mul_ucbWidth🔗

Lemma

No docstring.

🔗theorem
Bandits.UCB.gap_arm_le_two_mul_ucbWidth.{u_1} {K : } {c : } {ν : ProbabilityTheory.Kernel (Fin K) } {Ω : Type u_1} {A : Ω Fin K} {R : Ω } {n : } {ω : Ω} [Nonempty (Fin K)] (h_best : (x : ), id x ν (bestArm ν) Learning.empMean A R (bestArm ν) n ω + ucbWidth A c (bestArm ν) n ω) (h_arm : Learning.empMean A R (A n ω) n ω - ucbWidth A c (A n ω) n ω (x : ), id x ν (A n ω)) (h_le : Learning.empMean A R (bestArm ν) n ω + ucbWidth A c (bestArm ν) n ω Learning.empMean A R (A n ω) n ω + ucbWidth A c (A n ω) n ω) : gap ν (A n ω) 2 * ucbWidth A c (A n ω) n ω
Bandits.UCB.gap_arm_le_two_mul_ucbWidth.{u_1} {K : } {c : } {ν : ProbabilityTheory.Kernel (Fin K) } {Ω : Type u_1} {A : Ω Fin K} {R : Ω } {n : } {ω : Ω} [Nonempty (Fin K)] (h_best : (x : ), id x ν (bestArm ν) Learning.empMean A R (bestArm ν) n ω + ucbWidth A c (bestArm ν) n ω) (h_arm : Learning.empMean A R (A n ω) n ω - ucbWidth A c (A n ω) n ω (x : ), id x ν (A n ω)) (h_le : Learning.empMean A R (bestArm ν) n ω + ucbWidth A c (bestArm ν) n ω Learning.empMean A R (A n ω) n ω + ucbWidth A c (A n ω) n ω) : gap ν (A n ω) 2 * ucbWidth A c (A n ω) n ω

Code

lemma gap_arm_le_two_mul_ucbWidth [Nonempty (Fin K)]
    (h_best : (ν (bestArm ν))[id] ≤ empMean A R (bestArm ν) n ω + ucbWidth A c (bestArm ν) n ω)
    (h_arm : empMean A R (A n ω) n ω - ucbWidth A c (A n ω) n ω ≤ (ν (A n ω))[id])
    (h_le : empMean A R (bestArm ν) n ω + ucbWidth A c (bestArm ν) n ω ≤
      empMean A R (A n ω) n ω + ucbWidth A c (A n ω) n ω) :
    gap ν (A n ω) ≤ 2 * ucbWidth A c (A n ω) n ω
Proof
by
  rw [gap_eq_bestArm_sub, sub_le_iff_le_add']
  calc (ν (bestArm ν))[id]
  _ ≤ empMean A R (bestArm ν) n ω + ucbWidth A c (bestArm ν) n ω := h_best
  _ ≤ empMean A R (A n ω) n ω + ucbWidth A c (A n ω) n ω := h_le
  _ ≤ (ν (A n ω))[id] + 2 * ucbWidth A c (A n ω) n ω := by
    rw [two_mul, ← add_assoc]
    gcongr
    rwa [sub_le_iff_le_add] at h_arm

Actions: Source · Open Issue

Meaning last changed in v4.34.0-rc2-14-gf86702d (2026-08-25), the 3th 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: 6 project declarations, 85 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.