Lean module · Foundations
BanditRLProof.Algorithms.MOSS
Algorithm 7 in Lattimore--Szepesvari, *Bandit Algorithms*, uses a horizon dependent, realized-pull-count index. These definitions keep its factor four and log-plus truncation. They do not yet construct a stochastic history law or prove Theorem 9.1's regret bound.
Module map
Imports
Imported by
BanditRLProof.Algorithms.MOSSConstants, BanditRLProof.Algorithms.MOSSHistory, BanditRLProof.Algorithms.MOSSPeeling
Declarations
Open an item to read its exact compact statement and source link. Detailed teaching notes are linked when registered.
def
BanditRLProof.MOSS.logPlus
Compiled
Source convention `log max {1,x}`.
Used in these reading views: Bandit Book
1. Finite bandits, traces, and regret
Canonical node identity
declaration:BanditRLProof.MOSS.logPlusReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
noncomputable def logPlus (x : ℝ) : ℝ
def
BanditRLProof.MOSS.radius
Compiled
Source confidence radius at sample count `s`. Real division totalizes `s=0`; the post-initialization algorithm must be used on positive counts.
Used in these reading views: Bandit Book
1. Finite bandits, traces, and regret
Canonical node identity
declaration:BanditRLProof.MOSS.radiusReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
noncomputable def radius (n k s : ℕ) : ℝ
def
BanditRLProof.MOSS.index
Compiled
Source index for arbitrary current empirical means and pull counts.
Used in these reading views: Bandit Book
1. Finite bandits, traces, and regret
Canonical node identity
declaration:BanditRLProof.MOSS.indexReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
noncomputable def index {k : ℕ} (n : ℕ) (empiricalMean : Fin k → ℝ) (pulls : Fin k → ℕ) (a : Fin k) : ℝ
def
BanditRLProof.MOSS.action
Compiled
Zero-based Algorithm 7 action: first each arm once, then a real argmax. This accepts a state; consistency of that state with past feedback is a separate history-level obligation.
Used in these reading views: Bandit Book
1. Finite bandits, traces, and regret
Canonical node identity
declaration:BanditRLProof.MOSS.actionReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
noncomputable def action {k : ℕ} (hk : 0 < k) (n t : ℕ) (empiricalMean : Fin k → ℝ) (pulls : Fin k → ℕ) : Fin k
theorem
BanditRLProof.MOSS.logPlus_nonneg
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
Used in these reading views: Bandit Book
1. Finite bandits, traces, and regret
Canonical node identity
declaration:BanditRLProof.MOSS.logPlus_nonnegReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem logPlus_nonneg (x : ℝ) : 0 ≤ logPlus x
theorem
BanditRLProof.MOSS.radius_nonneg
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
Used in these reading views: Bandit Book
1. Finite bandits, traces, and regret
Canonical node identity
declaration:BanditRLProof.MOSS.radius_nonnegReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem radius_nonneg (n k s : ℕ) : 0 ≤ radius n k s
theorem
BanditRLProof.MOSS.radius_zero
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
Used in these reading views: Bandit Book
1. Finite bandits, traces, and regret
Canonical node identity
declaration:BanditRLProof.MOSS.radius_zeroReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
@[simp] theorem radius_zero (n k : ℕ) : radius n k 0 = 0
theorem
BanditRLProof.MOSS.radius_sq
Compiled
Exact squared source radius, including the totalized zero-count branch.
Used in these reading views: Bandit Book
1. Finite bandits, traces, and regret
Canonical node identity
declaration:BanditRLProof.MOSS.radius_sqReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem radius_sq (n k s : ℕ) : radius n k s ^ 2 = 4 / (s : ℝ) * logPlus ((n : ℝ) / ((k : ℝ) * (s : ℝ)))
theorem
BanditRLProof.MOSS.action_of_lt
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
Used in these reading views: Bandit Book
1. Finite bandits, traces, and regret
Canonical node identity
declaration:BanditRLProof.MOSS.action_of_ltReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
@[simp] theorem action_of_lt {k : ℕ} (hk : 0 < k) (n t : ℕ) (empiricalMean : Fin k → ℝ) (pulls : Fin k → ℕ) (ht : t < k) : action hk n t empiricalMean pulls = ⟨t, ht⟩
theorem
BanditRLProof.MOSS.action_initial_arm
Compiled
Initialization selects each source arm at its own zero-based time.
Used in these reading views: Bandit Book
1. Finite bandits, traces, and regret
Canonical node identity
declaration:BanditRLProof.MOSS.action_initial_armReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem action_initial_arm {k : ℕ} (hk : 0 < k) (n : ℕ) (empiricalMean : Fin k → ℝ) (pulls : Fin k → ℕ) (a : Fin k) : action hk n a.val empiricalMean pulls = a
theorem
BanditRLProof.MOSS.action_index_max
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
Used in these reading views: Bandit Book
1. Finite bandits, traces, and regret
Canonical node identity
declaration:BanditRLProof.MOSS.action_index_maxReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem action_index_max {k : ℕ} (hk : 0 < k) (n t : ℕ) (empiricalMean : Fin k → ℝ) (pulls : Fin k → ℕ) (ht : k ≤ t) (a : Fin k) : index n empiricalMean pulls a ≤ index n empiricalMean pulls (action hk n t empiricalMean pulls)
theorem
BanditRLProof.MOSS.selected_index_gt_mean_add_half_gap
Compiled
The large-gap selection implication in the proof of Theorem 9.1. The optimism-deficit bound is explicit and is not a concentration theorem.
Used in these reading views: Bandit Book
1. Finite bandits, traces, and regret · Chapter 13: Lower Bounds: Basic Ideas
Canonical node identity
declaration:BanditRLProof.MOSS.selected_index_gt_mean_add_half_gapReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem selected_index_gt_mean_add_half_gap {k : ℕ} (hk : 0 < k) (n t : ℕ) (mean empiricalMean : Fin k → ℝ) (pulls : Fin k → ℕ) (best chosen : Fin k) (deficit : ℝ) (ht : k ≤ t) (hselected : action hk n t empiricalMean pulls = chosen) (hoptimism : mean best - deficit ≤ index n empiricalMean pulls best) (hgap : 2 * deficit < mean best - mean chosen) : mean chosen + (mean best - mean chosen) / 2 < index n empiricalMean pulls chosen