ABRL Hierarchical Harness
Fixed mathematical target → route planning → source grounding → formal proof-DAG decomposition → one-leaf proving → Lean compiler → reviewer-gated memory.
Inspect the ABRL harness →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 ↗Local experimental formalization workspace
Powered by two connected systems
Fixed mathematical target → route planning → source grounding → formal proof-DAG decomposition → one-leaf proving → Lean compiler → reviewer-gated memory.
Inspect the ABRL harness →Compiled Lean declarations → searchable reusable library → textbook-aligned learning → LaTeX↔Lean formalization → community lemma intake.
Browse BanditRLlib →flowchart LR
Target["Mathematical target<br/>paper, textbook, or proposal"] --> Upper["ABRL upper layer<br/>planning and target fence"]
subgraph Harness["ABRL · hierarchical autoformalization harness"]
Upper --> Middle["middle layer<br/>route and obligation design"]
Middle --> Lower["lower layer<br/>Lean proof construction"]
Lower --> Compiler["Lean 4 compiler<br/>lake + Mathlib"]
Compiler --> Reviewer["reviewer and full gate<br/>statement + evidence audit"]
Reviewer -. "diagnostics and refinement" .-> Middle
end
Reviewer -->|accepted declarations| Library["BanditRLlib<br/>verified Lean library"]
Library --> Learn["Learn<br/>ten-chapter book map"]
Library --> Reuse["Reuse<br/>declaration catalogue"]
Library --> Formalize["Formalize<br/>retrieval-grounded candidates"]
Library --> Contribute["Contribute<br/>reviewed lemma packets"]
Formalize -. "candidate packet" .-> Upper
Contribute -. "proposal packet" .-> Upper
For students
Follow ten chapters from finite bandit bookkeeping through concentration, stochastic and adversarial algorithms, stopping times, and finite-horizon RL. Read intuition and mathematics before opening the exact type.
Follow the teaching path →For library users
Search all 7,581 indexed declarations, filter by chapter and kind, inspect module imports, and distinguish compiled endpoints from broader routes that remain partial or blocked.
Search the declaration catalog →For contributors
Submit a structured lemma packet with the source theorem, natural-language statement, LaTeX, Lean draft, dependencies, and honest verification status. Live Formalization already exports the same machine-readable format for ABRL review.
Read the contribution guide →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.
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.
Chapter-by-chapter source spine
This separate layer follows Chapters 13–17 of Bandit Algorithms in order. It does not change the ten-chapter Book Map or imply that the whole textbook is complete.
The Chapter 13 semantic and deterministic slice and Chapter 15 same-policy history KL bridge are compiled. Theorem 13.1 remains blocked on the Gaussian regret/event and caller-free minimax terminal.
Chapter 14 Partial Foundations of Information Theory 160–169 print · 195–206 PDFThe source-faithful §14.2 relative-entropy and Bretagnolle–Huber spine is compiled. Entropy/source coding in §14.1 and full sub-sigma-algebra data processing remain outside this scoped gate.
Chapter 15 Partial Minimax Lower Bounds 170–176 print · 207–214 PDFLemma 15.1 now compiles for finite arms, a countably generated reward space, arbitrary Markov arm laws, and one common randomized history policy. The unit-Gaussian dependency slice also compiles; Theorem 15.2 and the 1/27 minimax terminal remain blocked.
Chapter 16 Partial Instance-Dependent Lower Bounds 177–184 print · 215–223 PDFDefinition 16.1, Theorem 16.2, Lemma 16.3, and Theorem 16.4 are source-frozen. Generic consistency, d_inf, Gaussian-candidate, eventual power, and eventual log-growth leaves compile; the bandit information, liminf, and finite-time terminals remain blocked.
Chapter 17 Partial High-Probability Lower Bounds 185–190 print · 224–230 PDFClaim 17.5's first-moment witness and reusable threshold, event-subtraction, and deterministic Eq. (17.8) algebra compile. The stochastic tail terminals and clipped-normal adversarial construction remain blocked.
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" : 60 "Partial route" : 4 "Planned" : 1 "Blocked" : 5 "Stated, proof incomplete" : 0
Students can take a short stochastic route through Foundations → Probability → ETC → UCB, a linear route through UCB → OFUL, an adversarial route through EXP3 → Tsallis-FTRL, or continue from Probability and OFUL stopping-time ideas into finite-horizon RL. Thompson sampling branches from posterior kernels.
flowchart LR Start["New to Lean or bandit/RL proofs"] --> F["1. Foundations"] F --> P["2. Probability layer"] F --> ETC["3. ETC"] ETC --> UCB["4. UCB"] P --> UCB UCB --> OFUL["5. OFUL + stopping times"] P --> TS["6. Thompson sampling"] F --> E["7. EXP3"] P --> E E --> T["8. Tsallis-FTRL"] P --> T P --> RL["9. Finite-horizon RL"] OFUL --> RL UCB --> RL RL --> Frontier["10. Frontier + contribution workflow"] T --> Frontier TS --> Frontier IDE["Research IDE: LaTeX ↔ Lean ↔ tree"] -. "use beside every chapter" .-> F IDE -.-> RL
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.