Lean module · Frontier
BanditRLProof.Algorithms.StochasticGradientBanditTheoremTwoStarvation
This module isolates the deterministic consumer in Step 1 of Appendix C of Baudry--Johnson--Vary--Pike-Burke--Rebeschini (NeurIPS 2025). On the actual generated SGB action/reward trace, once exactly n optimal-arm pulls have occurred, a path with no later optimal-arm pull has exactly Delta * (T - n) sampled pseudo-regret.
Module map
Imports
BanditRLProof.Algorithms.StochasticGradientBanditTwoArmTheoremOne, BanditRLProof.IntegrabilitySums, BanditRLProof.LeafLemmas, BanditRLProof.PullCountDecomposition
Imported by
BanditRLProof, BanditRLProof.Algorithms.StochasticGradientBanditTheoremTwoNthPull
Declarations
Open an item to read its exact compact statement and source link. Detailed teaching notes are linked when registered.
def
BanditRLProof.StochasticGradientBandit.twoArmGeneratedAction
Compiled
The action coordinate of the canonical SGB trajectory.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmGeneratedActionReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
def twoArmGeneratedAction {Env : Type v} (sample : Env × ((k : Nat) → Fin 2 × Real)) : ActionTrace (Fin 2)
def
BanditRLProof.StochasticGradientBandit.twoArmOptimalPullCount
Compiled
Number of optimal-arm (`0`) pulls in the first `horizon` generated rounds.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmOptimalPullCountReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
def twoArmOptimalPullCount {Env : Type v} (horizon : Nat) (sample : Env × ((k : Nat) → Fin 2 × Real)) : Nat
def
BanditRLProof.StochasticGradientBandit.twoArmStepOneThreshold
Compiled
The source Step-1 threshold `1 / (2*T)`.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmStepOneThresholdReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
def twoArmStepOneThreshold (horizon : Nat) : Real
def
BanditRLProof.StochasticGradientBandit.twoArmStepOneTriggerEvent
Compiled
At a chronological prefix ending at `prefix`, the source Step-1 trigger says that the next optimal-arm probability is at most `1/(2*T)` and that exactly `n` optimal-arm pulls have occurred through that prefix. The distinction between chronological `prefix` and pull index `n` is intentional and source-critical.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmStepOneTriggerEventReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
def twoArmStepOneTriggerEvent {Env : Type v} [MeasurableSpace Env] (eta : Real) (cutoff n horizon : Nat) : Set (Env × ((k : Nat) → Fin 2 × Real))
def
BanditRLProof.StochasticGradientBandit.twoArmStepOneStarvationEvent
Compiled
The measurable part of the Appendix-C Step-1 starvation event: a trigger prefix occurs and the total number of optimal-arm pulls by `horizon` remains exactly `n`. Equality of the two pull counts is the finite-trace statement that there is no later optimal-arm selection.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmStepOneStarvationEventReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
def twoArmStepOneStarvationEvent {Env : Type v} [MeasurableSpace Env] (eta : Real) (cutoff n horizon : Nat) : Set (Env × ((k : Nat) → Fin 2 × Real))
theorem
BanditRLProof.StochasticGradientBandit.measurable_twoArmGeneratedAction
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.measurable_twoArmGeneratedActionReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem measurable_twoArmGeneratedAction {Env : Type v} [MeasurableSpace Env] (t : Nat) : Measurable (fun sample : Env × ((k : Nat) → Fin 2 × Real) => twoArmGeneratedAction sample t)
theorem
BanditRLProof.StochasticGradientBandit.measurable_twoArmOptimalPullCount
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.measurable_twoArmOptimalPullCountReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem measurable_twoArmOptimalPullCount {Env : Type v} [MeasurableSpace Env] (horizon : Nat) : Measurable (twoArmOptimalPullCount (Env := Env) horizon)
def
BanditRLProof.StochasticGradientBandit.twoArmTerminalOptimalPullCountEvent
Compiled
The exact terminal optimal-arm count fiber at a finite horizon.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmTerminalOptimalPullCountEventReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
def twoArmTerminalOptimalPullCountEvent {Env : Type v} [MeasurableSpace Env] (n horizon : Nat) : Set (Env × ((k : Nat) → Fin 2 × Real))
theorem
BanditRLProof.StochasticGradientBandit.measurableSet_twoArmTerminalOptimalPullCountEvent
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.measurableSet_twoArmTerminalOptimalPullCountEventReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem measurableSet_twoArmTerminalOptimalPullCountEvent {Env : Type v} [MeasurableSpace Env] (n horizon : Nat) : MeasurableSet (twoArmTerminalOptimalPullCountEvent (Env := Env) n horizon)
def
BanditRLProof.StochasticGradientBandit.twoArmOptimalPullCountBelowEvent
Compiled
The finite-horizon event that fewer than `m` optimal-arm pulls occurred.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmOptimalPullCountBelowEventReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
def twoArmOptimalPullCountBelowEvent {Env : Type v} [MeasurableSpace Env] (m horizon : Nat) : Set (Env × ((k : Nat) → Fin 2 × Real))
theorem
BanditRLProof.StochasticGradientBandit.measurableSet_twoArmOptimalPullCountBelowEvent
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.measurableSet_twoArmOptimalPullCountBelowEventReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem measurableSet_twoArmOptimalPullCountBelowEvent {Env : Type v} [MeasurableSpace Env] (m horizon : Nat) : MeasurableSet (twoArmOptimalPullCountBelowEvent (Env := Env) m horizon)
theorem
BanditRLProof.StochasticGradientBandit.twoArmOptimalPullCountBelowEvent_eq_iUnion_terminalCount
Compiled
The below-threshold count event is the finite disjoint-by-value partition into its exact terminal-count fibers.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmOptimalPullCountBelowEvent_eq_iUnion_terminalCountReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem twoArmOptimalPullCountBelowEvent_eq_iUnion_terminalCount {Env : Type v} [MeasurableSpace Env] (m horizon : Nat) : twoArmOptimalPullCountBelowEvent (Env := Env) m horizon = ⋃ n : Fin m, twoArmTerminalOptimalPullCountEvent (Env := Env) (n : Nat) horizon
theorem
BanditRLProof.StochasticGradientBandit.measurableSet_twoArmStepOneTriggerEvent
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.measurableSet_twoArmStepOneTriggerEventReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem measurableSet_twoArmStepOneTriggerEvent {Env : Type v} [MeasurableSpace Env] (eta : Real) (cutoff n horizon : Nat) : MeasurableSet (twoArmStepOneTriggerEvent (Env := Env) eta cutoff n horizon)
theorem
BanditRLProof.StochasticGradientBandit.measurableSet_twoArmStepOneStarvationEvent
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.measurableSet_twoArmStepOneStarvationEventReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem measurableSet_twoArmStepOneStarvationEvent {Env : Type v} [MeasurableSpace Env] (eta : Real) (cutoff n horizon : Nat) : MeasurableSet (twoArmStepOneStarvationEvent (Env := Env) eta cutoff n horizon)
theorem
BanditRLProof.StochasticGradientBandit.finTwo_eq_zero_or_one
Compiled Internal helper
No declaration docstring is present; use the chapter context and exact statement below.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.finTwo_eq_zero_or_oneReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
private theorem finTwo_eq_zero_or_one (action : Fin 2) : action = 0 ∨ action = 1
theorem
BanditRLProof.StochasticGradientBandit.twoArmSampledPseudoRegret_nonneg
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmSampledPseudoRegret_nonnegReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem twoArmSampledPseudoRegret_nonneg {Env : Type v} (Delta : Real) (hDelta : 0 ≤ Delta) (horizon : Nat) (sample : Env × ((k : Nat) → Fin 2 × Real)) : 0 ≤ twoArmSampledPseudoRegret Delta horizon sample
theorem
BanditRLProof.StochasticGradientBandit.twoArmSampledPseudoRegret_eq_gap_mul_suboptimalPullCount
Compiled
The two-arm sampled pseudo-regret is exactly the gap times arm-`1` pulls.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmSampledPseudoRegret_eq_gap_mul_suboptimalPullCountReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem twoArmSampledPseudoRegret_eq_gap_mul_suboptimalPullCount {Env : Type v} (Delta : Real) (horizon : Nat) (sample : Env × ((k : Nat) → Fin 2 × Real)) : twoArmSampledPseudoRegret Delta horizon sample = Delta * (pullCount (twoArmGeneratedAction sample) 1 horizon : Real)
theorem
BanditRLProof.StochasticGradientBandit.twoArmOptimalPullCount_add_suboptimalPullCount_eq_horizon
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmOptimalPullCount_add_suboptimalPullCount_eq_horizonReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem twoArmOptimalPullCount_add_suboptimalPullCount_eq_horizon {Env : Type v} (horizon : Nat) (sample : Env × ((k : Nat) → Fin 2 × Real)) : twoArmOptimalPullCount horizon sample + pullCount (twoArmGeneratedAction sample) 1 horizon = horizon
theorem
BanditRLProof.StochasticGradientBandit.twoArmSampledPseudoRegret_eq_gap_mul_horizon_sub_of_optimalPullCount_eq
Compiled
Exactly `n` optimal pulls force the exact source starvation charge.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmSampledPseudoRegret_eq_gap_mul_horizon_sub_of_optimalPullCount_eqReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem twoArmSampledPseudoRegret_eq_gap_mul_horizon_sub_of_optimalPullCount_eq {Env : Type v} (Delta : Real) (n horizon : Nat) (sample : Env × ((k : Nat) → Fin 2 × Real)) (hcount : twoArmOptimalPullCount horizon sample = n) : twoArmSampledPseudoRegret Delta horizon sample = Delta * ((horizon - n : Nat) : Real)
theorem
BanditRLProof.StochasticGradientBandit.twoArmTerminalOptimalPullCountEvent_sampledPseudoRegret_eq
Compiled
On one terminal-count fiber, sampled pseudo-regret has the exact charge used by the Appendix-C starvation consumer.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmTerminalOptimalPullCountEvent_sampledPseudoRegret_eqReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem twoArmTerminalOptimalPullCountEvent_sampledPseudoRegret_eq {Env : Type v} [MeasurableSpace Env] (Delta : Real) (n horizon : Nat) (sample : Env × ((k : Nat) → Fin 2 × Real)) (hcount : sample ∈ twoArmTerminalOptimalPullCountEvent (Env := Env) n horizon) : twoArmSampledPseudoRegret Delta horizon sample = Delta * ((horizon - n : Nat) : Real)
theorem
BanditRLProof.StochasticGradientBandit.mem_twoArmStepOneStarvationEvent_of_lowProbability_noFurtherOptimalPull
Compiled
The explicit chronological no-return premise constructs membership in the measurable starvation event. This is the pathwise half of Appendix-C Step 1; it does not assign a probability to the event.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.mem_twoArmStepOneStarvationEvent_of_lowProbability_noFurtherOptimalPullReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem mem_twoArmStepOneStarvationEvent_of_lowProbability_noFurtherOptimalPull {Env : Type v} [MeasurableSpace Env] (eta : Real) (cutoff n horizon : Nat) (sample : Env × ((k : Nat) → Fin 2 × Real)) (hcutoff : cutoff + 1 ≤ horizon) (hlow : twoArmSuccessProbability eta cutoff sample ≤ twoArmStepOneThreshold horizon) (hcount : twoArmOptimalPullCount (cutoff + 1) sample = n) (hnoFurther : ∀ t, cutoff + 1 ≤ t → t < horizon → twoArmGeneratedAction sample t ≠ 0) : sample ∈ twoArmStepOneStarvationEvent (Env := Env) eta cutoff n horizon
theorem
BanditRLProof.StochasticGradientBandit.twoArmStepOneStarvationEvent_sampledPseudoRegret_eq
Compiled
Every path in the measurable starvation event has the exact Step-1 charge.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmStepOneStarvationEvent_sampledPseudoRegret_eqReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem twoArmStepOneStarvationEvent_sampledPseudoRegret_eq {Env : Type v} [MeasurableSpace Env] (eta Delta : Real) (cutoff n horizon : Nat) (sample : Env × ((k : Nat) → Fin 2 × Real)) (hstarve : sample ∈ twoArmStepOneStarvationEvent (Env := Env) eta cutoff n horizon) : twoArmSampledPseudoRegret Delta horizon sample = Delta * ((horizon - n : Nat) : Real)
theorem
BanditRLProof.StochasticGradientBandit.integrable_twoArmSampledPseudoRegret_of_finiteMeasure
Compiled
Integrability of finite-horizon sampled regret under any finite trace law.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.integrable_twoArmSampledPseudoRegret_of_finiteMeasureReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem integrable_twoArmSampledPseudoRegret_of_finiteMeasure {Env : Type v} [MeasurableSpace Env] (mu : Measure (Env × ((k : Nat) → Fin 2 × Real))) [IsFiniteMeasure mu] (Delta : Real) (horizon : Nat) : Integrable (twoArmSampledPseudoRegret (Env := Env) Delta horizon) mu
theorem
BanditRLProof.StochasticGradientBandit.twoArmOptimalPullCountBelowEvent_charge_mul_probability_le_integral
Compiled
Fewer than `m` optimal-arm pulls at `horizon` force at least the uniform `Delta * (horizon - m)` sampled-pseudo-regret charge. This is the finite-horizon consumer for a below-count event; it does not provide any positive-mass lower bound for that event. The measure need only be finite; probability and expectation terminology is reserved for probability-measure wrappers such as the fixed-IID consumer below.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmOptimalPullCountBelowEvent_charge_mul_probability_le_integralReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem twoArmOptimalPullCountBelowEvent_charge_mul_probability_le_integral {Env : Type v} [MeasurableSpace Env] (mu : Measure (Env × ((k : Nat) → Fin 2 × Real))) [IsFiniteMeasure mu] (Delta : Real) (hDelta : 0 ≤ Delta) (m horizon : Nat) : Delta * ((horizon - m : Nat) : Real) * mu.real (twoArmOptimalPullCountBelowEvent (Env := Env) m horizon) ≤ integral mu (twoArmSampledPseudoRegret (Env := Env) Delta horizon)
theorem
BanditRLProof.StochasticGradientBandit.twoArmStepOneStarvationEvent_charge_mul_probability_le_integral
Compiled
Expectation-level deterministic Step-1 consumer. It lower-bounds expected sampled regret by the exact starvation charge times the probability of the actual generated starvation event. The missing source producer is precisely the separate lower bound on this event probability from the trigger event.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmStepOneStarvationEvent_charge_mul_probability_le_integralReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem twoArmStepOneStarvationEvent_charge_mul_probability_le_integral {Env : Type v} [MeasurableSpace Env] (mu : Measure (Env × ((k : Nat) → Fin 2 × Real))) [IsFiniteMeasure mu] (eta Delta : Real) (hDelta : 0 ≤ Delta) (cutoff n horizon : Nat) : Delta * ((horizon - n : Nat) : Real) * mu.real (twoArmStepOneStarvationEvent (Env := Env) eta cutoff n horizon) ≤ integral mu (twoArmSampledPseudoRegret (Env := Env) Delta horizon)
theorem
BanditRLProof.StochasticGradientBandit.twoArmFixedIIDStepOneStarvationEvent_charge_mul_probability_le_integral
Compiled
The same deterministic Step-1 consumer specialized to the canonical generated fixed-IID trajectory with a Dirac environment prior. This wrapper covers the paper's Rademacher/Dirac arm-law instance once that explicit arm-law adapter is supplied; it still does not lower-bound the starvation-event probability.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmFixedIIDStepOneStarvationEvent_charge_mul_probability_le_integralReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem twoArmFixedIIDStepOneStarvationEvent_charge_mul_probability_le_integral (armLaw : Fin 2 -> Measure Real) (hprob : forall arm, IsProbabilityMeasure (armLaw arm)) (eta Delta : Real) (hDelta : 0 <= Delta) (cutoff n horizon : Nat) : Delta * ((horizon - n : Nat) : Real) * (twoArmTrajectoryMeasure (Measure.dirac ()) eta (twoArmFixedIIDEnvironment armLaw hprob)).real (twoArmStepOneStarvationEvent (Env := Unit) eta cutoff n horizon) <= integral (twoArmTrajectoryMeasure (Measure.dirac ()) eta (twoArmFixedIIDEnvironment armLaw hprob)) (twoArmSampledPseudoRegret (Env := Unit) Delta horizon)