Bandits.UCB.pullCount_arm_le
No docstring.
Bandits.UCB.pullCount_arm_le.{u_1} {K : ℕ} {c : ℝ} {ν : ProbabilityTheory.Kernel (Fin K) ℝ} {Ω : Type u_1} {A : ℕ → Ω → Fin K} {R : ℕ → Ω → ℝ} {n : ℕ} {ω : Ω} [Nonempty (Fin K)] (hc : 0 ≤ c) (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 ω) (h_gap_pos : 0 < gap ν (A n ω)) (h_pull_pos : 0 < Learning.pullCount A (A n ω) n ω) : ↑(Learning.pullCount A (A n ω) n ω) ≤ 8 * c * Real.log (↑n + 1) / gap ν (A n ω) ^ 2Bandits.UCB.pullCount_arm_le.{u_1} {K : ℕ} {c : ℝ} {ν : ProbabilityTheory.Kernel (Fin K) ℝ} {Ω : Type u_1} {A : ℕ → Ω → Fin K} {R : ℕ → Ω → ℝ} {n : ℕ} {ω : Ω} [Nonempty (Fin K)] (hc : 0 ≤ c) (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 ω) (h_gap_pos : 0 < gap ν (A n ω)) (h_pull_pos : 0 < Learning.pullCount A (A n ω) n ω) : ↑(Learning.pullCount A (A n ω) n ω) ≤ 8 * c * Real.log (↑n + 1) / gap ν (A n ω) ^ 2
Code
lemma pullCount_arm_le [Nonempty (Fin K)] (hc : 0 ≤ c)
(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 ω)
(h_gap_pos : 0 < gap ν (A n ω)) (h_pull_pos : 0 < pullCount A (A n ω) n ω) :
pullCount A (A n ω) n ω ≤ 8 * c * log (n + 1) / gap ν (A n ω) ^ 2Proof
by
have h_gap_le := gap_arm_le_two_mul_ucbWidth h_best h_arm h_le
rw [ucbWidth] at h_gap_le
have h2 : (gap ν (A n ω)) ^ 2 ≤ (2 * √(2 * c * log (n + 1) / pullCount A (A n ω) n ω)) ^ 2 := by
gcongr
rw [mul_pow, sq_sqrt] at h2
· have : (2 : ℝ) ^ 2 = 4 := by norm_num
rw [this] at h2
field_simp at h2 ⊢
grind
· have : 0 ≤ log (n + 1) := by simp [log_nonneg]
positivityActions: 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, 94 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.