Bandit Book
Ten core teaching routes plus source Chapters 13–17. Broader Bandit classification, techniques, theorem-level bounds and research frontiers are separate linked views rather than pseudo-chapters.
Bandit Algorithms
Verified bandit and reinforcement-learning theory in Lean
Learn bandit and reinforcement-learning theory beside its compiled Lean interfaces, search exact declarations, and contribute one reviewable lemma at a time.
Paper. ABRL: A Target-Faithful Autoformalization Harness and Lean 4 Library for Bandit and Reinforcement Learning Theory
GitHub repository ↗Compare minimax frontiersLocal experimental workspace
Choose your path
Books · shared Lean foundations
Each book is a reading view of one Lean library. Source mapping and local proof status remain explicit.
Ten core teaching routes plus source Chapters 13–17. Broader Bandit classification, techniques, theorem-level bounds and research frontiers are separate linked views rather than pseudo-chapters.
Bandit Algorithms
A dedicated RL reading view. Existing finite-horizon material is available; mapping the new source is planned.
Reinforcement Learning: Theory and Algorithms
Convex optimization and regret minimization. Existing EXP3/FTRL routes are shared references; adjacent online-learning frontier questions are indexed separately from core Bandit/RL open problems.
Online Learning: A Modern Introduction Using Convex Optimization
Reserved for a dedicated conformal prediction curriculum. Source selection and theorem mapping await review.
Source selection pending
Chapter-by-chapter source spine · Chapters 13–17
Follow the proof technology from basic lower-bound ideas through information theory, minimax bounds, instance-dependent bounds, and high-probability bounds. Each chapter links its exact source scope to Lean declarations.
T_i ≤ n/2, and Theorem 17.4 assumes 0 < δ ≤ 1/32, with constants c = 1/160 and C = 64. See the chapter pages for assumptions, source differences, and optional work.Read the exact scope, proofs, and remaining optional work.
Chapter 14 Compiled Foundations of Information Theory 160–169 print · 195–206 PDFRead the exact scope, proofs, and remaining optional work.
Chapter 15 Compiled Minimax Lower Bounds 170–176 print · 207–214 PDFRead the exact scope, proofs, and remaining optional work.
Chapter 16 Compiled Instance-Dependent Lower Bounds 177–184 print · 215–223 PDFRead the exact scope, proofs, and remaining optional work.
Chapter 17 Compiled High-Probability Lower Bounds 185–190 print · 224–230 PDFRead the exact scope, proofs, and remaining optional work.
Formalized textbook map
The curriculum is anchored in Lattimore and Szepesvári's Bandit Algorithms, with algorithm-specific papers for OFUL, Tsallis-INF, and UCBVI. It is a source-mapped learning path, not a chapter-for-chapter reproduction of one book. Each card reports online-edition pages and the chapter's canonical compiled boundary.
Current evidence snapshot
6847b678a73d ↗
These cards are generated from the Lean index, teaching crosswalks, implementation ledger, and harness-comparison log. They are not hand-entered completion percentages.
796 modules · 7,689 theorems and lemmas · 0 declarations with sorry or admit.
14 source-theorem restatements and 5 Part-IV chapter pages connect algorithms, page references, mathematics, and Lean.
Follow a reading route →Decision: insufficient evidence. The default is retained; the next evidence-gathering arm is hierarchical.
First named open bridge. A bridge from the compiled terminal-count-below event to a fixed-cutoff starvation trigger/event; the exact probability split and missing-pull-to-terminal-count inclusion do not supply occurrence-conditioned IID.
Open evidence and remaining gaps →Powered by two connected systems
A fixed mathematical target enters an evidence-aware scheduler. The hierarchical route remains the default; bounded master–worker trials use the same hashed route packet, and only separate reviewer verdicts can enter the comparison.
Inspect the ABRL harness →Compiled Lean declarations → searchable reusable library → textbook-aligned learning → LaTeX↔Lean formalization → community lemma intake.
Browse BanditRLlib →flowchart LR
Target["Frozen mathematical target<br/>paper, textbook, or proposal"] --> Scheduler["Evidence-aware scheduler<br/>same target, budget, and source packet"]
subgraph Harness["ABRL · adaptive autoformalization harness"]
Scheduler --> Hierarchy["Hierarchical default<br/>director → planner → one Lean leaf"]
Scheduler -. "bounded experiment" .-> Parallel["Master–worker trial<br/>independent proof routes"]
Hierarchy --> Gate["Common Lean + reviewer gate<br/>certificate, blocker, reuse"]
Parallel --> Gate
Gate -. "matched log and diagnostics" .-> Scheduler
end
Gate -->|accepted declarations| Library["BanditRLlib<br/>verified Lean library"]
Library --> Learn["Learn<br/>source-mapped Book Map"]
Library --> Reuse["Reuse<br/>declarations + proof graph"]
Library --> Formalize["Formalize<br/>local experimental workspace"]
Library --> Contribute["Contribute<br/>reviewed lemma packets"]
Formalize -. "candidate packet" .-> Target
Contribute -. "proposal packet" .-> Target
The numbers below are generated from the current internal BanditRLProof/ namespace at build time. BanditRLlib is the public library name; the mature namespace is intentionally unchanged.
sorry or admitBandit and reinforcement-learning proofs mix finite combinatorics, probability kernels, conditional expectation, concentration, optimization, and algorithm-specific bookkeeping. ABRL organizes that work into small Lean-checkable leaves. An automated hierarchy proposes and proves leaves; reinforcement-learning ideas help select promising proof routes; bandit objectives allocate effort among those routes; and Lean is the final certificate.
The current tree is no longer only a finite-bandit foundation. It contains concrete ETC, ordinary UCB, a conservative bounded generated KL-UCB route, stationary Thompson, EXP3, and Tsallis endpoints; an OFUL chain reaching self-normalized confidence and one horizon-free policy with all-time, all-horizon, and stopping consumers, plus a separately labeled horizon-indexed expected-consistency family; and a finite-horizon RL development that now reaches a canonical known-reward Hoeffding UCBVI-CH high-probability cumulative episode pseudo-regret theorem and its failure-aware expected consumer on one generated adaptive process. Natural-causal consistency and stopping-time RL remain independent compiled extensions. Bernstein/minimax and stochastic-reward UCBVI, sharp KL-Chernoff and asymptotically optimal KL-UCB refinements, full BwK, preference, federated, and several modern routes remain partial, planned, or blocked at named interfaces.
Upper bounds · lower bounds · local Lean evidence
The research atlas currently indexes 13 theorem-comparison cases across 7 assumption families. Each case fixes its reward model, feedback, horizon, regret notion, and salient parameters before comparing rates. Published optimality, theorem-level source audit, and local Lean compilation are three independent ledgers.
Open a setting, inspect the precise comparison signature, follow primary-paper links, and see every remaining logarithmic, constant, parameter, or model-class mismatch.
Open BanditRLwiki →1 case remains in the source-audit queue. The Frontier never turns a missing reference into a literature-open claim, and every Lean blocker names the exact missing bridge.
Inspect frontier leaves →People behind the project
The project authors are listed separately from future community contributors. Roles are intentionally neutral unless contribution metadata is explicitly recorded.
Project author
Project author.
Project author
Project author.
Project author
Project author.
Project author
Project author.
Reproduce the formalization
Install Git, Python 3, and Lean through Elan. The repository pins leanprover/lean4:v4.29.1.
git clone https://github.com/DakeBU/Auto-Bandit-RL-Proof-In-Sleep.git
cd Auto-Bandit-RL-Proof-In-Sleeplake update
python3 tools/bandit.py checkA reviewable path into the library
This chart counts the explicit milestones in the website's implementation map. It does not estimate what percentage of all bandit or RL mathematics has been formalized.
pie showData title Implementation-map milestones (not a percentage of all mathematics) "Compiled local endpoint" : 86 "Partial route" : 8 "Planned" : 1 "Blocked" : 2 "Stated, proof incomplete" : 0
Choose a mathematical route
Each route reuses the common foundations but emphasizes a different proof technology. These are pedagogical paths, not additional completion claims.
Start with bookkeeping, add concentration, then compare ETC and optimism.
Build the probability interface before moving from optimism to confidence ellipsoids.
Use the common probability layer, then follow posterior sampling and its information route.
Move from importance weighting in EXP3 to regularized FTRL and Tsallis geometry.
Reuse probability and optimism interfaces before entering Bellman recursion and UCBVI.
The workspace renders editable LaTeX, loads reviewed LaTeX-to-Lean mappings, visualizes declaration dependencies, and can call the pinned Lean compiler through a loopback-only companion server. It can now export a versioned lemma packet for community review; a future authenticated compiler can submit that same packet directly as a proposed contribution.