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

Teaching chapter 28 of 31 · Canonical route compiled

Projected OSD with legal history-dependent support policies

An actual finite-history policy recurrence with played-only legality and fixed/decreasing/tuned same-run regret.

How to read the status. It describes this page's canonical local Lean route, not completion of the cited textbook chapter or every extension listed below.

Orientation

Who should read this. Readers of Algorithm2.2, Lemma2.31 and the Theorem2.13/eq2.1 transfer.

Learning goals

  • Track the actual finite information available when a support is selected.
  • Distinguish played legality from a stronger off-path oracle law.
  • Derive real regret and retain the terminal subtraction on the same actual recurrence.

Textbook crosswalk

Read the mathematics before the Lean interface

This reading follows Online Learning: A Modern Introduction Using Convex Optimization. Teaching routes group mathematical dependencies across the shared library. Visible page labels use the cited source's numbered pages; source buttons use the PDF viewer's physical page index, including front matter. Companion papers cover algorithm-specific results.

Primary spine · arXiv:1912.13213v10,21June2026

Online Learning: A Modern Introduction Using Convex Optimization

Francesco Orabona

Location
Algorithm 2.2, Lemma 2.31, and the explicit transfer of Theorem 2.13 and equation (2.1) to subgradients; printed coarse OSD bound on page 21
Pages
printed 13-15 and 19-21; PDF 25-27 and 31-33
Open at the cited pages
derived source instantiation · ordered flow

Choose a legal support using the actual finite history

Read top to bottom to follow the argument or procedure.

  1. Output first

    The recursion constructs Xt from strict-past losses and rates before observing the current loss.

  2. Observe and select

    The policy receives actual finite history and current whole loss; played support membership is checked at Xt.

  3. Project and append

    The shared nearest projection of Xt-eta(t)gt is appended to the same stored history.

4 distinct theory routes, one frontier.Open the statement you want to compare; the other routes stay compact.
Derived instantiation of source guaranteeActual support-to-projection inequalityGeneric finite-history OSD policyTheorem 2.13 and equation (2.1), printed 13-15; Algorithm 2.2 and Lemma 2.31, printed 19-20
Derived instantiation of source guarantee

Actual support-to-projection inequality

Source context at Theorem 2.13 and equation (2.1), printed 13-15; Algorithm 2.2 and Lemma 2.31, printed 19-20 ↗
Generic finite-history OSD policyDeterministic policies receive whole loss functions and actual finite histories. The comparison holds one policy and initialization fixed. Randomized laws, executable finite-query oracles and anytime tuning require separate interfaces. Chapter and book completion remain separate.

A genuine played global support and positive current step give the full source Lemma2.31 chain.

Model
Finite-dimensional real inner-product space; a nonempty closed convex domain and its genuine nearest projection; one prescribed deterministic policy on finite whole-loss/output histories.
Assumptions
eta(t)>0, proper current loss subdifferentiable on V, actual selected global support at Xt, feasible u. No current/initial feasibility premise is added to this single-step lemma.
Algorithm parameters
Fixed p, loss sequence f and initialization x1; arbitrary current t, positive eta(t), actual selected gt and actual next nearest projection. Only u must be feasible in this single-step statement; no initial/current feasibility hypothesis.
Regret notion
Single finite real loss difference f_t(X_t)-f_t(u), multiplied by the current eta(t); no horizon sum in this lemma.
Guarantee
A genuine played global support and positive current step give the full source Lemma2.31 chain.
Derived explicit guarantee. A genuine played global support and positive current step give the full source Lemma2.31 chain.

BanditRLlib relationship. Instantiate the source support/projection chain on the actual policy recurrence. The library one-step theorem also permits the current point outside V when a global support is supplied; this is a wider helper domain than the source algorithm standing context.

Derived instantiation of source guaranteeFixed rate with negative terminalGeneric finite-history OSD policyTheorem 2.13 and equation (2.1), printed 13-15; Algorithm 2.2 and Lemma 2.31, printed 19-20
Generic finite-history OSD policyDeterministic policies receive whole loss functions and actual finite histories. The comparison holds one policy and initialization fixed. Randomized laws, executable finite-query oracles and anytime tuning require separate interfaces. Chapter and book completion remain separate.

For eta>0, every horizon including zero, every legal played policy and feasible comparator satisfy the same-run bound; no bounded-domain premise.

Model
Finite-dimensional real inner-product space; a nonempty closed convex domain and its genuine nearest projection; one prescribed deterministic policy on finite whole-loss/output histories.
Assumptions
eta>0, T>=0, feasible x1/u, proper losses with global supports nonempty on V and actual played LegalFeedback; no bounded domain.
Algorithm parameters
Finite-dimensional real inner-product space; shared nonempty closed convex V. Proper EReal losses exclude bottom and have an ambient finite witness; global supports are nonempty at feasible points. Properness and actual supports justify finite toReal loss differences. Only played support membership enters performance. Fixed eta>0 allows T=0 and unbounded V. Variable steps need T>0 and positive nonincreasing played steps with pairwise diameter control. Tuning needs D,G,T>0 and actual selected-norm bounds on the same horizon-prescribed trajectory. Prefix comparisons hold the policy and initialization fixed; they do not impose independence on external parameters.
Regret notion
Finite real played loss minus finite comparator loss, summed over t<T. Structural equalities are stated directly.
Guarantee
For eta>0, every horizon including zero, every legal played policy and feasible comparator satisfy the same-run bound; no bounded-domain premise.
Derived explicit guarantee. For eta>0, every horizon including zero, every legal played policy and feasible comparator satisfy the same-run bound; no bounded-domain premise.

BanditRLlib relationship. The source explicitly transfers the fixed-rate bound to arbitrary legal supports and permits unbounded domains. The library derives an additional T=0 boundary: initial and terminal potentials cancel. The negative endpoint remains in the bound.

Derived instantiation of source guaranteeSource decreasing-rate diameter branchGeneric finite-history OSD policyTheorem 2.13 and equation (2.1), printed 13-15; Algorithm 2.2 and Lemma 2.31, printed 19-20
Derived instantiation of source guarantee

Source decreasing-rate diameter branch

Source context at Theorem 2.13 and equation (2.1), printed 13-15; Algorithm 2.2 and Lemma 2.31, printed 19-20 ↗
Generic finite-history OSD policyDeterministic policies receive whole loss functions and actual finite histories. The comparison holds one policy and initialization fixed. Randomized laws, executable finite-query oracles and anytime tuning require separate interfaces. Chapter and book completion remain separate.

At T>0 a bounded V supplies its actual metric diameter, with the negative endpoint retained.

Model
Finite-dimensional real inner-product space; a nonempty closed convex domain and its genuine nearest projection; one prescribed deterministic policy on finite whole-loss/output histories.
Assumptions
T>0, positive nonincreasing played rates, bounded V, feasible x1/u, proper subdifferentiable losses on V and actual played LegalFeedback.
Algorithm parameters
Finite-dimensional real inner-product space; shared nonempty closed convex V. Proper EReal losses exclude bottom and have an ambient finite witness; global supports are nonempty at feasible points. Properness and actual supports justify finite toReal loss differences. Only played support membership enters performance. Fixed eta>0 allows T=0 and unbounded V. Variable steps need T>0 and positive nonincreasing played steps with pairwise diameter control. Tuning needs D,G,T>0 and actual selected-norm bounds on the same horizon-prescribed trajectory. Prefix comparisons hold the policy and initialization fixed; they do not impose independence on external parameters.
Regret notion
Finite real played loss minus finite comparator loss, summed over t<T. Structural equalities are stated directly.
Guarantee
At T>0 a bounded V supplies its actual metric diameter, with the negative endpoint retained.
Derived explicit guarantee. At T>0 a bounded V supplies its actual metric diameter, with the negative endpoint retained.

BanditRLlib relationship. The source transfers the nonincreasing-rate diameter bound to legal subgradients. The library records positive played rates, monotonicity and a bounded-domain Metric.diam adapter explicitly; eta(T-1) is the final played rate under zero-based indexing.

Derived instantiation of source guaranteeSame tuned run for all comparatorsGeneric finite-history OSD policyTheorem 2.13 and equation (2.1), printed 13-15; Algorithm 2.2 and Lemma 2.31, printed 19-20
Generic finite-history OSD policyDeterministic policies receive whole loss functions and actual finite histories. The comparison holds one policy and initialization fixed. Randomized laws, executable finite-query oracles and anytime tuning require separate interfaces. Chapter and book completion remain separate.

One horizon-prescribed policy/trajectory serves every comparator when pairwise distances<=D and the actual selected norms<=G.

Model
Finite-dimensional real inner-product space; a nonempty closed convex domain and its genuine nearest projection; one prescribed deterministic policy on finite whole-loss/output histories.
Assumptions
D,G,T>0, feasible x1, pairwise distances<=D, played proper subdifferentiable losses, actual legal selected vectors of norm<=G on this same tuned run.
Algorithm parameters
Finite-dimensional real inner-product space; shared nonempty closed convex V. Proper EReal losses exclude bottom and have an ambient finite witness; global supports are nonempty at feasible points. Properness and actual supports justify finite toReal loss differences. Only played support membership enters performance. Fixed eta>0 allows T=0 and unbounded V. Variable steps need T>0 and positive nonincreasing played steps with pairwise diameter control. Tuning needs D,G,T>0 and actual selected-norm bounds on the same horizon-prescribed trajectory. Prefix comparisons hold the policy and initialization fixed; they do not impose independence on external parameters.
Regret notion
Finite real played loss minus finite comparator loss, summed over t<T. Structural equalities are stated directly.
Guarantee
One horizon-prescribed policy/trajectory serves every comparator when pairwise distances<=D and the actual selected norms<=G.
Derived explicit guarantee. One horizon-prescribed policy/trajectory serves every comparator when pairwise distances<=D and the actual selected norms<=G.

BanditRLlib relationship. Specialize the fixed-horizon source tuning to the actual supports of this same policy run. Feasible initialization and pairwise distance control provide the initial comparator distance. Played legality and selected-norm bounds refer to eta=D/(G sqrt(T)); no optimization over future support energy is asserted.

Natural-language and Lean side by side

The mathematical readings are explanatory summaries. The exact generated Lean statement and its source link remain authoritative for hypotheses, types, constants, and indexing.

A curated route through definitions, key bridges, and canonical terminals stays visible. 17 additional dependency, extension, or research-frontier notes are grouped below.

Mathematics ↔ Lean

Actual support-to-projection inequality

Lean declarationBanditRL.OnlineSubgradientPolicy.one_step_chain

Compiled

Plain-English statement. A genuine played global support and positive current step give the full source Lemma2.31 chain.

Mathematical reading. A genuine played global support and positive current step give the full source Lemma2.31 chain.
Intuition
A genuine played global support and positive current step give the full source Lemma2.31 chain.
Why it is needed
Connect source Algorithm2.2 to its genuine selected-vector/projected trajectory and same-run bound.
Place in the proof
Orabona v10 printed19-21/PDF31-33; Theorem2.13 and eq2.1 printed13-15/PDF25-27.
Proof and Lean reading notes
Proof idea
Instantiate the existing full lemma with the actual selected vector and rewrite output_succ. No desired one-step bound is supplied.
Lean reading notes
Positive current rate, proper loss subdifferentiable on V, a global support at the actual current point and feasible comparator. Current and initial feasibility are not hypotheses of this wider helper.
Teaching dependencies
BanditRL.OnlineSubgradientPolicy.output_succ, BanditRL.OnlineSubgradientDescent.lemma_2_31
Exact Lean statement
theorem one_step_chain (V : Domain (E := E)) (η : ℕ → ℝ) (loss : ℕ → E → EReal) (x₁ : E) (p : SupportPolicy (E := E)) (t : ℕ) (hη : 0 < η t) (hloss : BanditRL.OnlineSubgradientDescent.SubdifferentiableOn V (loss t)) (hg : selected V η loss x₁ p t ∈ SourceSubdifferential (loss t) (output V η loss x₁ p t)) (u : E) (hu : u ∈ V.carrier) : η t * ((loss t (output V η loss x₁ p t)).toReal - (loss t u).toReal) ≤ η t * inner ℝ (selected V η loss x₁ p t) (output V η loss x₁ p t - u) ∧ η t * inner ℝ (selected V η loss x₁ p t) (output V η loss x₁ p t - u) ≤ ‖output V η loss x₁ p t - u‖ ^ 2 / 2 - ‖output V η loss x₁ p (t + 1) - u‖ ^ 2 / 2 + (η t) ^ 2 / 2 * ‖selected V η loss x₁ p t‖ ^ 2
Mathematics ↔ Lean

Fixed rate with negative terminal

Lean declarationBanditRL.OnlineSubgradientPolicy.regret_fixed

Compiled

Plain-English statement. For eta>0, every horizon including zero, every legal played policy and feasible comparator satisfy the same-run bound; no bounded-domain premise.

Mathematical reading. For eta>0, every horizon including zero, every legal played policy and feasible comparator satisfy the same-run bound; no bounded-domain premise.
Intuition
For eta>0, every horizon including zero, every legal played policy and feasible comparator satisfy the same-run bound; no bounded-domain premise.
Why it is needed
Connect source Algorithm2.2 to its genuine selected-vector/projected trajectory and same-run bound.
Place in the proof
Orabona v10 printed19-21/PDF31-33; Theorem2.13 and eq2.1 printed13-15/PDF25-27.
Proof and Lean reading notes
Proof idea
Induct on T for the scaled regret. Prefix legality/loss hypotheses restrict to the old run; append the actual one-step chain and cancel its intermediate distance. Divide by eta.
Lean reading notes
Feasible initialization/comparator, positive fixed rate, proper subdifferentiable played losses and played-only legal supports. T=0 and unbounded V are permitted. The coarse corollary explicitly discards the nonpositive terminal term.
Teaching dependencies
BanditRL.OnlineSubgradientPolicy.one_step_chain, BanditRL.OnlineSubgradientPolicy.output_zero
Exact Lean statement
theorem regret_fixed (V : Domain (E := E)) (η : ℝ) (hη : 0 < η) (loss : ℕ → E → EReal) (x₁ : E) (p : SupportPolicy (E := E)) (hx₁ : x₁ ∈ V.carrier) (T : ℕ) (hloss : ∀ t < T, BanditRL.OnlineSubgradientDescent.SubdifferentiableOn V (loss t)) (hlegal : LegalFeedback V (fun _ => η) loss x₁ p T) (u : E) (hu : u ∈ V.carrier) : regret V (fun _ => η) loss x₁ p u T ≤ ‖x₁ - u‖ ^ 2 / (2 * η) + η / 2 * (∑ t ∈ range T, ‖selected V (fun _ => η) loss x₁ p t‖ ^ 2) - ‖output V (fun _ => η) loss x₁ p T - u‖ ^ 2 / (2 * η)
Mathematics ↔ Lean

Source decreasing-rate diameter branch

Lean declarationBanditRL.OnlineSubgradientPolicy.regret_variable

Compiled

Plain-English statement. At T>0 a bounded V supplies its actual metric diameter, with the negative endpoint retained.

Mathematical reading. At T>0 a bounded V supplies its actual metric diameter, with the negative endpoint retained.
Intuition
At T>0 a bounded V supplies its actual metric diameter, with the negative endpoint retained.
Why it is needed
Connect source Algorithm2.2 to its genuine selected-vector/projected trajectory and same-run bound.
Place in the proof
Orabona v10 printed19-21/PDF31-33; Theorem2.13 and eq2.1 printed13-15/PDF25-27.
Proof and Lean reading notes
Proof idea
Instantiate explicit pairwise control with Metric.diam using boundedness and both points in V.
Lean reading notes
Positive horizon and played rates, nonincreasing rates, feasible initialization/comparator, played proper subdifferentiable losses, played-only legal supports and pairwise diameter control. The Metric.diam adapter additionally states boundedness. The endpoint denominator uses eta(T-1).
Teaching dependencies
BanditRL.OnlineSubgradientPolicy.regret_variable_bound
Exact Lean statement
theorem regret_variable (V : Domain (E := E)) (η : ℕ → ℝ) (loss : ℕ → E → EReal) (x₁ : E) (p : SupportPolicy (E := E)) (hx₁ : x₁ ∈ V.carrier) (T : ℕ) (hT : 0 < T) (hη : ∀ t < T, 0 < η t) (hmono : ∀ t, t + 1 < T → η (t + 1) ≤ η t) (hloss : ∀ t < T, BanditRL.OnlineSubgradientDescent.SubdifferentiableOn V (loss t)) (hlegal : LegalFeedback V η loss x₁ p T) (hV : Bornology.IsBounded V.carrier) (u : E) (hu : u ∈ V.carrier) : regret V η loss x₁ p u T ≤ (Metric.diam V.carrier) ^ 2 / (2 * η (T - 1)) + (∑ t ∈ range T, η t / 2 * ‖selected V η loss x₁ p t‖ ^ 2) - ‖output V η loss x₁ p T - u‖ ^ 2 / (2 * η (T - 1))
Mathematics ↔ Lean

Same tuned run for all comparators

Lean declarationBanditRL.OnlineSubgradientPolicy.regret_tuned

Compiled

Plain-English statement. One horizon-prescribed policy/trajectory serves every comparator when pairwise distances<=D and the actual selected norms<=G.

Mathematical reading. One horizon-prescribed policy/trajectory serves every comparator when pairwise distances<=D and the actual selected norms<=G.
Intuition
One horizon-prescribed policy/trajectory serves every comparator when pairwise distances<=D and the actual selected norms<=G.
Why it is needed
Connect source Algorithm2.2 to its genuine selected-vector/projected trajectory and same-run bound.
Place in the proof
Orabona v10 printed19-21/PDF31-33; Theorem2.13 and eq2.1 printed13-15/PDF25-27.
Proof and Lean reading notes
Proof idea
Apply the one-comparator tuned theorem with the initial point and arbitrary feasible u. LegalFeedback and the norm bounds refer to this same tuned run.
Lean reading notes
D,G,T are positive. Feasible initialization, played proper subdifferentiable losses, played legality and actual selected-norm bounds all refer to the same eta=D/(G sqrt(T)) run. Initial-distance control serves one comparator; pairwise control serves every feasible comparator on that run.
Teaching dependencies
BanditRL.OnlineSubgradientPolicy.regret_tuned_distance
Exact Lean statement
theorem regret_tuned (V : Domain (E := E)) (loss : ℕ → E → EReal) (x₁ : E) (p : SupportPolicy (E := E)) (hx₁ : x₁ ∈ V.carrier) (T : ℕ) (hT : 0 < T) (D G : ℝ) (hD : 0 < D) (hG : 0 < G) (hloss : ∀ t < T, BanditRL.OnlineSubgradientDescent.SubdifferentiableOn V (loss t)) (hlegal : LegalFeedback V (fun _ => D / (G * Real.sqrt T)) loss x₁ p T) (hdiam : ∀ x ∈ V.carrier, ∀ y ∈ V.carrier, ‖x - y‖ ≤ D) (hgrad : ∀ t < T, ‖selected V (fun _ => D / (G * Real.sqrt T)) loss x₁ p t‖ ≤ G) : ∀ u ∈ V.carrier, regret V (fun _ => D / (G * Real.sqrt T)) loss x₁ p u T ≤ D * G * Real.sqrt T
Explore 17 additional Lean teaching notes
Mathematics ↔ Lean

Initial finite history

Lean declarationBanditRL.OnlineSubgradientPolicy.history_zero

Compiled

Plain-English statement. The time-zero history has one entry, the prescribed initialization.

Mathematical reading. The time-zero history has one entry, the prescribed initialization.
Intuition
The time-zero history has one entry, the prescribed initialization.
Why it is needed
Connect source Algorithm2.2 to its genuine selected-vector/projected trajectory and same-run bound.
Place in the proof
Library structural refinement or adapter of Orabona v10 Algorithm2.2 (printed20/PDF32); this equality/interface fact is not a printed source theorem.
Proof and Lean reading notes
Proof idea
Reduce the dependent Nat.rec at zero.
Lean reading notes
The exact original declaration and proof are retained. The source cards distinguish printed support/projection analysis from the derived finite-history interface. Expand the folded Lean to inspect this declaration’s own hypotheses.
Teaching dependencies
No direct teaching dependency recorded.
Exact Lean statement
theorem history_zero (V : Domain (E := E)) (η : ℕ → ℝ) (loss : ℕ → E → EReal) (x₁ : E) (p : SupportPolicy (E := E)) : history V η loss x₁ p 0 = fun _ => x₁
Mathematics ↔ Lean

Append the actual projected update

Lean declarationBanditRL.OnlineSubgradientPolicy.history_succ

Compiled

Plain-English statement. The old finite history is preserved and its last entry is the actual projected next point.

Mathematical reading. The old finite history is preserved and its last entry is the actual projected next point.
Intuition
The old finite history is preserved and its last entry is the actual projected next point.
Why it is needed
Connect source Algorithm2.2 to its genuine selected-vector/projected trajectory and same-run bound.
Place in the proof
Library structural refinement or adapter of Orabona v10 Algorithm2.2 (printed20/PDF32); this equality/interface fact is not a printed source theorem.
Proof and Lean reading notes
Proof idea
Unfold the successor branch of Nat.rec and the last-entry/selected-vector definitions.
Lean reading notes
The exact original declaration and proof are retained. The source cards distinguish printed support/projection analysis from the derived finite-history interface. Expand the folded Lean to inspect this declaration’s own hypotheses.
Teaching dependencies
BanditRL.OnlineSubgradientPolicy.history
Exact Lean statement
theorem history_succ (V : Domain (E := E)) (η : ℕ → ℝ) (loss : ℕ → E → EReal) (x₁ : E) (p : SupportPolicy (E := E)) (t : ℕ) : history V η loss x₁ p (t + 1) = Fin.snoc (history V η loss x₁ p t) (BanditRL.OnlineGradientDescent.project V (output V η loss x₁ p t - η t • selected V η loss x₁ p t))
Mathematics ↔ Lean

Prescribed first output

Lean declarationBanditRL.OnlineSubgradientPolicy.output_zero

Compiled

Plain-English statement. The first output equals the prescribed initialization; the recurrence has read no losses.

Mathematical reading. The first output equals the prescribed initialization; the recurrence has read no losses.
Intuition
The first output is chosen before any observed loss.
Why it is needed
Connect source Algorithm2.2 to its genuine selected-vector/projected trajectory and same-run bound.
Place in the proof
Library structural refinement or adapter of Orabona v10 Algorithm2.2 (printed20/PDF32); this equality/interface fact is not a printed source theorem.
Proof and Lean reading notes
Proof idea
Reduce the initial history and its only coordinate.
Lean reading notes
The exact original declaration and proof are retained. The source cards distinguish printed support/projection analysis from the derived finite-history interface. Expand the folded Lean to inspect this declaration’s own hypotheses.
Teaching dependencies
BanditRL.OnlineSubgradientPolicy.history_zero
Exact Lean statement
theorem output_zero (V : Domain (E := E)) (η : ℕ → ℝ) (loss : ℕ → E → EReal) (x₁ : E) (p : SupportPolicy (E := E)) : output V η loss x₁ p 0 = x₁
Mathematics ↔ Lean

Algorithm2.2 actual update

Lean declarationBanditRL.OnlineSubgradientPolicy.output_succ

Compiled

Plain-English statement. Apply the same externally fixed history policy to the actual history and current loss.

Mathematical reading. Apply the same externally fixed history policy to the actual history and current loss.
Intuition
Apply the same externally fixed history policy to the actual history and current loss.
Why it is needed
Connect source Algorithm2.2 to its genuine selected-vector/projected trajectory and same-run bound.
Place in the proof
Library structural refinement or adapter of Orabona v10 Algorithm2.2 (printed20/PDF32); this equality/interface fact is not a printed source theorem.
Proof and Lean reading notes
Proof idea
Evaluate Fin.snoc at its last coordinate; this yields the update used in every performance theorem.
Lean reading notes
The exact original declaration and proof are retained. The source cards distinguish printed support/projection analysis from the derived finite-history interface. Expand the folded Lean to inspect this declaration’s own hypotheses.
Teaching dependencies
BanditRL.OnlineSubgradientPolicy.history, BanditRL.OnlineSubgradientPolicy.selected
Exact Lean statement
theorem output_succ (V : Domain (E := E)) (η : ℕ → ℝ) (loss : ℕ → E → EReal) (x₁ : E) (p : SupportPolicy (E := E)) (t : ℕ) : output V η loss x₁ p (t + 1) = BanditRL.OnlineGradientDescent.project V (output V η loss x₁ p t - η t • selected V η loss x₁ p t)
Mathematics ↔ Lean

Every stored output is feasible

Lean declarationBanditRL.OnlineSubgradientPolicy.history_mem

Compiled

Plain-English statement. Feasible initialization and actual nearest projection keep every history coordinate in V.

Mathematical reading. Feasible initialization and actual nearest projection keep every history coordinate in V.
Intuition
Feasible initialization and actual nearest projection keep every history coordinate in V.
Why it is needed
Connect source Algorithm2.2 to its genuine selected-vector/projected trajectory and same-run bound.
Place in the proof
Library structural refinement or adapter of Orabona v10 Algorithm2.2 (printed20/PDF32); this equality/interface fact is not a printed source theorem.
Proof and Lean reading notes
Proof idea
Induct on time, split the last coordinate from castSucc coordinates, and use projection membership.
Lean reading notes
The exact original declaration and proof are retained. The source cards distinguish printed support/projection analysis from the derived finite-history interface. Expand the folded Lean to inspect this declaration’s own hypotheses.
Teaching dependencies
BanditRL.OnlineSubgradientPolicy.history_succ, BanditRL.OnlineGradientDescent.project_spec
Exact Lean statement
theorem history_mem (V : Domain (E := E)) (η : ℕ → ℝ) (loss : ℕ → E → EReal) (x₁ : E) (p : SupportPolicy (E := E)) (hx₁ : x₁ ∈ V.carrier) (t : ℕ) (i : Fin (t + 1)) : history V η loss x₁ p t i ∈ V.carrier
Mathematics ↔ Lean

Current output feasibility

Lean declarationBanditRL.OnlineSubgradientPolicy.output_mem

Compiled

Plain-English statement. The current point is a member of the same domain at every time, even for invalid future data.

Mathematical reading. The current point is a member of the same domain at every time, even for invalid future data.
Intuition
The current point is a member of the same domain at every time, even for invalid future data.
Why it is needed
Connect source Algorithm2.2 to its genuine selected-vector/projected trajectory and same-run bound.
Place in the proof
Library structural refinement or adapter of Orabona v10 Algorithm2.2 (printed20/PDF32); this equality/interface fact is not a printed source theorem.
Proof and Lean reading notes
Proof idea
Apply history_mem at the last finite coordinate.
Lean reading notes
The exact original declaration and proof are retained. The source cards distinguish printed support/projection analysis from the derived finite-history interface. Expand the folded Lean to inspect this declaration’s own hypotheses.
Teaching dependencies
BanditRL.OnlineSubgradientPolicy.history_mem
Exact Lean statement
theorem output_mem (V : Domain (E := E)) (η : ℕ → ℝ) (loss : ℕ → E → EReal) (x₁ : E) (p : SupportPolicy (E := E)) (hx₁ : x₁ ∈ V.carrier) (t : ℕ) : output V η loss x₁ p t ∈ V.carrier
Mathematics ↔ Lean

Finite-history causality

Lean declarationBanditRL.OnlineSubgradientPolicy.history_prefix

Compiled

Plain-English statement. Equal strict-past whole losses and rates give the same actual history for one common policy and initialization.

Mathematical reading. Equal strict-past whole losses and rates give the same actual history for one common policy and initialization.
Intuition
Equal strict-past whole losses and rates give the same actual history for one common policy and initialization.
Why it is needed
Connect source Algorithm2.2 to its genuine selected-vector/projected trajectory and same-run bound.
Place in the proof
Library structural refinement or adapter of Orabona v10 Algorithm2.2 (printed20/PDF32); this equality/interface fact is not a printed source theorem.
Proof and Lean reading notes
Proof idea
Induct on time; identify the finite past-function input and old history before applying the same policy.
Lean reading notes
Both runs use the same policy and initialization, and equal strict-past whole loss functions and step schedules. The theorem does not certify external parameter independence or a stochastic information filtration.
Teaching dependencies
BanditRL.OnlineSubgradientPolicy.history_succ
Exact Lean statement
theorem history_prefix (V : Domain (E := E)) (η η' : ℕ → ℝ) (loss loss' : ℕ → E → EReal) (x₁ : E) (p : SupportPolicy (E := E)) (t : ℕ) (hη : ∀ s < t, η s = η' s) (hloss : ∀ s < t, loss s = loss' s) : history V η loss x₁ p t = history V η' loss' x₁ p t
Mathematics ↔ Lean

Current output ignores future data

Lean declarationBanditRL.OnlineSubgradientPolicy.output_prefix

Compiled

Plain-English statement. For the same policy and initialization, changing the current or future losses and rates leaves the already determined output unchanged.

Mathematical reading. For the same policy and initialization, changing the current or future losses and rates leaves the already determined output unchanged.
Intuition
Changing the current or future losses cannot change the already determined output.
Why it is needed
Connect source Algorithm2.2 to its genuine selected-vector/projected trajectory and same-run bound.
Place in the proof
Library structural refinement or adapter of Orabona v10 Algorithm2.2 (printed20/PDF32); this equality/interface fact is not a printed source theorem.
Proof and Lean reading notes
Proof idea
Apply congrArg to the last coordinate of history_prefix. External policy parameters remain fixed.
Lean reading notes
Both runs use the same policy and initialization, and equal strict-past whole loss functions and step schedules. The theorem does not certify external parameter independence or a stochastic information filtration.
Teaching dependencies
BanditRL.OnlineSubgradientPolicy.history_prefix
Exact Lean statement
theorem output_prefix (V : Domain (E := E)) (η η' : ℕ → ℝ) (loss loss' : ℕ → E → EReal) (x₁ : E) (p : SupportPolicy (E := E)) (t : ℕ) (hη : ∀ s < t, η s = η' s) (hloss : ∀ s < t, loss s = loss' s) : output V η loss x₁ p t = output V η' loss' x₁ p t
Mathematics ↔ Lean

Optional off-path law supplies played legality

Lean declarationBanditRL.OnlineSubgradientPolicy.oracle_feedback

Compiled

Plain-English statement. A universal legal oracle is a sufficient adapter, while performance also applies without it.

Mathematical reading. A universal legal oracle is a sufficient adapter, while performance also applies without it.
Intuition
A universal legal oracle is a sufficient adapter, while performance also applies without it.
Why it is needed
Connect source Algorithm2.2 to its genuine selected-vector/projected trajectory and same-run bound.
Place in the proof
Library structural refinement or adapter of Orabona v10 Algorithm2.2 (printed20/PDF32); this equality/interface fact is not a printed source theorem.
Proof and Lean reading notes
Proof idea
Query the law on the actual finite history and use output_mem. The main performance hypotheses ask only LegalFeedback.
Lean reading notes
Feasible initialization and proper subdifferentiable losses at each t<T are also hypotheses. The off-path OracleLaw then supplies legality at every actual played point; it is an optional sufficient provider.
Teaching dependencies
BanditRL.OnlineSubgradientPolicy.output_mem
Exact Lean statement
theorem oracle_feedback (V : Domain (E := E)) (η : ℕ → ℝ) (loss : ℕ → E → EReal) (x₁ : E) (p : SupportPolicy (E := E)) (hx₁ : x₁ ∈ V.carrier) (T : ℕ) (hp : OracleLaw V p) (hloss : ∀ t < T, BanditRL.OnlineSubgradientDescent.SubdifferentiableOn V (loss t)) : LegalFeedback V η loss x₁ p T
Mathematics ↔ Lean

Finite played and comparator losses

Lean declarationBanditRL.OnlineSubgradientPolicy.trajectory_finite_loss

Compiled

Plain-English statement. Finite real regret is justified before EReal values are converted with toReal.

Mathematical reading. Finite real regret is justified before EReal values are converted with toReal.
Intuition
Finite real regret is justified before EReal values are converted with toReal.
Why it is needed
Connect source Algorithm2.2 to its genuine selected-vector/projected trajectory and same-run bound.
Place in the proof
Library structural refinement or adapter of Orabona v10 Algorithm2.2 (printed20/PDF32); this equality/interface fact is not a printed source theorem.
Proof and Lean reading notes
Proof idea
Use feasible output membership and the reused proper-function/subgradient finite-value theorem.
Lean reading notes
The current loss is proper and subdifferentiable on V; initialization and comparator are feasible. Projection preserves feasibility. These hypotheses justify finite EReal values before conversion to real losses.
Teaching dependencies
BanditRL.OnlineSubgradientPolicy.output_mem, BanditRL.OnlineSubgradientDescent.finite_loss
Exact Lean statement
theorem trajectory_finite_loss (V : Domain (E := E)) (η : ℕ → ℝ) (loss : ℕ → E → EReal) (x₁ : E) (p : SupportPolicy (E := E)) (hx₁ : x₁ ∈ V.carrier) (t : ℕ) (hloss : BanditRL.OnlineSubgradientDescent.SubdifferentiableOn V (loss t)) (u : E) (hu : u ∈ V.carrier) : loss t (output V η loss x₁ p t) = ((loss t (output V η loss x₁ p t)).toReal : EReal) ∧ loss t u = ((loss t u).toReal : EReal)
Mathematics ↔ Lean

Divide by the positive played rate

Lean declarationBanditRL.OnlineSubgradientPolicy.one_step

Compiled

Plain-English statement. The two-point potential term follows from the actual source support/projection chain.

Mathematical reading. The two-point potential term follows from the actual source support/projection chain.
Intuition
The two-point potential term follows from the actual source support/projection chain.
Why it is needed
Connect source Algorithm2.2 to its genuine selected-vector/projected trajectory and same-run bound.
Place in the proof
Orabona v10 printed19-21/PDF31-33; Theorem2.13 and eq2.1 printed13-15/PDF25-27.
Proof and Lean reading notes
Proof idea
Compose both inequalities and multiply through the positive eta; field_simp verifies the denominator identity.
Lean reading notes
Positive current rate, proper loss subdifferentiable on V, a global support at the actual current point and feasible comparator. Current and initial feasibility are not hypotheses of this wider helper.
Teaching dependencies
BanditRL.OnlineSubgradientPolicy.one_step_chain
Exact Lean statement
theorem one_step (V : Domain (E := E)) (η : ℕ → ℝ) (loss : ℕ → E → EReal) (x₁ : E) (p : SupportPolicy (E := E)) (t : ℕ) (hη : 0 < η t) (hloss : BanditRL.OnlineSubgradientDescent.SubdifferentiableOn V (loss t)) (hg : selected V η loss x₁ p t ∈ SourceSubdifferential (loss t) (output V η loss x₁ p t)) (u : E) (hu : u ∈ V.carrier) : (loss t (output V η loss x₁ p t)).toReal - (loss t u).toReal ≤ (‖output V η loss x₁ p t - u‖ ^ 2 - ‖output V η loss x₁ p (t + 1) - u‖ ^ 2) / (2 * η t) + η t / 2 * ‖selected V η loss x₁ p t‖ ^ 2
Mathematics ↔ Lean

Source constant-rate coarse formula

Lean declarationBanditRL.OnlineSubgradientPolicy.regret_fixed_coarse

Compiled

Plain-English statement. Drop the nonpositive terminal term to obtain the coarser OSD formula printed on page 21.

Mathematical reading. Drop the nonpositive terminal term to obtain the coarser OSD formula printed on page 21.
Intuition
The source printed21 formula is a consequence of the sharper retained-terminal result.
Why it is needed
Connect source Algorithm2.2 to its genuine selected-vector/projected trajectory and same-run bound.
Place in the proof
Theorem 2.13 transferred to OSD on printed19/PDF31; coarse OSD formula explicitly reprinted on printed21/PDF33. Unit-scaling statements on that page remain separate.
Proof and Lean reading notes
Proof idea
Prove the removed endpoint quotient is nonnegative and weaken the sharp fixed bound.
Lean reading notes
Feasible initialization/comparator, positive fixed rate, proper subdifferentiable played losses and played-only legal supports. T=0 and unbounded V are permitted. The coarse corollary explicitly discards the nonpositive terminal term.
Teaching dependencies
BanditRL.OnlineSubgradientPolicy.regret_fixed
Exact Lean statement
theorem regret_fixed_coarse (V : Domain (E := E)) (η : ℝ) (hη : 0 < η) (loss : ℕ → E → EReal) (x₁ : E) (p : SupportPolicy (E := E)) (hx₁ : x₁ ∈ V.carrier) (T : ℕ) (hloss : ∀ t < T, BanditRL.OnlineSubgradientDescent.SubdifferentiableOn V (loss t)) (hlegal : LegalFeedback V (fun _ => η) loss x₁ p T) (u : E) (hu : u ∈ V.carrier) : regret V (fun _ => η) loss x₁ p u T ≤ ‖x₁ - u‖ ^ 2 / (2 * η) + η / 2 * (∑ t ∈ range T, ‖selected V (fun _ => η) loss x₁ p t‖ ^ 2)
Mathematics ↔ Lean

Decreasing rates with explicit diameter

Lean declarationBanditRL.OnlineSubgradientPolicy.regret_variable_bound

Compiled

Plain-English statement. Positive nonincreasing played steps and pairwise distance<=D control the weighted potential; the final denominator uses the last played rate.

Mathematical reading. Positive nonincreasing played steps and pairwise distance<=D control the weighted potential; the final denominator uses the last played rate.
Intuition
Positive nonincreasing played steps and pairwise distance<=D control the weighted potential; the final denominator uses the last played rate.
Why it is needed
Connect source Algorithm2.2 to its genuine selected-vector/projected trajectory and same-run bound.
Place in the proof
Orabona v10 printed19-21/PDF31-33; Theorem2.13 and eq2.1 printed13-15/PDF25-27.
Proof and Lean reading notes
Proof idea
Sum the actual one-step inequalities and apply weighted_potential_sum to actual squared output distances, using output_mem and pairwise control.
Lean reading notes
Positive horizon and played rates, nonincreasing rates, feasible initialization/comparator, played proper subdifferentiable losses, played-only legal supports and pairwise diameter control. The Metric.diam adapter additionally states boundedness. The endpoint denominator uses eta(T-1).
Teaching dependencies
BanditRL.OnlineSubgradientPolicy.one_step, BanditRL.OnlineSubgradientPolicy.output_mem, BanditRL.OnlineGradientDescent.weighted_potential_sum
Exact Lean statement
theorem regret_variable_bound (V : Domain (E := E)) (η : ℕ → ℝ) (loss : ℕ → E → EReal) (x₁ : E) (p : SupportPolicy (E := E)) (hx₁ : x₁ ∈ V.carrier) (T : ℕ) (hT : 0 < T) (hη : ∀ t < T, 0 < η t) (hmono : ∀ t, t + 1 < T → η (t + 1) ≤ η t) (hloss : ∀ t < T, BanditRL.OnlineSubgradientDescent.SubdifferentiableOn V (loss t)) (hlegal : LegalFeedback V η loss x₁ p T) (D : ℝ) (hdiam : ∀ x ∈ V.carrier, ∀ y ∈ V.carrier, ‖x - y‖ ≤ D) (u : E) (hu : u ∈ V.carrier) : regret V η loss x₁ p u T ≤ D ^ 2 / (2 * η (T - 1)) + (∑ t ∈ range T, η t / 2 * ‖selected V η loss x₁ p t‖ ^ 2) - ‖output V η loss x₁ p T - u‖ ^ 2 / (2 * η (T - 1))
Mathematics ↔ Lean

Tuning for one comparator distance

Lean declarationBanditRL.OnlineSubgradientPolicy.regret_tuned_distance

Compiled

Plain-English statement. D,G,T>0 and a distance bound give a tuned guarantee without requiring the entire domain bounded.

Mathematical reading. D,G,T>0 and a distance bound give a tuned guarantee without requiring the entire domain bounded.
Intuition
D,G,T>0 and a distance bound give a tuned guarantee without requiring the entire domain bounded.
Why it is needed
Connect source Algorithm2.2 to its genuine selected-vector/projected trajectory and same-run bound.
Place in the proof
Orabona v10 printed19-21/PDF31-33; Theorem2.13 and eq2.1 printed13-15/PDF25-27.
Proof and Lean reading notes
Proof idea
Bound initial squared distance and the actual support energy, discard the nonnegative terminal subtraction, and verify the positive tuned-rate identity with sqrt(T)^2=T.
Lean reading notes
D,G,T are positive. Feasible initialization, played proper subdifferentiable losses, played legality and actual selected-norm bounds all refer to the same eta=D/(G sqrt(T)) run. Initial-distance control serves one comparator; pairwise control serves every feasible comparator on that run.
Teaching dependencies
BanditRL.OnlineSubgradientPolicy.regret_fixed
Exact Lean statement
theorem regret_tuned_distance (V : Domain (E := E)) (loss : ℕ → E → EReal) (x₁ : E) (p : SupportPolicy (E := E)) (hx₁ : x₁ ∈ V.carrier) (T : ℕ) (hT : 0 < T) (D G : ℝ) (hD : 0 < D) (hG : 0 < G) (hloss : ∀ t < T, BanditRL.OnlineSubgradientDescent.SubdifferentiableOn V (loss t)) (hlegal : LegalFeedback V (fun _ => D / (G * Real.sqrt T)) loss x₁ p T) (u : E) (hu : u ∈ V.carrier) (hdist : ‖x₁ - u‖ ≤ D) (hgrad : ∀ t < T, ‖selected V (fun _ => D / (G * Real.sqrt T)) loss x₁ p t‖ ≤ G) : regret V (fun _ => D / (G * Real.sqrt T)) loss x₁ p u T ≤ D * G * Real.sqrt T
Mathematics ↔ Lean

The old current chooser is a legal policy

Lean declarationBanditRL.OnlineSubgradientPolicy.canonicalPolicy_legal

Compiled

Plain-English statement. The prior current-function/current-point choice is one member of the general history-policy family.

Mathematical reading. The prior current-function/current-point choice is one member of the general history-policy family.
Intuition
The prior current-function/current-point choice is one member of the general history-policy family.
Why it is needed
Connect source Algorithm2.2 to its genuine selected-vector/projected trajectory and same-run bound.
Place in the proof
Library structural refinement or adapter of Orabona v10 Algorithm2.2 (printed20/PDF32); this equality/interface fact is not a printed source theorem.
Proof and Lean reading notes
Proof idea
Use the existing Classical.choose membership theorem at a feasible query with nonempty global supports.
Lean reading notes
The exact original declaration and proof are retained. The source cards distinguish printed support/projection analysis from the derived finite-history interface. Expand the folded Lean to inspect this declaration’s own hypotheses.
Teaching dependencies
BanditRL.OnlineSubgradientDescent.currentSubgradient_mem
Exact Lean statement
theorem canonicalPolicy_legal (V : Domain (E := E)) : OracleLaw V (canonicalPolicy (E := E))
Mathematics ↔ Lean

Exact canonical trajectory bridge

Lean declarationBanditRL.OnlineSubgradientPolicy.canonical_output

Compiled

Plain-English statement. The general history implementation recovers the previous canonical recurrence at every time and every input regime.

Mathematical reading. The general history implementation recovers the previous canonical recurrence at every time and every input regime.
Intuition
The general history implementation recovers the previous canonical recurrence at every time and every input regime.
Why it is needed
Connect source Algorithm2.2 to its genuine selected-vector/projected trajectory and same-run bound.
Place in the proof
Library structural refinement or adapter of Orabona v10 Algorithm2.2 (printed20/PDF32); this equality/interface fact is not a printed source theorem.
Proof and Lean reading notes
Proof idea
Induct on time, unfold the same projection update and current selector, and rewrite the previous output equality. No legality or positive-rate premise is needed.
Lean reading notes
The exact original declaration and proof are retained. The source cards distinguish printed support/projection analysis from the derived finite-history interface. Expand the folded Lean to inspect this declaration’s own hypotheses.
Teaching dependencies
BanditRL.OnlineSubgradientPolicy.output_succ, BanditRL.OnlineSubgradientDescent.iterate
Exact Lean statement
theorem canonical_output (V : Domain (E := E)) (η : ℕ → ℝ) (loss : ℕ → E → EReal) (x₁ : E) (t : ℕ) : output V η loss x₁ canonicalPolicy t = BanditRL.OnlineSubgradientDescent.iterate V η loss x₁ t
Mathematics ↔ Lean

Exact canonical selected-vector bridge

Lean declarationBanditRL.OnlineSubgradientPolicy.canonical_selected

Compiled

Plain-English statement. The selected vector agrees exactly with the old currentSubgradient value, including the total-function fallback branch.

Mathematical reading. The selected vector agrees exactly with the old currentSubgradient value, including the total-function fallback branch.
Intuition
The selected vector agrees exactly with the old currentSubgradient value, including the total-function fallback branch.
Why it is needed
Connect source Algorithm2.2 to its genuine selected-vector/projected trajectory and same-run bound.
Place in the proof
Library structural refinement or adapter of Orabona v10 Algorithm2.2 (printed20/PDF32); this equality/interface fact is not a printed source theorem.
Proof and Lean reading notes
Proof idea
Unfold the policy application and rewrite canonical_output.
Lean reading notes
The exact original declaration and proof are retained. The source cards distinguish printed support/projection analysis from the derived finite-history interface. Expand the folded Lean to inspect this declaration’s own hypotheses.
Teaching dependencies
BanditRL.OnlineSubgradientPolicy.canonical_output, BanditRL.OnlineSubgradientDescent.currentSubgradient
Exact Lean statement
theorem canonical_selected (V : Domain (E := E)) (η : ℕ → ℝ) (loss : ℕ → E → EReal) (x₁ : E) (t : ℕ) : selected V η loss x₁ canonicalPolicy t = BanditRL.OnlineSubgradientDescent.currentSubgradient (loss t) (BanditRL.OnlineSubgradientDescent.iterate V η loss x₁ t)

Maintainer contract

Open the canonical completion definition and blockers

A bounded integration of the existing generic policy module: 21 production proofs, seven definitions, two abbreviations and the complete 92-declaration canary module.

Remaining blockers

  • Source obligations outside this generic policy chain retain their existing owners.

Chapter implementation status

The compact summary keeps the reading route visible. Open it for source-linked declarations and exact remaining gaps.

Open 0 implementation records0 compiled · 0 partial · 0 blocked · 0 planned
MilestoneStatusLean declarationRemaining gap

Open boundaries

  • Deterministic policies receive whole loss functions and actual finite histories. The comparison holds one policy and initialization fixed. Randomized laws, executable finite-query oracles and anytime tuning require separate interfaces. Chapter and book completion remain separate.

All Lean modules in this chapter

Open the complete module list (1 modules)
ModuleDeclarationsProject importsStatus
BanditRLProof.OnlineSubgradientPolicy301Compiled