Lean module · Frontier
BanditRLProof.Algorithms.StochasticGradientBanditAudit
This module formalizes the finite-action algebra in Algorithm 1 and Equations (3)--(7) of Baudry--Johnson--Vary--Pike-Burke--Rebeschini (NeurIPS 2025).
Module map
Imports
No project-local imports.
Imported by
BanditRLProof, BanditRLProof.Algorithms.StochasticGradientBanditTrajectoryAudit
Declarations
Open an item to read its exact compact statement and source link. Detailed teaching notes are linked when registered.
def
BanditRLProof.StochasticGradientBandit.softmaxDenominator
Compiled
The denominator in the source softmax rule, Equation (3).
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.softmaxDenominatorReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
def softmaxDenominator (theta : Action -> Real) : Real
def
BanditRLProof.StochasticGradientBandit.softmaxProbability
Compiled
The source softmax sampling probability, Equation (3).
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.softmaxProbabilityReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
def softmaxProbability (theta : Action -> Real) (a : Action) : Real
theorem
BanditRLProof.StochasticGradientBandit.softmaxDenominator_pos
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.softmaxDenominator_posReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem softmaxDenominator_pos [Nonempty Action] (theta : Action -> Real) : 0 < softmaxDenominator theta
theorem
BanditRLProof.StochasticGradientBandit.softmaxProbability_pos
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.softmaxProbability_posReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem softmaxProbability_pos [Nonempty Action] (theta : Action -> Real) (a : Action) : 0 < softmaxProbability theta a
theorem
BanditRLProof.StochasticGradientBandit.softmaxProbability_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.softmaxProbability_nonnegReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem softmaxProbability_nonneg [Nonempty Action] (theta : Action -> Real) (a : Action) : 0 <= softmaxProbability theta a
theorem
BanditRLProof.StochasticGradientBandit.softmaxProbability_sum
Compiled
Equation (3) defines a normalized finite sampling law.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.softmaxProbability_sumReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem softmaxProbability_sum [Nonempty Action] (theta : Action -> Real) : ∑ a, softmaxProbability theta a = 1
theorem
BanditRLProof.StochasticGradientBandit.softmaxProbability_le_one
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.softmaxProbability_le_oneReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem softmaxProbability_le_one [Nonempty Action] (theta : Action -> Real) (a : Action) : softmaxProbability theta a <= 1
def
BanditRLProof.StochasticGradientBandit.sourceIncrement
Compiled
Algorithm 1 / Equation (4), before multiplication by the learning rate.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.sourceIncrementReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
def sourceIncrement (p : Action -> Real) (reward : Real) (selected k : Action) : Real
theorem
BanditRLProof.StochasticGradientBandit.sourceIncrement_eq_indicator
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.sourceIncrement_eq_indicatorReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem sourceIncrement_eq_indicator (p : Action -> Real) (reward : Real) (selected k : Action) : sourceIncrement p reward selected k = reward * ((if selected = k then 1 else 0) - p k)
theorem
BanditRLProof.StochasticGradientBandit.sum_sourceIncrement
Compiled
Algorithm 1 preserves the zero sum of its parameter vector.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.sum_sourceIncrementReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem sum_sourceIncrement (p : Action -> Real) (reward : Real) (selected : Action) (hp : ∑ k, p k = 1) : ∑ k, sourceIncrement p reward selected k = 0
def
BanditRLProof.StochasticGradientBandit.policyValue
Compiled
The policy value at a fixed pre-action history.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.policyValueReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
def policyValue (p mean : Action -> Real) : Real
def
BanditRLProof.StochasticGradientBandit.expectedSourceIncrement
Compiled
The finite conditional-mean version of the source expected update.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.expectedSourceIncrementReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
def expectedSourceIncrement (p mean : Action -> Real) (k : Action) : Real
theorem
BanditRLProof.StochasticGradientBandit.expectedSourceIncrement_eq_gradientCoordinate
Compiled
Equation (5), in policy-gradient-coordinate form.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.expectedSourceIncrement_eq_gradientCoordinateReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem expectedSourceIncrement_eq_gradientCoordinate (p mean : Action -> Real) (k : Action) : expectedSourceIncrement p mean k = p k * (mean k - policyValue p mean)
def
BanditRLProof.StochasticGradientBandit.instantaneousGap
Compiled
The source instantaneous expected gap `E_t[Delta_{A_t}]`.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.instantaneousGapReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
def instantaneousGap (p gap : Action -> Real) : Real
theorem
BanditRLProof.StochasticGradientBandit.instantaneousGap_eq_bestMean_sub_policyValue
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.instantaneousGap_eq_bestMean_sub_policyValueReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem instantaneousGap_eq_bestMean_sub_policyValue (p mean gap : Action -> Real) (bestMean : Real) (hp : ∑ a, p a = 1) (hgap : ∀ a, gap a = bestMean - mean a) : instantaneousGap p gap = bestMean - policyValue p mean
theorem
BanditRLProof.StochasticGradientBandit.expectedSourceIncrement_eq_gapCoordinate
Compiled
Equation (5), in instantaneous-gap-coordinate form.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.expectedSourceIncrement_eq_gapCoordinateReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem expectedSourceIncrement_eq_gapCoordinate (p mean gap : Action -> Real) (bestMean : Real) (k : Action) (hp : ∑ a, p a = 1) (hgap : ∀ a, gap a = bestMean - mean a) : expectedSourceIncrement p mean k = p k * (instantaneousGap p gap - gap k)
def
BanditRLProof.StochasticGradientBandit.gapExpectedIncrement
Compiled
The gap-coordinate update isolated from Equation (5).
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.gapExpectedIncrementReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
def gapExpectedIncrement (p gap : Action -> Real) (k : Action) : Real
theorem
BanditRLProof.StochasticGradientBandit.expectedSourceIncrement_eq_gapExpectedIncrement
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.expectedSourceIncrement_eq_gapExpectedIncrementReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem expectedSourceIncrement_eq_gapExpectedIncrement (p mean gap : Action -> Real) (bestMean : Real) (k : Action) (hp : ∑ a, p a = 1) (hgap : ∀ a, gap a = bestMean - mean a) : expectedSourceIncrement p mean k = gapExpectedIncrement p gap k
theorem
BanditRLProof.StochasticGradientBandit.instantaneousGap_ge_minGap_mul_failureMass
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.instantaneousGap_ge_minGap_mul_failureMassReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem instantaneousGap_ge_minGap_mul_failureMass (p gap : Action -> Real) (best : Action) (Delta : Real) (hp : ∑ a, p a = 1) (hp_nonneg : ∀ a, 0 <= p a) (hgap_best : gap best = 0) (hgap_min : ∀ a, a ≠ best -> Delta <= gap a) : Delta * (1 - p best) <= instantaneousGap p gap
theorem
BanditRLProof.StochasticGradientBandit.gapExpectedIncrement_best_ge
Compiled
Pointwise Equation (6): the best coordinate gains at least the positive gap times its success/failure probability product.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.gapExpectedIncrement_best_geReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem gapExpectedIncrement_best_ge (p gap : Action -> Real) (best : Action) (Delta : Real) (hp : ∑ a, p a = 1) (hp_nonneg : ∀ a, 0 <= p a) (hgap_best : gap best = 0) (hgap_min : ∀ a, a ≠ best -> Delta <= gap a) : Delta * (p best * (1 - p best)) <= gapExpectedIncrement p gap best
def
BanditRLProof.StochasticGradientBandit.bestParameterIncrementSum
Compiled
The finite-horizon best-parameter expectation represented by Equation (6), after conditioning at each round.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.bestParameterIncrementSumReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
def bestParameterIncrementSum (eta : Real) (p : Nat -> Action -> Real) (gap : Action -> Real) (best : Action) (horizon : Nat) : Real
theorem
BanditRLProof.StochasticGradientBandit.bestParameterIncrementSum_ge
Compiled
Finite-horizon Equation (6).
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.bestParameterIncrementSum_geReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem bestParameterIncrementSum_ge (eta Delta : Real) (p : Nat -> Action -> Real) (gap : Action -> Real) (best : Action) (horizon : Nat) (heta : 0 <= eta) (hp : ∀ t, ∑ a, p t a = 1) (hp_nonneg : ∀ t a, 0 <= p t a) (hgap_best : gap best = 0) (hgap_min : ∀ a, a ≠ best -> Delta <= gap a) : eta * Delta * (∑ t ∈ Finset.range horizon, p t best * (1 - p t best)) <= bestParameterIncrementSum eta p gap best horizon
def
BanditRLProof.StochasticGradientBandit.sourceExpectedPseudoRegret
Compiled
The gap-weighted finite-horizon expected pseudo-regret from Equation (2).
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.sourceExpectedPseudoRegretReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
def sourceExpectedPseudoRegret (p : Nat -> Action -> Real) (gap : Action -> Real) (horizon : Nat) : Real
theorem
BanditRLProof.StochasticGradientBandit.instantaneousGap_le_maxGap_mul_failureMass
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.instantaneousGap_le_maxGap_mul_failureMassReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem instantaneousGap_le_maxGap_mul_failureMass (p gap : Action -> Real) (best : Action) (DeltaMax : Real) (hp : ∑ a, p a = 1) (hp_nonneg : ∀ a, 0 <= p a) (hgap_best : gap best = 0) (hgap_max : ∀ a, a ≠ best -> gap a <= DeltaMax) : instantaneousGap p gap <= DeltaMax * (1 - p best)
theorem
BanditRLProof.StochasticGradientBandit.failureMass_eq_successFailure_add_sq
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.failureMass_eq_successFailure_add_sqReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem failureMass_eq_successFailure_add_sq (x : Real) : 1 - x = x * (1 - x) + (1 - x) ^ 2
theorem
BanditRLProof.StochasticGradientBandit.sourceRegretDecomposition_le
Compiled
Equation (7), with its positive learning-rate/minimum-gap denominator and maximum-gap envelope exposed explicitly.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.sourceRegretDecomposition_leReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem sourceRegretDecomposition_le (eta Delta DeltaMax : Real) (p : Nat -> Action -> Real) (gap : Action -> Real) (best : Action) (horizon : Nat) (heta : 0 < eta) (hDelta : 0 < Delta) (hDeltaMax : 0 <= DeltaMax) (hp : ∀ t, ∑ a, p t a = 1) (hp_nonneg : ∀ t a, 0 <= p t a) (hgap_best : gap best = 0) (hgap_min : ∀ a, a ≠ best -> Delta <= gap a) (hgap_max : ∀ a, a ≠ best -> gap a <= DeltaMax) : sourceExpectedPseudoRegret p gap horizon <= (DeltaMax / (eta * Delta)) * bestParameterIncrementSum eta p gap best horizon + DeltaMax * (∑ t ∈ Finset.range horizon, (1 - p t best) ^ 2)