Lean module · UCB
BanditRLProof.Algorithms.UCBArmStreamConditionalReward
# Conditional laws for stationary UCB arm-stream coordinates This module isolates the product-measure part of the selected-reward route. Every `(pull index, arm)` coordinate is independent of the function containing all other coordinates, so its conditional distribution given that complement is the prescribed stationary arm law.
Module map
Imports
BanditRLProof.Algorithms.UCBRealStationaryExplicitPolicy, BanditRLProof.Algorithms.UCBArmStreamTail
Imported by
BanditRLProof, BanditRLProof.Algorithms.UCBRealStationarySelectedRewardConsistency
Declarations
Open an item to read its exact compact statement and source link. Detailed teaching notes are linked when registered.
def
BanditRLProof.UCB.armStreamCoordinate
Compiled
A flattened pull-index/arm coordinate of a latent arm-reward stream.
def armStreamCoordinate {K : Nat} (index : Nat × Fin K) : ArmRewardStream K -> Real
def
BanditRLProof.UCB.armStreamWithoutCoordinate
Compiled
The latent arm stream with one specified coordinate omitted.
def armStreamWithoutCoordinate {K : Nat} (target : Nat × Fin K) : ArmRewardStream K -> ({index : Nat × Fin K // index ≠ target} -> Real)
def
BanditRLProof.UCB.armStreamInsertCoordinate
Compiled
Reconstruct a latent arm stream after supplying one omitted coordinate.
def armStreamInsertCoordinate {K : Nat} (target : Nat × Fin K) (value : Real) : ({index : Nat × Fin K // index ≠ target} -> Real) -> ArmRewardStream K
def
BanditRLProof.UCB.armStreamHistoryAction
Compiled
The history/action condition used by the successor reward kernel.
noncomputable def armStreamHistoryAction {K : Nat} (hK : 0 < K) (c : Real) (n : Nat) : ArmRewardStream K -> History.FinitePairHistory (Fin K) Real n × Fin K
def
BanditRLProof.UCB.armStreamNextCoordinate
Compiled
The next unused pull-index/arm coordinate selected after history `n`.
noncomputable def armStreamNextCoordinate {K : Nat} (hK : 0 < K) (c : Real) (n : Nat) : ArmRewardStream K -> Nat × Fin K
def
BanditRLProof.UCB.armStreamCoordinateOfHistoryAction
Compiled
The pull-index/arm coordinate encoded by a successor history/action condition.
noncomputable def armStreamCoordinateOfHistoryAction {K : Nat} (n : Nat) : History.FinitePairHistory (Fin K) Real n × Fin K -> Nat × Fin K
def
BanditRLProof.UCB.armStreamHistoryActionCoordinateBranch
Compiled
Conditions that encode one fixed next pull-index/arm coordinate.
def armStreamHistoryActionCoordinateBranch {K : Nat} (n : Nat) (target : Nat × Fin K) : Set (History.FinitePairHistory (Fin K) Real n × Fin K)
abbrev
BanditRLProof.UCB.armStreamSelectedRewardKernel
Compiled
The stationary reward kernel selected by the arm component of a condition.
noncomputable abbrev armStreamSelectedRewardKernel {K : Nat} (n : Nat) (nu : Kernel (Fin K) Real) : Kernel (History.FinitePairHistory (Fin K) Real n × Fin K) Real
def
BanditRLProof.UCB.armStreamNextCoordinateBranch
Compiled
Latent streams for which one fixed pull-index/arm coordinate is selected next.
def armStreamNextCoordinateBranch {K : Nat} (hK : 0 < K) (c : Real) (n : Nat) (target : Nat × Fin K) : Set (ArmRewardStream K)
def
BanditRLProof.UCB.armStreamHistoryActionFromWithout
Compiled
Reconstructed successor condition using only a fixed coordinate's complement.
noncomputable def armStreamHistoryActionFromWithout {K : Nat} (hK : 0 < K) (c : Real) (n : Nat) (target : Nat × Fin K) (value : Real) : ({index : Nat × Fin K // index ≠ target} -> Real) -> History.FinitePairHistory (Fin K) Real n × Fin K
theorem
BanditRLProof.UCB.measurable_armStreamCoordinate
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
theorem measurable_armStreamCoordinate {K : Nat} (index : Nat × Fin K) : Measurable (armStreamCoordinate index)
theorem
BanditRLProof.UCB.measurable_armStreamWithoutCoordinate
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
theorem measurable_armStreamWithoutCoordinate {K : Nat} (target : Nat × Fin K) : Measurable (armStreamWithoutCoordinate target)
theorem
BanditRLProof.UCB.measurable_armStreamInsertCoordinate
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
theorem measurable_armStreamInsertCoordinate {K : Nat} (target : Nat × Fin K) (value : Real) : Measurable (armStreamInsertCoordinate target value)
theorem
BanditRLProof.UCB.armStreamWithoutCoordinate_insertCoordinate
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
theorem armStreamWithoutCoordinate_insertCoordinate {K : Nat} (target : Nat × Fin K) (value : Real) (rest : {index : Nat × Fin K // index ≠ target} -> Real) : armStreamWithoutCoordinate target (armStreamInsertCoordinate target value rest) = rest
theorem
BanditRLProof.UCB.measurable_armStreamHistoryAction
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
theorem measurable_armStreamHistoryAction {K : Nat} (hK : 0 < K) (c : Real) (n : Nat) : Measurable (armStreamHistoryAction hK c n)
theorem
BanditRLProof.UCB.measurable_armStreamNextCoordinate
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
theorem measurable_armStreamNextCoordinate {K : Nat} (hK : 0 < K) (c : Real) (n : Nat) : Measurable (armStreamNextCoordinate hK c n)
theorem
BanditRLProof.UCB.measurable_armStreamCoordinateOfHistoryAction
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
theorem measurable_armStreamCoordinateOfHistoryAction {K : Nat} (n : Nat) : Measurable (armStreamCoordinateOfHistoryAction (K
theorem
BanditRLProof.UCB.measurableSet_armStreamHistoryActionCoordinateBranch
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
theorem measurableSet_armStreamHistoryActionCoordinateBranch {K : Nat} (n : Nat) (target : Nat × Fin K) : MeasurableSet (armStreamHistoryActionCoordinateBranch n target)
theorem
BanditRLProof.UCB.measurableSet_armStreamNextCoordinateBranch
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
theorem measurableSet_armStreamNextCoordinateBranch {K : Nat} (hK : 0 < K) (c : Real) (n : Nat) (target : Nat × Fin K) : MeasurableSet (armStreamNextCoordinateBranch hK c n target)
theorem
BanditRLProof.UCB.armStreamNextCoordinate_eq_coordinateOfHistoryAction
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
theorem armStreamNextCoordinate_eq_coordinateOfHistoryAction {K : Nat} (hK : 0 < K) (c : Real) (n : Nat) (stream : ArmRewardStream K) : armStreamNextCoordinate hK c n stream = armStreamCoordinateOfHistoryAction n (armStreamHistoryAction hK c n stream)
theorem
BanditRLProof.UCB.pairwise_disjoint_armStreamHistoryActionCoordinateBranch
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
theorem pairwise_disjoint_armStreamHistoryActionCoordinateBranch {K : Nat} (n : Nat) : Pairwise (Function.onFun (fun s t : Set (History.FinitePairHistory (Fin K) Real n × Fin K) => Disjoint s t) (fun target : Nat × Fin K => armStreamHistoryActionCoordinateBranch n target))
theorem
BanditRLProof.UCB.pairwise_disjoint_armStreamNextCoordinateBranch
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
theorem pairwise_disjoint_armStreamNextCoordinateBranch {K : Nat} (hK : 0 < K) (c : Real) (n : Nat) : Pairwise (Function.onFun (fun s t : Set (ArmRewardStream K) => Disjoint s t) (fun target : Nat × Fin K => armStreamNextCoordinateBranch hK c n target))
theorem
BanditRLProof.UCB.iUnion_armStreamHistoryActionCoordinateBranch
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
theorem iUnion_armStreamHistoryActionCoordinateBranch {K : Nat} (n : Nat) : (⋃ target : Nat × Fin K, armStreamHistoryActionCoordinateBranch n target) = Set.univ
theorem
BanditRLProof.UCB.iUnion_armStreamNextCoordinateBranch
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
theorem iUnion_armStreamNextCoordinateBranch {K : Nat} (hK : 0 < K) (c : Real) (n : Nat) : (⋃ target : Nat × Fin K, armStreamNextCoordinateBranch hK c n target) = Set.univ
theorem
BanditRLProof.UCB.measure_eq_sum_restrict_armStreamHistoryActionCoordinateBranch
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
theorem measure_eq_sum_restrict_armStreamHistoryActionCoordinateBranch {K : Nat} (n : Nat) (mu : Measure (History.FinitePairHistory (Fin K) Real n × Fin K)) : mu = Measure.sum fun target : Nat × Fin K => mu.restrict (armStreamHistoryActionCoordinateBranch n target)
theorem
BanditRLProof.UCB.armStreamMeasure_eq_sum_restrict_nextCoordinateBranch
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
theorem armStreamMeasure_eq_sum_restrict_nextCoordinateBranch {K : Nat} (hK : 0 < K) (c : Real) (n : Nat) (nu : Kernel (Fin K) Real) [IsMarkovKernel nu] : armStreamMeasure nu = Measure.sum fun target : Nat × Fin K => (armStreamMeasure nu).restrict (armStreamNextCoordinateBranch hK c n target)
theorem
BanditRLProof.UCB.measurable_armStreamHistoryActionFromWithout
Compiled
No declaration docstring is present; use the chapter context and exact statement below.
theorem measurable_armStreamHistoryActionFromWithout {K : Nat} (hK : 0 < K) (c : Real) (n : Nat) (target : Nat × Fin K) (value : Real) : Measurable (armStreamHistoryActionFromWithout hK c n target value)
theorem
BanditRLProof.UCB.armStreamNextCoordinate_fst_eq_pullCount
Compiled
The first component of the next coordinate is the selected arm's current count.
theorem armStreamNextCoordinate_fst_eq_pullCount {K : Nat} (hK : 0 < K) (c : Real) (stream : ArmRewardStream K) (n : Nat) : (armStreamNextCoordinate hK c n stream).1 = pullCount (armStreamAction hK c stream) (armStreamNextCoordinate hK c n stream).2 (n + 1)
theorem
BanditRLProof.UCB.armStreamReward_succ_eq_nextCoordinate
Compiled
The successor reward reads exactly the next coordinate selected after history `n`.
theorem armStreamReward_succ_eq_nextCoordinate {K : Nat} (hK : 0 < K) (c : Real) (stream : ArmRewardStream K) (n : Nat) : armStreamReward hK c stream (n + 1) = armStreamCoordinate (armStreamNextCoordinate hK c n stream) stream
theorem
BanditRLProof.UCB.armStreamHistory_eq_of_eq_below_pullCount
Compiled
The recursive history through `n` only reads coordinates whose pull index is strictly below the corresponding arm count at time `n + 1`.
theorem armStreamHistory_eq_of_eq_below_pullCount {K : Nat} (hK : 0 < K) (c : Real) (stream stream' : ArmRewardStream K) (n : Nat) (hagrees : ∀ arm index, index < pullCount (armStreamAction hK c stream) arm (n + 1) → stream index arm = stream' index arm) : armStreamHistory hK c stream n = armStreamHistory hK c stream' n
theorem
BanditRLProof.UCB.armStreamHistory_eq_of_withoutCoordinate_eq_of_pullCount_le
Compiled
Changing one not-yet-consumed coordinate cannot alter the history already generated from the latent stream.
theorem armStreamHistory_eq_of_withoutCoordinate_eq_of_pullCount_le {K : Nat} (hK : 0 < K) (c : Real) (target : Nat × Fin K) (stream stream' : ArmRewardStream K) (n : Nat) (hwithout : armStreamWithoutCoordinate target stream = armStreamWithoutCoordinate target stream') (hfuture : pullCount (armStreamAction hK c stream) target.2 (n + 1) ≤ target.1) : armStreamHistory hK c stream n = armStreamHistory hK c stream' n
theorem
BanditRLProof.UCB.armStreamNextCoordinate_eq_iff_insertCoordinate
Compiled
The event that a fixed coordinate is selected next factors through the stream with that coordinate omitted.
theorem armStreamNextCoordinate_eq_iff_insertCoordinate {K : Nat} (hK : 0 < K) (c : Real) (n : Nat) (target : Nat × Fin K) (value : Real) (stream : ArmRewardStream K) : armStreamNextCoordinate hK c n stream = target ↔ armStreamNextCoordinate hK c n (armStreamInsertCoordinate target value (armStreamWithoutCoordinate target stream)) = target
theorem
BanditRLProof.UCB.armStreamHistoryAction_eq_fromWithout_of_nextCoordinate_eq
Compiled
On the branch selecting `target`, the actual successor condition equals its reconstruction from all coordinates except `target`.
theorem armStreamHistoryAction_eq_fromWithout_of_nextCoordinate_eq {K : Nat} (hK : 0 < K) (c : Real) (n : Nat) (target : Nat × Fin K) (value : Real) (stream : ArmRewardStream K) (hnext : armStreamNextCoordinate hK c n stream = target) : armStreamHistoryAction hK c n stream = armStreamHistoryActionFromWithout hK c n target value (armStreamWithoutCoordinate target stream)
theorem
BanditRLProof.UCB.iIndepFun_armStreamMeasure_coordinate
Compiled
All pull-index/arm coordinates are mutually independent.
theorem iIndepFun_armStreamMeasure_coordinate {K : Nat} (nu : Kernel (Fin K) Real) [IsMarkovKernel nu] : iIndepFun (fun index : Nat × Fin K => armStreamCoordinate index) (armStreamMeasure nu)
theorem
BanditRLProof.UCB.indepFun_armStreamMeasure_coordinate_without
Compiled
A fixed coordinate is independent of the collection of all other coordinates.
theorem indepFun_armStreamMeasure_coordinate_without {K : Nat} (nu : Kernel (Fin K) Real) [IsMarkovKernel nu] (target : Nat × Fin K) : IndepFun (armStreamCoordinate target) (armStreamWithoutCoordinate target) (armStreamMeasure nu)
theorem
BanditRLProof.UCB.indepFun_armStreamMeasure_coordinate_historyActionFromWithout
Compiled
A fixed reward coordinate is independent of the reconstructed successor condition.
theorem indepFun_armStreamMeasure_coordinate_historyActionFromWithout {K : Nat} (hK : 0 < K) (c : Real) (n : Nat) (nu : Kernel (Fin K) Real) [IsMarkovKernel nu] (target : Nat × Fin K) (value : Real) : IndepFun (armStreamCoordinate target) (fun stream : ArmRewardStream K => armStreamHistoryActionFromWithout hK c n target value (armStreamWithoutCoordinate target stream)) (armStreamMeasure nu)
theorem
BanditRLProof.UCB.armStreamMeasure_map_historyActionFromWithout_coordinate_eq_prod
Compiled
The reconstructed successor condition and a fixed omitted coordinate have a product joint law, with the prescribed arm marginal on the reward coordinate.
theorem armStreamMeasure_map_historyActionFromWithout_coordinate_eq_prod {K : Nat} (hK : 0 < K) (c : Real) (n : Nat) (nu : Kernel (Fin K) Real) [IsMarkovKernel nu] (target : Nat × Fin K) (value : Real) : Measure.map (fun stream : ArmRewardStream K => (armStreamHistoryActionFromWithout hK c n target value (armStreamWithoutCoordinate target stream), armStreamCoordinate target stream)) (armStreamMeasure nu) = (Measure.map (fun stream : ArmRewardStream K => armStreamHistoryActionFromWithout hK c n target value (armStreamWithoutCoordinate target stream)) (armStreamMeasure nu)).prod (nu target.2)
theorem
BanditRLProof.UCB.armStreamHistoryActionFromWithout_mem_coordinateBranch_iff
Compiled
The reconstructed condition is in `target`'s branch exactly on the actual branch.
theorem armStreamHistoryActionFromWithout_mem_coordinateBranch_iff {K : Nat} (hK : 0 < K) (c : Real) (n : Nat) (target : Nat × Fin K) (value : Real) (stream : ArmRewardStream K) : armStreamHistoryActionFromWithout hK c n target value (armStreamWithoutCoordinate target stream) ∈ armStreamHistoryActionCoordinateBranch n target ↔ stream ∈ armStreamNextCoordinateBranch hK c n target
theorem
BanditRLProof.UCB.map_historyActionFromWithout_restrict_coordinateBranch_eq_historyAction
Compiled
Both actual and reconstructed condition maps induce the same branch restriction.
theorem map_historyActionFromWithout_restrict_coordinateBranch_eq_historyAction {K : Nat} (hK : 0 < K) (c : Real) (n : Nat) (target : Nat × Fin K) (value : Real) (mu : Measure (ArmRewardStream K)) : (Measure.map (fun stream : ArmRewardStream K => armStreamHistoryActionFromWithout hK c n target value (armStreamWithoutCoordinate target stream)) mu).restrict (armStreamHistoryActionCoordinateBranch n target) = (Measure.map (armStreamHistoryAction hK c n) mu).restrict (armStreamHistoryActionCoordinateBranch n target)
theorem
BanditRLProof.UCB.armStreamMeasure_map_historyAction_reward_restrict_branch_eq_prod
Compiled
On one fixed next-coordinate branch, the actual successor condition/reward pair has the restricted condition marginal times the prescribed arm law.
theorem armStreamMeasure_map_historyAction_reward_restrict_branch_eq_prod {K : Nat} (hK : 0 < K) (c : Real) (n : Nat) (nu : Kernel (Fin K) Real) [IsMarkovKernel nu] (target : Nat × Fin K) (value : Real) : Measure.map (fun stream : ArmRewardStream K => (armStreamHistoryAction hK c n stream, armStreamReward hK c stream (n + 1))) ((armStreamMeasure nu).restrict (armStreamNextCoordinateBranch hK c n target)) = ((Measure.map (armStreamHistoryAction hK c n) (armStreamMeasure nu)).restrict (armStreamHistoryActionCoordinateBranch n target)).prod (nu target.2)
theorem
BanditRLProof.UCB.armStreamMeasure_map_historyAction_reward_succ_eq_compProd
Compiled
The full successor condition/reward joint law is the condition marginal followed by the stationary law of the arm selected in that condition.
theorem armStreamMeasure_map_historyAction_reward_succ_eq_compProd {K : Nat} (hK : 0 < K) (c : Real) (n : Nat) (nu : Kernel (Fin K) Real) [IsMarkovKernel nu] : Measure.map (fun stream : ArmRewardStream K => (armStreamHistoryAction hK c n stream, armStreamReward hK c stream (n + 1))) (armStreamMeasure nu) = Measure.compProd (Measure.map (armStreamHistoryAction hK c n) (armStreamMeasure nu)) (armStreamSelectedRewardKernel n nu)
theorem
BanditRLProof.UCB.armStreamReward_succ_condDistrib_ae_eq_nu
Compiled
The successor arm-stream reward conditional law is the selected arm law.
theorem armStreamReward_succ_condDistrib_ae_eq_nu {K : Nat} (hK : 0 < K) (c : Real) (n : Nat) (nu : Kernel (Fin K) Real) [IsMarkovKernel nu] : Filter.EventuallyEq (ae ((armStreamMeasure nu).map (armStreamHistoryAction hK c n))) (condDistrib (fun stream : ArmRewardStream K => armStreamReward hK c stream (n + 1)) (armStreamHistoryAction hK c n) (armStreamMeasure nu)) (armStreamSelectedRewardKernel n nu)
theorem
BanditRLProof.UCB.canonicalArmStreamHistoryEnvironment_feedback_ae_eq_nu
Compiled
The packaged canonical successor-feedback kernel is the stationary selected law.
theorem canonicalArmStreamHistoryEnvironment_feedback_ae_eq_nu {K : Nat} [NeZero K] (hK : 0 < K) (c : Real) (sigma2 : NNReal) (nu : Kernel (Fin K) Real) [IsMarkovKernel nu] (n : Nat) : Filter.EventuallyEq (ae ((armStreamMeasure nu).map (armStreamHistoryAction hK (c * (sigma2 : Real)) n))) ((canonicalArmStreamHistoryEnvironment hK c sigma2 nu).feedback n) (armStreamSelectedRewardKernel n nu)
theorem
BanditRLProof.UCB.armStreamMeasure_condDistrib_coordinate_given_without
Compiled
Given every other latent coordinate, a fixed coordinate still has its prescribed stationary arm law.
theorem armStreamMeasure_condDistrib_coordinate_given_without {K : Nat} (nu : Kernel (Fin K) Real) [IsMarkovKernel nu] (target : Nat × Fin K) : Filter.EventuallyEq (ae ((armStreamMeasure nu).map (armStreamWithoutCoordinate target))) (condDistrib (armStreamCoordinate target) (armStreamWithoutCoordinate target) (armStreamMeasure nu)) (Kernel.const _ (nu target.2))
theorem
BanditRLProof.UCB.armStreamReward_zero_condDistrib_ae_eq_nu
Compiled
The initial arm-stream reward conditional law is the selected arm law.
theorem armStreamReward_zero_condDistrib_ae_eq_nu {K : Nat} [NeZero K] (hK : 0 < K) (c : Real) (sigma2 : NNReal) (nu : Kernel (Fin K) Real) [IsMarkovKernel nu] : Filter.EventuallyEq (ae ((armStreamMeasure nu).map (fun stream : ArmRewardStream K => armStreamAction hK (c * (sigma2 : Real)) stream 0))) (condDistrib (fun stream : ArmRewardStream K => armStreamReward hK (c * (sigma2 : Real)) stream 0) (fun stream : ArmRewardStream K => armStreamAction hK (c * (sigma2 : Real)) stream 0) (armStreamMeasure nu)) nu
theorem
BanditRLProof.UCB.canonicalArmStreamHistoryEnvironment_initialFeedback_ae_eq_nu
Compiled
The packaged canonical initial-feedback kernel is the stationary selected law.
theorem canonicalArmStreamHistoryEnvironment_initialFeedback_ae_eq_nu {K : Nat} [NeZero K] (hK : 0 < K) (c : Real) (sigma2 : NNReal) (nu : Kernel (Fin K) Real) [IsMarkovKernel nu] : Filter.EventuallyEq (ae ((canonicalArmStreamHistoryAlgorithm hK c sigma2 nu).initialAction)) (canonicalArmStreamHistoryEnvironment hK c sigma2 nu).initialFeedback nu