Lean module · Frontier
BanditRLProof.Algorithms.StochasticGradientBanditTheoremTwoNthPull
Appendix C of Baudry--Johnson--Vary--Pike-Burke--Rebeschini reindexes the optimal-arm dynamics by the number of times that arm has been selected. The generated Lean trajectory is instead indexed by chronological time. This module supplies the missing bridge without assuming that the adaptively selected reward subsequence is IID.
Module map
Imports
BanditRLProof.Algorithms.StochasticGradientBanditTheoremTwoStarvation, BanditRLProof.MeasurablePullCount
Imported by
BanditRLProof, BanditRLProof.Algorithms.StochasticGradientBanditTheoremTwoLatentReward
Declarations
Open an item to read its exact compact statement and source link. Detailed teaching notes are linked when registered.
def
BanditRLProof.StochasticGradientBandit.twoArmPrefixGeneratedAction
Compiled
Complete an inclusive finite prefix to an action trace, using arm `0` outside the prefix. Only coordinates through `prefix` are consumed below.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmPrefixGeneratedActionReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
def twoArmPrefixGeneratedAction {Env : Type v} (chron : Nat) (context : Env × History.FinitePairHistory (Fin 2) Real chron) : ActionTrace (Fin 2)
def
BanditRLProof.StochasticGradientBandit.twoArmPrefixOptimalPullCount
Compiled
Optimal-arm pulls visible in an inclusive finite prefix.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmPrefixOptimalPullCountReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
def twoArmPrefixOptimalPullCount {Env : Type v} (chron : Nat) (context : Env × History.FinitePairHistory (Fin 2) Real chron) : Nat
theorem
BanditRLProof.StochasticGradientBandit.measurable_twoArmPrefixGeneratedAction
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_twoArmPrefixGeneratedActionReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem measurable_twoArmPrefixGeneratedAction {Env : Type v} [MeasurableSpace Env] (chron t : Nat) : Measurable (fun context : Env × History.FinitePairHistory (Fin 2) Real chron => twoArmPrefixGeneratedAction chron context t)
theorem
BanditRLProof.StochasticGradientBandit.measurable_twoArmPrefixOptimalPullCount
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_twoArmPrefixOptimalPullCountReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem measurable_twoArmPrefixOptimalPullCount {Env : Type v} [MeasurableSpace Env] (chron : Nat) : Measurable (twoArmPrefixOptimalPullCount (Env := Env) chron)
theorem
BanditRLProof.StochasticGradientBandit.twoArmPrefixOptimalPullCount_environmentPrefix_eq
Compiled
The finite-prefix count is exactly the chronological count on the ambient trajectory.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmPrefixOptimalPullCount_environmentPrefix_eqReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
@[simp] theorem twoArmPrefixOptimalPullCount_environmentPrefix_eq {Env : Type v} [MeasurableSpace Env] (chron : Nat) (sample : Env × ((k : Nat) -> Fin 2 × Real)) : twoArmPrefixOptimalPullCount chron (twoArmEnvironmentPrefix chron sample) = twoArmOptimalPullCount (chron + 1) sample
def
BanditRLProof.StochasticGradientBandit.twoArmInclusiveOptimalPullCountProcess
Compiled
Inclusive optimal-arm pull count as a chronological stochastic process.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmInclusiveOptimalPullCountProcessReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
def twoArmInclusiveOptimalPullCountProcess {Env : Type v} [MeasurableSpace Env] (chron : Nat) (sample : Env × ((k : Nat) -> Fin 2 × Real)) : Nat
theorem
BanditRLProof.StochasticGradientBandit.adapted_twoArmInclusiveOptimalPullCountProcess
Compiled
The inclusive count process is adapted to the canonical environment and generated-prefix filtration.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.adapted_twoArmInclusiveOptimalPullCountProcessReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem adapted_twoArmInclusiveOptimalPullCountProcess {Env : Type v} [MeasurableSpace Env] : Adapted (twoArmPrefixFiltration (Env := Env)) (twoArmInclusiveOptimalPullCountProcess (Env := Env))
def
BanditRLProof.StochasticGradientBandit.twoArmNthOptimalPullTime
Compiled
Zero-based time of the requested optimal-arm pull. The value is `top` when that pull never occurs.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmNthOptimalPullTimeReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
def twoArmNthOptimalPullTime {Env : Type v} [MeasurableSpace Env] (pullIndex : Nat) : Env × ((k : Nat) -> Fin 2 × Real) -> WithTop Nat
theorem
BanditRLProof.StochasticGradientBandit.isStoppingTime_twoArmNthOptimalPullTime
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.isStoppingTime_twoArmNthOptimalPullTimeReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem isStoppingTime_twoArmNthOptimalPullTime {Env : Type v} [MeasurableSpace Env] (pullIndex : Nat) : IsStoppingTime (twoArmPrefixFiltration (Env := Env)) (twoArmNthOptimalPullTime (Env := Env) pullIndex)
theorem
BanditRLProof.StochasticGradientBandit.measurable_twoArmNthOptimalPullTime
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_twoArmNthOptimalPullTimeReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem measurable_twoArmNthOptimalPullTime {Env : Type v} [MeasurableSpace Env] (pullIndex : Nat) : Measurable (twoArmNthOptimalPullTime (Env := Env) pullIndex)
theorem
BanditRLProof.StochasticGradientBandit.twoArmNthOptimalPullTime_eq_top_iff
Compiled
`top` is precisely the explicit not-yet-pulled case.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmNthOptimalPullTime_eq_top_iffReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem twoArmNthOptimalPullTime_eq_top_iff {Env : Type v} [MeasurableSpace Env] (pullIndex : Nat) (sample : Env × ((k : Nat) -> Fin 2 × Real)) : twoArmNthOptimalPullTime pullIndex sample = (⊤ : WithTop Nat) <-> forall chron : Nat, twoArmOptimalPullCount (chron + 1) sample ≠ pullIndex + 1
theorem
BanditRLProof.StochasticGradientBandit.twoArmOptimalPullCount_lt_succ_of_nthOptimalPullTime_eq_top
Compiled
A missing zero-based requested pull keeps every finite-horizon count below the corresponding positive count level.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmOptimalPullCount_lt_succ_of_nthOptimalPullTime_eq_topReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem twoArmOptimalPullCount_lt_succ_of_nthOptimalPullTime_eq_top {Env : Type v} [MeasurableSpace Env] (pullIndex horizon : Nat) (sample : Env × ((k : Nat) -> Fin 2 × Real)) (htop : twoArmNthOptimalPullTime pullIndex sample = (⊤ : WithTop Nat)) : twoArmOptimalPullCount horizon sample < pullIndex + 1
theorem
BanditRLProof.StochasticGradientBandit.twoArmOptimalPullCount_lt_of_fin_nthOptimalPullTime_eq_top
Compiled
If one of the first `m` requested optimal-arm pulls is missing, every finite-horizon optimal-arm count is strictly below `m`.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmOptimalPullCount_lt_of_fin_nthOptimalPullTime_eq_topReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem twoArmOptimalPullCount_lt_of_fin_nthOptimalPullTime_eq_top {Env : Type v} [MeasurableSpace Env] (m horizon : Nat) (i : Fin m) (sample : Env × ((k : Nat) -> Fin 2 × Real)) (htop : twoArmNthOptimalPullTime (i : Nat) sample = (⊤ : WithTop Nat)) : twoArmOptimalPullCount horizon sample < m
theorem
BanditRLProof.StochasticGradientBandit.twoArmNthOptimalPullTime_count_succ_eq
Compiled
At every finite nth-pull time, the inclusive count hits its target.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmNthOptimalPullTime_count_succ_eqReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem twoArmNthOptimalPullTime_count_succ_eq {Env : Type v} [MeasurableSpace Env] (pullIndex : Nat) (sample : Env × ((k : Nat) -> Fin 2 × Real)) (hfinite : twoArmNthOptimalPullTime pullIndex sample ≠ (⊤ : WithTop Nat)) : twoArmOptimalPullCount ((twoArmNthOptimalPullTime pullIndex sample).untopA + 1) sample = pullIndex + 1
theorem
BanditRLProof.StochasticGradientBandit.twoArmNthOptimalPullTime_count_succ_eq_of_eq
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.twoArmNthOptimalPullTime_count_succ_eq_of_eqReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem twoArmNthOptimalPullTime_count_succ_eq_of_eq {Env : Type v} [MeasurableSpace Env] (pullIndex t : Nat) (sample : Env × ((k : Nat) -> Fin 2 × Real)) (htime : twoArmNthOptimalPullTime pullIndex sample = (t : WithTop Nat)) : twoArmOptimalPullCount (t + 1) sample = pullIndex + 1
theorem
BanditRLProof.StochasticGradientBandit.twoArmNthOptimalPullTime_action_eq_zero
Compiled
A finite nth-pull time is a genuine selection of the optimal arm.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmNthOptimalPullTime_action_eq_zeroReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem twoArmNthOptimalPullTime_action_eq_zero {Env : Type v} [MeasurableSpace Env] (pullIndex t : Nat) (sample : Env × ((k : Nat) -> Fin 2 × Real)) (htime : twoArmNthOptimalPullTime pullIndex sample = (t : WithTop Nat)) : twoArmGeneratedAction sample t = 0
theorem
BanditRLProof.StochasticGradientBandit.twoArmNthOptimalPullTime_count_eq
Compiled
Immediately before the finite nth-pull time there are exactly `pullIndex` optimal pulls.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmNthOptimalPullTime_count_eqReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem twoArmNthOptimalPullTime_count_eq {Env : Type v} [MeasurableSpace Env] (pullIndex t : Nat) (sample : Env × ((k : Nat) -> Fin 2 × Real)) (htime : twoArmNthOptimalPullTime pullIndex sample = (t : WithTop Nat)) : twoArmOptimalPullCount t sample = pullIndex
theorem
BanditRLProof.StochasticGradientBandit.twoArmNthOptimalPullTime_spec
Compiled
The complete deterministic chronological-to-pull-index bridge.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmNthOptimalPullTime_specReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem twoArmNthOptimalPullTime_spec {Env : Type v} [MeasurableSpace Env] (pullIndex t : Nat) (sample : Env × ((k : Nat) -> Fin 2 × Real)) (htime : twoArmNthOptimalPullTime pullIndex sample = (t : WithTop Nat)) : twoArmOptimalPullCount t sample = pullIndex /\ twoArmGeneratedAction sample t = 0 /\ twoArmOptimalPullCount (t + 1) sample = pullIndex + 1
def
BanditRLProof.StochasticGradientBandit.twoArmNthOptimalPullReward
Compiled
Reward observed at the requested optimal-arm pull. The value at `top` is Mathlib's totalized stopped-value default and is never used without a finite time witness.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmNthOptimalPullRewardReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
def twoArmNthOptimalPullReward {Env : Type v} [MeasurableSpace Env] (pullIndex : Nat) (sample : Env × ((k : Nat) -> Fin 2 × Real)) : Real
theorem
BanditRLProof.StochasticGradientBandit.adapted_twoArmGeneratedReward
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.adapted_twoArmGeneratedRewardReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem adapted_twoArmGeneratedReward {Env : Type v} [MeasurableSpace Env] : Adapted (twoArmPrefixFiltration (Env := Env)) (fun (t : Nat) (sample : Env × ((k : Nat) -> Fin 2 × Real)) => (sample.2 t).2)
theorem
BanditRLProof.StochasticGradientBandit.measurable_twoArmNthOptimalPullReward
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_twoArmNthOptimalPullRewardReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem measurable_twoArmNthOptimalPullReward {Env : Type v} [MeasurableSpace Env] (pullIndex : Nat) : Measurable (twoArmNthOptimalPullReward (Env := Env) pullIndex)
theorem
BanditRLProof.StochasticGradientBandit.twoArmNthOptimalPullReward_eq_of_time_eq
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.twoArmNthOptimalPullReward_eq_of_time_eqReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
@[simp] theorem twoArmNthOptimalPullReward_eq_of_time_eq {Env : Type v} [MeasurableSpace Env] (pullIndex t : Nat) (sample : Env × ((k : Nat) -> Fin 2 × Real)) (htime : twoArmNthOptimalPullTime pullIndex sample = (t : WithTop Nat)) : twoArmNthOptimalPullReward pullIndex sample = (sample.2 t).2
def
BanditRLProof.StochasticGradientBandit.twoArmNthOptimalPullSuccessProbability
Compiled
Post-pull optimal-arm probability at the requested optimal-arm pull.
Used in these reading views: Bandit Book
10. Automation, resources, and open routes
Canonical node identity
declaration:BanditRLProof.StochasticGradientBandit.twoArmNthOptimalPullSuccessProbabilityReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
def twoArmNthOptimalPullSuccessProbability {Env : Type v} [MeasurableSpace Env] (eta : Real) (pullIndex : Nat) (sample : Env × ((k : Nat) -> Fin 2 × Real)) : Real
theorem
BanditRLProof.StochasticGradientBandit.adapted_twoArmSuccessProbability
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.adapted_twoArmSuccessProbabilityReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem adapted_twoArmSuccessProbability {Env : Type v} [MeasurableSpace Env] (eta : Real) : Adapted (twoArmPrefixFiltration (Env := Env)) (twoArmSuccessProbability (Env := Env) eta)
theorem
BanditRLProof.StochasticGradientBandit.measurable_twoArmNthOptimalPullSuccessProbability
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_twoArmNthOptimalPullSuccessProbabilityReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
theorem measurable_twoArmNthOptimalPullSuccessProbability {Env : Type v} [MeasurableSpace Env] (eta : Real) (pullIndex : Nat) : Measurable (twoArmNthOptimalPullSuccessProbability (Env := Env) eta pullIndex)
theorem
BanditRLProof.StochasticGradientBandit.twoArmNthOptimalPullSuccessProbability_eq_of_time_eq
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.twoArmNthOptimalPullSuccessProbability_eq_of_time_eqReading membership is not a proof dependency. Exact assumptions remain in the Lean statement.
@[simp] theorem twoArmNthOptimalPullSuccessProbability_eq_of_time_eq {Env : Type v} [MeasurableSpace Env] (eta : Real) (pullIndex t : Nat) (sample : Env × ((k : Nat) -> Fin 2 × Real)) (htime : twoArmNthOptimalPullTime pullIndex sample = (t : WithTop Nat)) : twoArmNthOptimalPullSuccessProbability eta pullIndex sample = twoArmSuccessProbability eta t sample