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

Lean module · Finite-horizon RL

BanditRLProof.RL.FiniteHorizonAdaptiveCumulativeUCBVIClippedPlanner

This module defines the actual recurrent planner used by the Chapter 9 route. Coordinate zero uses the all-H initial Q table and its fixed finite argmax. After observing coordinates 0,...,n, the successor planner folds those exact transition summaries, normalizes their cross-stage aggregate row, and applies the backward recurrence

Module map

Declarations
21
Placeholders
0

Imports

BanditRLProof.RL.FiniteHorizonAdaptiveCumulativeUCBVIAggregateTransition

Imported by

BanditRLProof.RL.FiniteHorizonAdaptiveCumulativeUCBVISameSourceConfidence

Declarations

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

abbrev BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.QTable Compiled

A chronological action-value table for all actual decision stages.

Used in these reading views: Bandit Book · Reinforcement Learning Book

9. Finite-horizon reinforcement learning

Canonical node identitydeclaration:BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.QTable

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

abbrev QTable (mdp : MDP State Action)
def BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.initialQTable Compiled

The UCBVI-CH initialization `Q_{0,h}(x,a)=H`.

Used in these reading views: Bandit Book · Reinforcement Learning Book

9. Finite-horizon reinforcement learning

Canonical node identitydeclaration:BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.initialQTable

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

def initialQTable (mdp : MDP State Action) : QTable mdp
def BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.cumulativeSummaryOfSequence Compiled

Sum a finite sequence of observed transition summaries coordinatewise.

Used in these reading views: Bandit Book · Reinforcement Learning Book

9. Finite-horizon reinforcement learning

Canonical node identitydeclaration:BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.cumulativeSummaryOfSequence

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

def cumulativeSummaryOfSequence {mdp : MDP State Action} {n : Nat} (summaries : Fin n -> TransitionCountSummary mdp) : TransitionCountSummary mdp
def BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.clippedValueRemaining Compiled

The recursively selected clipped value with a given previous-episode Q table and one pooled empirical transition model. The index is decisions remaining; its successor case uses the chronological stage `H-(remaining+1)`.

Used in these reading views: Bandit Book · Reinforcement Learning Book

9. Finite-horizon reinforcement learning

Canonical node identitydeclaration:BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.clippedValueRemaining

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

noncomputable def clippedValueRemaining {mdp : MDP State Action} (previousQ : QTable mdp) (summary : TransitionCountSummary mdp) (defaultState : State) (bonusScale : Real) : (remaining : Nat) -> remaining <= mdp.horizon -> State -> Real | 0, _ => fun _state => 0 | remaining + 1, hremaining => let stage := mdp.decisionStageRemaining remaining hremaining let tail := clippedValueRemaining previousQ summary defaultState bonusScale remaining (by omega) let score : State -> Action -> Real := fun state action => let count := summary.aggregateVisitCount state action if count = 0 then (mdp.horizon : Real) else min (previousQ stage state action) (min (mdp.horizon : Real) (mdp.reward state action + (∫ nextState, tail nextState ∂ summary.aggregateEmpiricalTransitionKernel defaultState (state, action)) + bonusScale / Real.sqrt count)) fun state => score state (FiniteRealArgmax.choose (fun action => score state action)) /-- The action-value used at one remaining-horizon coordinate. -/ noncomputable def clippedQRemaining {mdp : MDP State Action} (previousQ : QTable mdp) (summary : TransitionCountSummary mdp) (defaultState : State) (bonusScale : Real) (remaining : Nat) (hremaining : remaining + 1 <= mdp.horizon) (state : State) (action : Action) : Real
def BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.clippedQRemaining Compiled

The action-value used at one remaining-horizon coordinate.

Used in these reading views: Bandit Book · Reinforcement Learning Book

9. Finite-horizon reinforcement learning

Canonical node identitydeclaration:BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.clippedQRemaining

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

noncomputable def clippedQRemaining {mdp : MDP State Action} (previousQ : QTable mdp) (summary : TransitionCountSummary mdp) (defaultState : State) (bonusScale : Real) (remaining : Nat) (hremaining : remaining + 1 <= mdp.horizon) (state : State) (action : Action) : Real
def BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.clippedQTable Compiled

The complete chronological Q table produced by one recurrent update.

Used in these reading views: Bandit Book · Reinforcement Learning Book

9. Finite-horizon reinforcement learning

Canonical node identitydeclaration:BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.clippedQTable

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

noncomputable def clippedQTable (mdp : MDP State Action) (previousQ : QTable mdp) (summary : TransitionCountSummary mdp) (defaultState : State) (bonusScale : Real) : QTable mdp
theorem BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.clippedQRemaining_of_aggregateVisitCount_eq_zero Compiled

No declaration docstring is present; use the chapter context and exact statement below.

Used in these reading views: Bandit Book · Reinforcement Learning Book

9. Finite-horizon reinforcement learning

Canonical node identitydeclaration:BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.clippedQRemaining_of_aggregateVisitCount_eq_zero

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

theorem clippedQRemaining_of_aggregateVisitCount_eq_zero {mdp : MDP State Action} (previousQ : QTable mdp) (summary : TransitionCountSummary mdp) (defaultState : State) (bonusScale : Real) (remaining : Nat) (hremaining : remaining + 1 <= mdp.horizon) (state : State) (action : Action) (hzero : summary.aggregateVisitCount state action = 0) : clippedQRemaining previousQ summary defaultState bonusScale remaining hremaining state action = (mdp.horizon : Real)
theorem BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.clippedQRemaining_of_aggregateVisitCount_pos Compiled

No declaration docstring is present; use the chapter context and exact statement below.

Used in these reading views: Bandit Book · Reinforcement Learning Book

9. Finite-horizon reinforcement learning

Canonical node identitydeclaration:BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.clippedQRemaining_of_aggregateVisitCount_pos

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

theorem clippedQRemaining_of_aggregateVisitCount_pos {mdp : MDP State Action} (previousQ : QTable mdp) (summary : TransitionCountSummary mdp) (defaultState : State) (bonusScale : Real) (remaining : Nat) (hremaining : remaining + 1 <= mdp.horizon) (state : State) (action : Action) (hpos : 0 < summary.aggregateVisitCount state action) : clippedQRemaining previousQ summary defaultState bonusScale remaining hremaining state action = min (previousQ (mdp.decisionStageRemaining remaining hremaining) state action) (min (mdp.horizon : Real) (mdp.reward state action + (∫ nextState, clippedValueRemaining previousQ summary defaultState bonusScale remaining (by omega) nextState ∂ summary.aggregateEmpiricalTransitionKernel defaultState (state, action)) + bonusScale / Real.sqrt (summary.aggregateVisitCount state action)))
def BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.clippedPolicyTable Compiled

Fixed-enumeration argmax table of one recurrent Q update.

Used in these reading views: Bandit Book · Reinforcement Learning Book

9. Finite-horizon reinforcement learning

Canonical node identitydeclaration:BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.clippedPolicyTable

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

noncomputable def clippedPolicyTable (mdp : MDP State Action) (previousQ : QTable mdp) (summary : TransitionCountSummary mdp) (defaultState : State) (bonusScale : Real) : DeterministicMarkovPolicyTable mdp
theorem BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.clippedQTable_le_selected Compiled

The selected recurrent action maximizes the actual clipped Q table.

Used in these reading views: Bandit Book · Reinforcement Learning Book

9. Finite-horizon reinforcement learning

Canonical node identitydeclaration:BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.clippedQTable_le_selected

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

theorem clippedQTable_le_selected (mdp : MDP State Action) (previousQ : QTable mdp) (summary : TransitionCountSummary mdp) (defaultState : State) (bonusScale : Real) (stage : Fin mdp.horizon) (state : State) (action : Action) : clippedQTable mdp previousQ summary defaultState bonusScale stage state action <= clippedQTable mdp previousQ summary defaultState bonusScale stage state (clippedPolicyTable mdp previousQ summary defaultState bonusScale stage state)
theorem BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.measurable_clippedPolicyTable Compiled

Every recurrent selector is measurable on the finite state space.

Used in these reading views: Bandit Book · Reinforcement Learning Book

9. Finite-horizon reinforcement learning

Canonical node identitydeclaration:BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.measurable_clippedPolicyTable

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

theorem measurable_clippedPolicyTable (mdp : MDP State Action) (previousQ : QTable mdp) (summary : TransitionCountSummary mdp) (defaultState : State) (bonusScale : Real) (stage : Fin mdp.horizon) : Measurable (clippedPolicyTable mdp previousQ summary defaultState bonusScale stage)
def BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.recurrentQTableOfSummaries Compiled

Fold observed summaries into the genuine sequence of previous-Q updates.

Used in these reading views: Bandit Book · Reinforcement Learning Book

9. Finite-horizon reinforcement learning

Canonical node identitydeclaration:BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.recurrentQTableOfSummaries

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

noncomputable def recurrentQTableOfSummaries (mdp : MDP State Action) (defaultState : State) (bonusScale : Real) : (n : Nat) -> (Fin n -> TransitionCountSummary mdp) -> QTable mdp | 0, _summaries => initialQTable mdp | n + 1, summaries => let previous := recurrentQTableOfSummaries mdp defaultState bonusScale n (fun i => summaries i.castSucc) let cumulative := cumulativeSummaryOfSequence summaries clippedQTable mdp previous cumulative defaultState bonusScale /-- Policy table obtained after the same finite previous-Q fold. -/ noncomputable def recurrentPolicyTableOfSummaries (mdp : MDP State Action) (defaultState : State) (bonusScale : Real) (n : Nat) (summaries : Fin n -> TransitionCountSummary mdp) : DeterministicMarkovPolicyTable mdp
def BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.recurrentPolicyTableOfSummaries Compiled

Policy table obtained after the same finite previous-Q fold.

Used in these reading views: Bandit Book · Reinforcement Learning Book

9. Finite-horizon reinforcement learning

Canonical node identitydeclaration:BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.recurrentPolicyTableOfSummaries

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

noncomputable def recurrentPolicyTableOfSummaries (mdp : MDP State Action) (defaultState : State) (bonusScale : Real) (n : Nat) (summaries : Fin n -> TransitionCountSummary mdp) : DeterministicMarkovPolicyTable mdp
def BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.prefixTransitionSummaries Compiled

Extract exactly the transition summaries stored in one finite prefix.

Used in these reading views: Bandit Book · Reinforcement Learning Book

9. Finite-horizon reinforcement learning

Canonical node identitydeclaration:BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.prefixTransitionSummaries

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

def prefixTransitionSummaries {mdp : MDP State Action} {episodes n : Nat} (history : EpisodeBatchPrefix mdp episodes n) : Fin (n + 1) -> TransitionCountSummary mdp
theorem BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.measurable_prefixTransitionSummaries Compiled

No declaration docstring is present; use the chapter context and exact statement below.

Used in these reading views: Bandit Book · Reinforcement Learning Book

9. Finite-horizon reinforcement learning

Canonical node identitydeclaration:BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.measurable_prefixTransitionSummaries

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

theorem measurable_prefixTransitionSummaries {mdp : MDP State Action} {episodes n : Nat} : Measurable (prefixTransitionSummaries : EpisodeBatchPrefix mdp episodes n -> Fin (n + 1) -> TransitionCountSummary mdp)
def BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.recurrentSuccessorTable Compiled

Measurable strict-prefix selector for the recurrent generated source.

Used in these reading views: Bandit Book · Reinforcement Learning Book

9. Finite-horizon reinforcement learning

Canonical node identitydeclaration:BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.recurrentSuccessorTable

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

noncomputable def recurrentSuccessorTable {mdp : MDP State Action} {episodes : Nat} (defaultState : State) (bonusScale : Real) (n : Nat) (history : EpisodeBatchPrefix mdp episodes n) : DeterministicMarkovPolicyTable mdp
theorem BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.measurable_recurrentSuccessorTable Compiled

No declaration docstring is present; use the chapter context and exact statement below.

Used in these reading views: Bandit Book · Reinforcement Learning Book

9. Finite-horizon reinforcement learning

Canonical node identitydeclaration:BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.measurable_recurrentSuccessorTable

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

theorem measurable_recurrentSuccessorTable {mdp : MDP State Action} {episodes : Nat} (defaultState : State) (bonusScale : Real) (n : Nat) : Measurable (recurrentSuccessorTable (mdp := mdp) (episodes := episodes) defaultState bonusScale n)
def BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.recurrentInitialTable Compiled

The initial table is the fixed argmax of the all-`H` Q initialization.

Used in these reading views: Bandit Book · Reinforcement Learning Book

9. Finite-horizon reinforcement learning

Canonical node identitydeclaration:BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.recurrentInitialTable

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

noncomputable def recurrentInitialTable (mdp : MDP State Action) : DeterministicMarkovPolicyTable mdp
def BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.recurrentSource Compiled

Canonical one-episode recurrent UCBVI source. It has no arbitrary initial policy parameter: coordinate zero executes `recurrentInitialTable`; coordinate `n+1` executes the fold of exactly the observed coordinates `0,...,n`.

Used in these reading views: Bandit Book · Reinforcement Learning Book

9. Finite-horizon reinforcement learning

Canonical node identitydeclaration:BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.recurrentSource

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

noncomputable def recurrentSource (mdp : MDP State Action) (initialState : Measure State) [IsProbabilityMeasure initialState] (defaultState : State) (episodes : Nat) (delta : Real) : AdaptiveEpisodeBatchSource mdp initialState 1 where
theorem BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.recurrentSource_policyAt_zero Compiled

Coordinate zero uses the all-`H` initialized recurrent policy.

Used in these reading views: Bandit Book · Reinforcement Learning Book

9. Finite-horizon reinforcement learning

Canonical node identitydeclaration:BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.recurrentSource_policyAt_zero

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

theorem recurrentSource_policyAt_zero (mdp : MDP State Action) (initialState : Measure State) [IsProbabilityMeasure initialState] (defaultState : State) (episodes : Nat) (delta : Real) (trajectory : EpisodeBatchTrajectory mdp 1) : (recurrentSource mdp initialState defaultState episodes delta).policyAt trajectory 0 = (recurrentInitialTable mdp).toMarkovPolicy
theorem BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.recurrentSource_policyAt_succ Compiled

Every successor policy is the exact strict-prefix previous-Q fold.

Used in these reading views: Bandit Book · Reinforcement Learning Book

9. Finite-horizon reinforcement learning

Canonical node identitydeclaration:BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.recurrentSource_policyAt_succ

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

theorem recurrentSource_policyAt_succ (mdp : MDP State Action) (initialState : Measure State) [IsProbabilityMeasure initialState] (defaultState : State) (episodes : Nat) (delta : Real) (trajectory : EpisodeBatchTrajectory mdp 1) (n : Nat) : (recurrentSource mdp initialState defaultState episodes delta).policyAt trajectory (n + 1) = (recurrentSuccessorTable defaultState (scale (State := State) (Action := Action) mdp episodes delta) n (Preorder.frestrictLe n trajectory)).toMarkovPolicy