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

Lean module · Frontier

BanditRLProof.Algorithms.StochasticGradientBanditTrajectoryAudit

This module lifts the finite Algorithm-1 / Equation-(5) algebra in StochasticGradientBanditAudit to the repository's canonical measurable action/reward trajectory. It constructs the recursive parameter vector, packages its softmax law as a history algorithm, and identifies the generated successor action and pair conditional laws.

Module map

Declarations
18
Placeholders
0

Imports

BanditRLProof.Algorithms.StochasticGradientBanditAudit, BanditRLProof.Exp3PredictableMoments

Imported by

BanditRLProof, BanditRLProof.Algorithms.StochasticGradientBanditConditionalExponentialAudit, BanditRLProof.Algorithms.StochasticGradientBanditTwoArmRate

Declarations

Open an item to read its exact compact statement and source link. Detailed teaching notes are linked when registered.

theorem BanditRLProof.StochasticGradientBandit.measurable_softmaxProbability Compiled

Coordinate measurability of the source softmax transform.

Used in these reading views: Bandit Book

10. Automation, resources, and open routes

Canonical node identitydeclaration:BanditRLProof.StochasticGradientBandit.measurable_softmaxProbability

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

theorem measurable_softmaxProbability [Fintype Action] {History : Type*} [MeasurableSpace History] (theta : History -> Action -> Real) (htheta : forall action, Measurable (fun history => theta history action)) (action : Action) : Measurable (fun history => softmaxProbability (theta history) action)
theorem BanditRLProof.StochasticGradientBandit.measurable_sourceIncrement Compiled

Measurability of one Algorithm-1 coordinate update.

Used in these reading views: Bandit Book

10. Automation, resources, and open routes

Canonical node identitydeclaration:BanditRLProof.StochasticGradientBandit.measurable_sourceIncrement

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

theorem measurable_sourceIncrement [MeasurableSpace Action] [MeasurableSingletonClass Action] [DecidableEq Action] {History : Type*} [MeasurableSpace History] (prob : History -> Action -> Real) (reward : History -> Real) (selected : History -> Action) (coordinate : Action) (hprob : Measurable (fun history => prob history coordinate)) (hreward : Measurable reward) (hselected : Measurable selected) : Measurable (fun history => sourceIncrement (prob history) (reward history) (selected history) coordinate)
def BanditRLProof.StochasticGradientBandit.historyParameter Compiled

The Algorithm-1 parameter vector after an inclusive finite action/reward history. At round zero the first observed pair updates `initialTheta`; every successor uses the softmax vector generated by the preceding inclusive prefix.

Used in these reading views: Bandit Book

10. Automation, resources, and open routes

Canonical node identitydeclaration:BanditRLProof.StochasticGradientBandit.historyParameter

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

noncomputable def historyParameter [Fintype Action] [DecidableEq Action] (initialTheta : Action -> Real) (eta : Real) : (n : Nat) -> History.FinitePairHistory Action Real n -> Action -> Real | 0, history, coordinate => initialTheta coordinate + eta * sourceIncrement (softmaxProbability initialTheta) (history ⟨0, Finset.mem_Iic.mpr le_rfl⟩).2 (history ⟨0, Finset.mem_Iic.mpr le_rfl⟩).1 coordinate | n + 1, history, coordinate => let previous := Exp3.previousPairHistory history historyParameter initialTheta eta n previous coordinate + eta * sourceIncrement (softmaxProbability (historyParameter initialTheta eta n previous)) (history ⟨n + 1, Finset.mem_Iic.mpr le_rfl⟩).2 (history ⟨n + 1, Finset.mem_Iic.mpr le_rfl⟩).1 coordinate @[simp] theorem historyParameter_zero [Fintype Action] [DecidableEq Action] (initialTheta : Action -> Real) (eta : Real) (history : History.FinitePairHistory Action Real 0) (coordinate : Action) : historyParameter initialTheta eta 0 history coordinate = initialTheta coordinate + eta * sourceIncrement (softmaxProbability initialTheta) (history ⟨0, Finset.mem_Iic.mpr le_rfl⟩).2 (history ⟨0, Finset.mem_Iic.mpr le_rfl⟩).1 coordinate
theorem BanditRLProof.StochasticGradientBandit.historyParameter_zero 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 identitydeclaration:BanditRLProof.StochasticGradientBandit.historyParameter_zero

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

theorem historyParameter_zero [Fintype Action] [DecidableEq Action] (initialTheta : Action -> Real) (eta : Real) (history : History.FinitePairHistory Action Real 0) (coordinate : Action) : historyParameter initialTheta eta 0 history coordinate = initialTheta coordinate + eta * sourceIncrement (softmaxProbability initialTheta) (history ⟨0, Finset.mem_Iic.mpr le_rfl⟩).2 (history ⟨0, Finset.mem_Iic.mpr le_rfl⟩).1 coordinate
theorem BanditRLProof.StochasticGradientBandit.historyParameter_succ 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 identitydeclaration:BanditRLProof.StochasticGradientBandit.historyParameter_succ

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

theorem historyParameter_succ [Fintype Action] [DecidableEq Action] (initialTheta : Action -> Real) (eta : Real) (n : Nat) (history : History.FinitePairHistory Action Real (n + 1)) (coordinate : Action) : historyParameter initialTheta eta (n + 1) history coordinate = historyParameter initialTheta eta n (Exp3.previousPairHistory history) coordinate + eta * sourceIncrement (softmaxProbability (historyParameter initialTheta eta n (Exp3.previousPairHistory history))) (history ⟨n + 1, Finset.mem_Iic.mpr le_rfl⟩).2 (history ⟨n + 1, Finset.mem_Iic.mpr le_rfl⟩).1 coordinate
theorem BanditRLProof.StochasticGradientBandit.measurable_historyParameter Compiled

Every recursive parameter coordinate is measurable in the finite history.

Used in these reading views: Bandit Book

10. Automation, resources, and open routes

Canonical node identitydeclaration:BanditRLProof.StochasticGradientBandit.measurable_historyParameter

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

theorem measurable_historyParameter (initialTheta : Action -> Real) (eta : Real) : forall n coordinate, Measurable (fun history : History.FinitePairHistory Action Real n => historyParameter initialTheta eta n history coordinate)
def BanditRLProof.StochasticGradientBandit.softmaxFiniteActionDistribution Compiled

The source softmax vector as a finite probability distribution on all actions.

Used in these reading views: Bandit Book

10. Automation, resources, and open routes

Canonical node identitydeclaration:BanditRLProof.StochasticGradientBandit.softmaxFiniteActionDistribution

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

def softmaxFiniteActionDistribution (theta : Action -> Real) : Exp3.FiniteActionDistribution (Finset.univ : Finset Action) (softmaxProbability theta) where
def BanditRLProof.StochasticGradientBandit.historySoftmaxDistributionSource Compiled

Measurable softmax policy generated from the recursive SGB state.

Used in these reading views: Bandit Book

10. Automation, resources, and open routes

Canonical node identitydeclaration:BanditRLProof.StochasticGradientBandit.historySoftmaxDistributionSource

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

def historySoftmaxDistributionSource (initialTheta : Action -> Real) (eta : Real) (n : Nat) : Exp3.MeasurableFiniteActionDistribution (Finset.univ : Finset Action) (fun history : History.FinitePairHistory Action Real n => softmaxProbability (historyParameter initialTheta eta n history)) where
def BanditRLProof.StochasticGradientBandit.historyAlgorithm Compiled

The recursive stochastic-gradient-bandit history policy.

Used in these reading views: Bandit Book

10. Automation, resources, and open routes

Canonical node identitydeclaration:BanditRLProof.StochasticGradientBandit.historyAlgorithm

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

noncomputable def historyAlgorithm (initialTheta : Action -> Real) (eta : Real) : Thompson.HistoryAlgorithm Action Real where
theorem BanditRLProof.StochasticGradientBandit.historyAlgorithm_policy 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 identitydeclaration:BanditRLProof.StochasticGradientBandit.historyAlgorithm_policy

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

theorem historyAlgorithm_policy (initialTheta : Action -> Real) (eta : Real) (n : Nat) : (historyAlgorithm initialTheta eta).policy n = Exp3.finiteActionKernel (Finset.univ : Finset Action) (fun history : History.FinitePairHistory Action Real n => softmaxProbability (historyParameter initialTheta eta n history)) (historySoftmaxDistributionSource initialTheta eta n)
theorem BanditRLProof.StochasticGradientBandit.integral_measurableEnvironmentInitialPairKernel_sourceIncrement_eq_expectedSourceIncrement Compiled

Equation (5) for the generated initial action/reward pair law.

Used in these reading views: Bandit Book

10. Automation, resources, and open routes

Canonical node identitydeclaration:BanditRLProof.StochasticGradientBandit.integral_measurableEnvironmentInitialPairKernel_sourceIncrement_eq_expectedSourceIncrement

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

theorem integral_measurableEnvironmentInitialPairKernel_sourceIncrement_eq_expectedSourceIncrement {Env : Type v} [MeasurableSpace Env] (initialTheta : Action -> Real) (eta : Real) (environment : Thompson.MeasurableHistoryEnvironment Env Action Real) (env : Env) (mean : Action -> Real) (coordinate : Action) (hIntegrable : Integrable (fun pair : Action × Real => sourceIncrement (softmaxProbability initialTheta) pair.2 pair.1 coordinate) (Thompson.measurableEnvironmentInitialPairKernel (historyAlgorithm initialTheta eta) environment env)) (hmean : forall selected, integral (environment.initialFeedback (env, selected)) id = mean selected) : integral (Thompson.measurableEnvironmentInitialPairKernel (historyAlgorithm initialTheta eta) environment env) (fun pair : Action × Real => sourceIncrement (softmaxProbability initialTheta) pair.2 pair.1 coordinate) = expectedSourceIncrement (softmaxProbability initialTheta) mean coordinate
theorem BanditRLProof.StochasticGradientBandit.integral_historyStepKernel_sourceIncrement_eq_expectedSourceIncrement Compiled

The exact Equation-(5) conditional-kernel calculation at a fixed generated history. The reward-law hypotheses expose precisely the two facts used here: integrability of the source increment and the selected arm's reward mean.

Used in these reading views: Bandit Book

10. Automation, resources, and open routes

Canonical node identitydeclaration:BanditRLProof.StochasticGradientBandit.integral_historyStepKernel_sourceIncrement_eq_expectedSourceIncrement

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

theorem integral_historyStepKernel_sourceIncrement_eq_expectedSourceIncrement (initialTheta : Action -> Real) (eta : Real) (environment : Thompson.HistoryEnvironment Action Real) (n : Nat) (history : History.FinitePairHistory Action Real n) (mean : Action -> Real) (coordinate : Action) (hIntegrable : Integrable (fun pair : Action × Real => sourceIncrement (softmaxProbability (historyParameter initialTheta eta n history)) pair.2 pair.1 coordinate) (Thompson.historyStepKernel (historyAlgorithm initialTheta eta) environment n history)) (hmean : forall selected, integral (environment.feedback n (history, selected)) id = mean selected) : integral (Thompson.historyStepKernel (historyAlgorithm initialTheta eta) environment n history) (fun pair : Action × Real => sourceIncrement (softmaxProbability (historyParameter initialTheta eta n history)) pair.2 pair.1 coordinate) = expectedSourceIncrement (softmaxProbability (historyParameter initialTheta eta n history)) mean coordinate
theorem BanditRLProof.StochasticGradientBandit.integral_measurableEnvironmentHistoryStepKernel_sourceIncrement_eq_expectedSourceIncrement Compiled

Environment-indexed form of the same conditional-kernel calculation. This is the exact kernel that appears on the right-hand side of the generated trajectory's successor-pair `condDistrib` theorem below.

Used in these reading views: Bandit Book

10. Automation, resources, and open routes

Canonical node identitydeclaration:BanditRLProof.StochasticGradientBandit.integral_measurableEnvironmentHistoryStepKernel_sourceIncrement_eq_expectedSourceIncrement

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

theorem integral_measurableEnvironmentHistoryStepKernel_sourceIncrement_eq_expectedSourceIncrement {Env : Type v} [MeasurableSpace Env] (initialTheta : Action -> Real) (eta : Real) (environment : Thompson.MeasurableHistoryEnvironment Env Action Real) (n : Nat) (env : Env) (history : History.FinitePairHistory Action Real n) (mean : Action -> Real) (coordinate : Action) (hIntegrable : Integrable (fun pair : Action × Real => sourceIncrement (softmaxProbability (historyParameter initialTheta eta n history)) pair.2 pair.1 coordinate) (Thompson.measurableEnvironmentHistoryStepKernel (historyAlgorithm initialTheta eta) environment n (env, history))) (hmean : forall selected, integral (environment.feedback n (env, (history, selected))) id = mean selected) : integral (Thompson.measurableEnvironmentHistoryStepKernel (historyAlgorithm initialTheta eta) environment n (env, history)) (fun pair : Action × Real => sourceIncrement (softmaxProbability (historyParameter initialTheta eta n history)) pair.2 pair.1 coordinate) = expectedSourceIncrement (softmaxProbability (historyParameter initialTheta eta n history)) mean coordinate
theorem BanditRLProof.StochasticGradientBandit.integral_measurableEnvironmentHistoryStepKernel_sourceIncrement_eq_gapCoordinate Compiled

Generated Equation (5), in the source instantaneous-gap coordinates.

Used in these reading views: Bandit Book

10. Automation, resources, and open routes

Canonical node identitydeclaration:BanditRLProof.StochasticGradientBandit.integral_measurableEnvironmentHistoryStepKernel_sourceIncrement_eq_gapCoordinate

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

theorem integral_measurableEnvironmentHistoryStepKernel_sourceIncrement_eq_gapCoordinate {Env : Type v} [MeasurableSpace Env] (initialTheta : Action -> Real) (eta : Real) (environment : Thompson.MeasurableHistoryEnvironment Env Action Real) (n : Nat) (env : Env) (history : History.FinitePairHistory Action Real n) (mean gap : Action -> Real) (bestMean : Real) (coordinate : Action) (hIntegrable : Integrable (fun pair : Action × Real => sourceIncrement (softmaxProbability (historyParameter initialTheta eta n history)) pair.2 pair.1 coordinate) (Thompson.measurableEnvironmentHistoryStepKernel (historyAlgorithm initialTheta eta) environment n (env, history))) (hmean : forall selected, integral (environment.feedback n (env, (history, selected))) id = mean selected) (hgap : forall action, gap action = bestMean - mean action) : integral (Thompson.measurableEnvironmentHistoryStepKernel (historyAlgorithm initialTheta eta) environment n (env, history)) (fun pair : Action × Real => sourceIncrement (softmaxProbability (historyParameter initialTheta eta n history)) pair.2 pair.1 coordinate) = softmaxProbability (historyParameter initialTheta eta n history) coordinate * (instantaneousGap (softmaxProbability (historyParameter initialTheta eta n history)) gap - gap coordinate)
def BanditRLProof.StochasticGradientBandit.trajectoryKernel Compiled

Canonical generated action/reward trajectory for the recursive SGB policy.

Used in these reading views: Bandit Book

10. Automation, resources, and open routes

Canonical node identitydeclaration:BanditRLProof.StochasticGradientBandit.trajectoryKernel

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

noncomputable def trajectoryKernel {Env : Type v} [MeasurableSpace Env] (initialTheta : Action -> Real) (eta : Real) (environment : Thompson.MeasurableHistoryEnvironment Env Action Real) : Kernel Env ((n : Nat) -> Action × Real)
theorem BanditRLProof.StochasticGradientBandit.trajectoryMeasure_condDistrib_action_zero_given_environment Compiled

The generated initial action follows the initial softmax law given the environment.

Used in these reading views: Bandit Book

10. Automation, resources, and open routes

Canonical node identitydeclaration:BanditRLProof.StochasticGradientBandit.trajectoryMeasure_condDistrib_action_zero_given_environment

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

theorem trajectoryMeasure_condDistrib_action_zero_given_environment {Env : Type v} [MeasurableSpace Env] [StandardBorelSpace Action] (prior : Measure Env) [IsFiniteMeasure prior] (initialTheta : Action -> Real) (eta : Real) (environment : Thompson.MeasurableHistoryEnvironment Env Action Real) : condDistrib (fun sample : Env × ((k : Nat) -> Action × Real) => (sample.2 0).1) (fun sample : Env × ((k : Nat) -> Action × Real) => sample.1) (prior ⊗ₘ trajectoryKernel initialTheta eta environment) =ᵐ[ (prior ⊗ₘ trajectoryKernel initialTheta eta environment).map (fun sample : Env × ((k : Nat) -> Action × Real) => sample.1)] Kernel.const Env (Exp3.finiteActionMeasure (Finset.univ : Finset Action) (softmaxProbability initialTheta))
theorem BanditRLProof.StochasticGradientBandit.trajectoryMeasure_condDistrib_action Compiled

Every generated successor action has the recursive softmax conditional law.

Used in these reading views: Bandit Book

10. Automation, resources, and open routes

Canonical node identitydeclaration:BanditRLProof.StochasticGradientBandit.trajectoryMeasure_condDistrib_action

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

theorem trajectoryMeasure_condDistrib_action {Env : Type v} [MeasurableSpace Env] [StandardBorelSpace Env] [StandardBorelSpace Action] (prior : Measure Env) [IsFiniteMeasure prior] (initialTheta : Action -> Real) (eta : Real) (environment : Thompson.MeasurableHistoryEnvironment Env Action Real) (n : Nat) : condDistrib (fun sample : Env × ((k : Nat) -> Action × Real) => (sample.2 (n + 1)).1) (fun sample => Preorder.frestrictLe n sample.2) (prior ⊗ₘ trajectoryKernel initialTheta eta environment) =ᵐ[ (prior ⊗ₘ trajectoryKernel initialTheta eta environment).map (fun sample => Preorder.frestrictLe n sample.2)] Exp3.finiteActionKernel (Finset.univ : Finset Action) (fun history : History.FinitePairHistory Action Real n => softmaxProbability (historyParameter initialTheta eta n history)) (historySoftmaxDistributionSource initialTheta eta n)
theorem BanditRLProof.StochasticGradientBandit.trajectoryMeasure_condDistrib_nextPair_given_environment_prefix Compiled

Conditional on the retained environment and visible prefix, the next generated action/reward pair follows the canonical SGB history-step kernel.

Used in these reading views: Bandit Book

10. Automation, resources, and open routes

Canonical node identitydeclaration:BanditRLProof.StochasticGradientBandit.trajectoryMeasure_condDistrib_nextPair_given_environment_prefix

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

theorem trajectoryMeasure_condDistrib_nextPair_given_environment_prefix {Env : Type v} [MeasurableSpace Env] [StandardBorelSpace Env] [StandardBorelSpace Action] (prior : Measure Env) [IsFiniteMeasure prior] (initialTheta : Action -> Real) (eta : Real) (environment : Thompson.MeasurableHistoryEnvironment Env Action Real) (n : Nat) : condDistrib (fun sample : Env × ((k : Nat) -> Action × Real) => sample.2 (n + 1)) (fun sample : Env × ((k : Nat) -> Action × Real) => (sample.1, Preorder.frestrictLe n sample.2)) (prior ⊗ₘ trajectoryKernel initialTheta eta environment) =ᵐ[ (prior ⊗ₘ trajectoryKernel initialTheta eta environment).map (fun sample : Env × ((k : Nat) -> Action × Real) => (sample.1, Preorder.frestrictLe n sample.2))] Thompson.measurableEnvironmentHistoryStepKernel (historyAlgorithm initialTheta eta) environment n