BanditRLlib
Lean gate passed before this site build; local proof declarations are shown as compiled.Lean-verified build · exact declarations linked.

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

Declarations
12
Placeholders
0

Imports

BanditRLProof.Algorithms.UCB

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 identitydeclaration:BanditRLProof.MOSS.logPlus

Reading 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 identitydeclaration:BanditRLProof.MOSS.radius

Reading 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 identitydeclaration:BanditRLProof.MOSS.index

Reading 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 identitydeclaration:BanditRLProof.MOSS.action

Reading 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 identitydeclaration:BanditRLProof.MOSS.logPlus_nonneg

Reading 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 identitydeclaration:BanditRLProof.MOSS.radius_nonneg

Reading 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 identitydeclaration:BanditRLProof.MOSS.radius_zero

Reading 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 identitydeclaration:BanditRLProof.MOSS.radius_sq

Reading 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 identitydeclaration:BanditRLProof.MOSS.action_of_lt

Reading 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 identitydeclaration:BanditRLProof.MOSS.action_initial_arm

Reading 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 identitydeclaration:BanditRLProof.MOSS.action_index_max

Reading 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 identitydeclaration:BanditRLProof.MOSS.selected_index_gt_mean_add_half_gap

Reading 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